ATLAS Offline Software
Loading...
Searching...
No Matches
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!
 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
 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
 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
 MaterialEffectsOnTrack (const double tInX0, const Surface &assocSurf)
 partial constructor with only a thickness, input to ME-Updator
 MaterialEffectsOnTrack (const MaterialEffectsOnTrack &meot)
 Copy constructor.
MaterialEffectsOnTrackoperator= (const MaterialEffectsOnTrack &rhs)
 Assignment operator.
 MaterialEffectsOnTrack (MaterialEffectsOnTrack &&meot) noexcept=default
 Moveconstructor.
MaterialEffectsOnTrackoperator= (MaterialEffectsOnTrack &&rhs) noexcept=default
 Assignment operator.
virtual ~MaterialEffectsOnTrack ()=default
 virtual destructor
MaterialEffectsBase::MaterialEffectsDerivedType derivedType () const override final
 concrete type
const ScatteringAnglesscatteringAngles () const
 returns the MCS-angles object.
const EnergyLossenergyLoss () const
 returns the energy loss object.
virtual MaterialEffectsOnTrackclone () const override final
 Virtual constructor.
std::unique_ptr< MaterialEffectsOnTrackuniqueClone () const
 NVI uniqueClone.
virtual MsgStream & dump (MsgStream &sl) const override final
 Interface method for output.
virtual std::ostream & dump (std::ostream &sl) const override final
 Interface method for output.
double thicknessInX0 () const
 returns the actually traversed material \( t/X_0 \).
const SurfaceassociatedSurface () const
 returns the surface to which these m.eff. are associated.
bool type (const MaterialEffectsType &type) const
 returns the flags (bits) which types of ME are present
std::string dumpType () const
 returns a string with the type of the object
const SurfacesurfacePtr ()
 return the ptr we hold useful for tests
const Surfacerelease () noexcept
 release ala unique_ptr release
void destroySurface () noexcept
 destroySurface deletes the ptr if not null and the surface has not a associatedDetectorElement Usefull also for testing

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

const Surfacem_associatedSurface

Private Attributes

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

◆ 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,
58 Unknown = 6,
60 // WARNING need to edit MaterialEffectsOnTrack.cxx if these enums change
61 };
@ BremPoint
contains q/p covariance noise term
@ ScatteringEffects
contains material effects due to multiple scattering
@ UsesMeasurement
contains energy loss correction based on Calo measurement
@ FittedMaterialEffects
contains values obtained by fitting the scatterer or e-loss
@ EnergyLossEffects
contains energy loss corrections
@ MaterialThickness
contains only thickness, needs M.E.Updator to calculate effects

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()

const Surface * Trk::SurfacePtrHolderImplDetEl< Surface >::cloneHelper ( const Surface * input)
inlinestaticinherited

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

Definition at line 213 of file SurfaceHolderImpl.h.

214 {
215 return (input && input->associatedDetectorElement() == nullptr
216 ? input->clone()
217 : input);
218 }

◆ derivedType()

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

concrete type

Implements Trk::MaterialEffectsBase.

Definition at line 116 of file MaterialEffectsOnTrack.h.

◆ destroySurface()

void Trk::SurfacePtrHolderImplDetEl< Surface >::destroySurface ( )
inlinenoexceptinherited

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

Definition at line 201 of file SurfaceHolderImpl.h.

202 {
204 m_associatedSurface->associatedDetectorElement() == nullptr) {
205 delete m_associatedSurface;
206 }
207 //
208 m_associatedSurface = nullptr;
209 }

◆ 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}
#define endmsg
virtual MsgStream & dump(MsgStream &sl) const
Interface method for output, can be overloaded by child classes.
const EnergyLoss * energyLoss() const
returns the energy loss object.
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.

◆ 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}
bool type(const MaterialEffectsType &type) const
returns the flags (bits) which types of ME are present

◆ 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()

const Surface * Trk::SurfacePtrHolderImplDetEl< Surface >::release ( )
inlinenoexceptinherited

release ala unique_ptr release

Definition at line 192 of file SurfaceHolderImpl.h.

193 {
194 const S* tmp = m_associatedSurface;
195 m_associatedSurface = nullptr;
196 return tmp;
197 }

◆ 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()

const Surface * Trk::SurfacePtrHolderImplDetEl< Surface >::surfacePtr ( )
inlineinherited

return the ptr we hold useful for tests

Definition at line 190 of file SurfaceHolderImpl.h.

190{ 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.

◆ ::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

const Surface* Trk::SurfacePtrHolderImplDetEl< Surface >::m_associatedSurface
protectedinherited

Definition at line 221 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.

139{};

◆ m_typeFlags

long Trk::MaterialEffectsBase::m_typeFlags {}
privateinherited

Definition at line 140 of file MaterialEffectsBase.h.

140{};

The documentation for this class was generated from the following files: