ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TruthHitAnalysis Class Reference

#include <TruthHitAnalysis.h>

Inheritance diagram for TruthHitAnalysis:
Collaboration diagram for TruthHitAnalysis:

Public Member Functions

 TruthHitAnalysis (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~TruthHitAnalysis ()
 
virtual StatusCode initialize ()
 
virtual StatusCode execute ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

TH1 * m_h_n_vert
 Some variables. More...
 
TH1 * m_h_n_part
 
TH1 * m_h_n_vert_prim
 
TH1 * m_h_n_part_prim
 
TH1 * m_h_n_vert_sec
 
TH1 * m_h_n_part_sec
 
TH1 * m_h_vtx_x
 
TH1 * m_h_vtx_y
 
TH1 * m_h_vtx_z
 
TH1 * m_h_vtx_r
 
TH2 * m_h_vtx_prim_xy
 
TH2 * m_h_vtx_prim_zr
 
TH2 * m_h_vtx_sec_xy
 
TH2 * m_h_vtx_sec_zr
 
TH1 * m_h_n_generations
 
TH1 * m_h_truth_px
 
TH1 * m_h_truth_py
 
TH1 * m_h_truth_pz
 
TH1 * m_h_truth_pt
 
TH1 * m_h_truth_eta
 
TH1 * m_h_truth_phi
 
TH1 * m_h_barcode
 
TH1 * m_h_part_status
 
TH1 * m_h_part_pdgid
 
TH1 * m_h_part_pdgid_sec
 
TH1 * m_h_part_eta
 
TH1 * m_h_part_phi
 
TH1 * m_h_part_p
 
std::vector< float > * m_vtx_x
 
std::vector< float > * m_vtx_y
 
std::vector< float > * m_vtx_z
 
std::vector< float > * m_vtx_r
 
std::vector< float > * m_vtx_barcode
 
std::vector< float > * m_truth_px
 
std::vector< float > * m_truth_py
 
std::vector< float > * m_truth_pz
 
std::vector< float > * m_truth_pt
 
std::vector< float > * m_truth_eta
 
std::vector< float > * m_truth_phi
 
std::vector< float > * m_barcode
 
std::vector< float > * m_status
 
std::vector< float > * m_pdgid
 
TTree * m_tree
 
std::string m_ntupleFileName
 
std::string m_path
 
ServiceHandle< ITHistSvc > m_thistSvc
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 24 of file TruthHitAnalysis.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TruthHitAnalysis()

TruthHitAnalysis::TruthHitAnalysis ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 21 of file TruthHitAnalysis.cxx.

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)
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)
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 }

◆ ~TruthHitAnalysis()

TruthHitAnalysis::~TruthHitAnalysis ( )
inline

Definition at line 29 of file TruthHitAnalysis.h.

29 {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode TruthHitAnalysis::execute ( )
virtual

Definition at line 224 of file TruthHitAnalysis.cxx.

224  {
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 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ initialize()

StatusCode TruthHitAnalysis::initialize ( )
virtual

histograms declaration

now add branches and leaves to the tree

Definition at line 76 of file TruthHitAnalysis.cxx.

76  {
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 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_barcode

std::vector<float>* TruthHitAnalysis::m_barcode
private

Definition at line 77 of file TruthHitAnalysis.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_h_barcode

TH1* TruthHitAnalysis::m_h_barcode
private

Definition at line 58 of file TruthHitAnalysis.h.

◆ m_h_n_generations

TH1* TruthHitAnalysis::m_h_n_generations
private

Definition at line 51 of file TruthHitAnalysis.h.

◆ m_h_n_part

TH1* TruthHitAnalysis::m_h_n_part
private

Definition at line 38 of file TruthHitAnalysis.h.

◆ m_h_n_part_prim

TH1* TruthHitAnalysis::m_h_n_part_prim
private

Definition at line 40 of file TruthHitAnalysis.h.

◆ m_h_n_part_sec

TH1* TruthHitAnalysis::m_h_n_part_sec
private

Definition at line 42 of file TruthHitAnalysis.h.

◆ m_h_n_vert

TH1* TruthHitAnalysis::m_h_n_vert
private

Some variables.

Definition at line 37 of file TruthHitAnalysis.h.

◆ m_h_n_vert_prim

TH1* TruthHitAnalysis::m_h_n_vert_prim
private

Definition at line 39 of file TruthHitAnalysis.h.

◆ m_h_n_vert_sec

TH1* TruthHitAnalysis::m_h_n_vert_sec
private

Definition at line 41 of file TruthHitAnalysis.h.

◆ m_h_part_eta

TH1* TruthHitAnalysis::m_h_part_eta
private

Definition at line 62 of file TruthHitAnalysis.h.

◆ m_h_part_p

TH1* TruthHitAnalysis::m_h_part_p
private

Definition at line 64 of file TruthHitAnalysis.h.

◆ m_h_part_pdgid

TH1* TruthHitAnalysis::m_h_part_pdgid
private

Definition at line 60 of file TruthHitAnalysis.h.

◆ m_h_part_pdgid_sec

TH1* TruthHitAnalysis::m_h_part_pdgid_sec
private

Definition at line 61 of file TruthHitAnalysis.h.

◆ m_h_part_phi

TH1* TruthHitAnalysis::m_h_part_phi
private

Definition at line 63 of file TruthHitAnalysis.h.

◆ m_h_part_status

TH1* TruthHitAnalysis::m_h_part_status
private

Definition at line 59 of file TruthHitAnalysis.h.

◆ m_h_truth_eta

TH1* TruthHitAnalysis::m_h_truth_eta
private

Definition at line 56 of file TruthHitAnalysis.h.

◆ m_h_truth_phi

TH1* TruthHitAnalysis::m_h_truth_phi
private

Definition at line 57 of file TruthHitAnalysis.h.

◆ m_h_truth_pt

TH1* TruthHitAnalysis::m_h_truth_pt
private

Definition at line 55 of file TruthHitAnalysis.h.

◆ m_h_truth_px

TH1* TruthHitAnalysis::m_h_truth_px
private

Definition at line 52 of file TruthHitAnalysis.h.

◆ m_h_truth_py

TH1* TruthHitAnalysis::m_h_truth_py
private

Definition at line 53 of file TruthHitAnalysis.h.

◆ m_h_truth_pz

TH1* TruthHitAnalysis::m_h_truth_pz
private

Definition at line 54 of file TruthHitAnalysis.h.

◆ m_h_vtx_prim_xy

TH2* TruthHitAnalysis::m_h_vtx_prim_xy
private

Definition at line 47 of file TruthHitAnalysis.h.

◆ m_h_vtx_prim_zr

TH2* TruthHitAnalysis::m_h_vtx_prim_zr
private

Definition at line 48 of file TruthHitAnalysis.h.

◆ m_h_vtx_r

TH1* TruthHitAnalysis::m_h_vtx_r
private

Definition at line 46 of file TruthHitAnalysis.h.

◆ m_h_vtx_sec_xy

TH2* TruthHitAnalysis::m_h_vtx_sec_xy
private

Definition at line 49 of file TruthHitAnalysis.h.

◆ m_h_vtx_sec_zr

TH2* TruthHitAnalysis::m_h_vtx_sec_zr
private

Definition at line 50 of file TruthHitAnalysis.h.

◆ m_h_vtx_x

TH1* TruthHitAnalysis::m_h_vtx_x
private

Definition at line 43 of file TruthHitAnalysis.h.

◆ m_h_vtx_y

TH1* TruthHitAnalysis::m_h_vtx_y
private

Definition at line 44 of file TruthHitAnalysis.h.

◆ m_h_vtx_z

TH1* TruthHitAnalysis::m_h_vtx_z
private

Definition at line 45 of file TruthHitAnalysis.h.

◆ m_ntupleFileName

std::string TruthHitAnalysis::m_ntupleFileName
private

Definition at line 82 of file TruthHitAnalysis.h.

◆ m_path

std::string TruthHitAnalysis::m_path
private

Definition at line 83 of file TruthHitAnalysis.h.

◆ m_pdgid

std::vector<float>* TruthHitAnalysis::m_pdgid
private

Definition at line 79 of file TruthHitAnalysis.h.

◆ m_status

std::vector<float>* TruthHitAnalysis::m_status
private

Definition at line 78 of file TruthHitAnalysis.h.

◆ m_thistSvc

ServiceHandle<ITHistSvc> TruthHitAnalysis::m_thistSvc
private

Definition at line 84 of file TruthHitAnalysis.h.

◆ m_tree

TTree* TruthHitAnalysis::m_tree
private

Definition at line 81 of file TruthHitAnalysis.h.

◆ m_truth_eta

std::vector<float>* TruthHitAnalysis::m_truth_eta
private

Definition at line 75 of file TruthHitAnalysis.h.

◆ m_truth_phi

std::vector<float>* TruthHitAnalysis::m_truth_phi
private

Definition at line 76 of file TruthHitAnalysis.h.

◆ m_truth_pt

std::vector<float>* TruthHitAnalysis::m_truth_pt
private

Definition at line 74 of file TruthHitAnalysis.h.

◆ m_truth_px

std::vector<float>* TruthHitAnalysis::m_truth_px
private

Definition at line 71 of file TruthHitAnalysis.h.

◆ m_truth_py

std::vector<float>* TruthHitAnalysis::m_truth_py
private

Definition at line 72 of file TruthHitAnalysis.h.

◆ m_truth_pz

std::vector<float>* TruthHitAnalysis::m_truth_pz
private

Definition at line 73 of file TruthHitAnalysis.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vtx_barcode

std::vector<float>* TruthHitAnalysis::m_vtx_barcode
private

Definition at line 70 of file TruthHitAnalysis.h.

◆ m_vtx_r

std::vector<float>* TruthHitAnalysis::m_vtx_r
private

Definition at line 69 of file TruthHitAnalysis.h.

◆ m_vtx_x

std::vector<float>* TruthHitAnalysis::m_vtx_x
private

Definition at line 66 of file TruthHitAnalysis.h.

◆ m_vtx_y

std::vector<float>* TruthHitAnalysis::m_vtx_y
private

Definition at line 67 of file TruthHitAnalysis.h.

◆ m_vtx_z

std::vector<float>* TruthHitAnalysis::m_vtx_z
private

Definition at line 68 of file TruthHitAnalysis.h.


The documentation for this class was generated from the following files:
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
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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::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
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
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
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
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
TruthHitAnalysis::m_h_n_part
TH1 * m_h_n_part
Definition: TruthHitAnalysis.h:38
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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::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
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TruthHitAnalysis::m_vtx_y
std::vector< float > * m_vtx_y
Definition: TruthHitAnalysis.h:67
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
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
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
TruthHitAnalysis::m_vtx_z
std::vector< float > * m_vtx_z
Definition: TruthHitAnalysis.h:68
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
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
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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.
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
TruthHitAnalysis::m_truth_pz
std::vector< float > * m_truth_pz
Definition: TruthHitAnalysis.h:73