ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Trk::GXFMaterialEffects Class Reference

class that is similar to MaterialEffectsOnTrack, but has 'set' methods for more flexibility during track fitting More...

#include <GXFMaterialEffects.h>

Collaboration diagram for Trk::GXFMaterialEffects:

Public Member Functions

 GXFMaterialEffects (const MaterialEffectsOnTrack &)
 Constructor that captures the properties of a more standard MaterialEffectsOnTrack object. More...
 
 GXFMaterialEffects ()=default
 
 GXFMaterialEffects (const GXFMaterialEffects &rhs)
 
GXFMaterialEffectsoperator= (const GXFMaterialEffects &rhs)
 
 GXFMaterialEffects (GXFMaterialEffects &&rhs)=default
 
GXFMaterialEffectsoperator= (GXFMaterialEffects &&rhs)=default
 
 ~GXFMaterialEffects ()=default
 
void setScatteringAngles (double, double)
 
void setScatteringSigmas (double, double)
 
double x0 () const
 
void setX0 (double)
 
double deltaPhi () const
 
double measuredDeltaPhi () const
 
void setMeasuredDeltaPhi (double)
 
double deltaTheta () const
 
double sigmaDeltaPhi () const
 
double sigmaDeltaTheta () const
 
double deltaE () const
 
void setEloss (std::unique_ptr< EnergyLoss >)
 Set the energy loss properties of this material effect. More...
 
double sigmaDeltaE () const
 
double sigmaDeltaEPos () const
 
double sigmaDeltaENeg () const
 
double sigmaDeltaEAve () const
 
void setDeltaE (double)
 
void setSigmaDeltaE (double)
 
void setSigmaDeltaEPos (double)
 
void setSigmaDeltaENeg (double)
 
double delta_p () const
 
void setdelta_p (double)
 
void setKink (bool)
 
bool isKink () const
 
void setMeasuredEloss (bool)
 
bool isMeasuredEloss () const
 
const SurfaceassociatedSurface () const
 
void setSurface (const Surface *)
 Set the surface for this material effects instance. More...
 
std::unique_ptr< MaterialEffectsBasemakeMEOT () const
 
const MaterialPropertiesmaterialProperties () const
 
void setMaterialProperties (const MaterialProperties *)
 Set the material properties of this material effects instance. More...
 

Private Attributes

double m_scatphi = 0
 
double m_scattheta = 0
 
double m_sigmascatphi = 0
 
double m_sigmascattheta = 0
 
double m_x0 = 0
 
double m_deltap = 0
 
double m_deltae = 0
 
double m_sigmadeltae = 0
 
double m_sigmadeltaepos = 0
 
double m_sigmadeltaeneg = 0
 
std::unique_ptr< const EnergyLossm_eloss
 
const Surfacem_surf = nullptr
 
const MaterialPropertiesm_matprop = nullptr
 
bool m_iskink = false
 
bool m_ismeasuredeloss = false
 
double m_measscatphi = 0
 
double m_sintheta = 1
 

Detailed Description

class that is similar to MaterialEffectsOnTrack, but has 'set' methods for more flexibility during track fitting

Author
thijs.nosp@m..cor.nosp@m.nelis.nosp@m.sen@.nosp@m.cern..nosp@m.ch

Definition at line 24 of file GXFMaterialEffects.h.

Constructor & Destructor Documentation

◆ GXFMaterialEffects() [1/4]

Trk::GXFMaterialEffects::GXFMaterialEffects ( const MaterialEffectsOnTrack meot)

Constructor that captures the properties of a more standard MaterialEffectsOnTrack object.

This is one of the possible constructors for GXFMaterialEffects. It takes as an argument a MaterialEffectsOnTrack, which is the more widely used class to represent material effects. It copies the properties of the passed object pointer.

Note
This method assumes no ownership of the passed pointer whatsoever, and ownership of the MaterialEffectsOnTrack remains the responsibility of the original owner.

Definition at line 12 of file GXFMaterialEffects.cxx.

13  : m_sigmadeltae(0), m_surf(&meot.associatedSurface()) {
14 
15  if (meot.energyLoss() != nullptr) {
16  m_deltae = meot.energyLoss()->deltaE();
17  m_sigmadeltaepos = meot.energyLoss()->sigmaPlusDeltaE();
18  m_sigmadeltaeneg = meot.energyLoss()->sigmaMinusDeltaE();
19 
20  if (meot.scatteringAngles() == nullptr) {
21  m_eloss = std::unique_ptr<EnergyLoss>(meot.energyLoss()->clone());
22  m_sigmadeltae = meot.energyLoss()->sigmaDeltaE();
23  } else {
24  m_eloss = nullptr;
25  }
26  } else {
27  m_eloss = nullptr;
28  m_deltae = 0;
29  m_sigmadeltaepos = 0;
30  m_sigmadeltaeneg = 0;
31  }
32 
33  double x0 = meot.thicknessInX0();
34  const ScatteringAngles *scatangles = meot.scatteringAngles();
35 
36  if ((scatangles != nullptr) && x0 > 0) {
37  m_x0 = x0;
38  m_sintheta = scatangles->sigmaDeltaTheta() / scatangles->sigmaDeltaPhi();
39  m_scatphi = scatangles->deltaPhi();
40  m_scattheta = scatangles->deltaTheta();
41  m_sigmascatphi = scatangles->sigmaDeltaPhi();
42  m_sigmascattheta = scatangles->sigmaDeltaTheta();
43  } else {
45  }
46  }

◆ GXFMaterialEffects() [2/4]

Trk::GXFMaterialEffects::GXFMaterialEffects ( )
default

◆ GXFMaterialEffects() [3/4]

Trk::GXFMaterialEffects::GXFMaterialEffects ( const GXFMaterialEffects rhs)

Definition at line 48 of file GXFMaterialEffects.cxx.

49  : m_scatphi (rhs.m_scatphi),
50  m_scattheta (rhs.m_scattheta),
51  m_sigmascatphi (rhs.m_sigmascatphi),
52  m_sigmascattheta (rhs.m_sigmascattheta),
53  m_x0 (rhs.m_x0),
54  m_deltap (rhs.m_deltap),
55  m_deltae (rhs.m_deltae),
56  m_sigmadeltae (rhs.m_sigmadeltae),
57  m_sigmadeltaepos (rhs.m_sigmadeltaepos),
58  m_sigmadeltaeneg (rhs.m_sigmadeltaeneg),
59  m_eloss (std::unique_ptr<EnergyLoss>(rhs.m_eloss != nullptr ? rhs.m_eloss->clone() : nullptr)),
60  m_surf (rhs.m_surf),
61  m_matprop (rhs.m_matprop),
62  m_iskink (rhs.m_iskink),
63  m_ismeasuredeloss (rhs.m_ismeasuredeloss),
64  m_measscatphi (rhs.m_measscatphi),
65  m_sintheta (rhs.m_sintheta)
66  {
67  }

◆ GXFMaterialEffects() [4/4]

Trk::GXFMaterialEffects::GXFMaterialEffects ( GXFMaterialEffects &&  rhs)
default

◆ ~GXFMaterialEffects()

Trk::GXFMaterialEffects::~GXFMaterialEffects ( )
default

Member Function Documentation

◆ associatedSurface()

const Surface & Trk::GXFMaterialEffects::associatedSurface ( ) const

Definition at line 202 of file GXFMaterialEffects.cxx.

202  {
203  return *m_surf;
204  }

◆ delta_p()

double Trk::GXFMaterialEffects::delta_p ( ) const

Definition at line 178 of file GXFMaterialEffects.cxx.

178  {
179  return m_deltap;
180  }

◆ deltaE()

double Trk::GXFMaterialEffects::deltaE ( ) const

Definition at line 131 of file GXFMaterialEffects.cxx.

131  {
132  return m_deltae;
133  }

◆ deltaPhi()

double Trk::GXFMaterialEffects::deltaPhi ( ) const

Definition at line 111 of file GXFMaterialEffects.cxx.

111  {
112  return m_scatphi;
113  }

◆ deltaTheta()

double Trk::GXFMaterialEffects::deltaTheta ( ) const

Definition at line 119 of file GXFMaterialEffects.cxx.

119  {
120  return m_scattheta;
121  }

◆ isKink()

bool Trk::GXFMaterialEffects::isKink ( ) const

Definition at line 190 of file GXFMaterialEffects.cxx.

190  {
191  return m_iskink;
192  }

◆ isMeasuredEloss()

bool Trk::GXFMaterialEffects::isMeasuredEloss ( ) const

Definition at line 198 of file GXFMaterialEffects.cxx.

198  {
199  return m_ismeasuredeloss;
200  }

◆ makeMEOT()

std::unique_ptr< MaterialEffectsBase > Trk::GXFMaterialEffects::makeMEOT ( ) const

Definition at line 210 of file GXFMaterialEffects.cxx.

210  {
211  std::optional<ScatteringAngles> scatangles;
212 
213  if (m_sigmascattheta != 0) {
214  scatangles = ScatteringAngles(m_scatphi, m_scattheta, m_sigmascatphi, m_sigmascattheta);
215  }
216 
217  std::bitset<MaterialEffectsBase::NumberOfMaterialEffectsTypes> typePattern;
219  std::unique_ptr<const Trk::EnergyLoss> neweloss;
220 
221  if (m_deltae != 0) {
222  if (m_eloss != nullptr) {
223  neweloss.reset(m_eloss->clone());
224  } else {
225  neweloss = std::make_unique<Trk::EnergyLoss>(m_deltae, m_sigmadeltae, m_sigmadeltaeneg, m_sigmadeltaepos);
226  }
227  }
228 
229  return std::make_unique<MaterialEffectsOnTrack>(
230  m_x0, scatangles, std::move(neweloss), *m_surf, typePattern);
231  }

◆ materialProperties()

const Trk::MaterialProperties * Trk::GXFMaterialEffects::materialProperties ( ) const

Definition at line 233 of file GXFMaterialEffects.cxx.

233  {
234  return m_matprop;
235  }

◆ measuredDeltaPhi()

double Trk::GXFMaterialEffects::measuredDeltaPhi ( ) const

Definition at line 115 of file GXFMaterialEffects.cxx.

115  {
116  return m_measscatphi;
117  }

◆ operator=() [1/2]

GXFMaterialEffects & Trk::GXFMaterialEffects::operator= ( const GXFMaterialEffects rhs)

Definition at line 69 of file GXFMaterialEffects.cxx.

69  {
70  if (this != &rhs) {
71  m_eloss = std::unique_ptr<EnergyLoss>(rhs.m_eloss != nullptr ? rhs.m_eloss->clone() : nullptr);
72  m_scatphi = rhs.m_scatphi;
73  m_scattheta = rhs.m_scattheta;
74  m_sigmascatphi = rhs.m_sigmascatphi;
75  m_sigmascattheta = rhs.m_sigmascattheta;
76  m_x0 = rhs.m_x0;
77  m_deltap = rhs.m_deltap;
78  m_deltae = rhs.m_deltae;
79  m_sigmadeltae = rhs.m_sigmadeltae;
80  m_sigmadeltaepos = rhs.m_sigmadeltaepos;
81  m_sigmadeltaeneg = rhs.m_sigmadeltaeneg;
82  m_iskink = rhs.m_iskink;
83  m_ismeasuredeloss = rhs.m_ismeasuredeloss;
84  m_surf = rhs.m_surf;
85  m_matprop = rhs.m_matprop;
86  m_measscatphi = rhs.m_measscatphi;
87  m_sintheta = rhs.m_sintheta;
88  }
89 
90  return *this;
91  }

◆ operator=() [2/2]

GXFMaterialEffects& Trk::GXFMaterialEffects::operator= ( GXFMaterialEffects &&  rhs)
default

◆ setdelta_p()

void Trk::GXFMaterialEffects::setdelta_p ( double  delta_p)

Definition at line 182 of file GXFMaterialEffects.cxx.

182  {
183  m_deltap = delta_p;
184  }

◆ setDeltaE()

void Trk::GXFMaterialEffects::setDeltaE ( double  deltae)

Definition at line 170 of file GXFMaterialEffects.cxx.

170  {
171  m_deltae = deltae;
172  }

◆ setEloss()

void Trk::GXFMaterialEffects::setEloss ( std::unique_ptr< EnergyLoss eloss)

Set the energy loss properties of this material effect.

This method sets the energy loss properties of the material effects instance through an instance of Trk::EnergyLoss.

Note
This method assumes full ownership of the passed pointer.

Definition at line 135 of file GXFMaterialEffects.cxx.

135  {
136  m_eloss = std::move(eloss);
137  }

◆ setKink()

void Trk::GXFMaterialEffects::setKink ( bool  iskink)

Definition at line 186 of file GXFMaterialEffects.cxx.

186  {
187  m_iskink = iskink;
188  }

◆ setMaterialProperties()

void Trk::GXFMaterialEffects::setMaterialProperties ( const MaterialProperties matprop)

Set the material properties of this material effects instance.

Note
The argument pointer is a raw, non-owning pointer and the method assumes no ownership of the pointee.

Definition at line 237 of file GXFMaterialEffects.cxx.

237  {
238  m_matprop = matprop;
239  }

◆ setMeasuredDeltaPhi()

void Trk::GXFMaterialEffects::setMeasuredDeltaPhi ( double  measdf)

Definition at line 174 of file GXFMaterialEffects.cxx.

174  {
175  m_measscatphi = measdf;
176  }

◆ setMeasuredEloss()

void Trk::GXFMaterialEffects::setMeasuredEloss ( bool  ismeasuredeloss)

Definition at line 194 of file GXFMaterialEffects.cxx.

194  {
195  m_ismeasuredeloss = ismeasuredeloss;
196  }

◆ setScatteringAngles()

void Trk::GXFMaterialEffects::setScatteringAngles ( double  scatphi,
double  scattheta 
)

Definition at line 93 of file GXFMaterialEffects.cxx.

93  {
94  m_scatphi = scatphi;
95  m_scattheta = scattheta;
96  }

◆ setScatteringSigmas()

void Trk::GXFMaterialEffects::setScatteringSigmas ( double  scatsigmaphi,
double  scatsigmatheta 
)

Definition at line 98 of file GXFMaterialEffects.cxx.

98  {
99  m_sigmascatphi = scatsigmaphi;
100  m_sigmascattheta = scatsigmatheta;
101  }

◆ setSigmaDeltaE()

void Trk::GXFMaterialEffects::setSigmaDeltaE ( double  sigmadeltae)

Definition at line 158 of file GXFMaterialEffects.cxx.

158  {
159  m_sigmadeltae = sigmadeltae;
160  }

◆ setSigmaDeltaENeg()

void Trk::GXFMaterialEffects::setSigmaDeltaENeg ( double  sigmadeltaeneg)

Definition at line 166 of file GXFMaterialEffects.cxx.

166  {
167  m_sigmadeltaeneg = sigmadeltaeneg;
168  }

◆ setSigmaDeltaEPos()

void Trk::GXFMaterialEffects::setSigmaDeltaEPos ( double  sigmadeltaepos)

Definition at line 162 of file GXFMaterialEffects.cxx.

162  {
163  m_sigmadeltaepos = sigmadeltaepos;
164  }

◆ setSurface()

void Trk::GXFMaterialEffects::setSurface ( const Surface surf)

Set the surface for this material effects instance.

This method links the instance of GXFMaterialEffects to a surface. The surface can then be accessed through the surface() method.

Note
This method does NOT assume ownership of the passed pointer.

Definition at line 206 of file GXFMaterialEffects.cxx.

206  {
207  m_surf = surf;
208  }

◆ setX0()

void Trk::GXFMaterialEffects::setX0 ( double  x0)

Definition at line 107 of file GXFMaterialEffects.cxx.

107  {
108  m_x0 = x0;
109  }

◆ sigmaDeltaE()

double Trk::GXFMaterialEffects::sigmaDeltaE ( ) const

Definition at line 139 of file GXFMaterialEffects.cxx.

139  {
140  return m_sigmadeltae;
141  }

◆ sigmaDeltaEAve()

double Trk::GXFMaterialEffects::sigmaDeltaEAve ( ) const

Definition at line 151 of file GXFMaterialEffects.cxx.

151  {
152  if (m_eloss != nullptr) {
153  return m_eloss->sigmaDeltaE();
154  }
155  return 0;
156  }

◆ sigmaDeltaENeg()

double Trk::GXFMaterialEffects::sigmaDeltaENeg ( ) const

Definition at line 147 of file GXFMaterialEffects.cxx.

147  {
148  return m_sigmadeltaeneg;
149  }

◆ sigmaDeltaEPos()

double Trk::GXFMaterialEffects::sigmaDeltaEPos ( ) const

Definition at line 143 of file GXFMaterialEffects.cxx.

143  {
144  return m_sigmadeltaepos;
145  }

◆ sigmaDeltaPhi()

double Trk::GXFMaterialEffects::sigmaDeltaPhi ( ) const

Definition at line 123 of file GXFMaterialEffects.cxx.

123  {
124  return m_sigmascatphi;
125  }

◆ sigmaDeltaTheta()

double Trk::GXFMaterialEffects::sigmaDeltaTheta ( ) const

Definition at line 127 of file GXFMaterialEffects.cxx.

127  {
128  return m_sigmascattheta;
129  }

◆ x0()

double Trk::GXFMaterialEffects::x0 ( ) const

Definition at line 103 of file GXFMaterialEffects.cxx.

103  {
104  return m_x0;
105  }

Member Data Documentation

◆ m_deltae

double Trk::GXFMaterialEffects::m_deltae = 0
private

Definition at line 112 of file GXFMaterialEffects.h.

◆ m_deltap

double Trk::GXFMaterialEffects::m_deltap = 0
private

Definition at line 111 of file GXFMaterialEffects.h.

◆ m_eloss

std::unique_ptr<const EnergyLoss> Trk::GXFMaterialEffects::m_eloss
private

Definition at line 116 of file GXFMaterialEffects.h.

◆ m_iskink

bool Trk::GXFMaterialEffects::m_iskink = false
private

Definition at line 120 of file GXFMaterialEffects.h.

◆ m_ismeasuredeloss

bool Trk::GXFMaterialEffects::m_ismeasuredeloss = false
private

Definition at line 121 of file GXFMaterialEffects.h.

◆ m_matprop

const MaterialProperties* Trk::GXFMaterialEffects::m_matprop = nullptr
private

Definition at line 119 of file GXFMaterialEffects.h.

◆ m_measscatphi

double Trk::GXFMaterialEffects::m_measscatphi = 0
private

Definition at line 122 of file GXFMaterialEffects.h.

◆ m_scatphi

double Trk::GXFMaterialEffects::m_scatphi = 0
private

Definition at line 106 of file GXFMaterialEffects.h.

◆ m_scattheta

double Trk::GXFMaterialEffects::m_scattheta = 0
private

Definition at line 107 of file GXFMaterialEffects.h.

◆ m_sigmadeltae

double Trk::GXFMaterialEffects::m_sigmadeltae = 0
private

Definition at line 113 of file GXFMaterialEffects.h.

◆ m_sigmadeltaeneg

double Trk::GXFMaterialEffects::m_sigmadeltaeneg = 0
private

Definition at line 115 of file GXFMaterialEffects.h.

◆ m_sigmadeltaepos

double Trk::GXFMaterialEffects::m_sigmadeltaepos = 0
private

Definition at line 114 of file GXFMaterialEffects.h.

◆ m_sigmascatphi

double Trk::GXFMaterialEffects::m_sigmascatphi = 0
private

Definition at line 108 of file GXFMaterialEffects.h.

◆ m_sigmascattheta

double Trk::GXFMaterialEffects::m_sigmascattheta = 0
private

Definition at line 109 of file GXFMaterialEffects.h.

◆ m_sintheta

double Trk::GXFMaterialEffects::m_sintheta = 1
private

Definition at line 123 of file GXFMaterialEffects.h.

◆ m_surf

const Surface* Trk::GXFMaterialEffects::m_surf = nullptr
private

Definition at line 118 of file GXFMaterialEffects.h.

◆ m_x0

double Trk::GXFMaterialEffects::m_x0 = 0
private

Definition at line 110 of file GXFMaterialEffects.h.


The documentation for this class was generated from the following files:
Trk::GXFMaterialEffects::m_scatphi
double m_scatphi
Definition: GXFMaterialEffects.h:106
Trk::GXFMaterialEffects::m_x0
double m_x0
Definition: GXFMaterialEffects.h:110
Trk::GXFMaterialEffects::m_sintheta
double m_sintheta
Definition: GXFMaterialEffects.h:123
Trk::GXFMaterialEffects::m_surf
const Surface * m_surf
Definition: GXFMaterialEffects.h:118
Trk::GXFMaterialEffects::m_matprop
const MaterialProperties * m_matprop
Definition: GXFMaterialEffects.h:119
Trk::GXFMaterialEffects::m_ismeasuredeloss
bool m_ismeasuredeloss
Definition: GXFMaterialEffects.h:121
Trk::GXFMaterialEffects::m_scattheta
double m_scattheta
Definition: GXFMaterialEffects.h:107
Trk::GXFMaterialEffects::m_sigmadeltae
double m_sigmadeltae
Definition: GXFMaterialEffects.h:113
Trk::GXFMaterialEffects::m_iskink
bool m_iskink
Definition: GXFMaterialEffects.h:120
Trk::MaterialEffectsBase::FittedMaterialEffects
@ FittedMaterialEffects
contains values obtained by fitting the scatterer or e-loss
Definition: MaterialEffectsBase.h:56
Trk::GXFMaterialEffects::m_measscatphi
double m_measscatphi
Definition: GXFMaterialEffects.h:122
Trk::GXFMaterialEffects::x0
double x0() const
Definition: GXFMaterialEffects.cxx:103
Trk::GXFMaterialEffects::m_sigmascattheta
double m_sigmascattheta
Definition: GXFMaterialEffects.h:109
Trk::GXFMaterialEffects::m_sigmascatphi
double m_sigmascatphi
Definition: GXFMaterialEffects.h:108
Trk::GXFMaterialEffects::delta_p
double delta_p() const
Definition: GXFMaterialEffects.cxx:178
Trk::GXFMaterialEffects::m_sigmadeltaepos
double m_sigmadeltaepos
Definition: GXFMaterialEffects.h:114
Trk::GXFMaterialEffects::m_sigmadeltaeneg
double m_sigmadeltaeneg
Definition: GXFMaterialEffects.h:115
Trk::GXFMaterialEffects::m_deltae
double m_deltae
Definition: GXFMaterialEffects.h:112
Trk::GXFMaterialEffects::m_deltap
double m_deltap
Definition: GXFMaterialEffects.h:111
Trk::GXFMaterialEffects::m_eloss
std::unique_ptr< const EnergyLoss > m_eloss
Definition: GXFMaterialEffects.h:116