ATLAS Offline Software
TruthHitAnalysis.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TruthHitAnalysis.h"
6 
7 // Section of includes for Truth tests
8 #include "AtlasHepMC/GenEvent.h"
11 
12 #include "TH1.h"
13 #include "TTree.h"
14 #include "TString.h"
15 
16 #include <algorithm>
17 #include <math.h>
18 #include <functional>
19 #include <iostream>
20 
21 TruthHitAnalysis::TruthHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
22  : AthAlgorithm(name, pSvcLocator)
23  , m_h_n_vert(0)
24  , m_h_n_part(0)
25  , m_h_n_vert_prim(0)
26  , m_h_n_part_prim(0)
27  , m_h_n_vert_sec(0)
28  , m_h_n_part_sec(0)
29  , m_h_vtx_x(0)
30  , m_h_vtx_y(0)
31  , m_h_vtx_z(0)
32  , m_h_vtx_r(0)
33  , m_h_vtx_prim_xy(0)
34  , m_h_vtx_prim_zr(0)
35  , m_h_vtx_sec_xy(0)
36  , m_h_vtx_sec_zr(0)
37  , m_h_n_generations(0)
38  , m_h_truth_px(0)
39  , m_h_truth_py(0)
40  , m_h_truth_pz(0)
41  , m_h_truth_pt(0)
42  , m_h_truth_eta(0)
43  , m_h_truth_phi(0)
44  , m_h_barcode(0)
45  , m_h_part_status(0)
46  , m_h_part_pdgid(0)
47  , m_h_part_pdgid_sec(0)
48  , m_h_part_eta(0)
49  , m_h_part_phi(0)
50  , m_h_part_p(0)
51  , m_vtx_x(0)
52  , m_vtx_y(0)
53  , m_vtx_z(0)
54  , m_vtx_r(0)
55  , m_vtx_barcode(0)
56  , m_truth_px(0)
57  , m_truth_py(0)
58  , m_truth_pz(0)
59  , m_truth_pt(0)
60  , m_truth_eta(0)
61  , m_truth_phi(0)
62  , m_barcode(0)
63  , m_status(0)
64  , m_pdgid(0)
65 
66  , m_tree(0)
67  , m_ntupleFileName("/TruthHitAnalysis/")
68  , m_path("/TruthHitAnalysis/")
69  , m_thistSvc("THistSvc", name)
70 {
71  declareProperty("NtupleFileName", m_ntupleFileName);
72  declareProperty("HistPath", m_path);
73 }
74 
75 
77  ATH_MSG_DEBUG( "Initializing TruthHitAnalysis" );
78 
79  // Grab the Ntuple and histogramming service for the tree
80  CHECK(m_thistSvc.retrieve());
81 
83  m_h_n_vert = new TH1D("h_n_vert","n_vert", 100,200, 1500);
84  m_h_n_vert->StatOverflows();
85  CHECK(m_thistSvc->regHist(m_path + m_h_n_vert->GetName(), m_h_n_vert));
86 
87  m_h_n_part = new TH1D("h_n_part","n_part", 100,1000, 10000);
88  m_h_n_part->StatOverflows();
89  CHECK(m_thistSvc->regHist(m_path + m_h_n_part->GetName(), m_h_n_part));
90 
91  m_h_n_vert_prim = new TH1D("h_n_vert_prim","n_vert prim", 100,0, 1000);
92  m_h_n_vert_prim->StatOverflows();
93  CHECK(m_thistSvc->regHist(m_path + m_h_n_vert_prim->GetName(), m_h_n_vert_prim));
94 
95  m_h_n_part_prim = new TH1D("h_n_part_prim","n_part prim", 100,200, 1500);
96  m_h_n_part_prim->StatOverflows();
97  CHECK(m_thistSvc->regHist(m_path + m_h_n_part_prim->GetName(), m_h_n_part_prim));
98 
99  m_h_n_vert_sec = new TH1D("h_n_vert_sec","n_vert sec", 100,0, 1000);
100  m_h_n_vert_sec->StatOverflows();
101  CHECK(m_thistSvc->regHist(m_path + m_h_n_vert_sec->GetName(), m_h_n_vert_sec));
102 
103  m_h_n_part_sec = new TH1D("h_n_part_sec","n_part sec", 100,0, 5000);
104  m_h_n_part_sec->StatOverflows();
105  CHECK(m_thistSvc->regHist(m_path + m_h_n_part_sec->GetName(), m_h_n_part_sec));
106 
107  m_h_vtx_x = new TH1D("h_vtx_x","vtx_x", 100,-1300, 1300);
108  m_h_vtx_x->StatOverflows();
109  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_x->GetName(), m_h_vtx_x));
110 
111  m_h_vtx_y = new TH1D("h_vtx_y","vtx_y", 100,-1200, 1200);
112  m_h_vtx_y->StatOverflows();
113  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_y->GetName(), m_h_vtx_y));
114 
115  m_h_vtx_z = new TH1D("h_vtx_z","vtx_z", 100,-5000, 5000);
116  m_h_vtx_z->StatOverflows();
117  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_z->GetName(), m_h_vtx_z));
118 
119  m_h_vtx_r = new TH1D("h_vtx_r","vtx_r", 100,0, 1160);
120  m_h_vtx_r->StatOverflows();
121  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_r->GetName(), m_h_vtx_r));
122 
123  m_h_vtx_prim_xy = new TH2D("h_vtx_prim_xy","vtx_prim_xy", 100,-100, 100, 100,-100, 100);
124  m_h_vtx_prim_xy->StatOverflows();
125  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_prim_xy->GetName(), m_h_vtx_prim_xy));
126 
127  m_h_vtx_prim_zr = new TH2D("h_vtx_prim_zr","vtx_prim_zr", 100,-1500, 1500, 100,0, 150);
128  m_h_vtx_prim_zr->StatOverflows();
129  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_prim_zr->GetName(), m_h_vtx_prim_zr));
130 
131  m_h_vtx_sec_xy = new TH2D("h_vtx_sec_xy","vtx_sec_xy", 100,-1200, 1200, 100,-1200, 1200);
132  m_h_vtx_sec_xy->StatOverflows();
133  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_sec_xy->GetName(), m_h_vtx_sec_xy));
134 
135  m_h_vtx_sec_zr = new TH2D("h_vtx_sec_zr","vtx_sec_zr", 100,-6000, 6000, 100,0, 1160);
136  m_h_vtx_sec_zr->StatOverflows();
137  CHECK(m_thistSvc->regHist(m_path + m_h_vtx_sec_zr->GetName(), m_h_vtx_sec_zr));
138 
139  m_h_n_generations = new TH1D("h_n_generations","h_generations", 100,0, 25);
140  m_h_n_generations->StatOverflows();
141  CHECK(m_thistSvc->regHist(m_path + m_h_n_generations->GetName(), m_h_n_generations));
142 
143  m_h_truth_px = new TH1D("h_truth_px","truth_px", 100,0, 4000);
144  m_h_truth_px->StatOverflows();
145  CHECK(m_thistSvc->regHist(m_path + m_h_truth_px->GetName(), m_h_truth_px));
146 
147  m_h_truth_py = new TH1D("h_truth_py","truth_py", 100,0, 4000);
148  m_h_truth_py->StatOverflows();
149  CHECK(m_thistSvc->regHist(m_path + m_h_truth_py->GetName(), m_h_truth_py));
150 
151  m_h_truth_pz = new TH1D("h_truth_pz","truth_pz", 100,0, 4000);
152  m_h_truth_pz->StatOverflows();
153  CHECK(m_thistSvc->regHist(m_path + m_h_truth_pz->GetName(), m_h_truth_pz));
154 
155  m_h_truth_pt = new TH1D("h_truth_pt","truth_pt", 100,0, 4000);
156  m_h_truth_pt->StatOverflows();
157  CHECK(m_thistSvc->regHist(m_path + m_h_truth_pt->GetName(), m_h_truth_pt));
158 
159  m_h_truth_eta = new TH1D("h_truth_eta","truth_eta", 50,-10, 10);
160  m_h_truth_eta->StatOverflows();
161  CHECK(m_thistSvc->regHist(m_path + m_h_truth_eta->GetName(), m_h_truth_eta));
162 
163  m_h_truth_phi = new TH1D("h_truth_phi","truth_phi", 25,-3.1416, 3.1416);
164  m_h_truth_phi->StatOverflows();
165  CHECK(m_thistSvc->regHist(m_path + m_h_truth_phi->GetName(), m_h_truth_phi));
166 
167  m_h_barcode = new TH1D("h_truth_barcode","truth_barcode", 100,0, 300000);
168  m_h_barcode->StatOverflows();
169  CHECK(m_thistSvc->regHist(m_path + m_h_barcode->GetName(), m_h_barcode));
170 
171  m_h_part_status = new TH1D("h_part_status","part status", 100,0,50);
172  m_h_part_status->StatOverflows();
173  CHECK(m_thistSvc->regHist(m_path + m_h_part_status->GetName(), m_h_part_status));
174 
175  m_h_part_pdgid = new TH1D("h_part_pdgid","part pdgid", 100,-5000, 5000);
176  m_h_part_pdgid->StatOverflows();
177  CHECK(m_thistSvc->regHist(m_path + m_h_part_pdgid->GetName(), m_h_part_pdgid));
178 
179  m_h_part_pdgid_sec = new TH1D("h_part_pdgid_sec","part pdgid sec", 100,-5000, 5000);
180  m_h_part_pdgid_sec->StatOverflows();
182 
183  m_h_part_eta = new TH1D("h_part_eta","part eta", 100,-10, 10);
184  m_h_part_eta->StatOverflows();
185  CHECK(m_thistSvc->regHist(m_path + m_h_part_eta->GetName(), m_h_part_eta));
186 
187  m_h_part_phi = new TH1D("h_part_phi","part phi", 100,-3.2, 3.2);
188  m_h_part_phi->StatOverflows();
189  CHECK(m_thistSvc->regHist(m_path + m_h_part_phi->GetName(), m_h_part_phi));
190 
191  m_h_part_p = new TH1D("h_part_p","part p", 100,0, 5000);
192  m_h_part_p->StatOverflows();
193  CHECK(m_thistSvc->regHist(m_path + m_h_part_p->GetName(), m_h_part_p));
194 
196  m_tree = new TTree("Truth", "Truth");
197  std::string fullNtupleName = "/" + m_ntupleFileName + "/";
198  CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
199 
200  if (m_tree) {
201  m_tree->Branch("vtx_x", &m_vtx_x);
202  m_tree->Branch("vtx_y", &m_vtx_y);
203  m_tree->Branch("vtx_z", &m_vtx_z);
204  m_tree->Branch("vtx_r", &m_vtx_r);
205  m_tree->Branch("vtx_barcode", &m_vtx_barcode);
206  m_tree->Branch("truth_px", &m_truth_px);
207  m_tree->Branch("truth_py", &m_truth_py);
208  m_tree->Branch("truth_pz", &m_truth_pz);
209  m_tree->Branch("truth_pt", &m_truth_pt);
210  m_tree->Branch("truth_eta", &m_truth_eta);
211  m_tree->Branch("truth_phi", &m_truth_phi);
212  m_tree->Branch("barcode", &m_barcode);
213  m_tree->Branch("status", &m_status);
214  m_tree->Branch("pdg_id", &m_pdgid);
215  }
216  else {
217  ATH_MSG_ERROR("No tree found!");
218  }
219 
220  return StatusCode::SUCCESS;
221 }
222 
223 
225  ATH_MSG_DEBUG( "In TruthHitAnalysis::execute()" );
226 
227  m_vtx_x->clear();
228  m_vtx_y->clear();
229  m_vtx_z->clear();
230  m_vtx_r->clear();
231  m_vtx_barcode->clear();
232  m_truth_px->clear();
233  m_truth_py->clear();
234  m_truth_pz->clear();
235  m_truth_pt->clear();
236  m_truth_eta->clear();
237  m_truth_phi->clear();
238  m_barcode->clear();
239  m_status->clear();
240  m_pdgid->clear();
241 
242  const McEventCollection* mcCollection;
243  if (evtStore()->retrieve(mcCollection,"TruthEvent") == StatusCode::SUCCESS) {
244  McEventCollection::const_iterator currentGenEventIter = mcCollection->begin();
245  if (currentGenEventIter != mcCollection->end()) {
246  int nvtx = 0;
247  int nvtx_sec=0;
248 #ifdef HEPMC3
249  const auto &barcodes = (*currentGenEventIter)->attribute<HepMC::GenEventBarcodes> ("barcodes");
250  std::map<int,int> id_to_barcode_map;
251  if (barcodes) id_to_barcode_map = barcodes->id_to_barcode_map();
252  for (const auto& vtx: (*currentGenEventIter)->vertices()) {
253  int bcode = id_to_barcode_map[vtx->id()];
254 #else
255  for (HepMC::GenEvent::vertex_const_iterator vtxit=(*currentGenEventIter)->vertices_begin(); vtxit!=(*currentGenEventIter)->vertices_end(); ++vtxit) {
256  auto vtx=*vtxit;
257  int bcode = HepMC::barcode(*vtx);
258 #endif
259  double x = vtx->position().x();
260  double y = vtx->position().y();
261  double z = vtx->position().z();
262  double r = std::sqrt(x*x+y*y);
263  m_h_vtx_x->Fill(x);
264  m_h_vtx_y->Fill(y);
265  m_h_vtx_r->Fill(r);
266  m_h_vtx_z->Fill(z);
267 
268  m_vtx_x->push_back(x);
269  m_vtx_y->push_back(y);
270  m_vtx_r->push_back(r);
271  m_vtx_z->push_back(z);
272  m_vtx_barcode->push_back(bcode);
273 
274  if (!HepMC::is_simulation_vertex(vtx)) {
275  m_h_vtx_prim_xy->Fill(x,y);
276  m_h_vtx_prim_zr->Fill(z,r);
277  ++nvtx;
278  }
279  else {
280  m_h_vtx_sec_xy->Fill(x,y);
281  m_h_vtx_sec_zr->Fill(z,r);
282  ++nvtx_sec;
283  }
284  } //End iteration over vertices
285 
286  m_h_n_vert->Fill(nvtx+nvtx_sec);
287  m_h_n_vert_prim->Fill(nvtx);
288  m_h_n_vert_sec->Fill(nvtx_sec);
289 
290  int npart_prim=0;
291  int npart_sec=0;
292 
293  for (auto currentGenParticle: *(*currentGenEventIter)) {
294  const HepMC::FourVector mom = currentGenParticle->momentum();
295 #ifdef HEPMC3
296  int currentGenParticlebarcode = id_to_barcode_map[currentGenParticle->id()];
297 #else
298  int currentGenParticlebarcode=HepMC::barcode(currentGenParticle);
299 #endif
300  m_h_truth_px->Fill(mom.x());
301  m_h_truth_py->Fill(mom.y());
302  m_h_truth_pz->Fill(mom.z());
303  m_h_truth_pt->Fill(mom.perp());
304  m_h_truth_eta->Fill(mom.eta());
305  m_h_truth_phi->Fill(mom.phi());
306  m_h_barcode->Fill(currentGenParticlebarcode);
307  m_h_part_status->Fill(currentGenParticle->status());
308  m_truth_px->push_back(mom.x());
309  m_truth_py->push_back(mom.y());
310  m_truth_pz->push_back(mom.z());
311  m_truth_pt->push_back(mom.perp());
312  m_truth_eta->push_back(mom.eta());
313  m_truth_phi->push_back(mom.phi());
314  m_barcode->push_back(currentGenParticlebarcode);
315  m_status->push_back(currentGenParticle->status());
316 
317  int pdg = currentGenParticle->pdg_id();
318  m_pdgid->push_back(pdg);
319 
320  if (!HepMC::is_simulation_particle(currentGenParticle)) {
321  m_h_part_pdgid->Fill(pdg);
322  m_h_part_p->Fill(std::sqrt(mom.x()*mom.x()+mom.y()*mom.y()+mom.z()*mom.z()));
323  m_h_part_eta->Fill(mom.eta());
324  m_h_part_phi->Fill(mom.phi());
325  ++npart_prim;
326  m_h_n_generations->Fill(1);
327 /* The conditions don't make any sense.
328  if (currentGenParticlebarcode < HepMC::PHOTOSMIN) {
329  m_h_n_generations->Fill(0);
330  }
331  else {
332  m_h_n_generations->Fill(1);
333  }
334 */
335  } //End simulation particle
336  else {
337  m_h_part_pdgid_sec->Fill(pdg);
338  ++npart_sec;
339  const int gen = HepMC::generations(currentGenParticle) + 2;
340  m_h_n_generations->Fill(gen);
341  }
342  } // End iteration over particles
343 
344  m_h_n_part_prim->Fill(npart_prim);
345  m_h_n_part_sec->Fill(npart_sec);
346  m_h_n_part->Fill(npart_prim+npart_sec);
347  } // End mcCollection
348  } // End statuscode success upon retrieval of events
349 
350  if (m_tree) m_tree->Fill();
351 
352  return StatusCode::SUCCESS;
353 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TruthHitAnalysis::m_h_truth_eta
TH1 * m_h_truth_eta
Definition: TruthHitAnalysis.h:56
beamspotman.r
def r
Definition: beamspotman.py:676
TruthHitAnalysis::m_h_n_vert_prim
TH1 * m_h_n_vert_prim
Definition: TruthHitAnalysis.h:39
TruthHitAnalysis::m_h_vtx_prim_zr
TH2 * m_h_vtx_prim_zr
Definition: TruthHitAnalysis.h:48
TruthHitAnalysis::m_h_truth_py
TH1 * m_h_truth_py
Definition: TruthHitAnalysis.h:53
TruthHitAnalysis::m_h_truth_pz
TH1 * m_h_truth_pz
Definition: TruthHitAnalysis.h:54
TruthHitAnalysis::m_pdgid
std::vector< float > * m_pdgid
Definition: TruthHitAnalysis.h:79
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
GenEvent.h
TruthHitAnalysis::m_ntupleFileName
std::string m_ntupleFileName
Definition: TruthHitAnalysis.h:82
TruthHitAnalysis::m_h_part_status
TH1 * m_h_part_status
Definition: TruthHitAnalysis.h:59
TruthHitAnalysis::m_h_part_p
TH1 * m_h_part_p
Definition: TruthHitAnalysis.h:64
TruthHitAnalysis::m_h_barcode
TH1 * m_h_barcode
Definition: TruthHitAnalysis.h:58
TruthHitAnalysis::m_h_truth_pt
TH1 * m_h_truth_pt
Definition: TruthHitAnalysis.h:55
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TruthHitAnalysis::m_truth_py
std::vector< float > * m_truth_py
Definition: TruthHitAnalysis.h:72
TruthHitAnalysis::m_h_truth_px
TH1 * m_h_truth_px
Definition: TruthHitAnalysis.h:52
TruthHitAnalysis::m_barcode
std::vector< float > * m_barcode
Definition: TruthHitAnalysis.h:77
TruthHitAnalysis::m_h_part_pdgid
TH1 * m_h_part_pdgid
Definition: TruthHitAnalysis.h:60
TruthHitAnalysis::m_tree
TTree * m_tree
Definition: TruthHitAnalysis.h:81
TruthHitAnalysis::m_h_vtx_sec_zr
TH2 * m_h_vtx_sec_zr
Definition: TruthHitAnalysis.h:50
TruthHitAnalysis::m_h_vtx_prim_xy
TH2 * m_h_vtx_prim_xy
Definition: TruthHitAnalysis.h:47
TruthHitAnalysis::m_h_n_part_prim
TH1 * m_h_n_part_prim
Definition: TruthHitAnalysis.h:40
TruthHitAnalysis::m_h_n_vert
TH1 * m_h_n_vert
Some variables.
Definition: TruthHitAnalysis.h:37
TruthHitAnalysis::m_h_n_part_sec
TH1 * m_h_n_part_sec
Definition: TruthHitAnalysis.h:42
TruthHitAnalysis::m_truth_phi
std::vector< float > * m_truth_phi
Definition: TruthHitAnalysis.h:76
x
#define x
TruthHitAnalysis::m_h_vtx_x
TH1 * m_h_vtx_x
Definition: TruthHitAnalysis.h:43
TruthHitAnalysis::TruthHitAnalysis
TruthHitAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TruthHitAnalysis.cxx:21
TruthHitAnalysis::m_h_vtx_r
TH1 * m_h_vtx_r
Definition: TruthHitAnalysis.h:46
TruthHitAnalysis::m_vtx_r
std::vector< float > * m_vtx_r
Definition: TruthHitAnalysis.h:69
master.gen
gen
Definition: master.py:32
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
TruthHitAnalysis.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TruthHitAnalysis::m_vtx_barcode
std::vector< float > * m_vtx_barcode
Definition: TruthHitAnalysis.h:70
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:355
McEventCollection.h
python.Dumpers.barcodes
def barcodes(beg, end, sz)
Definition: Dumpers.py:2800
z
#define z
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TruthHitAnalysis::m_h_part_pdgid_sec
TH1 * m_h_part_pdgid_sec
Definition: TruthHitAnalysis.h:61
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
m_path
std::string m_path
the path being used
Definition: OutputStreamData.cxx:88
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
HepMC::is_simulation_vertex
bool is_simulation_vertex(const T &v)
Method to establish if the vertex was created during simulation (TODO migrate to be based on status).
Definition: MagicNumbers.h:361
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
TruthHitAnalysis::m_h_n_vert_sec
TH1 * m_h_n_vert_sec
Definition: TruthHitAnalysis.h:41
AthAlgorithm
Definition: AthAlgorithm.h:47
TruthHitAnalysis::initialize
virtual StatusCode initialize()
Definition: TruthHitAnalysis.cxx:76
TruthHitAnalysis::m_h_n_part
TH1 * m_h_n_part
Definition: TruthHitAnalysis.h:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MagicNumbers.h
TruthHitAnalysis::m_h_vtx_z
TH1 * m_h_vtx_z
Definition: TruthHitAnalysis.h:45
TruthHitAnalysis::m_status
std::vector< float > * m_status
Definition: TruthHitAnalysis.h:78
TruthHitAnalysis::execute
virtual StatusCode execute()
Definition: TruthHitAnalysis.cxx:224
TruthHitAnalysis::m_truth_px
std::vector< float > * m_truth_px
Definition: TruthHitAnalysis.h:71
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
TruthHitAnalysis::m_h_vtx_y
TH1 * m_h_vtx_y
Definition: TruthHitAnalysis.h:44
TruthHitAnalysis::m_h_vtx_sec_xy
TH2 * m_h_vtx_sec_xy
Definition: TruthHitAnalysis.h:49
y
#define y
TruthHitAnalysis::m_vtx_y
std::vector< float > * m_vtx_y
Definition: TruthHitAnalysis.h:67
TruthHitAnalysis::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: TruthHitAnalysis.h:84
TruthHitAnalysis::m_h_truth_phi
TH1 * m_h_truth_phi
Definition: TruthHitAnalysis.h:57
TruthHitAnalysis::m_vtx_z
std::vector< float > * m_vtx_z
Definition: TruthHitAnalysis.h:68
TruthHitAnalysis::m_h_part_eta
TH1 * m_h_part_eta
Definition: TruthHitAnalysis.h:62
HepMC::generations
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
Definition: MagicNumbers.h:358
TruthHitAnalysis::m_path
std::string m_path
Definition: TruthHitAnalysis.h:83
TruthHitAnalysis::m_h_n_generations
TH1 * m_h_n_generations
Definition: TruthHitAnalysis.h:51
TruthHitAnalysis::m_h_part_phi
TH1 * m_h_part_phi
Definition: TruthHitAnalysis.h:63
TruthHitAnalysis::m_truth_pt
std::vector< float > * m_truth_pt
Definition: TruthHitAnalysis.h:74
TruthHitAnalysis::m_truth_eta
std::vector< float > * m_truth_eta
Definition: TruthHitAnalysis.h:75
TruthHitAnalysis::m_vtx_x
std::vector< float > * m_vtx_x
Definition: TruthHitAnalysis.h:66
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TruthHitAnalysis::m_truth_pz
std::vector< float > * m_truth_pz
Definition: TruthHitAnalysis.h:73