ATLAS Offline Software
Loading...
Searching...
No Matches
PhotonConversionTool.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_FATRASTOOLS_PHOTONCONVERSIONTOOL_H
6#define ISF_FATRASTOOLS_PHOTONCONVERSIONTOOL_H
7
8// Gaudi & Athena
10#include "GaudiKernel/ServiceHandle.h"
11#include "GaudiKernel/ToolHandle.h"
14// Trk
18// Fatras
20
21class TTree;
22
23class StoreGateSvc;
24
25namespace Trk {
26 class Layer;
29 class TrackingGeometry;
30}
31
32namespace ISF {
33 class IParticleBroker;
34 class ITruthSvc;
35}
36
37namespace iFatras {
38
40
47
48 class ATLAS_NOT_THREAD_SAFE PhotonConversionTool : public extends<AthAlgTool, iFatras::IPhotonConversionTool> { // deprecated: ATLASSIM-6020
49 public:
51 PhotonConversionTool(const std::string&,const std::string&,const IInterface*);
54
56 StatusCode initialize();
58 StatusCode finalize();
59
60
63 double pathCorrection,
64 double p) const;
65
67 bool doConversion(double time, const Trk::NeutralParameters& parm,
68 const Trk::ExtendedMaterialProperties* extMatProp=0) const;
69
72 double time, const Trk::NeutralParameters& parm,
73 const Trk::ExtendedMaterialProperties *ematprop=0) const;
74
75
76
77 private:
79 void recordChilds(double time,
80 const Amg::Vector3D& vertex,
81 const Amg::Vector3D& photonDirection,
82 double childEnergy, double photonEnergy,
85
88 double time,
89 const Amg::Vector3D& vertex,
90 const Amg::Vector3D& photonDirection,
91 double childEnergy, double photonEnergy,
93 Trk::ParticleHypothesis childType) const;
94
96 double childEnergyFraction(const Trk::MaterialProperties& mprop, double gammaMom) const;
97 double childEnergyFraction(double gammaMom) const;
98
101 double childE) const;
102
104 double phi1(double delta) const;
105
107 double phi2(double delta) const;
108
112
115
118
123
124
127 CLHEP::HepRandomEngine* m_randomEngine;
128 std::string m_randomEngineName;
129
133
134 // ------------------------ Validation section ------------------------------------
139
141 ToolHandle<IPhysicsValidationTool> m_validationTool;
142
143 // ------ ntuple branches
144 mutable float m_conversionPointX;
145 mutable float m_conversionPointY;
146 mutable float m_conversionPointR;
147 mutable float m_conversionPointZ;
151 // --------------------------------------------------------------------------------
152
154 };
155
156
157inline double PhotonConversionTool::phi1(double delta) const {
158 if (delta <= 1.)
159 return 20.867 - 3.242 * delta + 0.625*delta*delta;
160 else
161 return 21.12 - 4.184*log(delta+0.952);
162}
163
164inline double PhotonConversionTool::phi2(double delta) const {
165 if (delta <= 1.)
166 return 20.209 - 1.930 * delta + 0.086*delta*delta;
167 return 21.12 - 4.184*log(delta+0.952);
168}
169
170}
171
172#endif
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
@ class IParticleBroker
The generic ISF particle definition,.
Definition ISFParticle.h:42
@ class ITruthSvc
Definition ITruthSvc.h:29
The Athena Transient Store API.
Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces:
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
Material with information about thickness of material.
small converter from the (abs) PDG code to the particle hypothsis used in Tracking
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
static const Trk::PdgToParticleHypothesis s_pdgToHypo
virtual ~PhotonConversionTool()
Destructor.
int m_processCode
MCTruth process code for TruthIncidents created by this tool.
std::string m_validationTreeFolder
stream/folder to for the TTree to be written out
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
CLHEP::HepRandomEngine * m_randomEngine
ISF::ISFParticleVector getChilds(const ISF::ISFParticle *parent, double time, const Amg::Vector3D &vertex, const Amg::Vector3D &photonDirection, double childEnergy, double photonEnergy, const Amg::Vector3D &childDirection, Trk::ParticleHypothesis childType) const
get childs - for layer update
double childEnergyFraction(const Trk::MaterialProperties &mprop, double gammaMom) const
simulate the child energy
std::string m_validationTreeDescription
validation tree description - second argument in TTree
double phi2(double delta) const
helper functions for the Phi1/phi2
bool m_referenceMaterial
Switch to use reference material.
double phi1(double delta) const
helper functions for the Phi1/phi2
std::string m_randomEngineName
Name of the random number stream.
ServiceHandle< ISF::IParticleBroker > m_particleBroker
ISF services & Tools.
ToolHandle< IPhysicsValidationTool > m_validationTool
TTree * m_validationTree
Root Validation Tree.
PhotonConversionTool(const std::string &, const std::string &, const IInterface *)
AlgTool constructor for PhotonConversionTool.
StatusCode finalize()
AlgTool finalize method.
bool doConversion(double time, const Trk::NeutralParameters &parm, const Trk::ExtendedMaterialProperties *extMatProp=0) const
interface for processing of the presampled pair production
int m_recordedConversions
debug output - count the conversions
ISF::ISFParticleVector doConversionOnLayer(const ISF::ISFParticle *parent, double time, const Trk::NeutralParameters &parm, const Trk::ExtendedMaterialProperties *ematprop=0) const
interface for processing of the presampled nuclear interactions on layer
ServiceHandle< IAtRndmGenSvc > m_rndGenSvc
Random Generator service.
void recordChilds(double time, const Amg::Vector3D &vertex, const Amg::Vector3D &photonDirection, double childEnergy, double photonEnergy, const Amg::Vector3D &childDirection, Trk::ParticleHypothesis childType=Trk::electron) const
record childs - create interface already for mu-/mu+ pair production
Amg::Vector3D childDirection(const Amg::Vector3D &gammaMom, double childE) const
simulate the one child direction - the second one is given clear then
bool pairProduction(const Trk::MaterialProperties &mprop, double pathCorrection, double p) const
interface for processing of the pair production
std::string m_validationTreeName
validation tree name - to be acessed by this from root
double m_minChildEnergy
The cut from which on the child products are followed.
Eigen::Matrix< double, 3, 1 > Vector3D
ISFParticleOrderedQueue.
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersBase< NeutralParametersDim, Neutral > NeutralParameters
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
void initialize()