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

#include <PDGToG4Particle.h>

Inheritance diagram for iFatras::PDGToG4Particle:
Collaboration diagram for iFatras::PDGToG4Particle:

Public Types

typedef std::map< int, G4ParticleDefinition * > PDGG4ParticleMap
 

Public Member Functions

virtual StatusCode initialize () override
 AlgTool initailize method. More...
 
G4ParticleDefinition * getParticleDefinition (int pdgCode) const
 Returns the G4ParticleDefinition of particle with PDG ID pdgCode, 0 otherwise. More...
 
std::vector< std::pair< int, std::string > > listOfParticles () const
 returns a vector of pdgid / particlename pairs containing all particles More...
 
void printListOfParticles (bool withDecayTableOnly=false) const
 prints list of particles to stdout More...
 
 AthAlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor from base class. 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 sysInitialize () override
 Perform system initialization for an algorithm. 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, V, H > &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

std::map< int, G4ParticleDefinition * > predefinedParticles ()
 fills default particles in map More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

PDGG4ParticleMap m_pdgG4ParticleMap
 map from pdg codes to defined Geant4 particles More...
 
Gaudi::Property< std::vector< int > > m_useParticles
 
Gaudi::Property< bool > m_printList
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

AlgTool to convert a pdgCode into a particle definition used by the G4 decayer

Author
Joerg.Mechnich -at- cern.ch, Andreas.Salzburger -at- cern.ch

Definition at line 29 of file PDGToG4Particle.h.

Member Typedef Documentation

◆ PDGG4ParticleMap

typedef std::map<int,G4ParticleDefinition*> iFatras::PDGToG4Particle::PDGG4ParticleMap

Definition at line 52 of file PDGToG4Particle.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ AthAlgTool()

AthAlgTool::AthAlgTool

Constructor from base class.

Definition at line 31 of file AthAlgTool.cxx.

18  :
20 {
21 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > &  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< AlgTool > >::detStore ( ) const
inlineinherited

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ getParticleDefinition()

G4ParticleDefinition * iFatras::PDGToG4Particle::getParticleDefinition ( int  pdgCode) const

Returns the G4ParticleDefinition of particle with PDG ID pdgCode, 0 otherwise.

Definition at line 92 of file PDGToG4Particle.cxx.

93 {
94  G4ParticleDefinition* ret = 0;
95 
96  PDGG4ParticleMap::const_iterator it =
97  m_pdgG4ParticleMap.find( pdgCode);
98 
99  if( it != m_pdgG4ParticleMap.end()) ret = it->second;
100  else
101  {
102  it = m_pdgG4ParticleMap.find( std::abs( pdgCode));
103  if( it != m_pdgG4ParticleMap.end())
104  {
105  if( std::abs( it->second->GetPDGCharge()) < 0.1)
106  ret = it->second;
107  else
108  {
109  ATH_MSG_WARNING( "PDG Code " << pdgCode << " not found,"
110  << " " << -pdgCode << " exists but is charged!" );
111  }
112  }
113  }
114 
115  return ret;
116 }

◆ initialize()

StatusCode iFatras::PDGToG4Particle::initialize ( )
overridevirtual

AlgTool initailize method.

Definition at line 35 of file PDGToG4Particle.cxx.

36 {
37  // Update output level
38  ATH_MSG_VERBOSE( "initialize()" );
39 
40  /*-----------------------------------------------------------------------
41  * Fill map of particles
42  *-----------------------------------------------------------------------*/
43  static const auto s_predefinedParticles = predefinedParticles();
44 
45  if( m_useParticles.size() == 0)
46  {
47  ATH_MSG_INFO( "using all predefined particles" );
48  m_pdgG4ParticleMap.insert( s_predefinedParticles.begin(),
49  s_predefinedParticles.end());
50  ATH_MSG_INFO( "loaded " << m_pdgG4ParticleMap.size() << " particles" );
51  }
52  else
53  {
54  std::vector<int>::const_iterator pdgIt = m_useParticles.begin();
55  for( ; pdgIt != m_useParticles.end(); ++pdgIt)
56  {
57  PDGG4ParticleMap::const_iterator mapIt =
58  s_predefinedParticles.find( *pdgIt);
59  if( mapIt == s_predefinedParticles.end())
60  {
61  ATH_MSG_WARNING( "particle with pdg code " << *pdgIt
62  << " not found in list of predefined particles, ignoring" );
63  continue;
64  }
65 
66  if( m_pdgG4ParticleMap.find( *pdgIt) != m_pdgG4ParticleMap.end())
67  {
68  ATH_MSG_WARNING( "particle with pdg code " << *pdgIt
69  << " already loaded, ignoring" );
70  continue;
71  }
72 
73  m_pdgG4ParticleMap[*pdgIt] = mapIt->second;
74  }
75  }
76 
77  if( m_printList)
78  {
79  ATH_MSG_INFO( "List of loaded particles:" );
81  }
82 
83  return StatusCode::SUCCESS;
84 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ listOfParticles()

std::vector< std::pair< int, std::string > > iFatras::PDGToG4Particle::listOfParticles ( ) const

returns a vector of pdgid / particlename pairs containing all particles

Definition at line 123 of file PDGToG4Particle.cxx.

124 {
125  std::vector<std::pair<int,std::string> > ret;
126 
127  for( PDGG4ParticleMap::const_iterator it = m_pdgG4ParticleMap.begin();
128  it != m_pdgG4ParticleMap.end(); ++it)
129  {
130  // Only return matter particles (for consistency with HepPDT)
131  if( it->first > 0)
132  {
133  ret.push_back( std::make_pair( it->first, it->second->GetParticleName()));
134  }
135  }
136 
137  return ret;
138 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::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< AlgTool > >::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.

◆ predefinedParticles()

std::map< int, G4ParticleDefinition * > iFatras::PDGToG4Particle::predefinedParticles ( )
private

fills default particles in map

map of predefined particles

Helper to fill map

Definition at line 194 of file PDGToG4Particle.cxx.

195 {
197  std::map<int,G4ParticleDefinition*> predefinedParticles;
198 
200  auto addParticle = [&](G4ParticleDefinition* pDef) {
201  if (pDef) predefinedParticles[pDef->GetPDGEncoding()] = pDef;
202  };
203 
204  // Gauge and Higgs Bosons
205  addParticle( G4Gamma::GammaDefinition());
206 
207  // Leptons
208  addParticle( G4Electron::ElectronDefinition());
209  addParticle( G4NeutrinoE::NeutrinoEDefinition());
210  addParticle( G4MuonMinus::MuonMinusDefinition());
211  addParticle( G4NeutrinoMu::NeutrinoMuDefinition());
212  addParticle( G4TauMinus::TauMinusDefinition());
213  addParticle( G4NeutrinoTau::NeutrinoTauDefinition());
214  addParticle( G4Positron::PositronDefinition());
215  addParticle( G4AntiNeutrinoE::AntiNeutrinoEDefinition());
216  addParticle( G4MuonPlus::MuonPlusDefinition());
217  addParticle( G4AntiNeutrinoMu::AntiNeutrinoMuDefinition());
218  addParticle( G4TauPlus::TauPlusDefinition());
219  addParticle( G4AntiNeutrinoTau::AntiNeutrinoTauDefinition());
220 
221  // Light I=1 Mesons
222  addParticle( G4PionZero::PionZeroDefinition());
223  addParticle( G4PionPlus::PionPlusDefinition());
224  addParticle( G4PionMinus::PionMinusDefinition());
225 
226  // Light I=0 Mesons
227  addParticle( G4Eta::EtaDefinition());
228  addParticle( G4EtaPrime::EtaPrimeDefinition());
229 
230  // Strange Mesons
231  addParticle( G4KaonZeroLong::KaonZeroLongDefinition());
232  addParticle( G4KaonZeroShort::KaonZeroShortDefinition());
233  addParticle( G4KaonZero::KaonZeroDefinition());
234  addParticle( G4KaonPlus::KaonPlusDefinition());
235  addParticle( G4AntiKaonZero::AntiKaonZeroDefinition());
236  addParticle( G4KaonMinus::KaonMinusDefinition());
237 
238  // Charmed Mesons
239  addParticle( G4DMesonPlus::DMesonPlusDefinition());
240  addParticle( G4DMesonZero::DMesonZeroDefinition());
241  addParticle( G4DsMesonPlus::DsMesonPlusDefinition());
242  addParticle( G4DMesonMinus::DMesonMinusDefinition());
243  addParticle( G4AntiDMesonZero::AntiDMesonZeroDefinition());
244  addParticle( G4DsMesonMinus::DsMesonMinusDefinition());
245 
246  // Bottom Mesons
247  addParticle( G4BMesonZero::BMesonZeroDefinition());
248  addParticle( G4BMesonPlus::BMesonPlusDefinition());
249  addParticle( G4BsMesonZero::BsMesonZeroDefinition());
250  addParticle( G4AntiBMesonZero::AntiBMesonZeroDefinition());
251  addParticle( G4BMesonMinus::BMesonMinusDefinition());
252  addParticle( G4AntiBsMesonZero::AntiBsMesonZeroDefinition());
253 
254  // ccbar Mesons
255  addParticle( G4JPsi::JPsiDefinition());
256 
257  // Light Baryons
258  addParticle( G4Proton::ProtonDefinition());
259  addParticle( G4Neutron::NeutronDefinition());
260  addParticle( G4AntiProton::AntiProtonDefinition());
261  addParticle( G4AntiNeutron::AntiNeutronDefinition());
262 
263  // Strange Baryons
264  addParticle( G4Lambda::LambdaDefinition());
265  addParticle( G4SigmaPlus::SigmaPlusDefinition());
266  addParticle( G4SigmaZero::SigmaZeroDefinition());
267  addParticle( G4SigmaMinus::SigmaMinusDefinition());
268  addParticle( G4XiZero::XiZeroDefinition());
269  addParticle( G4XiMinus::XiMinusDefinition());
270  addParticle( G4OmegaMinus::OmegaMinusDefinition());
271  addParticle( G4AntiLambda::AntiLambdaDefinition());
272  addParticle( G4AntiSigmaPlus::AntiSigmaPlusDefinition());
273  addParticle( G4AntiSigmaZero::AntiSigmaZeroDefinition());
274  addParticle( G4AntiSigmaMinus::AntiSigmaMinusDefinition());
275  addParticle( G4AntiXiZero::AntiXiZeroDefinition());
276  addParticle( G4AntiXiMinus::AntiXiMinusDefinition());
277  addParticle( G4AntiOmegaMinus::AntiOmegaMinusDefinition());
278 
279  // Charmed Baryons
280  addParticle( G4LambdacPlus::LambdacPlusDefinition());
281  addParticle( G4SigmacPlusPlus::SigmacPlusPlusDefinition());
282  addParticle( G4SigmacPlus::SigmacPlusDefinition());
283  addParticle( G4SigmacZero::SigmacZeroDefinition());
284  addParticle( G4XicPlus::XicPlusDefinition());
285  addParticle( G4XicZero::XicZeroDefinition());
286  addParticle( G4OmegacZero::OmegacZeroDefinition());
287  addParticle( G4AntiLambdacPlus::AntiLambdacPlusDefinition());
288  addParticle( G4AntiSigmacPlusPlus::AntiSigmacPlusPlusDefinition());
289  addParticle( G4AntiSigmacPlus::AntiSigmacPlusDefinition());
290  addParticle( G4AntiSigmacZero::AntiSigmacZeroDefinition());
291  addParticle( G4AntiXicPlus::AntiXicPlusDefinition());
292  addParticle( G4AntiXicZero::AntiXicZeroDefinition());
293  addParticle( G4AntiOmegacZero::AntiOmegacZeroDefinition());
294 
295 #ifdef PDGTOG4PARTICLE_USE_SUSY
296  // SUSY particles from G4Extensions in ATHENA (incomplete)
297  addParticle( G4SElectronMinus::SElectronMinusDefinition());
298  addParticle( G4SElectronPlus::SElectronPlusDefinition());
299  addParticle( G4SMuonMinus::SMuonMinusDefinition());
300  addParticle( G4SMuonPlus::SMuonPlusDefinition());
301  addParticle( G4STauMinus::STauMinusDefinition());
302  addParticle( G4STauPlus::STauPlusDefinition());
303 #endif
304 
305  return predefinedParticles;
306 }

◆ printListOfParticles()

void iFatras::PDGToG4Particle::printListOfParticles ( bool  withDecayTableOnly = false) const

prints list of particles to stdout

Definition at line 145 of file PDGToG4Particle.cxx.

146 {
147  std::cout << "****************************************"
148  << "****************************************"
149  << std::endl;
150 
151  std::cout << "* "
152  << std::setw( 8) << "PDG Code" << " "
153  << std::setw(16) << "Particle Name" << " "
154  << std::setw( 8) << "G4 PDGID" << " "
155  << std::setw( 8) << "Mass" << " "
156  << std::setw(16) << "Width" << " "
157  << std::setw( 6) << "Charge" << " "
158  << std::setw( 7) << "#DecChn" << " "
159  << std::endl;
160 
161  std::cout << "****************************************"
162  << "****************************************"
163  << std::endl;
164 
165  for( PDGG4ParticleMap::const_iterator it = m_pdgG4ParticleMap.begin();
166  it != m_pdgG4ParticleMap.end(); ++it)
167  {
168  G4DecayTable* dt = it->second->GetDecayTable();
169  int nDecayChannels = 0;
170  if( dt) nDecayChannels = dt->entries();
171  else if( withDecayTableOnly) continue;
172 
173  std::cout << "* "
174  << std::setw( 8) << it->first << " "
175  << std::setw(16) << it->second->GetParticleName() << " "
176  << std::setw( 8) << it->second->GetPDGEncoding() << " "
177  << std::setw( 8) << it->second->GetPDGMass() << " "
178  << std::setw(16) << it->second->GetPDGWidth() << " "
179  << std::setw( 6) << it->second->GetPDGCharge() << " "
180  << std::setw( 7) << nDecayChannels << " "
181  << std::endl;
182  }
183 
184  std::cout << "****************************************"
185  << "****************************************"
186  << std::endl;
187 }

◆ 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< AlgTool > >::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< AlgTool > >::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()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_pdgG4ParticleMap

PDGG4ParticleMap iFatras::PDGToG4Particle::m_pdgG4ParticleMap
private

map from pdg codes to defined Geant4 particles

Definition at line 62 of file PDGToG4Particle.h.

◆ m_printList

Gaudi::Property<bool> iFatras::PDGToG4Particle::m_printList
private
Initial value:
{this, "PrintList", false,
"Print list of loaded particles in initialize()"}

Definition at line 70 of file PDGToG4Particle.h.

◆ m_useParticles

Gaudi::Property<std::vector<int> > iFatras::PDGToG4Particle::m_useParticles
private
Initial value:
{this, "UseParticles", {},
"List of particles which should be available for conversion"}

Definition at line 67 of file PDGToG4Particle.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
iFatras::PDGToG4Particle::m_useParticles
Gaudi::Property< std::vector< int > > m_useParticles
Definition: PDGToG4Particle.h:67
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
skel.it
it
Definition: skel.GENtoEVGEN.py:407
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
iFatras::PDGToG4Particle::predefinedParticles
std::map< int, G4ParticleDefinition * > predefinedParticles()
fills default particles in map
Definition: PDGToG4Particle.cxx:194
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:56
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
iFatras::PDGToG4Particle::printListOfParticles
void printListOfParticles(bool withDecayTableOnly=false) const
prints list of particles to stdout
Definition: PDGToG4Particle.cxx:145
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
iFatras::PDGToG4Particle::m_printList
Gaudi::Property< bool > m_printList
Definition: PDGToG4Particle.h:70
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
iFatras::PDGToG4Particle::m_pdgG4ParticleMap
PDGG4ParticleMap m_pdgG4ParticleMap
map from pdg codes to defined Geant4 particles
Definition: PDGToG4Particle.h:62
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
fitman.k
k
Definition: fitman.py:528