ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Trk::AlignTSOS Class Reference

#include <AlignTSOS.h>

Inheritance diagram for Trk::AlignTSOS:
Collaboration diagram for Trk::AlignTSOS:

Public Types

enum  TrackStateOnSurfaceType {
  Measurement = 0, InertMaterial = 1, BremPoint = 2, Scatterer = 3,
  Perigee = 4, Outlier = 5, Hole = 6, Unknown = 7,
  CaloDeposit = 8, Parameter = 9, FitQuality = 10, Alignment = 11,
  NumberOfTrackStateOnSurfaceTypes = 12
}
 
enum  PersistencyHint {
  PartialPersistification = 0, PersistifyMeasurement = 1, PersistifyTrackParameters = 2, PersistifySlimCaloDeposit = 3,
  NumberOfPersistencyHints = 4
}
 
enum  Variety { SingleComponent = 0, MultiComponent = 1, Align = 2 }
 

Public Member Functions

 AlignTSOS (const TrackStateOnSurface &tsos, AlignModule *module, const RIO_OnTrack *rio, TrackState::MeasurementType detType)
 constructor takes: 1) the TSOS from the original track, 2) the AlignModule containing the TrkDetElementBase in which the TSOS was measured (NULL for a scatterer), 3) nresdim, the dimensionality of the measurement, 4) the RIO if the TSOS is a RIO, or the leading RIO if a CompetingRIOsOnTrack, 5) and the detector type (from TrackStateDefs.h) More...
 
 AlignTSOS (const TrackStateOnSurface &tsos, AlignModule *module, const CompetingRIOsOnTrack *crio, TrackState::MeasurementType detType)
 
 AlignTSOS (const TrackStateOnSurface &tsos, TrackState::MeasurementType measType)
 
 AlignTSOS (const AlignTSOS &atsos)
 copy constructor More...
 
virtual ~AlignTSOS ()
 destructor More...
 
AlignTSOSoperator= (const AlignTSOS &atsos)
 asignment operator More...
 
const AlignModulemodule () const
 accessor method for AlignModule to which tsos belongs More...
 
AlignModulemodule ()
 
void setValid (bool isvalid)
 set and retrieve flag to indicate whether hit valid for alignment More...
 
bool isValid () const
 
int nResDim () const
 returns number of measurement residual + scatterer residual dimensions More...
 
TrackState::MeasurementType measType () const
 returns measurement type enum More...
 
Identifier identify () const
 returns Identifier of RIO More...
 
const RIO_OnTrackrio () const
 returns RIO_OnTrack or leading RIO of CompetingRIOsOnTrack (assigned by c'tor) More...
 
void setCompetingRIOsOnTrack (const CompetingRIOsOnTrack *crio)
 sets CompetingRIOsOnTrack More...
 
const CompetingRIOsOnTrackcrio () const
 returns CompetingRIOsOnTrack More...
 
void addResidual (const Residual &residual)
 pushes back vector of Residuals to alignTSOS residuals More...
 
const std::vector< Residual > & residuals () const
 returns vector of Residuals More...
 
void clearResiduals ()
 clears vector of residuals More...
 
std::vector< Residual >::const_iterator firstResidual () const
 returns first Residual iterator More...
 
std::vector< Residual >::const_iterator lastResidual () const
 returns last Residual iterator More...
 
const TrkDetElementBasedetelement (int i=0) const
 method for retrieving detector elements (one if RIO, more if CRIO) More...
 
int nDetElements () const
 method for retrieving number of detector elements More...
 
std::string dumpMeasType () const
 returns string corresponding to the measurement type More...
 
void setAlphaStrip (double alpha)
 returns strip angle for fan-out structured modules (SCT endcap) More...
 
double alphaStrip () const
 returns strip angle for fan-out structured modules (SCT endcap) More...
 
void setMeasDir (Trk::ParamDefs dir)
 set the measurement direction More...
 
Trk::ParamDefs measDir () const
 retrieve the measurement direction More...
 
std::string dumpMeasDir () const
 returns string corresponding to the measurement direction More...
 
const TrackParametersunbiasedTrackPars () const
 returns pointer to unbiased track parameters if present More...
 
void setUnbiasedTrackPars (const TrackParameters *trkPars)
 setter for unbiased track parameters More...
 
const std::vector< Amg::VectorX > * derivatives () const
 returns pointer to vector of derivatives More...
 
const std::vector< Amg::VectorX > * derivativesVtx () const
 returns pointer to vector of derivatives w.r.t. More...
 
void setDerivatives (std::vector< Amg::VectorX > *derivs)
 setter for the derivatives More...
 
void setDerivativesVtx (std::vector< Amg::VectorX > *derivs)
 setter for the derivatives w.r.t. More...
 
virtual TrackStateOnSurface::Variety variety () const override final
 Use this method to find if this is a Single, Multi or Align TrackStateOnsurface. More...
 
virtual TrackStateOnSurfaceclone () const
 Pseudo-constructor: needed to avoid excessive RTTI. More...
 
const FitQualityOnSurfacefitQualityOnSurface () const
 return FitQuality On Surface const overload More...
 
FitQualityOnSurfacefitQualityOnSurface ()
 return FitQuality On Surface non-const overload More...
 
const TrackParameterstrackParameters () const
 return ptr to trackparameters const overload More...
 
TrackParameterstrackParameters ()
 return ptr to trackparameters non-const overload More...
 
const MeasurementBasemeasurementOnTrack () const
 returns MeasurementBase const overload More...
 
MeasurementBasemeasurementOnTrack ()
 returns MeasurementBase non-const overload More...
 
const MaterialEffectsBasematerialEffectsOnTrack () const
 return material effects const overload More...
 
MaterialEffectsBasematerialEffectsOnTrack ()
 return material effects non-const overload More...
 
const AlignmentEffectsOnTrackalignmentEffectsOnTrack () const
 return the the alignment effects const overload More...
 
AlignmentEffectsOnTrackalignmentEffectsOnTrack ()
 return the the alignment effects non-const overload More...
 
bool type (const TrackStateOnSurfaceType type) const
 Use this method to find out if the TSoS is of a certain type: i.e. More...
 
std::string dumpType () const
 returns a string with the expanded type of the object (i.e. More...
 
const std::bitset< NumberOfTrackStateOnSurfaceTypestypes () const
 returns a bitset with the types of this bitset. More...
 
void setHints (const uint8_t hints) const
 Use this method to set persistification hints. More...
 
const std::bitset< NumberOfPersistencyHintshints () const
 Use this method to get the persistification hints. More...
 
const Trk::Surfacesurface () const
 return associated surface More...
 
bool isSane () const
 

Static Public Member Functions

static unsigned int long joinBitsets (const std::bitset< NumberOfTrackStateOnSurfaceTypes > &types, const std::bitset< NumberOfPersistencyHints > &hints)
 
static void splitToBitsets (const unsigned int long input, std::bitset< NumberOfTrackStateOnSurfaceTypes > &types, std::bitset< NumberOfPersistencyHints > &hints)
 

Protected Attributes

uint16_t m_typeFlags {}
 
std::atomic< uint8_t > m_hints {}
 

Private Member Functions

 AlignTSOS ()
 
void setFlags ()
 set sensible default flags More...
 

Private Attributes

AlignModulem_module
 
const RIO_OnTrackm_rio
 
const CompetingRIOsOnTrackm_crio
 
const TrackParametersm_unbiasedTrackPars
 
std::vector< Residualm_residuals
 
std::vector< const TrkDetElementBase * > m_detelements
 
std::vector< Amg::VectorX > * m_derivatives
 
bool m_isvalid
 
TrackState::MeasurementType m_measType
 
Trk::ParamDefs m_measDir
 direction of measurement (set to Trk::x by default) More...
 
double m_alphaStrip
 
std::vector< Amg::VectorX > * m_derivativesVtx
 
FitQualityOnSurface m_fitQualityOnSurface {}
 
std::unique_ptr< TrackParametersm_trackParameters {}
 
std::unique_ptr< MeasurementBasem_measurementOnTrack {}
 
std::unique_ptr< MaterialEffectsBasem_materialEffectsOnTrack {}
 
std::unique_ptr< AlignmentEffectsOnTrackm_alignmentEffectsOnTrack {}
 

Detailed Description

Definition at line 37 of file AlignTSOS.h.

Member Enumeration Documentation

◆ PersistencyHint

Enumerator
PartialPersistification 
PersistifyMeasurement 

Mark the measuremenet for persistification.

PersistifyTrackParameters 

Mark track parameters for persisitification.

PersistifySlimCaloDeposit 

Mark track parameters for persisitification.

NumberOfPersistencyHints 

Definition at line 155 of file TrackStateOnSurface.h.

156  {
157 
163 
168 
173 
175  };

◆ TrackStateOnSurfaceType

Enumerator
Measurement 

This is a measurement, and will at least contain a Trk::MeasurementBase.

InertMaterial 

This represents inert material, and so will contain MaterialEffectsBase.

BremPoint 

This represents a brem point on the track, and so will contain TrackParameters and MaterialEffectsBase.

Scatterer 

This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffectsBase.

Perigee 

This represents a perigee, and so will contain a Perigee object only.

Outlier 

This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used in the track fit.

Hole 

A hole on the track - this is defined in the following way.

A hole is a missing measurement BETWEEN the first and last actual measurements. i.e. if your track starts in the SCT, you should not consider a missing b-layer hit as a hole.

Unknown 

For some reason this does not fall into any of the other categories PLEASE DO NOT USE THIS - DEPRECATED!

CaloDeposit 

This TSOS contains a CaloEnergy object.

Parameter 

This TSOS contains a Trk::ParameterBase.

FitQuality 

This TSOS contains a Trk::FitQualityOnSurface.

Alignment 

This TSOS contains a Trk::AlignmentEffectsOnTrack.

NumberOfTrackStateOnSurfaceTypes 

Definition at line 97 of file TrackStateOnSurface.h.

98  {
101  Measurement = 0,
102 
105  InertMaterial = 1,
106 
109  BremPoint = 2,
110 
113  Scatterer = 3,
114 
117  Perigee = 4,
118 
122  Outlier = 5,
123 
128  Hole = 6,
129 
132  Unknown = 7,
133 
135  CaloDeposit = 8,
136 
140  Parameter = 9,
141 
145  FitQuality = 10,
146 
150  Alignment = 11,
151 
153  };

◆ Variety

Enumerator
SingleComponent 
MultiComponent 
Align 

Definition at line 211 of file TrackStateOnSurface.h.

212  {
213  SingleComponent = 0,
214  MultiComponent = 1,
215  Align = 2,
216  };

Constructor & Destructor Documentation

◆ AlignTSOS() [1/5]

AlignTSOS::AlignTSOS ( const TrackStateOnSurface tsos,
AlignModule module,
const RIO_OnTrack rio,
TrackState::MeasurementType  detType 
)

constructor takes: 1) the TSOS from the original track, 2) the AlignModule containing the TrkDetElementBase in which the TSOS was measured (NULL for a scatterer), 3) nresdim, the dimensionality of the measurement, 4) the RIO if the TSOS is a RIO, or the leading RIO if a CompetingRIOsOnTrack, 5) and the detector type (from TrackStateDefs.h)

Definition at line 16 of file AlignTSOS.cxx.

20  : TrackStateOnSurface(tsos)
21  , m_module(module)
22  , m_rio(rio)
23  , m_crio(nullptr)
24  , m_unbiasedTrackPars(nullptr)
25  , m_derivatives(nullptr)
26  , m_isvalid(true)
28  , m_measDir(Trk::x)
29  , m_alphaStrip(0)
30  , m_derivativesVtx(nullptr)
31  {
32  if(!module)
33  m_isvalid = false;
34 
35  const TrkDetElementBase * detelement(nullptr);
36  detelement = tsos.measurementOnTrack()->associatedSurface().associatedDetectorElement();
37 
38  m_detelements.push_back(detelement);
39  }

◆ AlignTSOS() [2/5]

AlignTSOS::AlignTSOS ( const TrackStateOnSurface tsos,
AlignModule module,
const CompetingRIOsOnTrack crio,
TrackState::MeasurementType  detType 
)

Definition at line 42 of file AlignTSOS.cxx.

46  : TrackStateOnSurface(tsos)
47  , m_module(module)
48  , m_rio(nullptr)
49  , m_crio(crio)
50  , m_unbiasedTrackPars(nullptr)
51  , m_derivatives(nullptr)
52  , m_isvalid(true)
54  , m_measDir(Trk::x)
55  , m_alphaStrip(0)
56  , m_derivativesVtx(nullptr)
57  {
58  if(!module)
59  m_isvalid = false;
60 
61  for (unsigned int irio = 0; irio < crio->numberOfContainedROTs(); irio++) {
62  const Trk::RIO_OnTrack& rio = crio->rioOnTrack(irio);
64  }
65  }

◆ AlignTSOS() [3/5]

AlignTSOS::AlignTSOS ( const TrackStateOnSurface tsos,
TrackState::MeasurementType  measType 
)

Definition at line 68 of file AlignTSOS.cxx.

70  : TrackStateOnSurface(tsos)
71  , m_module(nullptr)
72  , m_rio(nullptr)
73  , m_crio(nullptr)
74  , m_unbiasedTrackPars(nullptr)
75  , m_derivatives(nullptr)
76  , m_isvalid(false)
78  , m_measDir(Trk::x)
79  , m_alphaStrip(0)
80  , m_derivativesVtx(nullptr)
81  {
82  m_detelements.push_back(nullptr);
83  }

◆ AlignTSOS() [4/5]

AlignTSOS::AlignTSOS ( const AlignTSOS atsos)

copy constructor

Definition at line 93 of file AlignTSOS.cxx.

94  : TrackStateOnSurface(atsos)
95  , m_module(atsos.m_module)
96  , m_rio(atsos.m_rio)
97  , m_crio(atsos.m_crio)
98  , m_unbiasedTrackPars(atsos.m_unbiasedTrackPars ? atsos.m_unbiasedTrackPars->clone() : nullptr)
99  , m_residuals(atsos.m_residuals)
100  , m_detelements(atsos.m_detelements)
101  , m_derivatives(atsos.m_derivatives ? new std::vector<Amg::VectorX>(*(atsos.m_derivatives)) : nullptr)
102  , m_isvalid(atsos.m_isvalid)
103  , m_measType(atsos.m_measType)
104  , m_measDir(atsos.m_measDir)
105  , m_alphaStrip(atsos.m_alphaStrip)
106  , m_derivativesVtx(atsos.m_derivativesVtx)
107  {
108  }

◆ ~AlignTSOS()

AlignTSOS::~AlignTSOS ( )
virtual

destructor

Definition at line 86 of file AlignTSOS.cxx.

87  {
88  delete m_unbiasedTrackPars;
89  delete m_derivatives;
90  }

◆ AlignTSOS() [5/5]

Trk::AlignTSOS::AlignTSOS ( )
private

Member Function Documentation

◆ addResidual()

void Trk::AlignTSOS::addResidual ( const Residual residual)
inline

pushes back vector of Residuals to alignTSOS residuals

Definition at line 95 of file AlignTSOS.h.

95 { m_residuals.push_back(residual); }

◆ alignmentEffectsOnTrack() [1/2]

AlignmentEffectsOnTrack* Trk::TrackStateOnSurface::alignmentEffectsOnTrack ( )
inherited

return the the alignment effects non-const overload

◆ alignmentEffectsOnTrack() [2/2]

const AlignmentEffectsOnTrack* Trk::TrackStateOnSurface::alignmentEffectsOnTrack ( ) const
inherited

return the the alignment effects const overload

◆ alphaStrip()

double Trk::AlignTSOS::alphaStrip ( ) const
inline

returns strip angle for fan-out structured modules (SCT endcap)

Definition at line 122 of file AlignTSOS.h.

122 { return m_alphaStrip; }

◆ clearResiduals()

void Trk::AlignTSOS::clearResiduals ( )
inline

clears vector of residuals

Definition at line 101 of file AlignTSOS.h.

101 { m_residuals.clear(); }

◆ clone()

virtual TrackStateOnSurface* Trk::TrackStateOnSurface::clone ( ) const
virtualinherited

Pseudo-constructor: needed to avoid excessive RTTI.

Reimplemented in Trk::MultiComponentStateOnSurface.

◆ crio()

const CompetingRIOsOnTrack* Trk::AlignTSOS::crio ( ) const
inline

returns CompetingRIOsOnTrack

Definition at line 92 of file AlignTSOS.h.

92 { return m_crio; }

◆ derivatives()

const std::vector<Amg::VectorX>* Trk::AlignTSOS::derivatives ( ) const
inline

returns pointer to vector of derivatives

Definition at line 140 of file AlignTSOS.h.

140 { return m_derivatives; }

◆ derivativesVtx()

const std::vector<Amg::VectorX>* Trk::AlignTSOS::derivativesVtx ( ) const
inline

returns pointer to vector of derivatives w.r.t.

the vertex

Definition at line 143 of file AlignTSOS.h.

143 { return m_derivativesVtx; }

◆ detelement()

const TrkDetElementBase* Trk::AlignTSOS::detelement ( int  i = 0) const
inline

method for retrieving detector elements (one if RIO, more if CRIO)

Definition at line 110 of file AlignTSOS.h.

110 { return m_detelements[i]; }

◆ dumpMeasDir()

std::string AlignTSOS::dumpMeasDir ( ) const

returns string corresponding to the measurement direction

Definition at line 214 of file AlignTSOS.cxx.

215  {
216  switch(m_measDir) {
217  case Trk::x: return "X";
218  case Trk::y: return "Y";
219  case Trk::z: return "Z";
220  default: return "?";
221  }
222  }

◆ dumpMeasType()

std::string AlignTSOS::dumpMeasType ( ) const

returns string corresponding to the measurement type

Definition at line 194 of file AlignTSOS.cxx.

195  {
196  switch(m_measType) {
197  case Trk::TrackState::unidentified: return "none";
198  case Trk::TrackState::Pixel: return "Pixel";
199  case Trk::TrackState::SCT: return "SCT";
200  case Trk::TrackState::TRT: return "TRT";
201  case Trk::TrackState::MDT: return "MDT";
202  case Trk::TrackState::CSC: return "CSC";
203  case Trk::TrackState::RPC: return "RPC";
204  case Trk::TrackState::TGC: return "TGC";
205  case Trk::TrackState::Pseudo: return "Pseudo";
206  case Trk::TrackState::Vertex: return "Vertex";
207  case Trk::TrackState::Segment: return "Segment";
208  case Trk::TrackState::SpacePoint: return "SpacePoint";
209  default: return "UNDEFINED";
210  }
211  }

◆ dumpType()

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

returns a string with the expanded type of the object (i.e.

if it has several type bits set, they all will be returned)

Definition at line 147 of file TrackStateOnSurface.cxx.

148 {
149  std::string type;
150  const auto& typesSet = types();
151  if (typesSet.test(TrackStateOnSurface::Measurement)) {
152  type += "Measurement ";
153  }
154  if (typesSet.test(TrackStateOnSurface::InertMaterial)) {
155  type += "InertMaterial ";
156  }
157  if (typesSet.test(TrackStateOnSurface::BremPoint)) {
158  type += "BremPoint ";
159  }
160  if (typesSet.test(TrackStateOnSurface::Scatterer)) {
161  type += "Scatterer ";
162  }
163  if (typesSet.test(TrackStateOnSurface::Perigee)) {
164  type += "Perigee ";
165  }
166  if (typesSet.test(TrackStateOnSurface::Outlier)) {
167  type += "Outlier ";
168  }
169  if (typesSet.test(TrackStateOnSurface::Hole)) {
170  type += "Hole ";
171  }
172  if (typesSet.test(TrackStateOnSurface::CaloDeposit)) {
173  type += "CaloDeposit ";
174  }
175  if (typesSet.test(TrackStateOnSurface::Parameter)) {
176  type += "Parameter ";
177  }
178  if (typesSet.test(TrackStateOnSurface::FitQuality)) {
179  type += "FitQuality ";
180  }
181  if (typesSet.test(TrackStateOnSurface::Alignment)) {
182  type += "Alignment ";
183  }
184  return type;
185 }

◆ firstResidual()

std::vector<Residual>::const_iterator Trk::AlignTSOS::firstResidual ( ) const
inline

returns first Residual iterator

Definition at line 104 of file AlignTSOS.h.

104 { return m_residuals.begin(); }

◆ fitQualityOnSurface() [1/2]

FitQualityOnSurface& Trk::TrackStateOnSurface::fitQualityOnSurface ( )
inherited

return FitQuality On Surface non-const overload

◆ fitQualityOnSurface() [2/2]

const FitQualityOnSurface& Trk::TrackStateOnSurface::fitQualityOnSurface ( ) const
inherited

return FitQuality On Surface const overload

◆ hints()

const std::bitset<NumberOfPersistencyHints> Trk::TrackStateOnSurface::hints ( ) const
inherited

Use this method to get the persistification hints.

◆ identify()

Identifier AlignTSOS::identify ( ) const

returns Identifier of RIO

Definition at line 147 of file AlignTSOS.cxx.

148  {
149  Identifier id(0);
150  const MeasurementBase* mesb = this->measurementOnTrack();
151  const RIO_OnTrack* rio = dynamic_cast<const RIO_OnTrack*>(mesb);
152  if (rio) id=rio->identify();
153  return id;
154  }

◆ isSane()

bool Trk::TrackStateOnSurface::isSane ( ) const
inherited

Definition at line 203 of file TrackStateOnSurface.cxx.

204 {
205  bool surfacesDiffer =
209  if (surfacesDiffer) {
210  std::cerr << "TrackStateOnSurface::isSane. With :" << '\n';
211  std::cerr << "Types : " << types().to_string() << '\n';
212  std::cerr << "Hints " << hints().to_string() << '\n';
213  std::cerr << "Surfaces differ! " << std::endl;
214  if (m_trackParameters) {
215  std::cerr << "ParamSurf: [" << &(m_trackParameters->associatedSurface())
216  << "] " << m_trackParameters->associatedSurface() << std::endl;
217  }
218  if (m_measurementOnTrack) {
219  std::cerr << "measSurf: [" << &(m_measurementOnTrack->associatedSurface())
220  << "] " << m_measurementOnTrack->associatedSurface()
221  << std::endl;
222  }
224  std::cerr << "matSurf: ["
225  << &(m_materialEffectsOnTrack->associatedSurface()) << "] "
226  << m_materialEffectsOnTrack->associatedSurface() << std::endl;
227  }
228  return false;
229  }
230 
231  return true;
232 }

◆ isValid()

bool Trk::AlignTSOS::isValid ( ) const
inline

Definition at line 74 of file AlignTSOS.h.

74 { return m_isvalid; }

◆ joinBitsets()

static unsigned int long Trk::TrackStateOnSurface::joinBitsets ( const std::bitset< NumberOfTrackStateOnSurfaceTypes > &  types,
const std::bitset< NumberOfPersistencyHints > &  hints 
)
inlinestaticinherited

Definition at line 183 of file TrackStateOnSurface.h.

186  {
187  //put hints in place
188  unsigned int long res = hints.to_ulong();
189  //shift them up
191  //Add type
192  res += types.to_ulong();
193  return res;
194  }

◆ lastResidual()

std::vector<Residual>::const_iterator Trk::AlignTSOS::lastResidual ( ) const
inline

returns last Residual iterator

Definition at line 107 of file AlignTSOS.h.

107 { return m_residuals.end(); }

◆ materialEffectsOnTrack() [1/2]

MaterialEffectsBase* Trk::TrackStateOnSurface::materialEffectsOnTrack ( )
inherited

return material effects non-const overload

◆ materialEffectsOnTrack() [2/2]

const MaterialEffectsBase* Trk::TrackStateOnSurface::materialEffectsOnTrack ( ) const
inherited

return material effects const overload

◆ measDir()

Trk::ParamDefs Trk::AlignTSOS::measDir ( ) const
inline

retrieve the measurement direction

Definition at line 128 of file AlignTSOS.h.

128 { return m_measDir; }

◆ measType()

TrackState::MeasurementType Trk::AlignTSOS::measType ( ) const
inline

returns measurement type enum

Definition at line 80 of file AlignTSOS.h.

80 { return m_measType; }

◆ measurementOnTrack() [1/2]

MeasurementBase* Trk::TrackStateOnSurface::measurementOnTrack ( )
inherited

returns MeasurementBase non-const overload

◆ measurementOnTrack() [2/2]

const MeasurementBase* Trk::TrackStateOnSurface::measurementOnTrack ( ) const
inherited

returns MeasurementBase const overload

◆ module() [1/2]

AlignModule* Trk::AlignTSOS::module ( )
inline

Definition at line 70 of file AlignTSOS.h.

70 { return m_module; }

◆ module() [2/2]

const AlignModule* Trk::AlignTSOS::module ( ) const
inline

accessor method for AlignModule to which tsos belongs

Definition at line 69 of file AlignTSOS.h.

69 { return m_module; }

◆ nDetElements()

int Trk::AlignTSOS::nDetElements ( ) const
inline

method for retrieving number of detector elements

Definition at line 113 of file AlignTSOS.h.

113 { return m_detelements.size(); }

◆ nResDim()

int Trk::AlignTSOS::nResDim ( ) const
inline

returns number of measurement residual + scatterer residual dimensions

Definition at line 77 of file AlignTSOS.h.

77 { return m_residuals.size(); }

◆ operator=()

AlignTSOS & AlignTSOS::operator= ( const AlignTSOS atsos)

asignment operator

Definition at line 111 of file AlignTSOS.cxx.

112  {
113  if(this != &atsos) {
114 
115  // assign TrackStateOnSurface contents
117 
118  // copy the rest
119  m_module = atsos.m_module;
120  m_rio = atsos.m_rio;
121  m_crio = atsos.m_crio;
122 
123  m_residuals.clear();
124  m_residuals = atsos.m_residuals;
125 
126  m_detelements.clear();
127  m_detelements = atsos.m_detelements;
128 
129  m_isvalid = atsos.m_isvalid;
130  m_measType = atsos.m_measType;
131  m_measDir = atsos.m_measDir;
132  m_alphaStrip = atsos.m_alphaStrip;
133 
134  delete m_unbiasedTrackPars;
135  m_unbiasedTrackPars = atsos.m_unbiasedTrackPars ? atsos.m_unbiasedTrackPars->clone() : nullptr;
136 
137  delete m_derivatives;
138  m_derivatives = atsos.m_derivatives ? new std::vector<Amg::VectorX>(*(atsos.m_derivatives)) : nullptr;
139 
140  m_derivativesVtx = atsos.m_derivativesVtx;
141  }
142 
143  return *this;
144  }

◆ residuals()

const std::vector<Residual>& Trk::AlignTSOS::residuals ( ) const
inline

returns vector of Residuals

Definition at line 98 of file AlignTSOS.h.

98 { return m_residuals; }

◆ rio()

const RIO_OnTrack * AlignTSOS::rio ( ) const

returns RIO_OnTrack or leading RIO of CompetingRIOsOnTrack (assigned by c'tor)

Definition at line 157 of file AlignTSOS.cxx.

157  {
158  if (m_rio) return m_rio;
159  else if (m_crio) return &(m_crio->rioOnTrack(0));
160  else return nullptr;
161  }

◆ setAlphaStrip()

void Trk::AlignTSOS::setAlphaStrip ( double  alpha)
inline

returns strip angle for fan-out structured modules (SCT endcap)

Definition at line 119 of file AlignTSOS.h.

119 { m_alphaStrip = alpha; }

◆ setCompetingRIOsOnTrack()

void Trk::AlignTSOS::setCompetingRIOsOnTrack ( const CompetingRIOsOnTrack crio)
inline

sets CompetingRIOsOnTrack

Definition at line 89 of file AlignTSOS.h.

89 { m_crio=crio; }

◆ setDerivatives()

void Trk::AlignTSOS::setDerivatives ( std::vector< Amg::VectorX > *  derivs)
inline

setter for the derivatives

Definition at line 146 of file AlignTSOS.h.

146 { m_derivatives = derivs; }

◆ setDerivativesVtx()

void Trk::AlignTSOS::setDerivativesVtx ( std::vector< Amg::VectorX > *  derivs)
inline

setter for the derivatives w.r.t.

the vertex

Definition at line 149 of file AlignTSOS.h.

149 { m_derivativesVtx = derivs; }

◆ setFlags()

void Trk::TrackStateOnSurface::setFlags ( )
privateinherited

set sensible default flags

◆ setHints()

void Trk::TrackStateOnSurface::setHints ( const uint8_t  hints) const
inherited

Use this method to set persistification hints.

This can be called only once per TSOS It will set a cached Value which we can not reset But this allows it to be const..

Definition at line 235 of file TrackStateOnSurface.cxx.

236 {
237  // The extra "hidden" bit we save (1<<NumberOfPersistencyHints)
238  // is to dissalow repeated calls to setHints(0).
239  uint8_t exp = 0;
240  if (!m_hints.compare_exchange_strong(
241  exp, hints | (1 << NumberOfPersistencyHints))) {
242  throw std::runtime_error(
243  "TSOS trying to set again already set Persistification Hints");
244  }
245 }

◆ setMeasDir()

void Trk::AlignTSOS::setMeasDir ( Trk::ParamDefs  dir)
inline

set the measurement direction

Definition at line 125 of file AlignTSOS.h.

125 { m_measDir = dir; }

◆ setUnbiasedTrackPars()

void Trk::AlignTSOS::setUnbiasedTrackPars ( const TrackParameters trkPars)
inline

setter for unbiased track parameters

Definition at line 137 of file AlignTSOS.h.

137 { m_unbiasedTrackPars = trkPars; }

◆ setValid()

void Trk::AlignTSOS::setValid ( bool  isvalid)
inline

set and retrieve flag to indicate whether hit valid for alignment

Definition at line 73 of file AlignTSOS.h.

73 { m_isvalid=isvalid; }

◆ splitToBitsets()

static void Trk::TrackStateOnSurface::splitToBitsets ( const unsigned int long  input,
std::bitset< NumberOfTrackStateOnSurfaceTypes > &  types,
std::bitset< NumberOfPersistencyHints > &  hints 
)
inlinestaticinherited

Definition at line 196 of file TrackStateOnSurface.h.

200  {
201  // mask with NumberOfTrackStateOnSurfaceTypes bits set to 1
202  constexpr unsigned int long maskTypesSet =
204  //keep just the Type part of the input
205  types = std::bitset<NumberOfTrackStateOnSurfaceTypes>(input & maskTypesSet);
206  //keep the upper Hints part of the input
207  hints = std::bitset<NumberOfPersistencyHints>(
209  }

◆ surface()

const Surface & Trk::TrackStateOnSurface::surface ( ) const
inherited

return associated surface

Used to perform sanity checks on this object (i.e. all consistuents are on the same surface). Returns 'true' if it seems okay.

Definition at line 188 of file TrackStateOnSurface.cxx.

189 {
190  if (m_trackParameters) {
191  return m_trackParameters->associatedSurface();
192  }
193  if (m_measurementOnTrack) {
194  return m_measurementOnTrack->associatedSurface();
195  }
197  return m_materialEffectsOnTrack->associatedSurface();
198  }
199  throw std::runtime_error("TrackStateOnSurface without Surface!");
200 }

◆ trackParameters() [1/2]

TrackParameters* Trk::TrackStateOnSurface::trackParameters ( )
inherited

return ptr to trackparameters non-const overload

◆ trackParameters() [2/2]

const TrackParameters* Trk::TrackStateOnSurface::trackParameters ( ) const
inherited

return ptr to trackparameters const overload

◆ type()

bool Trk::TrackStateOnSurface::type ( const TrackStateOnSurfaceType  type) const
inherited

Use this method to find out if the TSoS is of a certain type: i.e.

if ( tsos->type(TrackStateOnSurface::Measurement) { //etc }

Returns
true if the TrackStateOnSurface is of this type

◆ types()

const std::bitset<NumberOfTrackStateOnSurfaceTypes> Trk::TrackStateOnSurface::types ( ) const
inherited

returns a bitset with the types of this bitset.

As an example of how this is used, see the type( const TrackStateOnSurfaceType& type ) method but a better example would be if you wanted to check several type flags at once.

const bitset<NumberOfTrackStateOnSurfaceTypes> mask;
mask.set(Measurement,true);
mask.set(BremPoint,true);
// loop over lots of TSoS and call:
if (tsos.types() & mask ) { // do something}

◆ unbiasedTrackPars()

const TrackParameters* Trk::AlignTSOS::unbiasedTrackPars ( ) const
inline

returns pointer to unbiased track parameters if present

Definition at line 134 of file AlignTSOS.h.

134 { return m_unbiasedTrackPars; }

◆ variety()

virtual TrackStateOnSurface::Variety Trk::AlignTSOS::variety ( ) const
inlinefinaloverridevirtual

Use this method to find if this is a Single, Multi or Align TrackStateOnsurface.

Reimplemented from Trk::TrackStateOnSurface.

Definition at line 151 of file AlignTSOS.h.

151  {
153  }

Member Data Documentation

◆ m_alignmentEffectsOnTrack

std::unique_ptr<AlignmentEffectsOnTrack> Trk::TrackStateOnSurface::m_alignmentEffectsOnTrack {}
privateinherited

Definition at line 371 of file TrackStateOnSurface.h.

◆ m_alphaStrip

double Trk::AlignTSOS::m_alphaStrip
private

Definition at line 177 of file AlignTSOS.h.

◆ m_crio

const CompetingRIOsOnTrack* Trk::AlignTSOS::m_crio
private

Definition at line 161 of file AlignTSOS.h.

◆ m_derivatives

std::vector<Amg::VectorX>* Trk::AlignTSOS::m_derivatives
private

Definition at line 169 of file AlignTSOS.h.

◆ m_derivativesVtx

std::vector<Amg::VectorX>* Trk::AlignTSOS::m_derivativesVtx
private

Definition at line 179 of file AlignTSOS.h.

◆ m_detelements

std::vector<const TrkDetElementBase *> Trk::AlignTSOS::m_detelements
private

Definition at line 167 of file AlignTSOS.h.

◆ m_fitQualityOnSurface

FitQualityOnSurface Trk::TrackStateOnSurface::m_fitQualityOnSurface {}
privateinherited

Definition at line 367 of file TrackStateOnSurface.h.

◆ m_hints

std::atomic<uint8_t> Trk::TrackStateOnSurface::m_hints {}
mutableprotectedinherited

Definition at line 374 of file TrackStateOnSurface.h.

◆ m_isvalid

bool Trk::AlignTSOS::m_isvalid
private

Definition at line 171 of file AlignTSOS.h.

◆ m_materialEffectsOnTrack

std::unique_ptr<MaterialEffectsBase> Trk::TrackStateOnSurface::m_materialEffectsOnTrack {}
privateinherited

Definition at line 370 of file TrackStateOnSurface.h.

◆ m_measDir

Trk::ParamDefs Trk::AlignTSOS::m_measDir
private

direction of measurement (set to Trk::x by default)

Definition at line 175 of file AlignTSOS.h.

◆ m_measType

TrackState::MeasurementType Trk::AlignTSOS::m_measType
private

Definition at line 173 of file AlignTSOS.h.

◆ m_measurementOnTrack

std::unique_ptr<MeasurementBase> Trk::TrackStateOnSurface::m_measurementOnTrack {}
privateinherited

Definition at line 369 of file TrackStateOnSurface.h.

◆ m_module

AlignModule* Trk::AlignTSOS::m_module
private

Definition at line 159 of file AlignTSOS.h.

◆ m_residuals

std::vector<Residual> Trk::AlignTSOS::m_residuals
private

Definition at line 165 of file AlignTSOS.h.

◆ m_rio

const RIO_OnTrack* Trk::AlignTSOS::m_rio
private

Definition at line 160 of file AlignTSOS.h.

◆ m_trackParameters

std::unique_ptr<TrackParameters> Trk::TrackStateOnSurface::m_trackParameters {}
privateinherited

Definition at line 368 of file TrackStateOnSurface.h.

◆ m_typeFlags

uint16_t Trk::TrackStateOnSurface::m_typeFlags {}
protectedinherited

Definition at line 373 of file TrackStateOnSurface.h.

◆ m_unbiasedTrackPars

const TrackParameters* Trk::AlignTSOS::m_unbiasedTrackPars
private

Definition at line 163 of file AlignTSOS.h.


The documentation for this class was generated from the following files:
Trk::y
@ y
Definition: ParamDefs.h:56
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
Trk::TrackStateOnSurface::CaloDeposit
@ CaloDeposit
This TSOS contains a CaloEnergy object.
Definition: TrackStateOnSurface.h:135
Trk::AlignTSOS::measType
TrackState::MeasurementType measType() const
returns measurement type enum
Definition: AlignTSOS.h:80
Trk::TrackState::Vertex
@ Vertex
Definition: TrackStateDefs.h:36
Trk::TrackStateOnSurface::operator=
Trk::TrackStateOnSurface & operator=(const Trk::TrackStateOnSurface &rhs)
Definition: TrackStateOnSurface.cxx:110
Trk::TrackStateOnSurface::Perigee
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
Definition: TrackStateOnSurface.h:117
Trk::TrackState::RPC
@ RPC
Definition: TrackStateDefs.h:33
Trk::TrackStateOnSurface::NumberOfPersistencyHints
@ NumberOfPersistencyHints
Definition: TrackStateOnSurface.h:174
Trk::TrackState::Pixel
@ Pixel
Definition: TrackStateDefs.h:28
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
Trk::AlignTSOS::m_residuals
std::vector< Residual > m_residuals
Definition: AlignTSOS.h:165
Trk::AlignTSOS::rio
const RIO_OnTrack * rio() const
returns RIO_OnTrack or leading RIO of CompetingRIOsOnTrack (assigned by c'tor)
Definition: AlignTSOS.cxx:157
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
Trk::TrackState::TRT
@ TRT
Definition: TrackStateDefs.h:30
Trk::AlignTSOS::m_derivatives
std::vector< Amg::VectorX > * m_derivatives
Definition: AlignTSOS.h:169
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
Trk::TrackStateOnSurface::TrackStateOnSurface
TrackStateOnSurface()
Default ctor for POOL.
Trk::TrackState::Segment
@ Segment
Definition: TrackStateDefs.h:37
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
Trk::TrackStateOnSurface::PersistifyTrackParameters
@ PersistifyTrackParameters
Mark track parameters for persisitification.
Definition: TrackStateOnSurface.h:167
Trk::TrackState::MDT
@ MDT
Definition: TrackStateDefs.h:31
Trk::TrackStateOnSurface::m_materialEffectsOnTrack
std::unique_ptr< MaterialEffectsBase > m_materialEffectsOnTrack
Definition: TrackStateOnSurface.h:370
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
Trk::TrackStateOnSurface::types
const std::bitset< NumberOfTrackStateOnSurfaceTypes > types() const
returns a bitset with the types of this bitset.
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::TrackState::TGC
@ TGC
Definition: TrackStateDefs.h:34
Trk::TrackStateOnSurface::PersistifyMeasurement
@ PersistifyMeasurement
Mark the measuremenet for persistification.
Definition: TrackStateOnSurface.h:162
Trk::AlignTSOS::m_isvalid
bool m_isvalid
Definition: AlignTSOS.h:171
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
Trk::TrackState::unidentified
@ unidentified
Definition: TrackStateDefs.h:27
Trk::TrackStateOnSurface::Alignment
@ Alignment
This TSOS contains a Trk::AlignmentEffectsOnTrack.
Definition: TrackStateOnSurface.h:150
Trk::AlignTSOS::m_alphaStrip
double m_alphaStrip
Definition: AlignTSOS.h:177
Trk::AlignTSOS::m_measDir
Trk::ParamDefs m_measDir
direction of measurement (set to Trk::x by default)
Definition: AlignTSOS.h:175
Trk::AlignTSOS::module
const AlignModule * module() const
accessor method for AlignModule to which tsos belongs
Definition: AlignTSOS.h:69
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
Trk::TrackState::SpacePoint
@ SpacePoint
Definition: TrackStateDefs.h:38
Trk::AlignTSOS::m_detelements
std::vector< const TrkDetElementBase * > m_detelements
Definition: AlignTSOS.h:167
Trk::AlignTSOS::m_derivativesVtx
std::vector< Amg::VectorX > * m_derivativesVtx
Definition: AlignTSOS.h:179
Trk::TrackStateOnSurface::type
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
Trk::CompetingRIOsOnTrack::rioOnTrack
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
Trk::AlignTSOS::m_module
AlignModule * m_module
Definition: AlignTSOS.h:159
Trk::CompetingRIOsOnTrack::numberOfContainedROTs
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::TrackStateOnSurface::materialEffectsOnTrack
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
Trk::TrackState::Pseudo
@ Pseudo
Definition: TrackStateDefs.h:35
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
Trk::AlignTSOS::detelement
const TrkDetElementBase * detelement(int i=0) const
method for retrieving detector elements (one if RIO, more if CRIO)
Definition: AlignTSOS.h:110
Trk::TrackStateOnSurface::SingleComponent
@ SingleComponent
Definition: TrackStateOnSurface.h:213
Trk::AlignTSOS::m_crio
const CompetingRIOsOnTrack * m_crio
Definition: AlignTSOS.h:161
Trk::TrackStateOnSurface::PersistifySlimCaloDeposit
@ PersistifySlimCaloDeposit
Mark track parameters for persisitification.
Definition: TrackStateOnSurface.h:172
Trk::TrackStateOnSurface::Parameter
@ Parameter
This TSOS contains a Trk::ParameterBase.
Definition: TrackStateOnSurface.h:140
Trk::AlignTSOS::m_unbiasedTrackPars
const TrackParameters * m_unbiasedTrackPars
Definition: AlignTSOS.h:163
Trk::TrackStateOnSurface::BremPoint
@ BremPoint
This represents a brem point on the track, and so will contain TrackParameters and MaterialEffectsBas...
Definition: TrackStateOnSurface.h:109
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::TrackStateOnSurface::m_trackParameters
std::unique_ptr< TrackParameters > m_trackParameters
Definition: TrackStateOnSurface.h:368
Trk::AlignTSOS::m_measType
TrackState::MeasurementType m_measType
Definition: AlignTSOS.h:173
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
Trk::TrackStateOnSurface::InertMaterial
@ InertMaterial
This represents inert material, and so will contain MaterialEffectsBase.
Definition: TrackStateOnSurface.h:105
Trk::AlignTSOS::m_rio
const RIO_OnTrack * m_rio
Definition: AlignTSOS.h:160
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Trk::TrackStateOnSurface::hints
const std::bitset< NumberOfPersistencyHints > hints() const
Use this method to get the persistification hints.
Trk::TrackStateOnSurface::MultiComponent
@ MultiComponent
Definition: TrackStateOnSurface.h:214
Trk::TrackStateOnSurface::m_hints
std::atomic< uint8_t > m_hints
Definition: TrackStateOnSurface.h:374
Trk::AlignTSOS::crio
const CompetingRIOsOnTrack * crio() const
returns CompetingRIOsOnTrack
Definition: AlignTSOS.h:92
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Trk::TrackState::CSC
@ CSC
Definition: TrackStateDefs.h:32
Trk::TrackStateOnSurface::Scatterer
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
Definition: TrackStateOnSurface.h:113
Trk::TrackStateOnSurface::FitQuality
@ FitQuality
This TSOS contains a Trk::FitQualityOnSurface.
Definition: TrackStateOnSurface.h:145
Trk::RIO_OnTrack::associatedSurface
virtual const Surface & associatedSurface() const override=0
returns the surface for the local to global transformation
Trk::TrackState::SCT
@ SCT
Definition: TrackStateDefs.h:29
Trk::TrackStateOnSurface::m_measurementOnTrack
std::unique_ptr< MeasurementBase > m_measurementOnTrack
Definition: TrackStateOnSurface.h:369
Trk::TrackStateOnSurface::Align
@ Align
Definition: TrackStateOnSurface.h:215
Trk::x
@ x
Definition: ParamDefs.h:55
Trk::consistentSurfaces
bool consistentSurfaces(U)
Definition: SurfaceConsistencyCheck.h:17
Trk::TrackStateOnSurface::Unknown
@ Unknown
For some reason this does not fall into any of the other categories PLEASE DO NOT USE THIS - DEPRECAT...
Definition: TrackStateOnSurface.h:132
Trk::TrackStateOnSurface::PartialPersistification
@ PartialPersistification
Definition: TrackStateOnSurface.h:158
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes
@ NumberOfTrackStateOnSurfaceTypes
Definition: TrackStateOnSurface.h:152
Identifier
Definition: IdentifierFieldParser.cxx:14