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

Filtering algorithm to sanity check HepMC event features. More...

#include <TestHepMC.h>

Inheritance diagram for TestHepMC:
Collaboration diagram for TestHepMC:

Public Member Functions

 TestHepMC (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
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

int m_maxloops
 
int m_pdg
 
double m_cm_energy
 
double m_cme_diff
 
double m_energy_diff
 
double m_max_energy_diff
 
bool m_dumpEvent
 
bool m_allowMissingXSec
 
double m_max_dist_trans
 
double m_max_dist
 
double m_min_tau
 
double m_nonG4_energy_threshold
 
double m_eff_warn_threshold
 
double m_eff_fail_threshold
 
double m_tau_eff_threshold
 
double m_accur_margin
 
bool m_doHist
 
bool m_beamEnergyTest
 
bool m_vtxNaNTest
 
bool m_vtxDisplacedTest
 
bool m_momNaNTest
 
bool m_lifeTimeTest
 
bool m_energyG4Test
 
bool m_energyImbalanceTest
 
bool m_momImbalanceTest
 
bool m_negativeEnergyTest
 
bool m_tachyonsTest
 
bool m_unstableNoVtxTest
 
bool m_pi0NoVtxTest
 
bool m_undisplacedDaughtersTest
 
bool m_unknownPDGIDTest
 
std::vector< int > m_vertexStatuses
 
int m_nPass
 
int m_nFail
 
int m_noXSECset
 
int m_TotalTaus
 
int m_FastDecayedTau
 
int m_invalidBeamParticlesCheckRate
 
int m_beamParticleswithStatusNotFourCheckRate
 
int m_beamEnergyCheckRate
 
int m_vtxNANandINFCheckRate
 
int m_vtxDisplacedstatuscode12CheckRate
 
int m_vtxDisplacedstatuscodenot12CheckRate
 
int m_vtxDisplacedMoreThan_1m_CheckRate
 
int m_partMomentumNANandINFCheckRate
 
int m_undecayedPi0statuscode12CheckRate
 
int m_unstableNoEndVtxCheckRate
 
int m_negativeEnergyTachyonicCheckRate
 
int m_decayCheckRate
 
int m_undisplacedLLHdaughtersCheckRate
 
int m_nonZeroPhotonMassCheckRate
 
int m_energyBalanceCheckRate
 
int m_momentumBalanceCheckRate
 
int m_negativeEnergyCheckRate
 
int m_tachyonCheckRate
 
int m_stableUnstableNoParentCheckRate
 
int m_unstablePartNoDecayVtxCheckRate
 
int m_undecayedPi0CheckRate
 
int m_Status1ShortLifetime
 
int m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate
 
int m_nonG4_energyCheckRate
 
int m_unknownPDGIDCheckRate
 
std::string m_paramFile
 
std::string m_unknownPDGIDFile
 
std::vector< int > m_G4pdgID_tab
 
std::vector< int > m_SusyPdgID_tab
 
std::vector< int > m_uknownPDGID_tab
 
ServiceHandle< ITHistSvc > m_thistSvc
 
TH1F * m_h_energy_dispVtxCheck
 
TH1F * m_h_energy_dispVtxCheck_lt10
 
TH1F * m_h_pdgid_dispVtxCheck
 
TH1F * m_h_status_dispVtxCheck
 
TH1F * m_h_px_dispVtxCheck
 
TH1F * m_h_py_dispVtxCheck
 
TH1F * m_h_pz_dispVtxCheck
 
TH1F * m_h_vx_dispVtxCheck
 
TH1F * m_h_vy_dispVtxCheck
 
TH1F * m_h_vz_dispVtxCheck
 
TH1F * m_h_vxprod_dispVtxCheck
 
TH1F * m_h_vyprod_dispVtxCheck
 
TH1F * m_h_vzprod_dispVtxCheck
 
TH1F * m_h_vtxend_dispVtxCheck
 
TH1F * m_h_vtxprod_dispVtxCheck
 
TH1F * m_h_photon_mass
 
TH1F * m_h_photon_energy
 
TH1F * m_h_photon_e2_p2_e2
 
TH1F * m_h_energyImbalance
 
TH1F * m_h_momentumImbalance_px
 
TH1F * m_h_momentumImbalance_py
 
TH1F * m_h_momentumImbalance_pz
 
TH1F * m_h_beamparticle1_Energy
 
TH1F * m_h_beamparticle2_Energy
 
TH1F * m_h_cmEnergyDiff
 
MC::Loops< HepMC::GenEvent, HepMC::ConstGenParticlePtr, HepMC::ConstGenVertexPtrm_looper
 member to detect loops More...
 
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
 

Utility event-mangling functions

Todo:
Replace with HepMC units when available
ServiceHandle< IPartPropSvc > m_ppSvc {this, "PartPropSvc", "PartPropSvc"}
 Handle on the particle property service. More...
 
SG::ReadHandleKey< McEventCollectionm_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
 Const handle to the MC event collection. More...
 
void GeVToMeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1000. More...
 
void MeVToGeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1/1000. More...
 
void cmTomm (HepMC::GenEvent *evt)
 Scale event lengths by x 10. More...
 
void mmTocm (HepMC::GenEvent *evt)
 Scale event lengths by x 1/10. More...
 

Detailed Description

Filtering algorithm to sanity check HepMC event features.

The TestHepMC algorithm is used in MC production to ensure that only events with valid final state particles, properly balanced initial-final state momentum and energy, etc. are accepted for further processing. A too-high failure rate results in a warning or algorithm failure to flag up to production that there is a fundamental problem and that the sanity check may be unphysically biasing the resulting events.

Todo:
Inherit from GenFilter? It is a filter

Definition at line 33 of file TestHepMC.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

◆ TestHepMC()

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

Definition at line 16 of file TestHepMC.cxx.

17  : GenBase(name, pSvcLocator),
18  m_thistSvc("THistSvc", name)
19 {
20  declareProperty("MaxLoops", m_maxloops = -1); //< Maximal number of particles allowed in the loops. -1 == any number
21  declareProperty("PdgToSearch", m_pdg = 15); //< @todo This test is a bit weirdly specific to taus
22  declareProperty("CmEnergy", m_cm_energy = -1); // in MeV, -1 = get from event
23  declareProperty("MaxTransVtxDisp", m_max_dist_trans = 100.); // mm
24  declareProperty("MaxVtxDisp", m_max_dist = 1000.); // mm;
25  declareProperty("EnergyDifference", m_energy_diff = 1000.); // MeV
26  declareProperty("EnergyDifferenceError", m_max_energy_diff = 100000.); // MeV
27  declareProperty("CmeDifference", m_cme_diff = 1.); // MeV
28  declareProperty("DumpEvent", m_dumpEvent = false);
29  declareProperty("MinTau", m_min_tau = 1/300.); // ns; corresponds to 1mm
30  declareProperty("MaxNonG4Energy", m_nonG4_energy_threshold = 100.); //MeV
31  declareProperty("TauEffThreshold", m_tau_eff_threshold = 0.1); // fraction
32  declareProperty("EffWarnThreshold", m_eff_warn_threshold=0.99); // fraction
33  declareProperty("EffFailThreshold", m_eff_fail_threshold=0.98); // fraction
34  declareProperty("AccuracyMargin", m_accur_margin=0.); //MeV
35 
36  declareProperty("G4ExtraWhiteFile", m_paramFile = "g4_extrawhite.param" );
37  // a list of allowed pdgid which however might not follow the official rules
38  declareProperty("UnknownPDGIDFile", m_unknownPDGIDFile = "pdgid_extras.txt" );
39 
40  declareProperty("NoDecayVertexStatuses", m_vertexStatuses );
41 
42  declareProperty("BeamEnergyTest", m_beamEnergyTest = true); //switching off inactive
43  declareProperty("VtxNaNTest", m_vtxNaNTest = true);
44  declareProperty("VtxDisplacedTest", m_vtxDisplacedTest = true);
45  declareProperty("MomNaNTest", m_momNaNTest = true);
46  declareProperty("LifeTimeTest", m_lifeTimeTest = true);
47  declareProperty("EnergyG4Test", m_energyG4Test = true);
48  declareProperty("EnergyImbalanceTest", m_energyImbalanceTest = true);
49  declareProperty("MomImbalanceTest", m_momImbalanceTest = true);
50  declareProperty("NegativeEnergyTest", m_negativeEnergyTest = true);
51  declareProperty("TachyonsTest", m_tachyonsTest = true);
52  declareProperty("UnstableNoVtxTest", m_unstableNoVtxTest = true);
53  declareProperty("Pi0NoVtxTest", m_pi0NoVtxTest = true);
54  declareProperty("UndisplacedDaughtersTest", m_undisplacedDaughtersTest = true);
55  declareProperty("UknownPDGIDTest", m_unknownPDGIDTest = true);
56  declareProperty("AllowMissingCrossSection", m_allowMissingXSec = false);
57 
58  m_vertexStatuses.push_back( 1 );
59  m_vertexStatuses.push_back( 3 );
60  m_vertexStatuses.push_back( 4 );
61 
62 
63  declareProperty("THistSvc", m_thistSvc);
64 
65  declareProperty("DoHist", m_doHist=true); //histograming yes/no true/false
66 
67  m_nPass = 0;
68  m_nFail = 0;
69 
70  m_TotalTaus = 0;
71  m_FastDecayedTau = 0;
72 
73  // Check counters
84  m_decayCheckRate = 0;
99  m_noXSECset = 0;
100 
116  m_h_photon_mass = 0;
117  m_h_photon_energy = 0;
125  m_h_cmEnergyDiff = 0;
126 }

Member Function Documentation

◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/2]

HepMC::GenEvent* event GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inlineinherited

Access the current signal event (first in the McEventCollection)

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

Definition at line 76 of file GenBase.h.

76  {
77  if (events()->empty())
78  ATH_MSG_ERROR("McEventCollection is empty during first event access");
79  return *(events()->begin());
80  }

◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]

McEventCollection* events GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inherited

Access the current event's McEventCollection.

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

◆ cmTomm()

void GenBase::cmTomm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 10.

Definition at line 78 of file GenBase.cxx.

78  {
79  for (HepMC::GenEvent::vertex_iterator vtx = evt->vertices_begin(); vtx != evt->vertices_end(); ++vtx) {
80  const HepMC::FourVector fv((*vtx)->position().x() * 10,
81  (*vtx)->position().y() * 10,
82  (*vtx)->position().z() * 10,
83  (*vtx)->position().t() * 10);
84  (*vtx)->set_position(fv);
85  }
86 }

◆ 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; }

◆ event_const()

const HepMC::GenEvent* GenBase::event_const ( ) const
inlineinherited

Access the current signal event (const)

Definition at line 83 of file GenBase.h.

83  {
84  if (events_const()->empty())
85  ATH_MSG_ERROR("Const McEventCollection is empty during first event access");
86  return *(events_const()->begin());
87  }

◆ events_const() [1/2]

const McEventCollection* GenBase::events_const ( ) const
inlineinherited

Access the current event's McEventCollection (const)

Definition at line 96 of file GenBase.h.

96  {
97  return events_const( getContext() );
98  }

◆ events_const() [2/2]

const McEventCollection* GenBase::events_const ( const EventContext &  ctx) const
inlineinherited

Definition at line 99 of file GenBase.h.

99  {
101  if (!ret.isValid())
102  ATH_MSG_ERROR("No McEventCollection found in StoreGate with key " << m_mcevents_const.key());
103  return ret.cptr();
104  }

◆ 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 TestHepMC::execute ( )
virtual
Todo:
Clean up / improve / apply to all decaying species
Todo:
Persuade generator authors to set proper generated masses in HepMC, then really require mass = 0

Reimplemented from GenBase.

Definition at line 268 of file TestHepMC.cxx.

268  {
269 
270  // Holder for filter outcome; allows us to check all filters on each event and diagnose multiple problems at once
271  bool filter_pass = true;
272 
273  // Loop over all events in McEventCollection
274  for(const HepMC::GenEvent* evt : *events_const()) {
275  double totalPx = 0;
276  double totalPy = 0;
277  double totalPz = 0;
278  double totalE = 0;
279  double nonG4_energy = 0;
280  std::vector<HepMC::ConstGenParticlePtr> negEnPart;
281  std::vector<HepMC::ConstGenParticlePtr> tachyons;
282  std::vector<HepMC::ConstGenParticlePtr> unstNoEnd;
283  std::vector<HepMC::ConstGenParticlePtr> unDecPi0;
284  std::vector<HepMC::ConstGenParticlePtr> undisplaceds;
285 
286  m_looper.findLoops(evt,true);
287  if (!m_looper.loop_particles().empty() || !m_looper.loop_vertices().empty()) {
288  ATH_MSG_DEBUG("Found " << m_looper.loop_vertices().size() << " vertices in loops");
289  ATH_MSG_DEBUG("Found " << m_looper.loop_particles().size() << " particles in loops");
290  ATH_MSG_DEBUG("Please use MC::Loops::findLoops for this event to obtain all particles and vertices in the loops");
291  if (m_maxloops > 0 && m_looper.loop_particles().size() > static_cast<std::size_t>(m_maxloops) ) filter_pass = false;
292  }
293 
294 #ifdef HEPMC3
295  const auto xsec = evt->cross_section();
296  if (!xsec) {
297  ATH_MSG_WARNING("WATCH OUT: event is missing the generator cross-section!");
298  ++m_noXSECset;
299  if (m_allowMissingXSec) {
300  ATH_MSG_WARNING("-> Adding a dummy cross-section for debugging purposes.");
301  // for debugging purposes only -> set a dummy cross-section to make TestHepMC happy
302  std::shared_ptr<HepMC3::GenCrossSection> dummy_xsec = std::make_shared<HepMC3::GenCrossSection>();
303  dummy_xsec->set_cross_section(1.0,0.0);
304  HepMC::GenEvent* evt_nonconst = const_cast<HepMC::GenEvent*>(evt);
305  evt_nonconst->set_cross_section(dummy_xsec);
306  }
307  else {
308  ATH_MSG_WARNING("-> Will report this as failure.");
309  }
310  }
311 
312  // Check beams and work out per-event beam energy
313  std::vector<std::shared_ptr<const HepMC3::GenParticle>> beams_t;
314  for (auto p : evt->beams()) { if (p->status() == 4) beams_t.push_back(p); }
315  std::pair<std::shared_ptr<const HepMC3::GenParticle>,std::shared_ptr<const HepMC3::GenParticle>> beams;
316  if (beams_t.size() == 2) {
317  beams.first=beams_t.at(0);
318  beams.second=beams_t.at(1);
319  } else {
320  ATH_MSG_WARNING("Invalid number of beam particles " << beams_t.size() << " this generator interface should be fixed");
322  for (const auto& part: beams_t) HepMC3::Print::line(part);
323  }
324 #else
325  auto beams = evt->beam_particles();
326 #endif
327  double cmenergy = m_cm_energy;
329  ATH_MSG_WARNING("Invalid beam particle pointers -- this generator interface should be fixed");
330  if (cmenergy < 0) ATH_MSG_WARNING("Invalid expected beam energy: " << cmenergy << " MeV");
332  } else {
333  if (beams.first->status() != 4 || beams.second->status() != 4) {
334  ATH_MSG_WARNING("Beam particles have incorrectly set status -- this generator interface should be fixed");
336  }
337  const double sumE = beams.first->momentum().e() + beams.second->momentum().e();
338  const double sumP = beams.first->momentum().pz() + beams.second->momentum().pz();
339  cmenergy = std::sqrt(sumE*sumE - sumP*sumP);
340 
341  if (m_cm_energy > 0 && std::abs(cmenergy - m_cm_energy) > m_cme_diff) {
342  ATH_MSG_FATAL("Beam particles have incorrect energy: " << m_cm_energy/1000. << " GeV expected, vs. " << cmenergy/1000. << " GeV found");
343  setFilterPassed(false);
344  if (m_doHist){
345  m_h_beamparticle1_Energy->Fill(beams.first->momentum().e()*1.E-03);
346  m_h_beamparticle2_Energy->Fill(beams.second->momentum().e()*1.E-03);
347  m_h_cmEnergyDiff->Fill((cmenergy-m_cm_energy)*1.E-03);
348  }
350  // Special case: this is so bad that we immediately fail out
351  return StatusCode::FAILURE;
352  }
353  }
354 
355  // Check vertices
356  int vtxDisplacedstatuscode12CheckRateCnt=0;
357  int vtxDisplacedstatuscodenot12CheckRateCnt=0;
358  int vtxDisplacedMoreThan_1m_CheckRateCnt=0;
359 #ifdef HEPMC3
360  for (const auto& vtx: evt->vertices()) {
361 #else
362  for (auto vitr = evt->vertices_begin(); vitr != evt->vertices_end(); ++vitr ) {
363  const HepMC::GenVertex* vtx = *vitr;
364 #endif
365  const HepMC::FourVector pos = vtx->position();
366 
367  // Check for NaNs and infs in vertex position components
368  if ( std::isnan(pos.x()) || std::isinf(pos.x()) ||
369  std::isnan(pos.y()) || std::isinf(pos.y()) ||
370  std::isnan(pos.z()) || std::isinf(pos.z()) ) {
371  ATH_MSG_WARNING("NaN (Not A Number) or inf found in the event record vertex positions");
372 
374  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
375  if (m_vtxNaNTest) {
376  filter_pass = false;
377  }
378  } // Done of checking for nans and infinities
379 
380  // Check for too-far-displaced vertices
381  // Anything which propagates macroscopically should be set stable in evgen for G4 to handle
382  const double dist_trans2 = pos.x()*pos.x() + pos.y()*pos.y(); // in mm2
383  const double dist2 = dist_trans2 + pos.z()*pos.z(); // in mm2
384  const double dist_trans = std::sqrt(dist_trans2); // in mm
385  const double dist = std::sqrt(dist2); // in mm
386  if (dist2 > m_max_dist*m_max_dist) {
387  ATH_MSG_WARNING("Found vertex position displaced by more than " << m_max_dist << "mm: " << dist << "mm");
388  ++vtxDisplacedMoreThan_1m_CheckRateCnt;
389 
390  if (m_vtxDisplacedTest) {
391  filter_pass = false;
392  }
393  }
394  if (dist_trans2 > m_max_dist_trans*m_max_dist_trans) {
395  ATH_MSG_WARNING("Found vertex position displaced by more than " << m_max_dist_trans << "mm in transverse distance: " << dist_trans << "mm");
396 
397 #ifdef HEPMC3
398  for (const auto& part: vtx->particles_in()) {
399 #else
400  for (auto part_it = vtx->particles_in_const_begin(); part_it != vtx->particles_in_const_end(); ++part_it) {
401  auto part=(*part_it);
402 #endif
403  if (m_dumpEvent){
404  ATH_MSG_WARNING("Outgoing particle : ");
405  HepMC::Print::line(msg( MSG::WARNING ).stream(),part);
406  }
407  ATH_MSG_WARNING("production vertex = " << part->production_vertex()->position().x() << ", " << part->production_vertex()->position().y() << ", " << part->production_vertex()->position().z());
408  ATH_MSG_WARNING("end vertex = " << part->end_vertex()->position().x() << ", " << part->end_vertex()->position().y() << ", " << part->end_vertex()->position().z());
409  if (m_dumpEvent) ATH_MSG_WARNING("parents info: ");
410  if (part->production_vertex()) {
411 #ifdef HEPMC3
412  for(const auto& p_parents: part->production_vertex()->particles_in()) {
413 #else
414  for(auto p_parents_it = part->production_vertex()->particles_in_const_begin(); p_parents_it != part->production_vertex()->particles_in_const_end(); ++p_parents_it) {
415  auto p_parents=(*p_parents_it);
416 #endif
417  if (m_dumpEvent){
418  msg(MSG::WARNING) << "\t";
419  HepMC::Print::line( msg( MSG::WARNING ).stream() , p_parents );
420  }
421  }
422  } // Done with fancy print
423 
424  if (part->status() == 1 || part->status() == 2){
425  vtxDisplacedstatuscode12CheckRateCnt += 1;
426  } else {
427  vtxDisplacedstatuscodenot12CheckRateCnt += 1;
428  }
429 
430  if (m_doHist){
431  m_h_energy_dispVtxCheck->Fill(part->momentum().e()*1e-3);
432  if (part->momentum().e()*1e-3 < 10.) {
433  m_h_energy_dispVtxCheck_lt10->Fill(part->momentum().e()*1e-3);
434  }
435  m_h_pdgid_dispVtxCheck->Fill(part->pdg_id());
436  m_h_status_dispVtxCheck->Fill(part->status());
437  m_h_px_dispVtxCheck->Fill(part->momentum().px()*1e-3);
438  m_h_py_dispVtxCheck->Fill(part->momentum().py()*1e-3);
439  m_h_pz_dispVtxCheck->Fill(part->momentum().pz()*1e-3);
440  m_h_vx_dispVtxCheck->Fill(part->end_vertex()->position().x());
441  m_h_vy_dispVtxCheck->Fill(part->end_vertex()->position().y());
442  m_h_vz_dispVtxCheck->Fill(part->end_vertex()->position().z());
443  m_h_vxprod_dispVtxCheck->Fill(part->production_vertex()->position().x());
444  m_h_vyprod_dispVtxCheck->Fill(part->production_vertex()->position().y());
445  m_h_vzprod_dispVtxCheck->Fill(part->production_vertex()->position().z());
446  double endvx = part->end_vertex()->position().x();
447  double endvy = part->end_vertex()->position().y();
448  double endvz = part->end_vertex()->position().z();
449  double prodvx = part->production_vertex()->position().x();
450  double prodvy = part->production_vertex()->position().y();
451  double prodvz = part->production_vertex()->position().z();
452  double enddis = std::sqrt(endvx*endvx + endvy*endvy + endvz*endvz);
453  double proddis = std::sqrt(prodvx*prodvx + prodvy*prodvy + prodvz*prodvz);
454  m_h_vtxend_dispVtxCheck->Fill(enddis);
455  m_h_vtxprod_dispVtxCheck->Fill(proddis);
456  } // End of the filling of histograms for bad vertices
457  } // End of a loop over theparents of the bad vertex
458  } // Found a bad vertex
459  } // Loop over all vertices
460  if (vtxDisplacedstatuscode12CheckRateCnt>0) ++m_vtxDisplacedstatuscode12CheckRate;
461  if (vtxDisplacedstatuscodenot12CheckRateCnt>0) ++m_vtxDisplacedstatuscodenot12CheckRate;
462  if (vtxDisplacedMoreThan_1m_CheckRateCnt>0) ++m_vtxDisplacedMoreThan_1m_CheckRate;
463 
464  // Check particles
465  for (auto pitr: *evt) {
466 
467  // Local loop variables to clean up the check code
468  const HepMC::FourVector pmom = pitr->momentum();
469  const int pstatus = pitr->status();
470  const int ppdgid = pitr->pdg_id();
471  // Check for NaNs and infs in momentum components
472  if ( std::isnan(pmom.px()) || std::isinf(pmom.px()) ||
473  std::isnan(pmom.py()) || std::isinf(pmom.py()) ||
474  std::isnan(pmom.pz()) || std::isinf(pmom.pz()) ||
475  std::isnan(pmom.e()) || std::isinf(pmom.e()) ) {
476  ATH_MSG_WARNING("NaN (Not A Number) or inf found in the event record momenta");
478 
479  if (m_dumpEvent) HepMC::Print::line(std::cout,pitr);
480  if (m_momNaNTest) {
481  filter_pass = false;
482  }
483  } // End of check for NaNs and infinities
484 
485  // Check for undecayed pi0s
486  if (pstatus == 1 || pstatus == 2) {
487  if (ppdgid == 111 && !pitr->end_vertex() ) {
488  unDecPi0.push_back( pitr);
490  }
491  } // End of check for undecayed pi0s
492 
493  //check stable particle lifetimes
494  if (pstatus == 1) {
495  const HepPDT::ParticleData* pd = particleData(ppdgid);
496  if (pd != NULL) {
497  double plifetime = pd->lifetime()*1e+12; // why lifetime doesn't come in common units???
498  if (plifetime != 0 && plifetime < m_min_tau) { // particles with infinite lifetime get a 0 in the PDT
499  ATH_MSG_WARNING("Stable particle found with lifetime = " << plifetime << "~ns!!");
500  if (m_dumpEvent) HepMC::Print::line(std::cout,pitr);
501 
503 
504  if (m_lifeTimeTest) {
505  filter_pass = false;
506  }
507  } // Particle did not have infinite lifetime
508  } // The particle has a data table (so a lifetime)
509  else{
510  int susyPart = 0;
511  std::vector<int>::size_type count = 0;
512  while (susyPart==0 && (count < m_SusyPdgID_tab.size() )){
513  // no warning for SUSY particles from the list susyParticlePdgid.txt
514  if (m_SusyPdgID_tab[count] == std::abs(ppdgid)) {
515  susyPart=1;
516  }
517  count++;
518  } // Look through the SUSY table to see if this one should be counted
519  if (susyPart==0){
520  ATH_MSG_WARNING("Stable particle not found in PDT, no lifetime check done");
521  if (m_dumpEvent) HepMC::Print::line(std::cout,pitr);
522  } // It's a SUSY particle -- skip the lifetime check
523  } // The particle has no data table
524  } // Test if the particle is stable
525 
526  //Check that stable particles are known by G4 or they are non-interacting
527  HepPDT::ParticleID pid(ppdgid);
528  int first_dig = ppdgid;
529  while (first_dig > 9) first_dig /= 10;
530 
531  if ((pstatus == 1 ) && (!pitr->end_vertex()) && (MC::isSimInteracting(pitr)) && (!pid.isNucleus()) && (first_dig != 9) ) {
532 
533  int known_byG4 = 0;
534  std::vector<int>::size_type count =0;
535 
536  while (known_byG4==0 && count < m_G4pdgID_tab.size()){
537  if(ppdgid == m_G4pdgID_tab[count]) known_byG4=1;
538  count++;
539  }
540  if(known_byG4==0){
541  nonG4_energy += pmom.e();
542  ATH_MSG_WARNING("Interacting particle not known by Geant4 with ID " << ppdgid);
543  }
544  } // End of check that stable particles are known to G4 or are non-interacting
545 
546  // Check for bad PDG IDs
547  if (!MC::isValid(ppdgid)){
548  ATH_MSG_DEBUG("Invalid PDG ID found: " << ppdgid);
550  ATH_MSG_WARNING("Invalid and unmasked PDG ID found: " << ppdgid);
551  filter_pass = false;
552  }
553  } // End of check for invalid PDG IDs
554 
555  // Check for unstables with no end vertex,
556  if (!pitr->end_vertex() && pstatus == 2) {
557  unstNoEnd.push_back(pitr);
559  } // End of check for unstable with no end vertex
560 
561  // Sum final state mom/energy, and note negative energy / tachyonic particles
562  // std::cout << "status " << pstatus << " e " << pmom.e() << " pz " << pmom.pz()<< std::endl;
563  if ( pstatus == 1 && !pitr->end_vertex() ) {
564  totalPx += pmom.px();
565  totalPy += pmom.py();
566  totalPz += pmom.pz();
567  totalE += pmom.e();
568  if (pmom.e() < 0) {
569  negEnPart.push_back(pitr);
571  }
572  const double aener = std::abs(pmom.e());
573  if ( aener+m_accur_margin < std::abs(pmom.px()) || aener+m_accur_margin < std::abs(pmom.py()) || aener+m_accur_margin < std::abs(pmom.pz()) ) {
574  tachyons.push_back(pitr);
576  }
577  } // End of sums for momentum and energy conservation
578 
579  // Decay checks (uses PdgToSearch attr value, for tau by default)
581  int tau_child = 0;
582  if (std::abs(ppdgid) == m_pdg && (pstatus == 1 || pstatus == 2)) {
583  ++m_TotalTaus;
584  auto vtx = pitr->end_vertex();
585  if (vtx) {
586  double p_energy = 0;
587 #ifdef HEPMC3
588  for (auto desc: HepMC::descendant_particles(vtx)) {
589 #else
590  for (auto desc_it = vtx->particles_begin(HepMC::descendants); desc_it != vtx->particles_end(HepMC::descendants); ++desc_it) {
591  auto desc=(*desc_it);
592 #endif
593  if (std::abs(desc->pdg_id()) == m_pdg) tau_child = 1;
594  if ( MC::isStable(desc) ) p_energy += desc->momentum().e();
595  }
596  if (std::abs( p_energy - pmom.e()) > m_energy_diff && !tau_child) {
597  ATH_MSG_WARNING("Energy sum (decay products): "
598  << "Energy (original particle) > " << m_energy_diff << " MeV, "
599  << "Event #" << evt->event_number() << ", "
600  << "The original particle = " << pitr);
602  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
603  }
604  //most taus should not decay immediately
605  const HepMC::FourVector tau_decaypos = vtx->position();
606  const double tau_displacement = tau_decaypos.x()*tau_decaypos.x() + tau_decaypos.y()*tau_decaypos.y() + tau_decaypos.z()*tau_decaypos.z();
607  //tau_child != 1 exclude cases in which a tau is copied to another vertex or emits a photon
608  if ((tau_displacement < 1.e-6) && (tau_child!=1)) ++m_FastDecayedTau;
609  } else {
610  ATH_MSG_WARNING("UNDECAYED PARTICLE WITH PDG_ID = " << m_pdg);
612  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
613  }
614  } // End of checks for specific particle (tau by default)
615 
616  // Check for undisplaced decay daughters from long-lived hadrons
617  if (pitr->end_vertex()) {
618  auto decayvtx = pitr->end_vertex();
619  const HepMC::FourVector decaypos = decayvtx->position();
620  const double displacement = decaypos.x()*decaypos.x() + decaypos.y()*decaypos.y() + decaypos.z()*decaypos.z();
621  if (displacement > 1e-6) {
622  for (auto ip: *decayvtx) {
623  const HepMC::FourVector pos2 = ip->production_vertex()->position();
624  const double displacement2 = pos2.x()*pos2.x() + pos2.y()*pos2.y() + pos2.z()*pos2.z();
625  if (displacement2 < 1e-6) {
626  ATH_MSG_WARNING("Decay child " << ip << " from " << pitr
627  << " has undisplaced vertex (" << ip->production_vertex()
628  << " @ " << displacement2 << "mm) "
629  << " but parent vertex is displaced (" << decayvtx
630  << " @ " << displacement << "mm)");
631  undisplaceds.push_back(ip);
633  } // Check for displacement below 1 um
634  } // Loop over all particles coming from the decay vertex
635  } // Displacement of greater than 1 um
636  } // End of check for undisplaced decay daughters from long-lived hadrons
637 
638  // Check for photons with non-zero masses
640  if (ppdgid == 22 && pstatus == 1) {
641  const double mass = pitr->generated_mass();
642  if (std::abs(mass) > 1.0) { // in MeV
643  ATH_MSG_WARNING("Photon with non-zero mass found! Mass: " << mass << " MeV" << pitr);
645  }
646  } // End check for photons with too-large a mass
647 
648  } // End of loop over particles in the event
649 
650  // Energy of interacting particles not known by Geant4
651  if(nonG4_energy > m_nonG4_energy_threshold) {
652  ATH_MSG_WARNING("The energy of interacting particles not known by Geant4 is = " << nonG4_energy << " MeV");
653  if (m_energyG4Test) {
654  filter_pass = false;
655  }
657  } // End of check for interacting particles not known by G4
658 
659  // Energy balance
660  double lostE = std::abs(totalE - cmenergy);
661  if (lostE > m_energy_diff) {
662  ATH_MSG_WARNING("ENERGY BALANCE FAILED : E-difference = " << lostE << " MeV");
663 
664  ATH_MSG_WARNING("balance " << totalPx << " " << totalPy << " " << totalPz << " " << totalE);
665 
666  if (m_doHist){
667  m_h_energyImbalance->Fill(lostE*1.E-03);
668  }
669  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
670  if (m_energyImbalanceTest) {
671  filter_pass = false;
672  }
674  } // End of energy balance check
675 
676  // Momentum balance
677  if ( std::abs(totalPx) > m_energy_diff || std::abs(totalPy) > m_energy_diff || std::abs(totalPz) > m_energy_diff ) {
678  ATH_MSG_WARNING("MOMENTUM BALANCE FAILED : SumPx = " << totalPx << " SumPy = " << totalPy << " SumPz = " << totalPz << " MeV");
679  if (m_doHist){
680  m_h_momentumImbalance_px->Fill(std::abs(totalPx)*1.E-03);
681  m_h_momentumImbalance_py->Fill(std::abs(totalPy)*1.E-03);
682  m_h_momentumImbalance_pz->Fill(std::abs(totalPz)*1.E-03);
683  }
684  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
685  if (m_momImbalanceTest) {
686  filter_pass = false;
687  }
689  } // End of momentum balance check
690 
691  // Negative energy particles
692  if (!negEnPart.empty()) {
693  std::stringstream ss;
694  ss << "NEGATIVE ENERGY PARTICLES FOUND :";
695  for (auto b: negEnPart){
696  ss << " " << b;
697  }
698  ATH_MSG_WARNING(ss.str());
699  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
700  if (m_negativeEnergyTest) {
701  filter_pass = false;
702  }
704  } // End of negative energy particle chedk
705 
706  // Tachyons
707  if (!tachyons.empty()) {
708  std::stringstream ss;
709  ss << "PARTICLES WITH |E| < |Pi| (i=x,y,z) FOUND :";
710  for (auto b: tachyons){
711  ss << " " << b;
712  }
713  ATH_MSG_WARNING(ss.str());
714  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
715  if (m_tachyonsTest) {
716  filter_pass = false;
717  }
719  } // End of tachyon check
720 
721  // Unstable particles with no decay vertex
722  if (!unstNoEnd.empty()) {
723  std::stringstream ss;
724  ss << "Unstable particle with no decay vertex found: ";
725  for (auto b: unstNoEnd){
726  ss << " " << b;
727  }
728  ATH_MSG_WARNING(ss.str());
729  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
730  if (m_unstableNoVtxTest) {
731  filter_pass = false;
732  }
734  } // End of unstable particle with no decay vertex check
735 
736  // Undecayed pi0
737  if (!unDecPi0.empty()) {
738  std::stringstream ss;
739  ss << "pi0 with no decay vertex found:";
740  for (auto b: unDecPi0){
741  ss << " " << b;
742  }
743  ATH_MSG_WARNING(ss.str());
744  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
745  if (m_pi0NoVtxTest) {
746  filter_pass = false;
747  }
749  } // End of undecayed pi0 check
750 
751  // Undisplaced decay daughters of displaced vertices
752  if (!undisplaceds.empty()) {
753  std::stringstream ss;
754  ss << "Undisplaced decay vertices from displaced particle: ";
755  for (auto b: undisplaceds){
756  ss << " " << b;
757  }
758  ATH_MSG_WARNING(ss.str());
759  if (m_dumpEvent) HepMC::Print::content(std::cout,*evt);
761  filter_pass = false;
762  }
764  } // End of undisplaced decay daughter of displaced vertices check
765 
766  } // End of loop over MCEventCollection
767 
768  // End of execution for each event - update filter value
769  if (!filter_pass){
770  setFilterPassed(false);
771  ++m_nFail;
772  } else {
773  ++m_nPass;
774  }
775 
776  // If the efficiency after 100 events is below 10%, there is an important bug going on:
777  // we fail the job immediately so it doesn't run for ever
778  const double tmp_efficiency = double(m_nPass) / double(m_nPass + m_nFail);
779  if ((m_nPass + m_nFail) > 100 && tmp_efficiency < 0.1) {
780  ATH_MSG_FATAL("The efficiency after " << m_nPass + m_nFail << " events is " << tmp_efficiency*100. << "% !!!");
781  return StatusCode::FAILURE;
782  }
783 
784  return StatusCode::SUCCESS;
785 }

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

◆ finalize()

StatusCode TestHepMC::finalize ( )

Definition at line 788 of file TestHepMC.cxx.

788  {
789 
790  ATH_MSG_INFO("Events passed = " << m_nPass << ", Events Failed = " << m_nFail);
791 
792  ATH_MSG_INFO(" Event rate with invalid Beam Particles = " << m_invalidBeamParticlesCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
793  ATH_MSG_INFO(" Event rate with beam particles and status not equal to 4 = " << m_beamParticleswithStatusNotFourCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
794  ATH_MSG_INFO(" Event rate with incorrect beam particle energies = " << m_beamEnergyCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
795  ATH_MSG_INFO(" Event rate with NaN (Not A Number) or inf found in the event record vertex positions = " << m_vtxNANandINFCheckRate*100.0/double(m_nPass + m_nFail) << "%");
796  if (!m_vtxNaNTest) ATH_MSG_INFO(" The check for NaN or inf in vtx. record is switched off, so is not included in the final TestHepMC efficiency ");
797  ATH_MSG_INFO(" Event rate with vertices displaced more than " << m_max_dist_trans << "~mm in transverse direction for particles with status code other than 1 and 2 = " << m_vtxDisplacedstatuscodenot12CheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
798  ATH_MSG_INFO(" Event rate with vertices displaced more than " << m_max_dist << "~mm = " << m_vtxDisplacedMoreThan_1m_CheckRate*100.0/double(m_nPass + m_nFail) << "%");
799  if (!m_vtxDisplacedTest) ATH_MSG_INFO(" The check for displaced vertices is switched off, so is not included in the final TestHepMC efficiency ");
800  ATH_MSG_INFO(" Event rate with NAN (Not A Number) or inf found in particle momentum values = " << m_partMomentumNANandINFCheckRate*100.0/double(m_nPass + m_nFail) << "%");
801  if (!m_momNaNTest) ATH_MSG_INFO(" The check for NaN/inf in momentum record is switched off, so is not included in the final TestHepMC efficiency ");
802  ATH_MSG_INFO(" Event rate with undecayed pi0's with status 1 or 2 = " << m_undecayedPi0statuscode12CheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
803  ATH_MSG_INFO(" Event rate with unstable particles with no end vertex = " << m_unstableNoEndVtxCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
804  ATH_MSG_INFO(" Event rate with negative total energy like for tachyonic particles = " << m_negativeEnergyTachyonicCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
805  ATH_MSG_INFO(" Event rate with particles with improper decay properties = " << m_decayCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
806  ATH_MSG_INFO(" Event rate with undisplaced daughters of long lived hadrons = " << m_undisplacedLLHdaughtersCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
807  ATH_MSG_INFO(" Event rate with non zero photon mass = " << m_nonZeroPhotonMassCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)");
808  ATH_MSG_INFO(" Event rate with no energy balance = " << m_energyBalanceCheckRate*100.0/double(m_nPass + m_nFail) << "%");
809  if (!m_energyImbalanceTest) ATH_MSG_INFO(" The check for energy imbalance is switched off, so is not included in the final TestHepMC efficiency ");
810  ATH_MSG_INFO(" Event rate with no momentum balance = " << m_momentumBalanceCheckRate*100.0/double(m_nPass + m_nFail) << "%");
811  if (!m_momImbalanceTest) ATH_MSG_INFO(" The check for momentum imbalance is switched off, so is not included in the final TestHepMC efficiency ");
812  ATH_MSG_INFO(" Event rate with negative energy particles = " << m_negativeEnergyCheckRate*100.0/double(m_nPass + m_nFail) << "%");
813  if (!m_negativeEnergyTest) ATH_MSG_INFO(" The check for particles with negative energy is switched off, so is not included in the final TestHepMC efficiency ");
814  ATH_MSG_INFO(" Event rate with tachyons = " << m_tachyonCheckRate*100.0/double(m_nPass + m_nFail) << "%");
815  if (!m_tachyonsTest) ATH_MSG_INFO(" The check for tachyons is switched off, so is not included in the final TestHepMC efficiency ");
816  ATH_MSG_INFO(" Event rate with stable or unstable particles with no parents = " << m_stableUnstableNoParentCheckRate*100.0/double(m_nPass + m_nFail) << "%");
817  ATH_MSG_INFO(" Event rate with unstable particle with no decay vertex = " << m_unstablePartNoDecayVtxCheckRate*100.0/double(m_nPass + m_nFail) << "%");
818  if (!m_unstableNoVtxTest) ATH_MSG_INFO(" The check for unstable part. without end vertex is switched off, so is not included in the final TestHepMC efficiency ");
819  ATH_MSG_INFO(" Event rate with undecayed Pi0's = " << m_undecayedPi0CheckRate*100.0/double(m_nPass + m_nFail) << "%");
820  if (!m_pi0NoVtxTest) ATH_MSG_INFO(" The check for undecayed pi0's is switched off, so is not included in the final TestHepMC efficiency ");
821  ATH_MSG_INFO(" Event rate with undisplaced decay daughters of displaced vertices = " << m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate*100.0/double(m_nPass + m_nFail) << "%");
822  if (!m_undisplacedDaughtersTest) ATH_MSG_INFO(" The check for undisplaced daughters is switched off, so is not included in the final TestHepMC efficiency ");
823  ATH_MSG_INFO(" Event rate with particles with status 1 but lifetime < " << m_min_tau << "~ns = " << m_Status1ShortLifetime*100.0/double(m_nPass + m_nFail) << "%");
824  if (!m_lifeTimeTest) ATH_MSG_INFO(" The check for status 1 particles with too short lifetime is switched off, so is not included in the final TestHepMC efficiency ");
825  ATH_MSG_INFO(" Event rate with energy sum of interacting particles non known by Geant4 above " << m_nonG4_energy_threshold << " MeV = " << m_nonG4_energyCheckRate*100.0/double(m_nPass + m_nFail) << "%");
826  if (!m_energyG4Test) ATH_MSG_INFO(" The check for energy not known by G4 is switched off, so is not included in the final TestHepMC efficiency ");
827  ATH_MSG_INFO(" Event rate with unknown PDG IDs " << m_unknownPDGIDCheckRate*100.0/double(m_nPass+m_nFail) << "%");
828  if (!m_unknownPDGIDTest) ATH_MSG_INFO(" The check for unknown PDG IDs is sitched off, so it is not included in the final TestHepMC efficiency ");
829 
830  const double tau_fastDrate = double(m_FastDecayedTau) / double(m_TotalTaus);
831  if(tau_fastDrate > m_tau_eff_threshold){
832  ATH_MSG_FATAL("MORE THAN " << 100.*m_tau_eff_threshold << "% OF TAUS DECAYING IMMEDIATELY! " << m_FastDecayedTau << " found, out of: " << m_TotalTaus);
833  return StatusCode::FAILURE;
834  }
835 
836  if (m_noXSECset) {
837  if (m_allowMissingXSec) {
838  ATH_MSG_WARNING(m_noXSECset << " EVENTS WITHOUT CROSS-SECTION!!! Added dummy cross-section instead.");
839  }
840  else {
841  ATH_MSG_FATAL(m_noXSECset << " EVENTS WITHOUT CROSS-SECTION!! Check the setup before production!");
842  return StatusCode::FAILURE;
843  }
844  }
845 
846  const double efficiency = double(m_nPass) / double(m_nPass + m_nFail);
847  ATH_MSG_INFO("Efficiency = " << efficiency * 100 << "%");
848 
849  // Check efficiency, and fail (to kill production jobs) if the pass rate is too low
851  ATH_MSG_FATAL("EFFICIENCY ABOVE ERROR THRESHOLD! " << 100*efficiency << "% found, but at least: " << 100*m_eff_fail_threshold << "% required");
852  return StatusCode::FAILURE;
853  } else if (efficiency <= m_eff_warn_threshold) {
854  ATH_MSG_WARNING("EFFICIENCY ABOVE WARNING THRESHOLD! " << 100*efficiency << "% found, but at least: " << 100*m_eff_warn_threshold << "% expected");
855  }
856 
857  return StatusCode::SUCCESS;
858 }

◆ GeVToMeV()

void GenBase::GeVToMeV ( HepMC::GenEvent *  evt)
protectedinherited

Scale event energies/momenta by x 1000.

Todo:
Add HepMC units awareness and do it differently when HepMC provides this functionality directly (and reference-based FourVector accessors)

Definition at line 58 of file GenBase.cxx.

58  {
59  for (HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) {
60  const HepMC::FourVector fv((*p)->momentum().px() * 1000,
61  (*p)->momentum().py() * 1000,
62  (*p)->momentum().pz() * 1000,
63  (*p)->momentum().e() * 1000);
64  (*p)->set_momentum(fv);
65  (*p)->set_generated_mass(1000 * (*p)->generated_mass());
66  }
67 }

◆ initialize()

StatusCode TestHepMC::initialize ( )
virtual

Reimplemented from GenBase.

Definition at line 129 of file TestHepMC.cxx.

129  {
131 
132  if (m_doHist){
133  CHECK(m_thistSvc.retrieve());
134 
135  m_h_energy_dispVtxCheck = new TH1F("h_energy_dispVtxCheck", "h_energy_dispVtxCheck", 2000, 0., 2000.);
136  m_h_energy_dispVtxCheck_lt10 = new TH1F("h_energy_dispVtxCheck_lt10", "h_energy_dispVtxCheck_lt10", 1000, 0., 10.);
137  m_h_pdgid_dispVtxCheck = new TH1F("h_pdgid_dispVtxCheck", "h_pdgid_dispVtxCheck", 10000, 0., 10000.);
138  m_h_status_dispVtxCheck = new TH1F("h_status_dispVtxCheck", "h_status_dispVtxCheck", 10000, 0., 10000.);
139  m_h_px_dispVtxCheck = new TH1F("h_px_dispVtxCheck", "h_px_dispVtxCheck", 4000, -2000., 2000.);
140  m_h_py_dispVtxCheck = new TH1F("h_py_dispVtxCheck", "h_py_dispVtxCheck", 4000, -2000., 2000.);
141  m_h_pz_dispVtxCheck = new TH1F("h_pz_dispVtxCheck", "h_pz_dispVtxCheck", 4000, -2000., 2000.);
142  m_h_vx_dispVtxCheck = new TH1F("h_vx_dispVtxCheck", "h_vx_dispVtxCheck", 40000, -200., 200);
143  m_h_vy_dispVtxCheck = new TH1F("h_vy_dispVtxCheck", "h_vy_dispVtxCheck", 40000, -200., 200);
144  m_h_vz_dispVtxCheck = new TH1F("h_vz_dispVtxCheck", "h_vz_dispVtxCheck", 40000, -200., 200);
145  m_h_vxprod_dispVtxCheck = new TH1F("h_vxprod_dispVtxCheck", "h_vxprod_dispVtxCheck", 40000, -200., 200.);
146  m_h_vyprod_dispVtxCheck = new TH1F("h_vyprod_dispVtxCheck", "h_vyprod_dispVtxCheck", 40000, -200., 200.);
147  m_h_vzprod_dispVtxCheck = new TH1F("h_vzprod_dispVtxCheck", "h_vzprod_dispVtxCheck", 40000, -200., 200.);
148  m_h_vtxprod_dispVtxCheck = new TH1F("h_vtxprod_dispVtxCheck", "h_vtxprod_dispVtxCheck", 20000, 0., 200.);
149  m_h_vtxend_dispVtxCheck = new TH1F("h_vtxend_dispVtxCheck", "h_vtxend_dispVtxCheck", 20000, 0., 200.);
150  m_h_photon_mass = new TH1F("h_photon_mass", "h_photon_mass", 20000, -10000., 10000);
151  m_h_photon_energy = new TH1F("h_photon_energy", "h_photon_energy", 20000, -10000., 10000);
152  m_h_photon_e2_p2_e2 = new TH1F("h_photon_e2_p2_e2", "h_photon_e2_p2_e2", 20000, -10., 10);
153  m_h_energyImbalance = new TH1F("h_energyImbalance", "h_energyImbalance", 2000, 0., 2000.);
154  m_h_momentumImbalance_px = new TH1F("h_momentumImbalance_px", "h_momentumImbalance_px", 2000,0., 2000.);
155  m_h_momentumImbalance_py = new TH1F("h_momentumImbalance_py", "h_momentumImbalance_py", 2000,0., 2000.);
156  m_h_momentumImbalance_pz = new TH1F("h_momentumImbalance_pz", "h_momentumImbalance_pz", 2000,0., 2000.);
157  m_h_beamparticle1_Energy = new TH1F("h_beamparticle1_Energy", "h_beamparticle1_Energy", 14000,0., 14000.);
158  m_h_beamparticle2_Energy = new TH1F("h_beamparticle2_Energy", "h_beamparticle2_Energy", 14000,0., 14000.);
159  m_h_cmEnergyDiff = new TH1F("h_cmEnergyDiff", "h_cmEnergyDiff", 8000, -4000., 4000.);
160 
161  CHECK(m_thistSvc->regHist("/TestHepMCname/h_energy_dispVtxCheck", m_h_energy_dispVtxCheck));
162  CHECK(m_thistSvc->regHist("/TestHepMCname/h_energy_dispVtxCheck_lt10", m_h_energy_dispVtxCheck_lt10));
163  CHECK(m_thistSvc->regHist("/TestHepMCname/h_pdgid_dispVtxCheck", m_h_pdgid_dispVtxCheck));
164  CHECK(m_thistSvc->regHist("/TestHepMCname/h_status_dispVtxCheck", m_h_status_dispVtxCheck));
165  CHECK(m_thistSvc->regHist("/TestHepMCname/h_px_dispVtxCheck", m_h_px_dispVtxCheck));
166  CHECK(m_thistSvc->regHist("/TestHepMCname/h_py_dispVtxCheck", m_h_py_dispVtxCheck));
167  CHECK(m_thistSvc->regHist("/TestHepMCname/h_pz_dispVtxCheck", m_h_pz_dispVtxCheck));
168  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vx_dispVtxCheck", m_h_vx_dispVtxCheck));
169  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vy_dispVtxCheck", m_h_vy_dispVtxCheck));
170  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vz_dispVtxCheck", m_h_vz_dispVtxCheck));
171  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vxprod_dispVtxCheck", m_h_vxprod_dispVtxCheck));
172  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vyprod_dispVtxCheck", m_h_vyprod_dispVtxCheck));
173  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vzprod_dispVtxCheck", m_h_vzprod_dispVtxCheck));
174  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vtxprod_dispVtxCheck", m_h_vtxprod_dispVtxCheck));
175  CHECK(m_thistSvc->regHist("/TestHepMCname/h_vtxend_dispVtxCheck", m_h_vtxend_dispVtxCheck));
176  CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_mass", m_h_photon_mass));
177  CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_energy", m_h_photon_energy));
178  CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_e2_p2_e2", m_h_photon_e2_p2_e2));
179  CHECK(m_thistSvc->regHist("/TestHepMCname/h_energyImbalance", m_h_energyImbalance));
180  CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_px", m_h_momentumImbalance_px));
181  CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_py", m_h_momentumImbalance_py));
182  CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_pz", m_h_momentumImbalance_pz));
183  CHECK(m_thistSvc->regHist("/TestHepMCname/h_beamparticle1_Energy", m_h_beamparticle1_Energy));
184  CHECK(m_thistSvc->regHist("/TestHepMCname/h_beamparticle2_Energy", m_h_beamparticle2_Energy));
185  CHECK(m_thistSvc->regHist("/TestHepMCname/h_cmEnergyDiff", m_h_cmEnergyDiff));
186 
187  ATH_MSG_INFO("No decay vertex - is ignored for particles with status (list):" );
188  for ( unsigned int i = 0; i < m_vertexStatuses.size(); i++ ) ATH_MSG_INFO(" : " << m_vertexStatuses.at(i) );
189  ATH_MSG_INFO("Vertex statuses finished");
190 
191  } // End of histogramming setup
192 
193  // open the files and read G4particle_acceptlist.txt
194 
195  const std::string& fileLocation = PathResolverFindDataFile ( "G4particle_acceptlist.txt" );
196  std::ifstream G4file;
197  G4file.open(fileLocation);
198  std::string line;
199  int G4pdgID;
200  if (!G4file.fail()){
201  while(std::getline(G4file,line)){
202  std::stringstream ss(line);
203  ss >> G4pdgID;
204  m_G4pdgID_tab.push_back(G4pdgID);
205  }
206  G4file.close();
207  }
208  else {
209  ATH_MSG_WARNING("Failed to open G4particle_acceptlist.txt, checking that all particles are known by Genat4 cannot be performed");
210  }
211 
212  // Open the param file (G4 accept list)
213  G4file.open(m_paramFile.c_str());
214  if (!G4file.fail()){
215  ATH_MSG_INFO("extra accept list for G4 found " << m_paramFile.c_str());
216  while(std::getline(G4file,line)){
217  std::stringstream ss(line);
218  ss >> G4pdgID;
219  m_G4pdgID_tab.push_back(G4pdgID);
220  }
221  G4file.close();
222  }
223  else {
224  ATH_MSG_INFO("extra accept list for G4 not provided ");
225  }
226 
227  // Open the files and read susyParticlePdgid.txt
228  std::ifstream susyFile;
229  susyFile.open("susyParticlePdgid.txt");
230  int susyPdgID;
231  if (!susyFile.fail()){
232  while(getline(susyFile,line)){
233  std::stringstream ss1(line);
234  ss1 >> susyPdgID;
235  m_SusyPdgID_tab.push_back(susyPdgID);
236  }
237  susyFile.close();
238  }
239  else{
240  ATH_MSG_WARNING("Failed to open susyParticlePdgid.txt, listing particles not present in PDTTable");
241  }
242 
243  // Open the file of extra PDG IDs that don't need to obey the rules
244  std::ifstream pdgFile;
245  pdgFile.open(m_unknownPDGIDFile.c_str());
246  int pdgID;
247  if (!pdgFile.fail()){
248  ATH_MSG_INFO("extra accept list for PDG IDs found " << m_unknownPDGIDFile.c_str());
249  while(std::getline(pdgFile,line)){
250  std::stringstream ss(line);
251  ss >> pdgID;
252  m_uknownPDGID_tab.push_back(pdgID);
253  }
254  pdgFile.close();
255  }
256  else {
257  ATH_MSG_INFO("extra accept list for PDG IDs not provided");
258  }
259 
260  // Print Efficiency warning and error thresholds
261  ATH_MSG_INFO("EffWarnThreshold = " << m_eff_warn_threshold * 100 << " %");
262  ATH_MSG_INFO("EffFailThreshold = " << m_eff_fail_threshold * 100 << " %");
263 
264  return StatusCode::SUCCESS;
265 }

◆ 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.

◆ MeVToGeV()

void GenBase::MeVToGeV ( HepMC::GenEvent *  evt)
protectedinherited

Scale event energies/momenta by x 1/1000.

Definition at line 68 of file GenBase.cxx.

68  {
69  for (HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) {
70  const HepMC::FourVector fv((*p)->momentum().px() / 1000,
71  (*p)->momentum().py() / 1000,
72  (*p)->momentum().pz() / 1000,
73  (*p)->momentum().e() / 1000);
74  (*p)->set_momentum(fv);
75  (*p)->set_generated_mass((*p)->generated_mass() / 1000);
76  }
77 }

◆ mmTocm()

void GenBase::mmTocm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 1/10.

Definition at line 87 of file GenBase.cxx.

87  {
88  for (HepMC::GenEvent::vertex_iterator vtx = evt->vertices_begin(); vtx != evt->vertices_end(); ++vtx) {
89  const HepMC::FourVector fv((*vtx)->position().x() / 10,
90  (*vtx)->position().y() / 10,
91  (*vtx)->position().z() / 10,
92  (*vtx)->position().t() / 10);
93  (*vtx)->set_position(fv);
94  }
95 }

◆ 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.

◆ particleData()

const HepPDT::ParticleData* GenBase::particleData ( int  pid) const
inlineinherited

Access an element in the particle data table.

Definition at line 126 of file GenBase.h.

126  {
127  return pdt().particle(HepPDT::ParticleID(std::abs(pid)));
128  }

◆ particleTable()

const HepPDT::ParticleDataTable& GenBase::particleTable ( ) const
inlineinherited

Get a particle data table.

Definition at line 118 of file GenBase.h.

118  {
119  return *(m_ppSvc->PDT());
120  }

◆ partPropSvc()

const ServiceHandle<IPartPropSvc> GenBase::partPropSvc ( ) const
inlineinherited

Access the particle property service.

Definition at line 113 of file GenBase.h.

113  {
114  return m_ppSvc;
115  }

◆ pdt()

const HepPDT::ParticleDataTable& GenBase::pdt ( ) const
inlineinherited

Shorter alias to get a particle data table.

Definition at line 123 of file GenBase.h.

123 { return particleTable(); }

◆ 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_accur_margin

double TestHepMC::m_accur_margin
private

Definition at line 50 of file TestHepMC.h.

◆ m_allowMissingXSec

bool TestHepMC::m_allowMissingXSec
private

Definition at line 47 of file TestHepMC.h.

◆ m_beamEnergyCheckRate

int TestHepMC::m_beamEnergyCheckRate
private

Definition at line 67 of file TestHepMC.h.

◆ m_beamEnergyTest

bool TestHepMC::m_beamEnergyTest
private

Definition at line 52 of file TestHepMC.h.

◆ m_beamParticleswithStatusNotFourCheckRate

int TestHepMC::m_beamParticleswithStatusNotFourCheckRate
private

Definition at line 66 of file TestHepMC.h.

◆ m_cm_energy

double TestHepMC::m_cm_energy
private

Definition at line 45 of file TestHepMC.h.

◆ m_cme_diff

double TestHepMC::m_cme_diff
private

Definition at line 45 of file TestHepMC.h.

◆ m_decayCheckRate

int TestHepMC::m_decayCheckRate
private

Definition at line 76 of file TestHepMC.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_doHist

bool TestHepMC::m_doHist
private

Definition at line 51 of file TestHepMC.h.

◆ m_dumpEvent

bool TestHepMC::m_dumpEvent
private

Definition at line 47 of file TestHepMC.h.

◆ m_eff_fail_threshold

double TestHepMC::m_eff_fail_threshold
private

Definition at line 49 of file TestHepMC.h.

◆ m_eff_warn_threshold

double TestHepMC::m_eff_warn_threshold
private

Definition at line 49 of file TestHepMC.h.

◆ m_energy_diff

double TestHepMC::m_energy_diff
private

Definition at line 46 of file TestHepMC.h.

◆ m_energyBalanceCheckRate

int TestHepMC::m_energyBalanceCheckRate
private

Definition at line 79 of file TestHepMC.h.

◆ m_energyG4Test

bool TestHepMC::m_energyG4Test
private

Definition at line 52 of file TestHepMC.h.

◆ m_energyImbalanceTest

bool TestHepMC::m_energyImbalanceTest
private

Definition at line 53 of file TestHepMC.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_FastDecayedTau

int TestHepMC::m_FastDecayedTau
private

Definition at line 63 of file TestHepMC.h.

◆ m_G4pdgID_tab

std::vector<int> TestHepMC::m_G4pdgID_tab
private

Definition at line 94 of file TestHepMC.h.

◆ m_h_beamparticle1_Energy

TH1F* TestHepMC::m_h_beamparticle1_Energy
private

Definition at line 126 of file TestHepMC.h.

◆ m_h_beamparticle2_Energy

TH1F* TestHepMC::m_h_beamparticle2_Energy
private

Definition at line 127 of file TestHepMC.h.

◆ m_h_cmEnergyDiff

TH1F* TestHepMC::m_h_cmEnergyDiff
private

Definition at line 128 of file TestHepMC.h.

◆ m_h_energy_dispVtxCheck

TH1F* TestHepMC::m_h_energy_dispVtxCheck
private

Definition at line 101 of file TestHepMC.h.

◆ m_h_energy_dispVtxCheck_lt10

TH1F* TestHepMC::m_h_energy_dispVtxCheck_lt10
private

Definition at line 102 of file TestHepMC.h.

◆ m_h_energyImbalance

TH1F* TestHepMC::m_h_energyImbalance
private

Definition at line 121 of file TestHepMC.h.

◆ m_h_momentumImbalance_px

TH1F* TestHepMC::m_h_momentumImbalance_px
private

Definition at line 122 of file TestHepMC.h.

◆ m_h_momentumImbalance_py

TH1F* TestHepMC::m_h_momentumImbalance_py
private

Definition at line 123 of file TestHepMC.h.

◆ m_h_momentumImbalance_pz

TH1F* TestHepMC::m_h_momentumImbalance_pz
private

Definition at line 124 of file TestHepMC.h.

◆ m_h_pdgid_dispVtxCheck

TH1F* TestHepMC::m_h_pdgid_dispVtxCheck
private

Definition at line 103 of file TestHepMC.h.

◆ m_h_photon_e2_p2_e2

TH1F* TestHepMC::m_h_photon_e2_p2_e2
private

Definition at line 119 of file TestHepMC.h.

◆ m_h_photon_energy

TH1F* TestHepMC::m_h_photon_energy
private

Definition at line 118 of file TestHepMC.h.

◆ m_h_photon_mass

TH1F* TestHepMC::m_h_photon_mass
private

Definition at line 117 of file TestHepMC.h.

◆ m_h_px_dispVtxCheck

TH1F* TestHepMC::m_h_px_dispVtxCheck
private

Definition at line 105 of file TestHepMC.h.

◆ m_h_py_dispVtxCheck

TH1F* TestHepMC::m_h_py_dispVtxCheck
private

Definition at line 106 of file TestHepMC.h.

◆ m_h_pz_dispVtxCheck

TH1F* TestHepMC::m_h_pz_dispVtxCheck
private

Definition at line 107 of file TestHepMC.h.

◆ m_h_status_dispVtxCheck

TH1F* TestHepMC::m_h_status_dispVtxCheck
private

Definition at line 104 of file TestHepMC.h.

◆ m_h_vtxend_dispVtxCheck

TH1F* TestHepMC::m_h_vtxend_dispVtxCheck
private

Definition at line 114 of file TestHepMC.h.

◆ m_h_vtxprod_dispVtxCheck

TH1F* TestHepMC::m_h_vtxprod_dispVtxCheck
private

Definition at line 115 of file TestHepMC.h.

◆ m_h_vx_dispVtxCheck

TH1F* TestHepMC::m_h_vx_dispVtxCheck
private

Definition at line 108 of file TestHepMC.h.

◆ m_h_vxprod_dispVtxCheck

TH1F* TestHepMC::m_h_vxprod_dispVtxCheck
private

Definition at line 111 of file TestHepMC.h.

◆ m_h_vy_dispVtxCheck

TH1F* TestHepMC::m_h_vy_dispVtxCheck
private

Definition at line 109 of file TestHepMC.h.

◆ m_h_vyprod_dispVtxCheck

TH1F* TestHepMC::m_h_vyprod_dispVtxCheck
private

Definition at line 112 of file TestHepMC.h.

◆ m_h_vz_dispVtxCheck

TH1F* TestHepMC::m_h_vz_dispVtxCheck
private

Definition at line 110 of file TestHepMC.h.

◆ m_h_vzprod_dispVtxCheck

TH1F* TestHepMC::m_h_vzprod_dispVtxCheck
private

Definition at line 113 of file TestHepMC.h.

◆ m_invalidBeamParticlesCheckRate

int TestHepMC::m_invalidBeamParticlesCheckRate
private

Definition at line 65 of file TestHepMC.h.

◆ m_lifeTimeTest

bool TestHepMC::m_lifeTimeTest
private

Definition at line 52 of file TestHepMC.h.

◆ m_looper

MC::Loops<HepMC::GenEvent,HepMC::ConstGenParticlePtr,HepMC::ConstGenVertexPtr> TestHepMC::m_looper
private

member to detect loops

Definition at line 130 of file TestHepMC.h.

◆ m_max_dist

double TestHepMC::m_max_dist
private

Definition at line 48 of file TestHepMC.h.

◆ m_max_dist_trans

double TestHepMC::m_max_dist_trans
private

Definition at line 48 of file TestHepMC.h.

◆ m_max_energy_diff

double TestHepMC::m_max_energy_diff
private

Definition at line 46 of file TestHepMC.h.

◆ m_maxloops

int TestHepMC::m_maxloops
private

Definition at line 43 of file TestHepMC.h.

◆ m_mcEventKey

std::string GenBase::m_mcEventKey {}
protectedinherited

StoreGate key for the MC event collection (defaults to GEN_EVENT)

Definition at line 137 of file GenBase.h.

◆ m_mcevents_const

SG::ReadHandleKey<McEventCollection> GenBase::m_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
privateinherited

Const handle to the MC event collection.

Definition at line 163 of file GenBase.h.

◆ m_min_tau

double TestHepMC::m_min_tau
private

Definition at line 48 of file TestHepMC.h.

◆ m_mkMcEvent

BooleanProperty GenBase::m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"}
protectedinherited

Flag to determine if a new MC event collection should be made if it doesn't exist.

Definition at line 139 of file GenBase.h.

◆ m_momentumBalanceCheckRate

int TestHepMC::m_momentumBalanceCheckRate
private

Definition at line 80 of file TestHepMC.h.

◆ m_momImbalanceTest

bool TestHepMC::m_momImbalanceTest
private

Definition at line 53 of file TestHepMC.h.

◆ m_momNaNTest

bool TestHepMC::m_momNaNTest
private

Definition at line 52 of file TestHepMC.h.

◆ m_negativeEnergyCheckRate

int TestHepMC::m_negativeEnergyCheckRate
private

Definition at line 81 of file TestHepMC.h.

◆ m_negativeEnergyTachyonicCheckRate

int TestHepMC::m_negativeEnergyTachyonicCheckRate
private

Definition at line 75 of file TestHepMC.h.

◆ m_negativeEnergyTest

bool TestHepMC::m_negativeEnergyTest
private

Definition at line 53 of file TestHepMC.h.

◆ m_nFail

int TestHepMC::m_nFail
private

Definition at line 59 of file TestHepMC.h.

◆ m_nonG4_energy_threshold

double TestHepMC::m_nonG4_energy_threshold
private

Definition at line 48 of file TestHepMC.h.

◆ m_nonG4_energyCheckRate

int TestHepMC::m_nonG4_energyCheckRate
private

Definition at line 88 of file TestHepMC.h.

◆ m_nonZeroPhotonMassCheckRate

int TestHepMC::m_nonZeroPhotonMassCheckRate
private

Definition at line 78 of file TestHepMC.h.

◆ m_noXSECset

int TestHepMC::m_noXSECset
private

Definition at line 60 of file TestHepMC.h.

◆ m_nPass

int TestHepMC::m_nPass
private

Definition at line 58 of file TestHepMC.h.

◆ m_paramFile

std::string TestHepMC::m_paramFile
private

Definition at line 91 of file TestHepMC.h.

◆ m_partMomentumNANandINFCheckRate

int TestHepMC::m_partMomentumNANandINFCheckRate
private

Definition at line 72 of file TestHepMC.h.

◆ m_pdg

int TestHepMC::m_pdg
private

Definition at line 44 of file TestHepMC.h.

◆ m_pi0NoVtxTest

bool TestHepMC::m_pi0NoVtxTest
private

Definition at line 54 of file TestHepMC.h.

◆ m_ppSvc

ServiceHandle<IPartPropSvc> GenBase::m_ppSvc {this, "PartPropSvc", "PartPropSvc"}
privateinherited

Handle on the particle property service.

Definition at line 160 of file GenBase.h.

◆ m_stableUnstableNoParentCheckRate

int TestHepMC::m_stableUnstableNoParentCheckRate
private

Definition at line 83 of file TestHepMC.h.

◆ m_Status1ShortLifetime

int TestHepMC::m_Status1ShortLifetime
private

Definition at line 86 of file TestHepMC.h.

◆ m_SusyPdgID_tab

std::vector<int> TestHepMC::m_SusyPdgID_tab
private

Definition at line 95 of file TestHepMC.h.

◆ m_tachyonCheckRate

int TestHepMC::m_tachyonCheckRate
private

Definition at line 82 of file TestHepMC.h.

◆ m_tachyonsTest

bool TestHepMC::m_tachyonsTest
private

Definition at line 53 of file TestHepMC.h.

◆ m_tau_eff_threshold

double TestHepMC::m_tau_eff_threshold
private

Definition at line 49 of file TestHepMC.h.

◆ m_thistSvc

ServiceHandle<ITHistSvc> TestHepMC::m_thistSvc
private
Todo:
Can we use the GenAnalysis / AthHistoAlg methods for histo management?

Definition at line 99 of file TestHepMC.h.

◆ m_TotalTaus

int TestHepMC::m_TotalTaus
private

Definition at line 62 of file TestHepMC.h.

◆ m_uknownPDGID_tab

std::vector<int> TestHepMC::m_uknownPDGID_tab
private

Definition at line 96 of file TestHepMC.h.

◆ m_undecayedPi0CheckRate

int TestHepMC::m_undecayedPi0CheckRate
private

Definition at line 85 of file TestHepMC.h.

◆ m_undecayedPi0statuscode12CheckRate

int TestHepMC::m_undecayedPi0statuscode12CheckRate
private

Definition at line 73 of file TestHepMC.h.

◆ m_undisplacedDaughtersTest

bool TestHepMC::m_undisplacedDaughtersTest
private

Definition at line 54 of file TestHepMC.h.

◆ m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate

int TestHepMC::m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate
private

Definition at line 87 of file TestHepMC.h.

◆ m_undisplacedLLHdaughtersCheckRate

int TestHepMC::m_undisplacedLLHdaughtersCheckRate
private

Definition at line 77 of file TestHepMC.h.

◆ m_unknownPDGIDCheckRate

int TestHepMC::m_unknownPDGIDCheckRate
private

Definition at line 89 of file TestHepMC.h.

◆ m_unknownPDGIDFile

std::string TestHepMC::m_unknownPDGIDFile
private

Definition at line 92 of file TestHepMC.h.

◆ m_unknownPDGIDTest

bool TestHepMC::m_unknownPDGIDTest
private

Definition at line 54 of file TestHepMC.h.

◆ m_unstableNoEndVtxCheckRate

int TestHepMC::m_unstableNoEndVtxCheckRate
private

Definition at line 74 of file TestHepMC.h.

◆ m_unstableNoVtxTest

bool TestHepMC::m_unstableNoVtxTest
private

Definition at line 53 of file TestHepMC.h.

◆ m_unstablePartNoDecayVtxCheckRate

int TestHepMC::m_unstablePartNoDecayVtxCheckRate
private

Definition at line 84 of file TestHepMC.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexStatuses

std::vector<int> TestHepMC::m_vertexStatuses
private

Definition at line 56 of file TestHepMC.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vtxDisplacedMoreThan_1m_CheckRate

int TestHepMC::m_vtxDisplacedMoreThan_1m_CheckRate
private

Definition at line 71 of file TestHepMC.h.

◆ m_vtxDisplacedstatuscode12CheckRate

int TestHepMC::m_vtxDisplacedstatuscode12CheckRate
private

Definition at line 69 of file TestHepMC.h.

◆ m_vtxDisplacedstatuscodenot12CheckRate

int TestHepMC::m_vtxDisplacedstatuscodenot12CheckRate
private

Definition at line 70 of file TestHepMC.h.

◆ m_vtxDisplacedTest

bool TestHepMC::m_vtxDisplacedTest
private

Definition at line 52 of file TestHepMC.h.

◆ m_vtxNANandINFCheckRate

int TestHepMC::m_vtxNANandINFCheckRate
private

Definition at line 68 of file TestHepMC.h.

◆ m_vtxNaNTest

bool TestHepMC::m_vtxNaNTest
private

Definition at line 52 of file TestHepMC.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
TestHepMC::m_cm_energy
double m_cm_energy
Definition: TestHepMC.h:45
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TestHepMC::m_h_status_dispVtxCheck
TH1F * m_h_status_dispVtxCheck
Definition: TestHepMC.h:104
TestHepMC::m_tachyonCheckRate
int m_tachyonCheckRate
Definition: TestHepMC.h:82
TestHepMC::m_h_vx_dispVtxCheck
TH1F * m_h_vx_dispVtxCheck
Definition: TestHepMC.h:108
TestHepMC::m_h_py_dispVtxCheck
TH1F * m_h_py_dispVtxCheck
Definition: TestHepMC.h:106
TestHepMC::m_doHist
bool m_doHist
Definition: TestHepMC.h:51
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkFileSG.line
line
Definition: checkFileSG.py:75
TestHepMC::m_unstableNoVtxTest
bool m_unstableNoVtxTest
Definition: TestHepMC.h:53
HepMC::Print::content
void content(std::ostream &os, const GenEvent &e)
Definition: GenEvent.h:678
TestHepMC::m_TotalTaus
int m_TotalTaus
Definition: TestHepMC.h:62
TestHepMC::m_energyBalanceCheckRate
int m_energyBalanceCheckRate
Definition: TestHepMC.h:79
TestHepMC::m_unstablePartNoDecayVtxCheckRate
int m_unstablePartNoDecayVtxCheckRate
Definition: TestHepMC.h:84
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
TestHepMC::m_eff_fail_threshold
double m_eff_fail_threshold
Definition: TestHepMC.h:49
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
TestHepMC::m_beamParticleswithStatusNotFourCheckRate
int m_beamParticleswithStatusNotFourCheckRate
Definition: TestHepMC.h:66
TestHepMC::m_negativeEnergyTest
bool m_negativeEnergyTest
Definition: TestHepMC.h:53
GenBase::events_const
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Definition: GenBase.h:96
TestHepMC::m_noXSECset
int m_noXSECset
Definition: TestHepMC.h:60
SG::ReadHandle< McEventCollection >
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TestHepMC::m_negativeEnergyCheckRate
int m_negativeEnergyCheckRate
Definition: TestHepMC.h:81
TestHepMC::m_tachyonsTest
bool m_tachyonsTest
Definition: TestHepMC.h:53
TestHepMC::m_maxloops
int m_maxloops
Definition: TestHepMC.h:43
TestHepMC::m_h_vtxprod_dispVtxCheck
TH1F * m_h_vtxprod_dispVtxCheck
Definition: TestHepMC.h:115
TestHepMC::m_FastDecayedTau
int m_FastDecayedTau
Definition: TestHepMC.h:63
TestHepMC::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: TestHepMC.h:99
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
TestHepMC::m_h_momentumImbalance_pz
TH1F * m_h_momentumImbalance_pz
Definition: TestHepMC.h:124
TestHepMC::m_vtxDisplacedstatuscodenot12CheckRate
int m_vtxDisplacedstatuscodenot12CheckRate
Definition: TestHepMC.h:70
TestHepMC::m_vtxDisplacedstatuscode12CheckRate
int m_vtxDisplacedstatuscode12CheckRate
Definition: TestHepMC.h:69
TestHepMC::m_unknownPDGIDFile
std::string m_unknownPDGIDFile
Definition: TestHepMC.h:92
makeDTCalibBlob_pickPhase.pd
pd
Definition: makeDTCalibBlob_pickPhase.py:342
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
TestHepMC::m_energy_diff
double m_energy_diff
Definition: TestHepMC.h:46
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:620
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
TestHepMC::m_unknownPDGIDCheckRate
int m_unknownPDGIDCheckRate
Definition: TestHepMC.h:89
TestHepMC::m_momentumBalanceCheckRate
int m_momentumBalanceCheckRate
Definition: TestHepMC.h:80
TestHepMC::m_pdg
int m_pdg
Definition: TestHepMC.h:44
HepMC::Print::line
void line(std::ostream &os, const GenEvent &e)
Definition: GenEvent.h:676
TestHepMC::m_G4pdgID_tab
std::vector< int > m_G4pdgID_tab
Definition: TestHepMC.h:94
TestHepMC::m_h_px_dispVtxCheck
TH1F * m_h_px_dispVtxCheck
Definition: TestHepMC.h:105
TestHepMC::m_uknownPDGID_tab
std::vector< int > m_uknownPDGID_tab
Definition: TestHepMC.h:96
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
TestHepMC::m_eff_warn_threshold
double m_eff_warn_threshold
Definition: TestHepMC.h:49
TestHepMC::m_accur_margin
double m_accur_margin
Definition: TestHepMC.h:50
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TestHepMC::m_dumpEvent
bool m_dumpEvent
Definition: TestHepMC.h:47
TestHepMC::m_nonG4_energy_threshold
double m_nonG4_energy_threshold
Definition: TestHepMC.h:48
TestHepMC::m_h_pz_dispVtxCheck
TH1F * m_h_pz_dispVtxCheck
Definition: TestHepMC.h:107
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TestHepMC::m_momImbalanceTest
bool m_momImbalanceTest
Definition: TestHepMC.h:53
TestHepMC::m_max_dist
double m_max_dist
Definition: TestHepMC.h:48
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
TestHepMC::m_allowMissingXSec
bool m_allowMissingXSec
Definition: TestHepMC.h:47
TestHepMC::m_stableUnstableNoParentCheckRate
int m_stableUnstableNoParentCheckRate
Definition: TestHepMC.h:83
GenBase::m_ppSvc
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
Definition: GenBase.h:160
TestHepMC::m_unstableNoEndVtxCheckRate
int m_unstableNoEndVtxCheckRate
Definition: TestHepMC.h:74
TestHepMC::m_SusyPdgID_tab
std::vector< int > m_SusyPdgID_tab
Definition: TestHepMC.h:95
efficiency
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:128
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
CaloCondBlobAlgs_fillNoiseFromASCII.desc
desc
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:54
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TestHepMC::m_vertexStatuses
std::vector< int > m_vertexStatuses
Definition: TestHepMC.h:56
TestHepMC::m_undecayedPi0statuscode12CheckRate
int m_undecayedPi0statuscode12CheckRate
Definition: TestHepMC.h:73
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
TestHepMC::m_vtxNANandINFCheckRate
int m_vtxNANandINFCheckRate
Definition: TestHepMC.h:68
TestHepMC::m_h_photon_energy
TH1F * m_h_photon_energy
Definition: TestHepMC.h:118
lumiFormat.i
int i
Definition: lumiFormat.py:85
TestHepMC::m_partMomentumNANandINFCheckRate
int m_partMomentumNANandINFCheckRate
Definition: TestHepMC.h:72
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TestHepMC::m_h_beamparticle2_Energy
TH1F * m_h_beamparticle2_Energy
Definition: TestHepMC.h:127
TestHepMC::m_h_vyprod_dispVtxCheck
TH1F * m_h_vyprod_dispVtxCheck
Definition: TestHepMC.h:112
TestHepMC::m_undecayedPi0CheckRate
int m_undecayedPi0CheckRate
Definition: TestHepMC.h:85
GenBase::m_mcevents_const
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition: GenBase.h:163
TestHepMC::m_h_momentumImbalance_py
TH1F * m_h_momentumImbalance_py
Definition: TestHepMC.h:123
TestHepMC::m_vtxNaNTest
bool m_vtxNaNTest
Definition: TestHepMC.h:52
TestHepMC::m_nFail
int m_nFail
Definition: TestHepMC.h:59
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
TestHepMC::m_vtxDisplacedMoreThan_1m_CheckRate
int m_vtxDisplacedMoreThan_1m_CheckRate
Definition: TestHepMC.h:71
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
TestHepMC::m_h_vtxend_dispVtxCheck
TH1F * m_h_vtxend_dispVtxCheck
Definition: TestHepMC.h:114
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
TestHepMC::m_momNaNTest
bool m_momNaNTest
Definition: TestHepMC.h:52
TestHepMC::m_pi0NoVtxTest
bool m_pi0NoVtxTest
Definition: TestHepMC.h:54
TestHepMC::m_energyG4Test
bool m_energyG4Test
Definition: TestHepMC.h:52
TestHepMC::m_paramFile
std::string m_paramFile
Definition: TestHepMC.h:91
TestHepMC::m_h_pdgid_dispVtxCheck
TH1F * m_h_pdgid_dispVtxCheck
Definition: TestHepMC.h:103
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TestHepMC::m_h_photon_e2_p2_e2
TH1F * m_h_photon_e2_p2_e2
Definition: TestHepMC.h:119
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
TestHepMC::m_beamEnergyTest
bool m_beamEnergyTest
Definition: TestHepMC.h:52
GenBase::particleTable
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
Definition: GenBase.h:118
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
TestHepMC::m_h_vzprod_dispVtxCheck
TH1F * m_h_vzprod_dispVtxCheck
Definition: TestHepMC.h:113
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
TestHepMC::m_h_vy_dispVtxCheck
TH1F * m_h_vy_dispVtxCheck
Definition: TestHepMC.h:109
MC::Loops::loop_particles
const std::vector< Prt > & loop_particles() const
Definition: Loops.h:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
TestHepMC::m_beamEnergyCheckRate
int m_beamEnergyCheckRate
Definition: TestHepMC.h:67
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TestHepMC::m_energyImbalanceTest
bool m_energyImbalanceTest
Definition: TestHepMC.h:53
TestHepMC::m_nonG4_energyCheckRate
int m_nonG4_energyCheckRate
Definition: TestHepMC.h:88
TestHepMC::m_nonZeroPhotonMassCheckRate
int m_nonZeroPhotonMassCheckRate
Definition: TestHepMC.h:78
TestHepMC::m_min_tau
double m_min_tau
Definition: TestHepMC.h:48
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
TestHepMC::m_looper
MC::Loops< HepMC::GenEvent, HepMC::ConstGenParticlePtr, HepMC::ConstGenVertexPtr > m_looper
member to detect loops
Definition: TestHepMC.h:130
TestHepMC::m_invalidBeamParticlesCheckRate
int m_invalidBeamParticlesCheckRate
Definition: TestHepMC.h:65
PathResolverFindDataFile
std::string PathResolverFindDataFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:379
MC::Loops::loop_vertices
const std::vector< Vtx > & loop_vertices() const
Definition: Loops.h:28
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
TestHepMC::m_h_vxprod_dispVtxCheck
TH1F * m_h_vxprod_dispVtxCheck
Definition: TestHepMC.h:111
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
TestHepMC::m_nPass
int m_nPass
Definition: TestHepMC.h:58
TestHepMC::m_tau_eff_threshold
double m_tau_eff_threshold
Definition: TestHepMC.h:49
a
TList * a
Definition: liststreamerinfos.cxx:10
TestHepMC::m_cme_diff
double m_cme_diff
Definition: TestHepMC.h:45
TestHepMC::m_unknownPDGIDTest
bool m_unknownPDGIDTest
Definition: TestHepMC.h:54
h
TestHepMC::m_h_energy_dispVtxCheck
TH1F * m_h_energy_dispVtxCheck
Definition: TestHepMC.h:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
HepMC::valid_beam_particles
bool valid_beam_particles(const GenEvent *e)
Definition: GenEvent.h:681
GetAllXsec.xsec
xsec
Definition: GetAllXsec.py:85
GenBase::pdt
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
Definition: GenBase.h:123
TestHepMC::m_max_energy_diff
double m_max_energy_diff
Definition: TestHepMC.h:46
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
MC::isSimInteracting
bool isSimInteracting(const T &p)
Identify if the particle could interact with the detector during the simulation, e....
Definition: HepMCHelpers.h:60
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
TestHepMC::m_h_vz_dispVtxCheck
TH1F * m_h_vz_dispVtxCheck
Definition: TestHepMC.h:110
GenBase::GenBase
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: GenBase.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
TestHepMC::m_Status1ShortLifetime
int m_Status1ShortLifetime
Definition: TestHepMC.h:86
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
MC::Loops::findLoops
int findLoops(const Evt *evt, bool force)
Definition: Loops.h:31
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
TestHepMC::m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate
int m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate
Definition: TestHepMC.h:87
TestHepMC::m_max_dist_trans
double m_max_dist_trans
Definition: TestHepMC.h:48
TestHepMC::m_h_cmEnergyDiff
TH1F * m_h_cmEnergyDiff
Definition: TestHepMC.h:128
TestHepMC::m_undisplacedLLHdaughtersCheckRate
int m_undisplacedLLHdaughtersCheckRate
Definition: TestHepMC.h:77
TestHepMC::m_h_energyImbalance
TH1F * m_h_energyImbalance
Definition: TestHepMC.h:121
TestHepMC::m_h_beamparticle1_Energy
TH1F * m_h_beamparticle1_Energy
Definition: TestHepMC.h:126
TestHepMC::m_vtxDisplacedTest
bool m_vtxDisplacedTest
Definition: TestHepMC.h:52
TestHepMC::m_negativeEnergyTachyonicCheckRate
int m_negativeEnergyTachyonicCheckRate
Definition: TestHepMC.h:75
GenBase::particleData
const HepPDT::ParticleData * particleData(int pid) const
Access an element in the particle data table.
Definition: GenBase.h:126
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TestHepMC::m_h_energy_dispVtxCheck_lt10
TH1F * m_h_energy_dispVtxCheck_lt10
Definition: TestHepMC.h:102
GenBase::initialize
virtual StatusCode initialize() override
Definition: GenBase.cxx:17
TestHepMC::m_decayCheckRate
int m_decayCheckRate
Definition: TestHepMC.h:76
TestHepMC::m_undisplacedDaughtersTest
bool m_undisplacedDaughtersTest
Definition: TestHepMC.h:54
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
TestHepMC::m_lifeTimeTest
bool m_lifeTimeTest
Definition: TestHepMC.h:52
TestHepMC::m_h_photon_mass
TH1F * m_h_photon_mass
Definition: TestHepMC.h:117
ServiceHandle< ICondSvc >
TestHepMC::m_h_momentumImbalance_px
TH1F * m_h_momentumImbalance_px
Definition: TestHepMC.h:122