ATLAS Offline Software
Loading...
Searching...
No Matches
McMaterialEffectsUpdator.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_TRACKONLAYERUPDATOR_H
6#define ISF_FATRASTOOLS_TRACKONLAYERUPDATOR_H
7
8// GaudiKernel & Athena
11#include "GaudiKernel/ServiceHandle.h"
12#include "GaudiKernel/ToolHandle.h"
14
15// Trk
26
27// ISF
29
30#ifndef MAXHADINTCHILDREN
31#define MAXHADINTCHILDREN 20
32#endif
33
34class StoreGateSvc;
35
36class TTree;
37
38namespace Trk {
39class EnergyLoss;
40class CylinderVolumeBounds;
41class IEnergyLossUpdator;
42class IMultipleScatteringUpdator;
43class TrackingGeometry;
44}
45
46namespace ISF {
47class IParticleBroker;
48class ISFParticle;
49class ITruthSvc;
50}
51
52namespace iFatras {
53
55class McMaterialEffectsUpdatorException : public std::exception
56{
57 const char* what() const throw()
58 {
59 return "Problem with TrackingGeometry loading";
60 }
61};
62
63class IProcessSamplingTool;
64class IPhysicsValidationTool;
65class IHadronicInteractionProcessor;
66class IPhotonConversionTool;
67class IParticleDecayHelper;
68
80
81class ATLAS_NOT_THREAD_SAFE McMaterialEffectsUpdator // deprecated: ATLASSIM-6020
82 : public extends<AthAlgTool, Trk::ITimedMatEffUpdator>
83{
84public:
86 McMaterialEffectsUpdator(const std::string&,
87 const std::string&,
88 const IInterface*);
91
93 StatusCode initialize();
95 StatusCode finalize();
96
102 std::unique_ptr<Trk::TrackParameters> update(
103 const Trk::TrackParameters* parm,
104 const Trk::Layer& sf,
105 Trk::TimeLimit& time,
106 Trk::PathLimit& path,
109 Trk::ParticleHypothesis particle = Trk::pion) const;
110
111 std::unique_ptr<Trk::TrackParameters> update(
112 double time,
113 const Trk::TrackParameters* parm,
114 const Trk::MaterialEffectsOnTrack& meff,
116 Trk::MaterialUpdateMode matupmode = Trk::addNoise) const;
117
122 std::unique_ptr<Trk::TrackParameters> update(
123 double time,
124 const Trk::TrackParameters& parm,
125 const Trk::MaterialProperties& mprop,
126 double pathcorrection,
129 Trk::MaterialUpdateMode matupmode = Trk::addNoise) const;
130
131 std::unique_ptr<Trk::TrackParameters> interact(
132 double time,
133 const Amg::Vector3D& position,
134 const Amg::Vector3D& momentum,
136 int process,
137 const Trk::Material* extMatProp = 0) const;
138
140 void recordBremPhoton(double time,
141 double pElectron,
142 double gammaE,
143 const Amg::Vector3D& vertex,
144 Amg::Vector3D& particleDir,
145 Trk::ParticleHypothesis particle) const;
146
147private:
148 std::unique_ptr<Trk::TrackParameters> updateInLay(
149 const ISF::ISFParticle* isp,
150 const Trk::TrackParameters* parm,
151 double& matFraction,
152 Trk::TimeLimit& time,
153 Trk::PathLimit& path,
155 Trk::ParticleHypothesis particle = Trk::pion) const;
156
158 const ISF::ISFParticle* isp,
159 double time,
160 const Trk::TrackParameters& parm,
162 int process,
163 const Trk::MaterialProperties* extMatProp = 0) const;
164
165 void radiate(const ISF::ISFParticle* parent,
166 AmgVector(5) & updatedParameters,
167 const Amg::Vector3D& pos,
168 Amg::Vector3D& dir,
169 Trk::TimeLimit time,
170 double dX0,
171 double& matFraction,
172 double matTot,
174 Trk::ParticleHypothesis particle) const;
175
176 void ionize(const Trk::TrackParameters& parm,
177 AmgVector(5) & updatedPar,
178 double dInX0,
180 Trk::ParticleHypothesis particle) const;
181
183 // bool handleEnergyLoss(double time,
184 // const Trk::TrackParameters& parm,
185 // Amg::Vector3D* updatedParameter,
186 // Trk::EnergyLoss* sampldEnergyLoss,
187 // const Trk::Layer& lay,
188 // double p, double E, double m,
189 // Trk::ParticleHypothesis particle=Trk::pion) const;
190
192 double msSigma(double dInX0,
193 double p,
194 Trk::ParticleHypothesis particle) const;
195
199 AmgVector(5) & parameters,
200 double sigmaMSproj) const;
201
203 void recordBremPhotonLay(const ISF::ISFParticle* parent,
204 Trk::TimeLimit time,
205 double pElectron,
206 double gammaE,
207 const Amg::Vector3D& vertex,
208 Amg::Vector3D& particleDir,
209 double matFraction,
211 Trk::ParticleHypothesis particle) const;
212
215
218 const EventContext& ctx) const;
219
222 ToolHandle<Trk::IEnergyLossUpdator> m_eLossUpdator;
223
225 bool m_ms;
226 ToolHandle<Trk::IMultipleScatteringUpdator> m_msUpdator;
227
229 ToolHandle<iFatras::IPhotonConversionTool> m_conversionTool;
230
233
235 ToolHandle<iFatras::IProcessSamplingTool> m_samplingTool;
236
239 ToolHandle<IHadronicInteractionProcessor> m_hadIntProcessor;
240
242 ToolHandle<IParticleDecayHelper> m_particleDecayer;
243
246
249
252
255
258
261
264
268 CLHEP::HepRandomEngine* m_randomEngine;
269 std::string m_randomEngineName;
270
272 mutable std::atomic<unsigned int> m_recordedBremPhotons;
273
278 mutable const Trk::LayerIndexSampleMap*
280
281 // ---------------------------- Tracking Geometry ---------------------------
284 this,
285 "TrackingGeometryReadKey",
286 "ISF_FatrasTrackingGeometry",
287 "Key of input TrackingGeometry"
288 };
289
292 this,
293 "TrackingGeometrySvc",
294 "",
295 ""
296 };
297
298 std::string m_trackingGeometryName{ "ISF_FatrasTrackingGeometry" };
299 // --------------------------------------------------------------------------
300
303
304
305 // ------------------------ Validation section
306 // ------------------------------------
308 ToolHandle<IPhysicsValidationTool> m_validationTool;
315
317
318 // ----------- ntuple branches
319 mutable int
321 mutable float m_tInX0;
322 mutable float m_thetaMSproj;
323 mutable float m_thetaMSphi;
324 mutable float m_thetaMStheta;
325 mutable float m_deltaP;
326 mutable float m_deltaPsigma;
327
335
337
338 // ------ ntuple branches
339 mutable float m_bremPointX;
340 mutable float m_bremPointY;
341 mutable float m_bremPointR;
342 mutable float m_bremPointZ;
343 mutable float m_bremMotherEnergy;
344 mutable float m_bremPhotonEnergy;
345 mutable float m_bremPhotonAngle;
346
347 // --------------------------------------------------------------------------------
348
356
358
359 // ------ ntuple branches
360 mutable float
362 mutable float
364 mutable float
366 mutable float
368 mutable float
370 mutable float m_edLayerSample;
371
374
377
379 mutable const ISF::ISFParticle* m_isp;
380
382 mutable const Trk::Layer* m_layer;
385};
386
387}
388
389#endif // ISF_FATRASTOOLS_TRACKONLAYERUPDATOR_H
#define AmgVector(rows)
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.
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
represents the full description of deflection and e-loss of a track in material.
Material with information about thickness of material.
A common object to be contained by.
Definition Material.h:117
small converter from the (abs) PDG code to the particle hypothsis used in Tracking
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
Exception to be thrown when TrackingGeometry not found.
std::string m_validationTreeDescription
validation tree description - second argument in TTree
std::string m_bremValidationTreeDescription
validation tree description
float m_deltaP
nutple variable : energy loss
double m_minimumBremPhotonMomentum
Minimum momentum for brem photons.
std::string m_edValidationTreeName
validation tree name - to be acessed by this from root
ToolHandle< IHadronicInteractionProcessor > m_hadIntProcessor
float m_bremPointZ
ntuple variable : brem point z coordinate
virtual ~McMaterialEffectsUpdator()
Destructor.
void radiate(const ISF::ISFParticle *parent, AmgVector(5) &updatedParameters, const Amg::Vector3D &pos, Amg::Vector3D &dir, Trk::TimeLimit time, double dX0, double &matFraction, double matTot, Trk::PropDirection pdir, Trk::ParticleHypothesis particle) const
ServiceHandle< Trk::ITrackingGeometrySvc > m_trackingGeometrySvc
ToolHandle to the TrackingGeometrySvc.
float m_bremPointY
ntuple variable : brem point y coordinate
float m_thetaMStheta
ntuple variable : ms in theta
McMaterialEffectsUpdator(const std::string &, const std::string &, const IInterface *)
AlgTool constructor for McMaterialEffectsUpdator.
const Trk::Layer * m_layer
cache layer properties
double m_minimumMomentum
Minimum momentum cut.
float m_edLayerIntersectR
ntuple variable : energy deposit r coordinate
float m_edLayerSample
ntuple variable : layer sample
ISF::ISFParticleVector interactLay(const ISF::ISFParticle *isp, double time, const Trk::TrackParameters &parm, Trk::ParticleHypothesis particle, int process, const Trk::MaterialProperties *extMatProp=0) const
bool m_parametricScattering
describe deflection parametric/do real deflection
void recordBremPhotonLay(const ISF::ISFParticle *parent, Trk::TimeLimit time, double pElectron, double gammaE, const Amg::Vector3D &vertex, Amg::Vector3D &particleDir, double matFraction, Trk::PropDirection dir, Trk::ParticleHypothesis particle) const
the helper function for a brem photon record
int m_processCode
MCTruth process code for TruthIncidents created by this tool.
ToolHandle< iFatras::IProcessSamplingTool > m_samplingTool
MCTruth process sampling.
float m_edLayerIntersectY
ntuple variable : energy deposit y coordinate
std::string m_layerIndexCaloSampleMapName
name to record it
const Trk::LayerIndexSampleMap * layerIndexSampleMap() const
return the TrackingGeometry used
const ISF::ISFParticle * m_isp
cache incoming particle
Trk::PdgToParticleHypothesis m_pdgToParticleHypothesis
std::unique_ptr< Trk::TrackParameters > interact(double time, const Amg::Vector3D &position, const Amg::Vector3D &momentum, Trk::ParticleHypothesis particle, int process, const Trk::Material *extMatProp=0) const
float m_bremPhotonEnergy
ntuple variable : brem photon energy
std::string m_bremValidationTreeFolder
stream/folder to for the TTree to be written out
double msSigma(double dInX0, double p, Trk::ParticleHypothesis particle) const
handle the Energy loss
CLHEP::HepRandomEngine * m_randomEngine
Random engine.
bool m_uniformHertzDipoleAngle
use the relativistic hertz dipole for brem photon radiation
void ionize(const Trk::TrackParameters &parm, AmgVector(5) &updatedPar, double dInX0, Trk::PropDirection pdir, Trk::ParticleHypothesis particle) const
StatusCode finalize()
AlgTool finalize method.
float m_deltaPsigma
ntuple variable : stragling on energy loss
bool m_use_msUpdator
switch between MSUpdator and local parametrization
std::string m_edValidationTreeDescription
validation tree description - second argument in TTree
ToolHandle< IParticleDecayHelper > m_particleDecayer
Particle Decay.
bool m_hadInt
hadronic interaction setting
std::string m_validationTreeName
validation tree name - to be acessed by this from root
TTree * m_validationTree
Root Validation Tree.
ToolHandle< IPhysicsValidationTool > m_validationTool
virtual const Trk::TrackingGeometry * trackingGeometry(const EventContext &ctx) const
TTree * m_edValidationTree
Root Validation Tree.
const Trk::LayerIndexSampleMap * m_layerIndexCaloSampleMap
the map for the calo-layer index map
std::string m_edValidationTreeFolder
stream/folder to for the TTree to be written out
float m_edLayerEnergyDeposit
ntuple variable : energy despoit - value
float m_bremPhotonAngle
ntuple variable : brem photon angle
ServiceHandle< ISF::IParticleBroker > m_particleBroker
ToolHandle< Trk::IEnergyLossUpdator > m_eLossUpdator
float m_edLayerIntersectZ
ntuple variable : energy deposit z coordinate
float m_thetaMSproj
ntuple variable : projected ms
std::unique_ptr< Trk::TrackParameters > updateInLay(const ISF::ISFParticle *isp, const Trk::TrackParameters *parm, double &matFraction, Trk::TimeLimit &time, Trk::PathLimit &path, Trk::PropDirection dir=Trk::alongMomentum, Trk::ParticleHypothesis particle=Trk::pion) const
TTree * m_bremValidationTree
Root Validation Tree.
float m_edLayerIntersectX
ntuple variable : energy deposit x coordinate
std::string m_trackingGeometryName
Name of the TrackingGeometry as given in Detector Store.
double m_oneOverThree
useful for the angle calculation of the brem photon
bool m_ms
IMultipleScatteringUpdator.
float m_thetaMSphi
ntuple variable : ms in phi
std::atomic< unsigned int > m_recordedBremPhotons
for statistics output
float m_bremMotherEnergy
ntuple variable : brem mother energy
std::string m_bremValidationTreeName
validation tree name - to be acessed by this from root
void recordBremPhoton(double time, double pElectron, double gammaE, const Amg::Vector3D &vertex, Amg::Vector3D &particleDir, Trk::ParticleHypothesis particle) const
the helper function for a brem photon record
std::string m_randomEngineName
Name of the random number stream.
std::unique_ptr< Trk::TrackParameters > update(const Trk::TrackParameters *parm, const Trk::Layer &sf, Trk::TimeLimit &time, Trk::PathLimit &path, Trk::GeometrySignature geoID, Trk::PropDirection dir=Trk::alongMomentum, Trk::ParticleHypothesis particle=Trk::pion) const
Updator interface (full update for a layer): A unique_ptr to Trk::TrackParameters is returned it coul...
int m_currentSample
for the calo energy recording
bool m_bendingCorrection
Switch to use bending correction.
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
ServiceHandle< IAtRndmGenSvc > m_rndGenSvc
Random Generator service.
std::string m_validationTreeFolder
stream/folder to for the TTree to be written out
float m_bremPointX
ntuple variable : brem point x coordinate
bool m_referenceMaterial
Switch to use reference material.
double m_projectionFactor
projection factor for the non-parametric scattering
int m_layerIndex
ntuple variable : layer index of material effects update
const Trk::MaterialProperties * m_matProp
SG::ReadCondHandleKey< Trk::TrackingGeometry > m_trackingGeometryReadKey
ToolHandle< iFatras::IPhotonConversionTool > m_conversionTool
IPhotonConversionTool.
bool m_recordEnergyDeposition
for deposition methods
void multipleScatteringUpdate(const Trk::TrackParameters &parm, AmgVector(5) &parameters, double sigmaMSproj) const
the private multiple Scattering update method, thetaMs is the projected random number
ToolHandle< Trk::IMultipleScatteringUpdator > m_msUpdator
float m_bremPointR
ntuple variable : brem point r distance
const std::string process
Eigen::Matrix< double, 3, 1 > Vector3D
ISFParticleOrderedQueue.
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Ensure that the ATLAS eigen extensions are properly loaded.
PropDirection
PropDirection, enum for direction of the propagation.
@ alongMomentum
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
MaterialUpdateMode
This is a steering enum to force the material update it can be: (1) addNoise (-1) removeNoise Second ...
ParametersBase< TrackParametersDim, Charged > TrackParameters
std::map< Trk::LayerIndex, int > LayerIndexSampleMap
void initialize()