ATLAS Offline Software
Loading...
Searching...
No Matches
G4HadIntProcessor.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_G4HADINTPROCESSOR_H
6#define ISF_FATRASTOOLSG4_G4HADINTPROCESSOR_H
7
8// GaudiKernel & Athena
12#include "GaudiKernel/ToolHandle.h"
13#include "GaudiKernel/ServiceHandle.h"
14
15// Fatras
17
18// Geant4
19#include "G4ThreeVector.hh"
20
21// Trk
23
24// ISF
26
27// Forward Declarations
28class G4DynamicParticle;
29class G4VProcess;
30class G4RunManager;
31class G4VUserPhysicsList;
32class G4LayerDetectorConstruction;
33class G4LayerPrimaryGeneratorAction;
34class G4LayerTrackingAction;
35class G4Step;
36class G4StepPoint;
38class G4Material;
39class G4MaterialCutsCouple;
40
41namespace Trk {
42 class Material;
43 class MaterialProperties; // TODO: get rid of MatProp dependence
44}
45
46namespace ISF {
47 class IParticleBroker;
48 class ITruthSvc;
50}
51
52namespace iFatras {
53
61
62 class ATLAS_NOT_THREAD_SAFE G4HadIntProcessor : public extends<AthAlgTool, iFatras::IHadronicInteractionProcessor> { // deprecated: ATLASSIM-6020
63 public:
65 G4HadIntProcessor(const std::string&,const std::string&,const IInterface*);
67 virtual ~G4HadIntProcessor();
68
70 StatusCode initialize();
72 StatusCode finalize();
73
75 bool hadronicInteraction(const Amg::Vector3D& position, const Amg::Vector3D& momentum,
76 double p, double E, double charge,
77 const Trk::MaterialProperties& mprop, double pathCorrection,
78 Trk::ParticleHypothesis particle=Trk::pion) const;
79
80 bool doHadronicInteraction(double time, const Amg::Vector3D& position, const Amg::Vector3D& momentum,
81 const Trk::Material *ematprop,
83 bool processSecondaries=true) const;
84
87 const Amg::Vector3D& position, const Amg::Vector3D& momentum,
88 const Trk::Material *ematprop,
89 Trk::ParticleHypothesis particle=Trk::pion) const ;
90
91 private:
93 StatusCode initG4RunManager ATLAS_NOT_THREAD_SAFE ();
94
97 double time, const Amg::Vector3D& position, const Amg::Vector3D& momentum,
98 const Trk::Material *ematprop) const;
99
101 std::map<int,G4VProcess*>::const_iterator initProcessPDG(int pdg);
102
104 unsigned int retrieveG4MaterialIndex(const Trk::Material* ematprop) const;
105
108
109 ToolHandle<ISF::IG4RunManagerHelper> m_g4RunManagerHelper;
110
113
114 /* scale factors for hadronic/electromagnetic interactions */
116
117 // internal steering : clone type
119
121 std::map<int, G4VProcess*> m_g4HadrInelasticProcesses;
122 std::map<int, G4VProcess*> m_g4HadrElasticProcesses;
123
124 std::vector<std::pair<float,std::pair< G4Material*, G4MaterialCutsCouple> > > m_g4Material;
125
129
131 CLHEP::HepRandomEngine* m_randomEngine;
132 std::string m_randomEngineName;
133
134 };
135
136}
137
138#endif
double charge(const T &p)
Definition AtlasPID.h:997
Define macros for attributes used to control the static checker.
ATLAS custom singleton run manager.
@ class IParticleBroker
The generic ISF particle definition,.
Definition ISFParticle.h:42
@ class ITruthSvc
Definition ITruthSvc.h:29
Material with information about thickness of material.
A common object to be contained by.
Definition Material.h:117
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
double m_minMomentum
Geant4 processes <PDGcode, process> TODO : fission, capture.
std::map< int, G4VProcess * > m_g4HadrInelasticProcesses
ISF::ISFParticleVector doHadIntOnLayer(const ISF::ISFParticle *parent, double time, const Amg::Vector3D &position, const Amg::Vector3D &momentum, const Trk::Material *ematprop, Trk::ParticleHypothesis particle=Trk::pion) const
interface for processing of the presampled nuclear interactions on layer
std::vector< std::pair< float, std::pair< G4Material *, G4MaterialCutsCouple > > > m_g4Material
CLHEP::HepRandomEngine * m_randomEngine
Random engine.
ISF::ISFParticleVector getHadState(const ISF::ISFParticle *parent, double time, const Amg::Vector3D &position, const Amg::Vector3D &momentum, const Trk::Material *ematprop) const
collect secondaries for layer material update
G4HadIntProcessor(const std::string &, const std::string &, const IInterface *)
AlgTool constructor for G4HadIntProcessor.
bool doHadronicInteraction(double time, const Amg::Vector3D &position, const Amg::Vector3D &momentum, const Trk::Material *ematprop, Trk::ParticleHypothesis particle=Trk::pion, bool processSecondaries=true) const
std::map< int, G4VProcess * > m_g4HadrElasticProcesses
ServiceHandle< IAtRndmGenSvc > m_rndGenSvc
bool hadronicInteraction(const Amg::Vector3D &position, const Amg::Vector3D &momentum, double p, double E, double charge, const Trk::MaterialProperties &mprop, double pathCorrection, Trk::ParticleHypothesis particle=Trk::pion) const
interface for processing of the nuclear interactions
ServiceHandle< ISF::IParticleBroker > m_particleBroker
ISF services & Tools.
unsigned int retrieveG4MaterialIndex(const Trk::Material *ematprop) const
random number service
StatusCode finalize()
AlgTool finalize method.
std::map< int, G4VProcess * >::const_iterator initProcessPDG(int pdg)
choose for list of predefined (pure) materials
StatusCode initG4RunManager ATLAS_NOT_THREAD_SAFE()
initialize G4RunManager on first call if not done by then
std::string m_randomEngineName
Name of the random number stream.
ToolHandle< ISF::IG4RunManagerHelper > m_g4RunManagerHelper
steering: enable elastic interactions?
Eigen::Matrix< double, 3, 1 > Vector3D
ISFParticleOrderedQueue.
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Ensure that the ATLAS eigen extensions are properly loaded.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
void initialize()