ATLAS Offline Software
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
28 class G4DynamicParticle;
29 class G4VProcess;
30 class G4RunManager;
31 class G4VUserPhysicsList;
32 class G4LayerDetectorConstruction;
33 class G4LayerPrimaryGeneratorAction;
34 class G4LayerTrackingAction;
35 class G4Step;
36 class G4StepPoint;
37 class G4AtlasRunManager;
38 class G4Material;
39 class G4MaterialCutsCouple;
40 
41 namespace Trk {
42  class Material;
43  class MaterialProperties; // TODO: get rid of MatProp dependence
44 }
45 
46 namespace ISF {
47  class IParticleBroker;
48  class ITruthSvc;
49  class IG4RunManagerHelper;
50 }
51 
52 namespace iFatras {
53 
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 
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,
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 
86  ISF::ISFParticleVector doHadIntOnLayer(const ISF::ISFParticle* parent, double time,
87  const Amg::Vector3D& position, const Amg::Vector3D& momentum,
88  const Trk::Material *ematprop,
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
iFatras::G4HadIntProcessor::m_doElastic
bool m_doElastic
Definition: G4HadIntProcessor.h:112
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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::G4HadIntProcessor::m_g4Material
std::vector< std::pair< float, std::pair< G4Material *, G4MaterialCutsCouple > > > m_g4Material
Definition: G4HadIntProcessor.h:124
iFatras::G4HadIntProcessor::m_randomEngineName
std::string m_randomEngineName
Name of the random number stream.
Definition: G4HadIntProcessor.h:132
G4AtlasRunManager
ATLAS custom singleton run manager.
Definition: G4AtlasRunManager.h:30
ISFParticleContainer.h
iFatras
Definition: ActsFatrasSimTool.h:52
iFatras::G4HadIntProcessor::m_truthRecordSvc
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
Definition: G4HadIntProcessor.h:128
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
iFatras::G4HadIntProcessor
Definition: G4HadIntProcessor.h:62
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
AthAlgTool.h
ISF::ISFParticleVector
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Definition: ISFParticleContainer.h:26
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IHadronicInteractionProcessor.h
iFatras::G4HadIntProcessor::m_particleBroker
ServiceHandle< ISF::IParticleBroker > m_particleBroker
ISF services & Tools.
Definition: G4HadIntProcessor.h:127
iFatras::G4HadIntProcessor::m_randomEngine
CLHEP::HepRandomEngine * m_randomEngine
Random engine
Definition: G4HadIntProcessor.h:131
iFatras::G4HadIntProcessor::m_g4HadrInelasticProcesses
std::map< int, G4VProcess * > m_g4HadrInelasticProcesses
Definition: G4HadIntProcessor.h:121
ParticleHypothesis.h
iFatras::G4HadIntProcessor::m_g4RunManagerHelper
ToolHandle< ISF::IG4RunManagerHelper > m_g4RunManagerHelper
steering: enable elastic interactions?
Definition: G4HadIntProcessor.h:109
IAtRndmGenSvc.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
charge
double charge(const T &p)
Definition: AtlasPID.h:494
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MaterialProperties
Definition: MaterialProperties.h:40
iFatras::G4HadIntProcessor::ATLAS_NOT_THREAD_SAFE
StatusCode initG4RunManager ATLAS_NOT_THREAD_SAFE()
initialize G4RunManager on first call if not done by then
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
iFatras::G4HadIntProcessor::m_minMomentum
double m_minMomentum
Geant4 processes <PDGcode, process> TODO : fission, capture.
Definition: G4HadIntProcessor.h:118
Trk::Material
Definition: Material.h:116
iFatras::G4HadIntProcessor::m_g4HadrElasticProcesses
std::map< int, G4VProcess * > m_g4HadrElasticProcesses
Definition: G4HadIntProcessor.h:122
checker_macros.h
Define macros for attributes used to control the static checker.
Material
@ Material
Definition: MaterialTypes.h:8
iFatras::G4HadIntProcessor::m_hadIntProbScale
double m_hadIntProbScale
Definition: G4HadIntProcessor.h:115
iFatras::G4HadIntProcessor::m_rndGenSvc
ServiceHandle< IAtRndmGenSvc > m_rndGenSvc
Definition: G4HadIntProcessor.h:107
ServiceHandle< IAtRndmGenSvc >