Process the event and make histograms or summaries.
22 {
23
25 target_scoring_plane_coll_name_, target_scoring_plane_passname_));
27 sim_particles_coll_name_, sim_particles_passname_)};
28
29 std::vector<int> primary_daughters;
30
31 double hard_thresh{9999.0};
32
33
34 for (auto const& it : particle_map) {
36 std::vector<int> parents_track_ids = p.
getParents();
42 for (auto const& parent_track_id : parents_track_ids) {
43 if (parent_track_id == 0) {
44 ROOT::Math::XYZVector momentum_vec(momentum[0], momentum[1],
45 momentum[2]);
49 momentum_vec.Theta() * (180 / 3.14159));
51 hard_thresh = (2500. / 4000.) * energy;
52 primary_daughters = daughters;
54 if (sphit.getTrackID() == it.first && sphit.getPosition()[2] < 0) {
56 }
57 }
58 }
59 }
60 }
61
62 std::vector<std::vector<int>> hardbrem_daughters;
63
64 for (auto const& it : particle_map) {
65 int trackid = it.first;
68 ROOT::Math::XYZVector momentum_vec(momentum[0], momentum[1], momentum[2]);
69 for (auto const& primary_daughter : primary_daughters) {
70 if (trackid == primary_daughter) {
74 }
81 momentum_vec.Theta() * (180 / 3.14159));
84 }
85 }
86 }
87 }
88
89 for (auto const& it : particle_map) {
90 int trackid = it.first;
93 ROOT::Math::XYZVector momentum_vec(momentum[0], momentum[1], momentum[2]);
94 for (const std::vector<int>& daughter_track_id : hardbrem_daughters) {
95 for (const int& daughter_id : daughter_track_id) {
96 if (trackid == daughter_id) {
102 momentum_vec.Theta() * (180 / 3.14159));
104 std::sqrt(momentum_vec.Perp2()));
105 }
106 }
107 }
108 }
109
110 return;
111}
HistogramPool histograms_
helper object for making and filling histograms
const std::vector< ContentType > & getCollection(const std::string &collectionName, const std::string &passName) const
Get a collection (std::vector) of objects from the event bus.
void fill(const std::string &name, const T &val)
Fill a 1D histogram.
Class representing a simulated particle.
double getEnergy() const
Get the energy of this particle [MeV].
std::vector< int > getParents() const
Get a vector containing the track IDs of the parent particles.
std::vector< double > getVertex() const
Get a vector containing the vertex of this particle in mm.
std::vector< int > getDaughters() const
Get a vector containing the track IDs of all daughter particles.
int getPdgID() const
Get the PDG ID of this particle.
std::vector< double > getEndPoint() const
Get the end_point of this particle where it was destroyed or left the world volume [mm].
std::vector< double > getMomentum() const
Get a vector containing the momentum of this particle [MeV].
Represents a simulated tracker hit in the simulation.