ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
Trk::MaterialEffectsOnTrack Class Referencefinal

represents the full description of deflection and e-loss of a track in material. More...

#include <MaterialEffectsOnTrack.h>

Inheritance diagram for Trk::MaterialEffectsOnTrack:
Collaboration diagram for Trk::MaterialEffectsOnTrack:

Public Types

enum  MaterialEffectsDerivedType { ESTIMATED_BREM_ON_TRACK = 0, MATERIAL_EFFECTS_ON_TRACK, NTYPES }
 
enum  MaterialEffectsType {
  ScatteringEffects = 0, EnergyLossEffects = 1, MaterialThickness = 2, BremPoint = 3,
  UsesMeasurement = 4, FittedMaterialEffects = 5, Unknown = 6, NumberOfMaterialEffectsTypes = 7
}
 

Public Member Functions

 MaterialEffectsOnTrack ()=default
 default constructor for POOL - do not use in reconstruction! More...
 
 MaterialEffectsOnTrack (const double tInX0, std::optional< ScatteringAngles > scat, std::unique_ptr< const Trk::EnergyLoss > eloss, const Surface &assocSurf, const std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes > &typePattern=std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes >())
 full constructor passing (with ownership) both scattering angle and energy loss More...
 
 MaterialEffectsOnTrack (const double tInX0, std::optional< ScatteringAngles > scat, const Surface &assocSurf, const std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes > &typePattern=std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes >())
 partial constructor passing (with ownership) a scattering angle object More...
 
 MaterialEffectsOnTrack (const double tInX0, std::unique_ptr< const EnergyLoss > eloss, const Surface &assocSurf, const std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes > &typePattern=std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes >())
 partial constructor passing (with ownership) an energy loss object More...
 
 MaterialEffectsOnTrack (const double tInX0, const Surface &assocSurf)
 partial constructor with only a thickness, input to ME-Updator More...
 
 MaterialEffectsOnTrack (const MaterialEffectsOnTrack &meot)
 Copy constructor. More...
 
MaterialEffectsOnTrackoperator= (const MaterialEffectsOnTrack &rhs)
 Assignment operator. More...
 
 MaterialEffectsOnTrack (MaterialEffectsOnTrack &&meot) noexcept=default
 Moveconstructor. More...
 
MaterialEffectsOnTrackoperator= (MaterialEffectsOnTrack &&rhs) noexcept=default
 Assignment operator. More...
 
virtual ~MaterialEffectsOnTrack ()=default
 virtual destructor More...
 
MaterialEffectsBase::MaterialEffectsDerivedType derivedType () const override final
 concrete type More...
 
const ScatteringAnglesscatteringAngles () const
 returns the MCS-angles object. More...
 
const EnergyLossenergyLoss () const
 returns the energy loss object. More...
 
virtual MaterialEffectsOnTrackclone () const override final
 Virtual constructor. More...
 
std::unique_ptr< MaterialEffectsOnTrackuniqueClone () const
 NVI uniqueClone. More...
 
virtual MsgStream & dump (MsgStream &sl) const override final
 Interface method for output. More...
 
virtual std::ostream & dump (std::ostream &sl) const override final
 Interface method for output. More...
 
double thicknessInX0 () const
 returns the actually traversed material \( t/X_0 \). More...
 
const SurfaceassociatedSurface () const
 returns the surface to which these m.eff. are associated. More...
 
bool type (const MaterialEffectsType &type) const
 returns the flags (bits) which types of ME are present More...
 
std::string dumpType () const
 returns a string with the type of the object More...
 
const S * surfacePtr ()
 return the ptr we hold useful for tests More...
 
const S * release () noexcept
 release ala unique_ptr release More...
 
void destroySurface () noexcept
 destroySurface deletes the ptr if not null and the surface has not a associatedDetectorElement Usefull also for testing More...
 

Static Public Member Functions

static const S * cloneHelper (const S *input)
 Helper for cloning or not when we need depending on if we have an associatedDetectorElement. More...
 

Protected Member Functions

virtual void setValues (const Surface *assocSurface)
 allows POOL converter to recreate transient links to DetStore More...
 

Protected Attributes

const S * m_associatedSurface = nullptr
 

Private Attributes

std::optional< ScatteringAnglesm_scatteringAngles = std::nullopt
 holds the scattering angles+errors in a separate object More...
 
std::unique_ptr< const EnergyLossm_energyLoss = nullptr
 holds the measured and/or estimated energy loss in a separate object More...
 
double m_tInX0 {}
 \( t/X_0 \) - the traversed thickness in RadiationLengths More...
 
long m_typeFlags {}
 

Friends

class ::MaterialEffectsOnTrackCnv_p2
 
class ::ScatteringAngleOnTrackCnv_p1
 

Detailed Description

represents the full description of deflection and e-loss of a track in material.

This class is part of the ATLAS tracking EDM and extends the Trk::MaterialOnTrack base class known to the track. It holds two objects, one representing the deflection angles wrt. the track's theta and phi and their uncertainties, the other the energy loss and its uncertainties. Both objects are passed by pointer, implying that Trk::MaterialEffectsOnTrack will take ownership of them and that not both of them need to be present.

Author
Wolfgang Liebig http://consult.cern.ch/xwho/people/

Definition at line 39 of file MaterialEffectsOnTrack.h.

Member Enumeration Documentation

◆ MaterialEffectsDerivedType

Enumerator
ESTIMATED_BREM_ON_TRACK 
MATERIAL_EFFECTS_ON_TRACK 
NTYPES 

Definition at line 37 of file MaterialEffectsBase.h.

37  {
40  NTYPES
41  };

◆ MaterialEffectsType

Enumerator
ScatteringEffects 

contains material effects due to multiple scattering

EnergyLossEffects 

contains energy loss corrections

MaterialThickness 

contains only thickness, needs M.E.Updator to calculate effects

BremPoint 

contains q/p covariance noise term

UsesMeasurement 

contains energy loss correction based on Calo measurement

FittedMaterialEffects 

contains values obtained by fitting the scatterer or e-loss

Unknown 

new category

NumberOfMaterialEffectsTypes 

Definition at line 42 of file MaterialEffectsBase.h.

43  {
47  // trouble: avoid name clash Trk::Energyloss vs MET::EnergyLoss
52  BremPoint = 3,
54  UsesMeasurement = 4,
58  Unknown = 6,
60  // WARNING need to edit MaterialEffectsOnTrack.cxx if these enums change
61  };

Constructor & Destructor Documentation

◆ MaterialEffectsOnTrack() [1/7]

Trk::MaterialEffectsOnTrack::MaterialEffectsOnTrack ( )
default

default constructor for POOL - do not use in reconstruction!

◆ MaterialEffectsOnTrack() [2/7]

Trk::MaterialEffectsOnTrack::MaterialEffectsOnTrack ( const double  tInX0,
std::optional< ScatteringAngles scat,
std::unique_ptr< const Trk::EnergyLoss eloss,
const Surface assocSurf,
const std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes > &  typePattern = std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes >() 
)

full constructor passing (with ownership) both scattering angle and energy loss

Parameters
[in]tInX0layer thickness in terms of rad length
[in]scatpointer to ScatteringAngles object (passing ownership)
[in]elosspointer to EnergyLoss base class (passing ownership)
[in]assocSurfSurface on which material effects are expressed
[in]typePatternbitset scheme to characterise type of MEOT.

◆ MaterialEffectsOnTrack() [3/7]

Trk::MaterialEffectsOnTrack::MaterialEffectsOnTrack ( const double  tInX0,
std::optional< ScatteringAngles scat,
const Surface assocSurf,
const std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes > &  typePattern = std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes >() 
)

partial constructor passing (with ownership) a scattering angle object

Parameters
[in]tInX0layer thickness in terms of rad length
[in]scatpointer to ScatteringAngles object (passing ownership)
[in]assocSurfsurface on which material effects are expressed
[in]typePatternbitset scheme to characterise type of MEOT.

◆ MaterialEffectsOnTrack() [4/7]

Trk::MaterialEffectsOnTrack::MaterialEffectsOnTrack ( const double  tInX0,
std::unique_ptr< const EnergyLoss eloss,
const Surface assocSurf,
const std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes > &  typePattern = std::bitset< MaterialEffectsBase::NumberOfMaterialEffectsTypes >() 
)

partial constructor passing (with ownership) an energy loss object

Parameters
[in]tInX0layer thickness in terms of rad length
[in]elosspointer to EnergyLoss object (passing ownership)
[in]assocSurfsurface on which material effects are expressed
[in]typePatternbitset scheme to characterise type of MEOT.

◆ MaterialEffectsOnTrack() [5/7]

Trk::MaterialEffectsOnTrack::MaterialEffectsOnTrack ( const double  tInX0,
const Surface assocSurf 
)

partial constructor with only a thickness, input to ME-Updator

Parameters
[in]tInX0layer thickness in terms of rad length
[in]assocSurfsurface on which material effects are expressed The type will be defaulted to MaterialUpdatorInput.

◆ MaterialEffectsOnTrack() [6/7]

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

Copy constructor.

◆ MaterialEffectsOnTrack() [7/7]

Trk::MaterialEffectsOnTrack::MaterialEffectsOnTrack ( MaterialEffectsOnTrack &&  meot)
defaultnoexcept

Moveconstructor.

◆ ~MaterialEffectsOnTrack()

virtual Trk::MaterialEffectsOnTrack::~MaterialEffectsOnTrack ( )
virtualdefault

virtual destructor

Member Function Documentation

◆ associatedSurface()

const Surface& Trk::MaterialEffectsBase::associatedSurface ( ) const
inherited

returns the surface to which these m.eff. are associated.

◆ clone()

virtual MaterialEffectsOnTrack* Trk::MaterialEffectsOnTrack::clone ( ) const
finaloverridevirtual

Virtual constructor.

Implements Trk::MaterialEffectsBase.

◆ cloneHelper()

template<typename S >
static const S* Trk::SurfacePtrHolderImplDetEl< S >::cloneHelper ( const S *  input)
inlinestaticinherited

Helper for cloning or not when we need depending on if we have an associatedDetectorElement.

Definition at line 236 of file SurfaceHolderImpl.h.

237  {
238  return (input && input->associatedDetectorElement() == nullptr
239  ? input->clone()
240  : input);
241  }

◆ derivedType()

MaterialEffectsBase::MaterialEffectsDerivedType Trk::MaterialEffectsOnTrack::derivedType ( ) const
inlinefinaloverridevirtual

concrete type

Implements Trk::MaterialEffectsBase.

Definition at line 116 of file MaterialEffectsOnTrack.h.

116  {
118  }

◆ destroySurface()

template<typename S >
void Trk::SurfacePtrHolderImplDetEl< S >::destroySurface ( )
inlinenoexceptinherited

destroySurface deletes the ptr if not null and the surface has not a associatedDetectorElement Usefull also for testing

Definition at line 224 of file SurfaceHolderImpl.h.

225  {
226  if (m_associatedSurface &&
227  m_associatedSurface->associatedDetectorElement() == nullptr) {
228  delete m_associatedSurface;
229  }
230  //
231  m_associatedSurface = nullptr;
232  }

◆ dump() [1/2]

MsgStream & Trk::MaterialEffectsOnTrack::dump ( MsgStream &  sl) const
finaloverridevirtual

Interface method for output.

Reimplemented from Trk::MaterialEffectsBase.

Definition at line 13 of file MaterialEffectsOnTrack.cxx.

14 {
15  sl << "MaterialEffectsOnTrack based on" << endmsg;
17  sl << "MaterialEffects, Scatterer? : " << (scatteringAngles() ? "yes:" : "none")
18  << endmsg;
19  if (scatteringAngles()) {
20  sl << *scatteringAngles() << endmsg;
21  }
22  sl << "MaterialEffects, E-loss ? : " << (energyLoss() ? "yes:" : "none")
23  << endmsg;
24  if (energyLoss()) {
25  sl << *energyLoss() << endmsg;
26  }
27  return sl;
28 }

◆ dump() [2/2]

std::ostream & Trk::MaterialEffectsOnTrack::dump ( std::ostream &  sl) const
finaloverridevirtual

Interface method for output.

Reimplemented from Trk::MaterialEffectsBase.

Definition at line 31 of file MaterialEffectsOnTrack.cxx.

32 {
33  sl << "MaterialEffectsOnTrack based on" << std::endl;
35  sl << "MaterialEffects, Scatterer? : " << (scatteringAngles() ? "yes:" : "none")
36  << std::endl;
37  if (scatteringAngles()) {
38  sl << *scatteringAngles() << std::endl;
39  }
40  sl << "MaterialEffects, E-loss ? : " << (energyLoss() ? "yes:" : "none")
41  << std::endl;
42  if (energyLoss()) {
43  sl << *energyLoss() << std::endl;
44  }
45  return sl;
46 }

◆ dumpType()

std::string Trk::MaterialEffectsBase::dumpType ( ) const
inherited

returns a string with the type of the object

Definition at line 16 of file MaterialEffectsBase.cxx.

17 {
18  std::string type;
19  for (int i = 0; i < NumberOfMaterialEffectsTypes; ++i) {
20  if ((1 << i) & m_typeFlags) {
21  switch (i) {
23  type += "Scattering ";
24  break;
26  type += "EnergyLoss ";
27  break;
29  type += "UpdatorInput ";
30  break;
32  type += "BremPoint ";
33  break;
35  type += "UsesMeasurement ";
36  break;
38  type += "FittedMaterialEffects ";
39  break;
40  default:
41  type += "Unknown ";
42  break;
43  }
44  }
45  }
46  return type;
47 }

◆ energyLoss()

const EnergyLoss* Trk::MaterialEffectsOnTrack::energyLoss ( ) const

returns the energy loss object.

Careful: DO NOT DELETE! Pointer may be NULL if no E loss but only scattering angles are contained.

◆ operator=() [1/2]

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

Assignment operator.

◆ operator=() [2/2]

MaterialEffectsOnTrack& Trk::MaterialEffectsOnTrack::operator= ( MaterialEffectsOnTrack &&  rhs)
defaultnoexcept

Assignment operator.

◆ release()

template<typename S >
const S* Trk::SurfacePtrHolderImplDetEl< S >::release ( )
inlinenoexceptinherited

release ala unique_ptr release

Definition at line 215 of file SurfaceHolderImpl.h.

216  {
217  const S* tmp = m_associatedSurface;
218  m_associatedSurface = nullptr;
219  return tmp;
220  }

◆ scatteringAngles()

const ScatteringAngles* Trk::MaterialEffectsOnTrack::scatteringAngles ( ) const

returns the MCS-angles object.

Careful: DO NOT DELETE! Pointer may be NULL if no MCS but only energy loss is contained.

◆ setValues()

virtual void Trk::MaterialEffectsBase::setValues ( const Surface assocSurface)
protectedvirtualinherited

allows POOL converter to recreate transient links to DetStore

◆ surfacePtr()

template<typename S >
const S* Trk::SurfacePtrHolderImplDetEl< S >::surfacePtr ( )
inlineinherited

return the ptr we hold useful for tests

Definition at line 213 of file SurfaceHolderImpl.h.

213 { return m_associatedSurface; }

◆ thicknessInX0()

double Trk::MaterialEffectsBase::thicknessInX0 ( ) const
inherited

returns the actually traversed material \( t/X_0 \).

Leave 0.0 for external ME.

◆ type()

bool Trk::MaterialEffectsBase::type ( const MaterialEffectsType type) const
inherited

returns the flags (bits) which types of ME are present

Use this method to find out if the ME is of a certain type: i.e. if ( mefot->type(MaterialEffectsBase::EnergyLoss) { //etc }

Returns
true if the MaterialEffectsBase is of this type

◆ uniqueClone()

std::unique_ptr<MaterialEffectsOnTrack> Trk::MaterialEffectsOnTrack::uniqueClone ( ) const

NVI uniqueClone.

Friends And Related Function Documentation

◆ ::MaterialEffectsOnTrackCnv_p2

friend class ::MaterialEffectsOnTrackCnv_p2
friend

Definition at line 142 of file MaterialEffectsOnTrack.h.

◆ ::ScatteringAngleOnTrackCnv_p1

friend class ::ScatteringAngleOnTrackCnv_p1
friend

Definition at line 143 of file MaterialEffectsOnTrack.h.

Member Data Documentation

◆ m_associatedSurface

template<typename S >
const S* Trk::SurfacePtrHolderImplDetEl< S >::m_associatedSurface = nullptr
protectedinherited

Definition at line 244 of file SurfaceHolderImpl.h.

◆ m_energyLoss

std::unique_ptr<const EnergyLoss> Trk::MaterialEffectsOnTrack::m_energyLoss = nullptr
private

holds the measured and/or estimated energy loss in a separate object

Definition at line 148 of file MaterialEffectsOnTrack.h.

◆ m_scatteringAngles

std::optional<ScatteringAngles> Trk::MaterialEffectsOnTrack::m_scatteringAngles = std::nullopt
private

holds the scattering angles+errors in a separate object

Definition at line 146 of file MaterialEffectsOnTrack.h.

◆ m_tInX0

double Trk::MaterialEffectsBase::m_tInX0 {}
privateinherited

\( t/X_0 \) - the traversed thickness in RadiationLengths

Definition at line 139 of file MaterialEffectsBase.h.

◆ m_typeFlags

long Trk::MaterialEffectsBase::m_typeFlags {}
privateinherited

Definition at line 140 of file MaterialEffectsBase.h.


The documentation for this class was generated from the following files:
Trk::MaterialEffectsBase::FittedMaterialEffects
@ FittedMaterialEffects
contains values obtained by fitting the scatterer or e-loss
Definition: MaterialEffectsBase.h:56
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
Trk::SurfacePtrHolderImplDetEl::m_associatedSurface
const S * m_associatedSurface
Definition: SurfaceHolderImpl.h:244
Trk::MaterialEffectsBase::UsesMeasurement
@ UsesMeasurement
contains energy loss correction based on Calo measurement
Definition: MaterialEffectsBase.h:54
Trk::MaterialEffectsBase::MATERIAL_EFFECTS_ON_TRACK
@ MATERIAL_EFFECTS_ON_TRACK
Definition: MaterialEffectsBase.h:39
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
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::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
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
Trk::MaterialEffectsBase::Unknown
@ Unknown
new category
Definition: MaterialEffectsBase.h:58
Trk::MaterialEffectsBase::EnergyLossEffects
@ EnergyLossEffects
contains energy loss corrections
Definition: MaterialEffectsBase.h:48
Trk::MaterialEffectsBase::NTYPES
@ NTYPES
Definition: MaterialEffectsBase.h:40
Trk::MaterialEffectsBase::NumberOfMaterialEffectsTypes
@ NumberOfMaterialEffectsTypes
Definition: MaterialEffectsBase.h:59
Trk::MaterialEffectsOnTrack::energyLoss
const EnergyLoss * energyLoss() const
returns the energy loss object.
Trk::MaterialEffectsBase::m_typeFlags
long m_typeFlags
Definition: MaterialEffectsBase.h:140
Trk::MaterialEffectsOnTrack::scatteringAngles
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
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::MaterialThickness
@ MaterialThickness
contains only thickness, needs M.E.Updator to calculate effects
Definition: MaterialEffectsBase.h:50