ATLAS Offline Software
Public Types | Public Member Functions | Static 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

 PDGToG4Particle (const std::string &, const std::string &, const IInterface *)
 Default constructor. More...
 
virtual ~PDGToG4Particle ()=default
 
StatusCode initialize ()
 AlgTool initailize method. More...
 
virtual G4ParticleDefinition * getParticleDefinition (int pdgCode) const
 Returns the G4ParticleDefinition of particle with PDG ID pdgCode, 0 otherwise. More...
 
virtual std::vector< std::pair< int, std::string > > listOfParticles () const
 returns a vector of pdgid / particlename pairs containing all particles More...
 
virtual void printListOfParticles (bool withDecayTableOnly=false) const
 prints list of particles to stdout 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 > &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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

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 > &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

PDGG4ParticleMap m_pdgG4ParticleMap
 map from pdg codes to defined Geant4 particles More...
 
std::vector< int > m_useParticles
 List of particles which should be available for conversion. More...
 
bool m_printList
 Print list of loaded particles in initialize() More...
 
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 31 of file PDGToG4Particle.h.

Member Typedef Documentation

◆ PDGG4ParticleMap

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

Definition at line 61 of file PDGToG4Particle.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PDGToG4Particle()

iFatras::PDGToG4Particle::PDGToG4Particle ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Default constructor.

Definition at line 33 of file PDGToG4Particle.cxx.

36  : AthAlgTool(t,n,p),
38 {
39  declareInterface<iFatras::PDGToG4Particle>(this);
40 
41  declareProperty("UseParticles", m_useParticles);
42  declareProperty("PrintList", m_printList=false);
43 
44 }

◆ ~PDGToG4Particle()

virtual iFatras::PDGToG4Particle::~PDGToG4Particle ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< 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 > &  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
virtual

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

Definition at line 109 of file PDGToG4Particle.cxx.

110 {
111  G4ParticleDefinition* ret = 0;
112 
113  PDGG4ParticleMap::const_iterator it =
114  m_pdgG4ParticleMap.find( pdgCode);
115 
116  if( it != m_pdgG4ParticleMap.end()) ret = it->second;
117  else
118  {
119  it = m_pdgG4ParticleMap.find( std::abs( pdgCode));
120  if( it != m_pdgG4ParticleMap.end())
121  {
122  if( std::abs( it->second->GetPDGCharge()) < 0.1)
123  ret = it->second;
124  else
125  {
126  ATH_MSG_WARNING( "PDG Code " << pdgCode << " not found,"
127  << " " << -pdgCode << " exists but is charged!" );
128  }
129  }
130  }
131 
132  return ret;
133 }

◆ initialize()

StatusCode iFatras::PDGToG4Particle::initialize ( )

AlgTool initailize method.

Definition at line 52 of file PDGToG4Particle.cxx.

53 {
54  // Update output level
55  ATH_MSG_VERBOSE( "initialize()" );
56 
57  /*-----------------------------------------------------------------------
58  * Fill map of particles
59  *-----------------------------------------------------------------------*/
60  static const auto s_predefinedParticles = predefinedParticles();
61 
62  if( m_useParticles.size() == 0)
63  {
64  ATH_MSG_INFO( "using all predefined particles" );
65  m_pdgG4ParticleMap.insert( s_predefinedParticles.begin(),
66  s_predefinedParticles.end());
67  ATH_MSG_INFO( "loaded " << m_pdgG4ParticleMap.size() << " particles" );
68  }
69  else
70  {
71  std::vector<int>::const_iterator pdgIt = m_useParticles.begin();
72  for( ; pdgIt != m_useParticles.end(); ++pdgIt)
73  {
74  PDGG4ParticleMap::const_iterator mapIt =
75  s_predefinedParticles.find( *pdgIt);
76  if( mapIt == s_predefinedParticles.end())
77  {
78  ATH_MSG_WARNING( "particle with pdg code " << *pdgIt
79  << " not found in list of predefined particles, ignoring" );
80  continue;
81  }
82 
83  if( m_pdgG4ParticleMap.find( *pdgIt) != m_pdgG4ParticleMap.end())
84  {
85  ATH_MSG_WARNING( "particle with pdg code " << *pdgIt
86  << " already loaded, ignoring" );
87  continue;
88  }
89 
90  m_pdgG4ParticleMap[*pdgIt] = mapIt->second;
91  }
92  }
93 
94  if( m_printList)
95  {
96  ATH_MSG_INFO( "List of loaded particles:" );
98  }
99 
100  return StatusCode::SUCCESS;
101 }

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

◆ interfaceID()

static const InterfaceID& iFatras::PDGToG4Particle::interfaceID ( )
inlinestatic

AlgTool interface methods.

Definition at line 45 of file PDGToG4Particle.h.

45 { return IID_PDGToG4Particle; }

◆ listOfParticles()

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

returns a vector of pdgid / particlename pairs containing all particles

Definition at line 140 of file PDGToG4Particle.cxx.

141 {
142  std::vector<std::pair<int,std::string> > ret;
143 
144  for( PDGG4ParticleMap::const_iterator it = m_pdgG4ParticleMap.begin();
145  it != m_pdgG4ParticleMap.end(); ++it)
146  {
147  // Only return matter particles (for consistency with HepPDT)
148  if( it->first > 0)
149  {
150  ret.push_back( std::make_pair( it->first, it->second->GetParticleName()));
151  }
152  }
153 
154  return ret;
155 }

◆ 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 211 of file PDGToG4Particle.cxx.

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

◆ printListOfParticles()

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

prints list of particles to stdout

Definition at line 162 of file PDGToG4Particle.cxx.

163 {
164  std::cout << "****************************************"
165  << "****************************************"
166  << std::endl;
167 
168  std::cout << "* "
169  << std::setw( 8) << "PDG Code" << " "
170  << std::setw(16) << "Particle Name" << " "
171  << std::setw( 8) << "G4 PDGID" << " "
172  << std::setw( 8) << "Mass" << " "
173  << std::setw(16) << "Width" << " "
174  << std::setw( 6) << "Charge" << " "
175  << std::setw( 7) << "#DecChn" << " "
176  << std::endl;
177 
178  std::cout << "****************************************"
179  << "****************************************"
180  << std::endl;
181 
182  for( PDGG4ParticleMap::const_iterator it = m_pdgG4ParticleMap.begin();
183  it != m_pdgG4ParticleMap.end(); ++it)
184  {
185  G4DecayTable* dt = it->second->GetDecayTable();
186  int nDecayChannels = 0;
187  if( dt) nDecayChannels = dt->entries();
188  else if( withDecayTableOnly) continue;
189 
190  std::cout << "* "
191  << std::setw( 8) << it->first << " "
192  << std::setw(16) << it->second->GetParticleName() << " "
193  << std::setw( 8) << it->second->GetPDGEncoding() << " "
194  << std::setw( 8) << it->second->GetPDGMass() << " "
195  << std::setw(16) << it->second->GetPDGWidth() << " "
196  << std::setw( 6) << it->second->GetPDGCharge() << " "
197  << std::setw( 7) << nDecayChannels << " "
198  << std::endl;
199  }
200 
201  std::cout << "****************************************"
202  << "****************************************"
203  << std::endl;
204 }

◆ 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 71 of file PDGToG4Particle.h.

◆ m_printList

bool iFatras::PDGToG4Particle::m_printList
private

Print list of loaded particles in initialize()

Definition at line 80 of file PDGToG4Particle.h.

◆ m_useParticles

std::vector<int> iFatras::PDGToG4Particle::m_useParticles
private

List of particles which should be available for conversion.

Definition at line 77 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:
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthCommonDataStore
Definition: AthCommonDataStore.h:52
iFatras::PDGToG4Particle::predefinedParticles
std::map< int, G4ParticleDefinition * > predefinedParticles()
fills default particles in map
Definition: PDGToG4Particle.cxx:211
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ret
T ret(T t)
Definition: rootspy.cxx:260
iFatras::PDGToG4Particle::m_useParticles
std::vector< int > m_useParticles
List of particles which should be available for conversion.
Definition: PDGToG4Particle.h:77
beamspotman.n
n
Definition: beamspotman.py:731
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
iFatras::PDGToG4Particle::m_printList
bool m_printList
Print list of loaded particles in initialize()
Definition: PDGToG4Particle.h:80
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
iFatras::PDGToG4Particle::printListOfParticles
virtual void printListOfParticles(bool withDecayTableOnly=false) const
prints list of particles to stdout
Definition: PDGToG4Particle.cxx:162
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
iFatras::PDGToG4Particle::m_pdgG4ParticleMap
PDGG4ParticleMap m_pdgG4ParticleMap
map from pdg codes to defined Geant4 particles
Definition: PDGToG4Particle.h:71
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528