ATLAS Offline Software
G4ParticleDecayHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_FATRASTOOLSG4_G4PARTICLEDECAYHELPER_H
6 #define ISF_FATRASTOOLSG4_G4PARTICLEDECAYHELPER_H
7 
8 // Gaudi & Athena
10 #include "GaudiKernel/ServiceHandle.h"
11 #include "GaudiKernel/ToolHandle.h"
14 // ISF
16 // iFatras
18 // STD
19 #include <vector>
20 #include <math.h>
21 
22 class StoreGateSvc;
23 
24 namespace ISF {
25  class ISFParticle;
26  class IParticleBroker;
27  class ITruthSvc;
28  class IG4RunManagerHelper;
29 }
30 
31 namespace iFatras {
32 
33  class ITrackCreator;
34  class PDGToG4Particle;
35  class IPhysicsValidationTool;
36 
45  class ATLAS_NOT_THREAD_SAFE G4ParticleDecayHelper : public extends<AthAlgTool, IParticleDecayHelper> { // deprecated: ATLASSIM-6020
46  public:
48  G4ParticleDecayHelper(const std::string&,const std::string&,const IInterface*);
51 
56 
58  double freePath(const ISF::ISFParticle& isp) const;
59 
61  void decay(const ISF::ISFParticle& isp,
62  const Amg::Vector3D& vertex,
63  const Amg::Vector3D& mom,
64  double timeStamp = 0) const;
65 
67  std::vector<ISF::ISFParticle*> decayParticle(const ISF::ISFParticle& parent,
68  const Amg::Vector3D& vertex,
69  const Amg::Vector3D& mom,
70  double timeStamp = 0) const;
71 
72 
73  private:
75  bool initG4RunManager() const;
76 
78  void handleDecayParticles(const ISF::ISFParticle& isp,
79  const ISF::ISFParticleVector& children) const;
80 
81  /*------------------------------------------------------------
82  * ServiceHandles
83  *------------------------------------------------------------*/
86 
87 
89  CLHEP::HepRandomEngine* m_randomEngine;
90  std::string m_randomEngineName;
91  std::string m_G4RandomEngineName;
92 
93  /*------------------------------------------------------------
94  * ToolHandles
95  *------------------------------------------------------------*/
96  ToolHandle<ISF::IG4RunManagerHelper> m_g4RunManagerHelper;
97  ToolHandle<PDGToG4Particle> m_pdgToG4Conv;
98 
101  ToolHandle<IPhysicsValidationTool> m_validationTool;
102 
103  };
104 
105 }
106 
107 #endif
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
iFatras::G4ParticleDecayHelper::m_truthRecordSvc
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
Truth Svc for truth tree.
Definition: G4ParticleDecayHelper.h:85
IParticleDecayHelper.h
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
initialize
void initialize()
Definition: run_EoverP.cxx:894
ISF::ISFParticle
Definition: ISFParticle.h:42
iFatras::G4ParticleDecayHelper::m_g4RunManagerHelper
ToolHandle< ISF::IG4RunManagerHelper > m_g4RunManagerHelper
G4RunManager needs to be initialized before G4 tables are accessed.
Definition: G4ParticleDecayHelper.h:96
ISFParticleContainer.h
iFatras
Definition: ActsFatrasSimTool.h:55
iFatras::G4ParticleDecayHelper::m_pdgToG4Conv
ToolHandle< PDGToG4Particle > m_pdgToG4Conv
Handle for the PDGToG4Particle converter tool.
Definition: G4ParticleDecayHelper.h:97
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
iFatras::G4ParticleDecayHelper::m_randomEngineName
std::string m_randomEngineName
Name of the random number stream.
Definition: G4ParticleDecayHelper.h:90
ISF::ISFParticleVector
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Definition: ISFParticleContainer.h:26
iFatras::G4ParticleDecayHelper::m_rndmSvc
ServiceHandle< IAtRndmGenSvc > m_rndmSvc
Random Svc.
Definition: G4ParticleDecayHelper.h:88
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IAtRndmGenSvc.h
iFatras::G4ParticleDecayHelper::m_randomEngine
CLHEP::HepRandomEngine * m_randomEngine
Random engine (updated to streams)
Definition: G4ParticleDecayHelper.h:89
iFatras::G4ParticleDecayHelper::m_particleBroker
ServiceHandle< ISF::IParticleBroker > m_particleBroker
Broker Svc for ISF particles.
Definition: G4ParticleDecayHelper.h:84
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
iFatras::G4ParticleDecayHelper::m_validationTool
ToolHandle< IPhysicsValidationTool > m_validationTool
the ntuple
Definition: G4ParticleDecayHelper.h:101
xAOD::timeStamp
setEventNumber timeStamp
Definition: EventInfo_v1.cxx:128
iFatras::G4ParticleDecayHelper::m_G4RandomEngineName
std::string m_G4RandomEngineName
Name of the random number stream for G4 tools.
Definition: G4ParticleDecayHelper.h:91
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
iFatras::G4ParticleDecayHelper::m_validationMode
bool m_validationMode
Validation output with histogram service.
Definition: G4ParticleDecayHelper.h:100
python.DecayParser.children
children
Definition: DecayParser.py:32
checker_macros.h
Define macros for attributes used to control the static checker.
iFatras::G4ParticleDecayHelper
Definition: G4ParticleDecayHelper.h:45
ServiceHandle< ISF::IParticleBroker >