ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_Fatras
ISF_FatrasToolsG4
ISF_FatrasToolsG4
PDGToG4Particle.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef FATRASG4TOOLS_PDGTOG4PARTICLE_H
6
#define FATRASG4TOOLS_PDGTOG4PARTICLE_H
7
8
// Gaudi/Athena
9
#include "
AthenaBaseComps/AthAlgTool.h
"
10
#include "GaudiKernel/MsgStream.h"
11
12
// STL
13
#include <map>
14
#include <vector>
15
#include <string>
16
17
class
G4ParticleDefinition;
18
19
namespace
iFatras
20
{
21
28
29
class
PDGToG4Particle
:
public
AthAlgTool
30
{
31
public
:
33
using
AthAlgTool::AthAlgTool
;
34
36
virtual
StatusCode
initialize
()
override
;
37
42
G4ParticleDefinition*
getParticleDefinition
(
int
pdgCode)
const
;
43
47
std::vector<std::pair<int,std::string> >
listOfParticles
()
const
;
48
50
void
printListOfParticles
(
bool
withDecayTableOnly=
false
)
const
;
51
52
typedef
std::map<int,G4ParticleDefinition*>
PDGG4ParticleMap
;
53
54
private
:
55
/*---------------------------------------------------------------------
56
* Private members
57
*---------------------------------------------------------------------*/
59
std::map<int,G4ParticleDefinition*>
predefinedParticles
();
60
62
PDGG4ParticleMap
m_pdgG4ParticleMap
;
63
64
/*---------------------------------------------------------------------
65
* Properties
66
*---------------------------------------------------------------------*/
67
Gaudi::Property<std::vector<int>>
m_useParticles
{
this
,
"UseParticles"
, {},
68
"List of particles which should be available for conversion"
};
69
70
Gaudi::Property<bool>
m_printList
{
this
,
"PrintList"
,
false
,
71
"Print list of loaded particles in initialize()"
};
72
73
};
74
}
75
76
#endif
// FATRASG4TOOLS_PDGTOG4PARTICLE_H
AthAlgTool.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
iFatras::PDGToG4Particle
AlgTool to convert a pdgCode into a particle definition used by the G4 decayer.
Definition
PDGToG4Particle.h:30
iFatras::PDGToG4Particle::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor from base class.
Definition
AthAlgTool.cxx:16
iFatras::PDGToG4Particle::m_useParticles
Gaudi::Property< std::vector< int > > m_useParticles
Definition
PDGToG4Particle.h:67
iFatras::PDGToG4Particle::getParticleDefinition
G4ParticleDefinition * getParticleDefinition(int pdgCode) const
Returns the G4ParticleDefinition of particle with PDG ID pdgCode, 0 otherwise.
Definition
PDGToG4Particle.cxx:92
iFatras::PDGToG4Particle::printListOfParticles
void printListOfParticles(bool withDecayTableOnly=false) const
prints list of particles to stdout
Definition
PDGToG4Particle.cxx:145
iFatras::PDGToG4Particle::PDGG4ParticleMap
std::map< int, G4ParticleDefinition * > PDGG4ParticleMap
Definition
PDGToG4Particle.h:52
iFatras::PDGToG4Particle::predefinedParticles
std::map< int, G4ParticleDefinition * > predefinedParticles()
fills default particles in map
Definition
PDGToG4Particle.cxx:194
iFatras::PDGToG4Particle::listOfParticles
std::vector< std::pair< int, std::string > > listOfParticles() const
returns a vector of pdgid / particlename pairs containing all particles
Definition
PDGToG4Particle.cxx:123
iFatras::PDGToG4Particle::initialize
virtual StatusCode initialize() override
AlgTool initailize method.
Definition
PDGToG4Particle.cxx:35
iFatras::PDGToG4Particle::m_printList
Gaudi::Property< bool > m_printList
Definition
PDGToG4Particle.h:70
iFatras::PDGToG4Particle::m_pdgG4ParticleMap
PDGG4ParticleMap m_pdgG4ParticleMap
map from pdg codes to defined Geant4 particles
Definition
PDGToG4Particle.h:62
iFatras
Definition
ActsFatrasSimTool.h:63
Generated on
for ATLAS Offline Software by
1.17.0