ATLAS Offline Software
MaterialEffectsBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MaterialEffectsBase.h, (c) ATLAS Detector software
8 
9 #ifndef TRKMATERIALONTRACK_MATERIALEFFECTSBASE_H
10 #define TRKMATERIALONTRACK_MATERIALEFFECTSBASE_H
11 
13 //
14 #include <bitset>
15 #include <iosfwd>
16 #include <memory>
17 
18 class MsgStream;
19 class TrackCollectionCnv;
24 
25 namespace Trk {
26 
35 {
36 public:
40  NTYPES
41  };
43  {
47  // trouble: avoid name clash Trk::Energyloss vs MET::EnergyLoss
52  BremPoint = 3,
58  Unknown = 6,
60  // WARNING need to edit MaterialEffectsOnTrack.cxx if these enums change
61  };
62 
75  double thicknessInX0,
76  const Surface& assocSurf,
77  const std::bitset<MaterialEffectsBase::NumberOfMaterialEffectsTypes>&
78  typePattern);
81  virtual ~MaterialEffectsBase() = default;
82 
84  virtual MaterialEffectsBase* clone() const = 0;
85 
87  std::unique_ptr<MaterialEffectsBase> uniqueClone() const
88  {
89  return std::unique_ptr<MaterialEffectsBase>(clone());
90  }
91 
94  double thicknessInX0() const;
95 
97  const Surface& associatedSurface() const;
98 
106  bool type(const MaterialEffectsType& type) const;
107 
110 
112  std::string dumpType() const;
113 
115  virtual MsgStream& dump(MsgStream& sl) const;
117  virtual std::ostream& dump(std::ostream& sl) const;
118 
119 protected:
121  virtual void setValues(const Surface* assocSurface);
130 
131 private:
132  friend class ::MaterialEffectsBaseCnv_p1;
133  friend class ::MaterialEffectsBaseCnv_p2;
134  friend class ::MaterialEffectsOnTrackCnv_p2;
135  friend class ::TrackCollectionCnv;
136  friend class ::ScatteringAngleOnTrackCnv_p1;
137 
139  double m_tInX0{};
140  long m_typeFlags{};
141 };
142 
144 MsgStream&
145 operator<<(MsgStream& sl, const MaterialEffectsBase& meb);
146 
148 std::ostream&
149 operator<<(std::ostream& sl, const MaterialEffectsBase& meb);
150 
151 } // end ns
152 
154 #endif // TRKMATERIALONTRACK_MATERIALEFFECTSBASE_H
SurfaceHolders.h
Trk::MaterialEffectsBase::clone
virtual MaterialEffectsBase * clone() const =0
Virtual constructor.
Trk::MaterialEffectsBase::MaterialEffectsBase
MaterialEffectsBase(MaterialEffectsBase &&rhs)=default
move constructor
MaterialEffectsOnTrackCnv_p2
T/P converter v2 for MaterialEffectsOnTrack.
Definition: MaterialEffectsOnTrackCnv_p2.h:22
Trk::MaterialEffectsBase::MaterialEffectsBase
MaterialEffectsBase(double thicknessInX0, const Surface &assocSurf, const std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes > &typePattern)
base class constructor with information common to all types of material effects.
MaterialEffectsBaseCnv_p1
Converter for T/P separation of the TrkMaterialOnTrack/MaterialEffectsBase class.
Definition: MaterialEffectsBaseCnv_p1.h:30
Trk::MaterialEffectsBase::MaterialEffectsBase
MaterialEffectsBase()
default constructor for POOL
Trk::MaterialEffectsBase::FittedMaterialEffects
@ FittedMaterialEffects
contains values obtained by fitting the scatterer or e-loss
Definition: MaterialEffectsBase.h:56
MaterialEffectsBase.icc
Trk::MaterialEffectsBase::thicknessInX0
double thicknessInX0() const
returns the actually traversed material .
Trk::MaterialEffectsBase
base class to integrate material effects on Trk::Track in a flexible way.
Definition: MaterialEffectsBase.h:35
Trk::MaterialEffectsBase::m_tInX0
double m_tInX0
- the traversed thickness in RadiationLengths
Definition: MaterialEffectsBase.h:139
Trk::MaterialEffectsBase::uniqueClone
std::unique_ptr< MaterialEffectsBase > uniqueClone() const
NVI uniqueClone.
Definition: MaterialEffectsBase.h:87
Trk::MaterialEffectsBase::UsesMeasurement
@ UsesMeasurement
contains energy loss correction based on Calo measurement
Definition: MaterialEffectsBase.h:54
Trk::MaterialEffectsBase::dumpType
std::string dumpType() const
returns a string with the type of the object
Definition: MaterialEffectsBase.cxx:16
Trk::MaterialEffectsBase::MaterialEffectsDerivedType
MaterialEffectsDerivedType
Definition: MaterialEffectsBase.h:37
Trk::MaterialEffectsBase::MATERIAL_EFFECTS_ON_TRACK
@ MATERIAL_EFFECTS_ON_TRACK
Definition: MaterialEffectsBase.h:39
MaterialEffectsBaseCnv_p2
Converter for T/P separation of the TrkMaterialOnTrack/MaterialEffectsBase class.
Definition: MaterialEffectsBaseCnv_p2.h:33
TrackCollectionCnv
Definition: TrackCollectionCnv.h:47
Trk::MaterialEffectsBase::~MaterialEffectsBase
virtual ~MaterialEffectsBase()=default
destructor.
Trk::MaterialEffectsBase::dump
virtual MsgStream & dump(MsgStream &sl) const
Interface method for output, can be overloaded by child classes.
Definition: MaterialEffectsBase.cxx:65
Trk::MaterialEffectsBase::MaterialEffectsType
MaterialEffectsType
Definition: MaterialEffectsBase.h:43
Trk::MaterialEffectsBase::ScatteringEffects
@ ScatteringEffects
contains material effects due to multiple scattering
Definition: MaterialEffectsBase.h:45
Trk::MaterialEffectsBase::type
bool type(const MaterialEffectsType &type) const
returns the flags (bits) which types of ME are present
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::MaterialEffectsBase::operator=
MaterialEffectsBase & operator=(MaterialEffectsBase &&rhs)=default
move Assignment operator
Trk::MaterialEffectsBase::Unknown
@ Unknown
new category
Definition: MaterialEffectsBase.h:58
Trk::MaterialEffectsBase::EnergyLossEffects
@ EnergyLossEffects
contains energy loss corrections
Definition: MaterialEffectsBase.h:48
ScatteringAngleOnTrackCnv_p1
Definition: ScatteringAngleOnTrackCnv_p1.h:18
Trk::MaterialEffectsBase::NTYPES
@ NTYPES
Definition: MaterialEffectsBase.h:40
Trk::MaterialEffectsBase::NumberOfMaterialEffectsTypes
@ NumberOfMaterialEffectsTypes
Definition: MaterialEffectsBase.h:59
Trk::MaterialEffectsBase::m_typeFlags
long m_typeFlags
Definition: MaterialEffectsBase.h:140
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
Trk::SurfacePtrHolderImplDetEl
Definition: SurfaceHolderImpl.h:165
Trk::MaterialEffectsBase::operator=
MaterialEffectsBase & operator=(const MaterialEffectsBase &rhs)=default
Assignment operator.
Trk::MaterialEffectsBase::BremPoint
@ BremPoint
contains q/p covariance noise term
Definition: MaterialEffectsBase.h:52
Trk::MaterialEffectsBase::ESTIMATED_BREM_ON_TRACK
@ ESTIMATED_BREM_ON_TRACK
Definition: MaterialEffectsBase.h:38
Trk::MaterialEffectsBase::derivedType
virtual MaterialEffectsDerivedType derivedType() const =0
Returns the concrete derived type.
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::MaterialEffectsBase::MaterialEffectsBase
MaterialEffectsBase(const MaterialEffectsBase &rhs)=default
copy constructor
Trk::MaterialEffectsBase::MaterialThickness
@ MaterialThickness
contains only thickness, needs M.E.Updator to calculate effects
Definition: MaterialEffectsBase.h:50
Trk::MaterialEffectsBase::associatedSurface
const Surface & associatedSurface() const
returns the surface to which these m.eff. are associated.
Trk::MaterialEffectsBase::setValues
virtual void setValues(const Surface *assocSurface)
allows POOL converter to recreate transient links to DetStore