2#include "DQM/SimObjects.h"
6#include "SimCore/Event/SimParticle.h"
12 sim_pass_ = ps.
get<std::string>(
"sim_pass");
14 sim_particles_map_passname_ =
15 ps.
get<std::string>(
"sim_particles_map_passname");
21 std::vector<std::string> creator_process_labels = {
29 "Multiple scattering",
46 "Vertex Total Energy [MeV]", 800, 0., 8000.);
48 "Vertex Momentum in x-Direction [MeV]", 50, 0., 500.);
50 "Vertex Momentum in y-Direction [MeV]", 50, 0., 500.);
52 "Vertex Momentum in z-Direction [MeV]", 400, 0., 4000.);
54 "Global Time of Creation [ns]", 50, 0., 10.);
64 "Creator Process Type", creator_process_labels);
66 "Track ID of Particle", 100, 0, 1000);
70 "Track IDs of Children", 100, 0, 1000);
133 static std::vector<framework::ProductTag> sp_maps, calo_colls, track_colls;
134 if (sp_maps.empty()) {
136 if (sp_maps.size() != 1) {
137 ldmx_log(warn) << sp_maps.size() <<
" SimParticle maps which is not one!";
140 if (calo_colls.empty()) {
141 calo_colls =
event.searchProducts(
"", sim_pass_,
".*SimCalorimeterHit.*");
144 if (track_colls.empty()) {
145 track_colls =
event.searchProducts(
"", sim_pass_,
".*SimTrackerHit.*");
150 "SimParticles", sim_particles_map_passname_)};
151 for (
auto const& [track_id, particle] : particle_map) {
152 auto const& momentum{particle.getMomentum()};
153 auto const& vertex{particle.getVertex()};
164 particle.getProcessType());
166 for (
auto const& parent : particle.getParents())
168 for (
auto const& child : particle.getDaughters())
172 if (particle.getProcessType() ==
173 ldmx::SimParticle::ProcessType::photonNuclear) {
184 for (
auto const& parent : particle.getParents())
186 for (
auto const& child : particle.getDaughters())
191 for (
auto const& pt : calo_colls) {
194 for (
auto const& hit : coll) {
195 unsigned int n_contribs{hit.getNumberOfContribs()};
197 for (
unsigned int i_contrib{0}; i_contrib < n_contribs; i_contrib++) {
205 auto pos{hit.getPosition()};
213 for (
auto const& pt : track_colls) {
216 for (
auto const& hit : coll) {
218 auto momentum{hit.getMomentum()};
224 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.
virtual void configure(framework::config::Parameters &ps)
Input python configuration parameters.
virtual void onProcessStart()
Construct histograms depending on which objects are requested.
std::string sim_particles_coll_name_
Pass Name for sim objects.
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.