ATLAS Offline Software
IMaterialEffectsUpdator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // IMaterialEffectsUpdator.h, (c) ATLAS Detector software
8 
9 #ifndef TRKEXINTERFACES_IMATERIALEFFECTSUPDATOR_H
10 #define TRKEXINTERFACES_IMATERIALEFFECTSUPDATOR_H
11 
12 // Gaudi
13 #include "GaudiKernel/IAlgTool.h"
14 // Trk
19 #include <memory>
20 
21 namespace Trk {
22 
23 class Layer;
24 class MaterialProperties;
25 class MaterialEffectsOnTrack;
26 
28 static const InterfaceID IID_IMaterialEffectsUpdator("IMaterialEffectsUpdator",
29  1,
30  0);
31 
44 class IMaterialEffectsUpdator : virtual public IAlgTool
45 {
46 
47 public:
50 
52  static const InterfaceID& interfaceID()
53  {
54  return IID_IMaterialEffectsUpdator;
55  }
56 
62  class ICache
63  {
64  public:
66  : validationLayer{ nullptr }
67  , validationSteps{ 0 }
68  , validationPhi{ 0. }
69  , validationEta{ 0. }
70  , accumulatedElossSigma{ 0. }
71  {}
72  ~ICache() = default;
74  const Trk::Layer* validationLayer{ nullptr };
75  int validationSteps{ 0 };
76  double validationPhi{ 0. };
77  double validationEta{ 0. };
78  double accumulatedElossSigma{ 0. };
81  };
82 
87  virtual ICache getCache() const { return {}; }
88 
93  virtual std::unique_ptr<TrackParameters> update(
94  ICache& icache,
95  const TrackParameters* param,
96  const Layer& sf,
99  MaterialUpdateMode matupmode = addNoise
100  ) const = 0;
101 
106  virtual std::unique_ptr<TrackParameters> update(
107  ICache& icache,
108  const TrackParameters* param,
109  const MaterialEffectsOnTrack& meff,
111  MaterialUpdateMode matupmode = addNoise
112  ) const = 0;
113 
118  virtual std::unique_ptr<TrackParameters> preUpdate(
119  ICache& icache,
120  const TrackParameters* param,
121  const Layer& sf,
124  MaterialUpdateMode matupmode = addNoise
125  ) const = 0;
126 
132  virtual std::unique_ptr<TrackParameters> postUpdate(
133  ICache& icache,
134  const TrackParameters& param,
135  const Layer& sf,
138  MaterialUpdateMode matupmode = addNoise
139  ) const = 0;
140 
146  virtual std::unique_ptr<TrackParameters> update(
147  ICache& icache,
148  const TrackParameters& param,
149  const MaterialProperties& mprop,
150  double pathcorrection,
153  MaterialUpdateMode matupmode = addNoise
154  ) const = 0;
155 
157  virtual void validationAction(ICache& icache) const = 0;
158 
160  virtual void modelAction(ICache& icache,
161  const TrackParameters* param = nullptr) const = 0;
162 
165  virtual std::unique_ptr<TrackParameters> update(
166  const TrackParameters* param,
167  const Layer& sf,
170  MaterialUpdateMode matupmode = addNoise
171  ) const = 0;
172 
175  virtual std::unique_ptr<TrackParameters> update(
176  const TrackParameters* param,
177  const MaterialEffectsOnTrack& meff,
179  MaterialUpdateMode matupmode = addNoise
180  ) const = 0;
183  virtual std::unique_ptr<TrackParameters> preUpdate(
184  const TrackParameters* param,
185  const Layer& sf,
188  MaterialUpdateMode matupmode = addNoise
189  ) const = 0;
190 
193  virtual std::unique_ptr<TrackParameters> postUpdate(
194  const TrackParameters& param,
195  const Layer& sf,
198  MaterialUpdateMode matupmode = addNoise
199  ) const = 0;
200 
205  virtual std::unique_ptr<TrackParameters> update(
206  const TrackParameters& param,
207  const MaterialProperties& mprop,
208  double pathcorrection,
211  MaterialUpdateMode matupmode = addNoise
212  ) const = 0;
216  virtual void validationAction() const = 0;
217 
222  virtual void modelAction(const TrackParameters* param = nullptr) const = 0;
223 };
224 
225 } // end of namespace
226 
227 #endif // TRKEXINTERFACES_MATERIALEFFECTSUPDATOR_H
228 
Trk::IMaterialEffectsUpdator::ICache
Cache class to allow passing information to/between calls.
Definition: IMaterialEffectsUpdator.h:63
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
TrackParameters.h
Trk::IMaterialEffectsUpdator::ICache::ICache
ICache()
Definition: IMaterialEffectsUpdator.h:65
Trk::IMaterialEffectsUpdator::getCache
virtual ICache getCache() const
Creates an instance of the cache to be used.
Definition: IMaterialEffectsUpdator.h:87
Trk::IMaterialEffectsUpdator::update
virtual std::unique_ptr< TrackParameters > update(const TrackParameters &param, const MaterialProperties &mprop, double pathcorrection, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface: MaterialProperties based material update.
Trk::IMaterialEffectsUpdator::update
virtual std::unique_ptr< TrackParameters > update(ICache &icache, const TrackParameters &param, const MaterialProperties &mprop, double pathcorrection, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface: The parameters are given as a pointer owned by the caller.
PropDirection.h
Trk::MaterialUpdateMode
MaterialUpdateMode
This is a steering enum to force the material update it can be: (1) addNoise (-1) removeNoise Second ...
Definition: MaterialUpdateMode.h:18
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
Trk::IMaterialEffectsUpdator::postUpdate
virtual std::unique_ptr< TrackParameters > postUpdate(const TrackParameters &param, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface (pre-update for a layer):
Trk::IMaterialEffectsUpdator::ICache::validationSteps
int validationSteps
number of validation steps
Definition: IMaterialEffectsUpdator.h:75
Trk::IMaterialEffectsUpdator::ICache::accumulatedElossSigma
double accumulatedElossSigma
Definition: IMaterialEffectsUpdator.h:80
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
Trk::MaterialEffectsOnTrack
represents the full description of deflection and e-loss of a track in material.
Definition: MaterialEffectsOnTrack.h:40
Trk::IMaterialEffectsUpdator::validationAction
virtual void validationAction() const =0
Validation Action: outside access to internal validation steps Optional.
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::IMaterialEffectsUpdator::validationAction
virtual void validationAction(ICache &icache) const =0
Validation Action:
Trk::IMaterialEffectsUpdator::interfaceID
static const InterfaceID & interfaceID()
AlgTool and IAlgTool interface methods.
Definition: IMaterialEffectsUpdator.h:52
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
Trk::IMaterialEffectsUpdator::ICache::validationEta
double validationEta
eta
Definition: IMaterialEffectsUpdator.h:77
Trk::ParametersBase
Definition: ParametersBase.h:55
ParticleHypothesis.h
Trk::IMaterialEffectsUpdator::update
virtual std::unique_ptr< TrackParameters > update(ICache &icache, const TrackParameters *param, const MaterialEffectsOnTrack &meff, Trk::ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
User updator interface (full update for a layer): The parameters are given as a pointer owned by the ...
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::IMaterialEffectsUpdator::preUpdate
virtual std::unique_ptr< TrackParameters > preUpdate(const TrackParameters *param, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface (pre-update for a layer):
Trk::IMaterialEffectsUpdator::ICache::~ICache
~ICache()=default
layer in the current validation step
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::IMaterialEffectsUpdator::update
virtual std::unique_ptr< TrackParameters > update(ICache &icache, const TrackParameters *param, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface (full update for a layer): The parameters are given as a pointer owned by the calle...
Trk::IMaterialEffectsUpdator::~IMaterialEffectsUpdator
virtual ~IMaterialEffectsUpdator()
Virtual destructor.
Definition: IMaterialEffectsUpdator.h:49
Trk::IMaterialEffectsUpdator::preUpdate
virtual std::unique_ptr< TrackParameters > preUpdate(ICache &icache, const TrackParameters *param, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface (pre-update for a layer): The parameters are given as a pointer owned by the caller...
MaterialUpdateMode.h
Trk::IMaterialEffectsUpdator::modelAction
virtual void modelAction(const TrackParameters *param=nullptr) const =0
Model Action: Provides the possibility of doing non-local MaterialEffectsUpdates for different models...
Trk::IMaterialEffectsUpdator::postUpdate
virtual std::unique_ptr< TrackParameters > postUpdate(ICache &icache, const TrackParameters &param, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface (pre-update for a layer): The parameters are given as a pointer owned by the caller...
Trk::MaterialProperties
Definition: MaterialProperties.h:40
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::addNoise
@ addNoise
Definition: MaterialUpdateMode.h:19
Trk::IMaterialEffectsUpdator
Definition: IMaterialEffectsUpdator.h:45
Trk::IMaterialEffectsUpdator::ICache::validationPhi
double validationPhi
theta
Definition: IMaterialEffectsUpdator.h:76
Trk::IMaterialEffectsUpdator::update
virtual std::unique_ptr< TrackParameters > update(const TrackParameters *param, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
Updator interface (full update for a layer):
Trk::IMaterialEffectsUpdator::modelAction
virtual void modelAction(ICache &icache, const TrackParameters *param=nullptr) const =0
Model Action:
Trk::IMaterialEffectsUpdator::ICache::validationLayer
const Trk::Layer * validationLayer
Definition: IMaterialEffectsUpdator.h:74
Trk::Layer
Definition: Layer.h:73
Trk::IMaterialEffectsUpdator::update
virtual std::unique_ptr< TrackParameters > update(const TrackParameters *param, const MaterialEffectsOnTrack &meff, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const =0
User updator interface (full update for a layer):