2#include "DQM/SimObjects.h"
6#include "SimCore/Event/SimParticle.h"
13 sim_particles_map_passname_ =
14 ps.
get<std::string>(
"sim_particles_map_passname");
20 std::vector<std::string> creator_process_labels = {
28 "Multiple scattering",
62 creator_process_labels);
130 static std::vector<framework::ProductTag> sp_maps, calo_colls, track_colls;
131 if (sp_maps.empty()) {
132 sp_maps =
event.searchProducts(
"SimParticles",
"",
"");
133 if (sp_maps.size() != 1) {
134 ldmx_log(warn) << sp_maps.size() <<
" SimParticle maps which is not one!";
137 if (calo_colls.empty()) {
138 calo_colls =
event.searchProducts(
"",
sim_pass_,
".*SimCalorimeterHit.*");
141 if (track_colls.empty()) {
142 track_colls =
event.searchProducts(
"",
sim_pass_,
".*SimTrackerHit.*");
147 "SimParticles", sim_particles_map_passname_)};
148 for (
auto const& [track_id, particle] : particle_map) {
149 auto const& momentum{particle.getMomentum()};
150 auto const& vertex{particle.getVertex()};
162 for (
auto const& parent : particle.getParents())
164 for (
auto const& child : particle.getDaughters())
168 if (particle.getProcessType() ==
169 ldmx::SimParticle::ProcessType::photonNuclear) {
180 for (
auto const& parent : particle.getParents())
182 for (
auto const& child : particle.getDaughters())
187 for (
auto const& pt : calo_colls) {
190 for (
auto const& hit : coll) {
191 unsigned int n_contribs{hit.getNumberOfContribs()};
193 for (
unsigned int i_contrib{0}; i_contrib < n_contribs; i_contrib++) {
201 auto pos{hit.getPosition()};
209 for (
auto const& pt : track_colls) {
212 for (
auto const& hit : coll) {
214 auto momentum{hit.getMomentum()};
220 auto pos{hit.getPosition()};
#define DECLARE_ANALYZER(CLASS)
Macro which allows the framework to construct an analyzer given its name during configuration.
Class defining the identity of a data product in the event.
Class which stores simulated calorimeter hit information.
Class which encapsulates information from a hit in a simulated tracking detector.
Generate histograms to check simulation output.
void createCalorimeterHists(const std::string &coll_name)
new calorimeter histograms
virtual void analyze(const framework::Event &event)
Fills histograms.
std::string sim_pass_
Pass Name for sim objects.
virtual void configure(framework::config::Parameters &ps)
Input python configuration parameters.
virtual void onProcessStart()
Construct histograms depending on which objects are requested.
void createTrackerHists(const std::string &coll_name)
new tracker histograms
HistogramPool histograms_
helper object for making and filling histograms
TDirectory * getHistoDirectory()
Access/create a directory in the histogram file for this event processor to create histograms and ana...
Implements an event buffer system for storing event data.
void create(const config::Parameters &p)
Create a histogram from the input configuration parameters.
void fill(const std::string &name, const T &val)
Fill a 1D histogram.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Stores simulated calorimeter hit information.
Class representing a simulated particle.
Represents a simulated tracker hit in the simulation.
Information about a contribution to the hit in the associated cell.