ATLAS Offline Software
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Muon::MuonDriftCircleErrorStrategy Class Reference

#include <MuonDriftCircleErrorStrategy.h>

Collaboration diagram for Muon::MuonDriftCircleErrorStrategy:

Public Types

enum  Strategy { Moore =0, Muon =1, UnknownStrategy =0x7 }
 
enum  CreationParameter {
  BroadError =3, ScaledError, FixedError, ParameterisedErrors,
  StationError, ErrorAtPredictedPosition, T0Refit, WireSagGeomCorrection,
  TofCorrection, PropCorrection, TempCorrection, MagFieldCorrection,
  WireSagTimeCorrection, SlewCorrection, BackgroundCorrection, Segment,
  FirstCalibWindowBit
}
 

Public Member Functions

 MuonDriftCircleErrorStrategy ()=default
 
 MuonDriftCircleErrorStrategy (const MuonDriftCircleErrorStrategyInput &bits)
 first 3 bits are Strategy, then come CreationParameter, last four are calib window bits More...
 
void setStrategy (Strategy)
 Select the strategy to be used - only one can be set at a time. More...
 
void setParameter (CreationParameter, bool value)
 
void setCalibWindow (unsigned long)
 Only the first nCalibWindowBits bits will be stored! More...
 
bool creationParameter (CreationParameter) const
 
unsigned long calibWindow () const
 Returns calibration configuration. More...
 
Strategy strategy () const
 
const MuonDriftCircleErrorStrategyInputgetBits () const
 

Static Public Attributes

static constexpr std::size_t nCalibWindowBits = 4
 Allows up to 16 configurations to be recorded. More...
 

Private Attributes

MuonDriftCircleErrorStrategyInput m_bits {}
 0,1,2 are reserved for Strategy, 3-16 are Creation parameters, 17-20 are calib window bits More...
 

Detailed Description

Definition at line 15 of file MuonDriftCircleErrorStrategy.h.

Member Enumeration Documentation

◆ CreationParameter

Enumerator
BroadError 
ScaledError 
FixedError 

A fixed error is given to this hit (user defined via jobProperties)

ParameterisedErrors 

Use parameterised errors.

StationError 

A term is added to account for misaligned.

ErrorAtPredictedPosition 
T0Refit 

A special error was applied to account for the T0 refit (user defined via jobProperties)

WireSagGeomCorrection 

Wire sag was applied, and so will affect errors.

TofCorrection 

Time of flight correction was applied in calibration.

PropCorrection 

Propagation correction was applied in calibration.

TempCorrection 

Temperature correction was applied in calibration.

MagFieldCorrection 

Magnetic field correction was applied in calibration.

WireSagTimeCorrection 

Wire sag correction was applied in calibration.

SlewCorrection 

Slewing correction was applied in calibration.

BackgroundCorrection 

Background correction was applied in calibration.

Segment 

Treating a segment or a track.

FirstCalibWindowBit 

First bit recording the calibration configuration.

Definition at line 18 of file MuonDriftCircleErrorStrategy.h.

18  { BroadError=3,// Bit 3. Create with broad errors.
19  ScaledError, // Error scaling is turned on (this is applied after eveyrthing else)
20  FixedError,
24  T0Refit,
33  Segment,
35  };

◆ Strategy

Enumerator
Moore 
Muon 
UnknownStrategy 

Definition at line 17 of file MuonDriftCircleErrorStrategy.h.

17 {Moore=0, Muon=1, UnknownStrategy=0x7}; // FIXME - better names

Constructor & Destructor Documentation

◆ MuonDriftCircleErrorStrategy() [1/2]

Muon::MuonDriftCircleErrorStrategy::MuonDriftCircleErrorStrategy ( )
default

◆ MuonDriftCircleErrorStrategy() [2/2]

Muon::MuonDriftCircleErrorStrategy::MuonDriftCircleErrorStrategy ( const MuonDriftCircleErrorStrategyInput bits)
inline

first 3 bits are Strategy, then come CreationParameter, last four are calib window bits

Definition at line 38 of file MuonDriftCircleErrorStrategy.h.

Member Function Documentation

◆ calibWindow()

unsigned long Muon::MuonDriftCircleErrorStrategy::calibWindow ( ) const
inline

Returns calibration configuration.

Definition at line 90 of file MuonDriftCircleErrorStrategy.h.

90  {
91  std::bitset<nCalibWindowBits> tmpconfig;
92 
93  // Copy relevant part of m_bits into temporary bitset
94  // Should do this with std::copy
95  for (std::size_t itmp=0,i=FirstCalibWindowBit; itmp<nCalibWindowBits; ++itmp,++i) {
96  tmpconfig[itmp] = m_bits[i];
97  }
98 
99  return tmpconfig.to_ulong();
100 }

◆ creationParameter()

bool Muon::MuonDriftCircleErrorStrategy::creationParameter ( CreationParameter  cp) const
inline

Definition at line 84 of file MuonDriftCircleErrorStrategy.h.

84  {
85  return m_bits[static_cast<unsigned int>(cp)];
86 }

◆ getBits()

const MuonDriftCircleErrorStrategyInput& Muon::MuonDriftCircleErrorStrategy::getBits ( ) const
inline

Definition at line 47 of file MuonDriftCircleErrorStrategy.h.

47 { return m_bits; }

◆ setCalibWindow()

void Muon::MuonDriftCircleErrorStrategy::setCalibWindow ( unsigned long  config)
inline

Only the first nCalibWindowBits bits will be stored!

Definition at line 71 of file MuonDriftCircleErrorStrategy.h.

71  {
72  std::bitset<nCalibWindowBits> tmpconfig(config);
73 
74  // Copy temporary bitset into m_bits
75  // Should do this with std::copy
76  for (std::size_t itmp=0,i=FirstCalibWindowBit; itmp<nCalibWindowBits; ++itmp,++i) {
77  m_bits[i] = tmpconfig[itmp];
78  }
79 
80 }

◆ setParameter()

void Muon::MuonDriftCircleErrorStrategy::setParameter ( CreationParameter  cp,
bool  value 
)
inline

Definition at line 65 of file MuonDriftCircleErrorStrategy.h.

65  {
66  m_bits[static_cast<unsigned int>(cp)] = value;
67 }

◆ setStrategy()

void Muon::MuonDriftCircleErrorStrategy::setStrategy ( Strategy  st)
inline

Select the strategy to be used - only one can be set at a time.

Definition at line 56 of file MuonDriftCircleErrorStrategy.h.

56  {
57  unsigned int holder = static_cast<unsigned int>(st);
58  m_bits[0] = holder&0x1;
59  m_bits[1] = holder&0x2;
60  m_bits[2] = holder&0x4;
61 }

◆ strategy()

Muon::MuonDriftCircleErrorStrategy::Strategy Muon::MuonDriftCircleErrorStrategy::strategy ( ) const
inline

Definition at line 104 of file MuonDriftCircleErrorStrategy.h.

104  {
105  switch (m_bits.to_ulong()&0x7){
106  case 0:
107  return Moore;
108  case 1:
109  return Muon;
110  default:
111  return UnknownStrategy;
112  }
113  return UnknownStrategy;
114 }

Member Data Documentation

◆ m_bits

MuonDriftCircleErrorStrategyInput Muon::MuonDriftCircleErrorStrategy::m_bits {}
private

0,1,2 are reserved for Strategy, 3-16 are Creation parameters, 17-20 are calib window bits

Definition at line 50 of file MuonDriftCircleErrorStrategy.h.

◆ nCalibWindowBits

constexpr std::size_t Muon::MuonDriftCircleErrorStrategy::nCalibWindowBits = 4
staticconstexpr

Allows up to 16 configurations to be recorded.

Definition at line 36 of file MuonDriftCircleErrorStrategy.h.


The documentation for this class was generated from the following file:
Muon::MuonDriftCircleErrorStrategy::WireSagTimeCorrection
@ WireSagTimeCorrection
Wire sag correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:30
Muon::MuonDriftCircleErrorStrategy::Muon
@ Muon
Definition: MuonDriftCircleErrorStrategy.h:17
athena.value
value
Definition: athena.py:124
Muon::MuonDriftCircleErrorStrategy::Moore
@ Moore
Definition: MuonDriftCircleErrorStrategy.h:17
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
Muon::MuonDriftCircleErrorStrategy::PropCorrection
@ PropCorrection
Propagation correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:27
Muon::MuonDriftCircleErrorStrategy::TempCorrection
@ TempCorrection
Temperature correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:28
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
Muon::MuonDriftCircleErrorStrategy::T0Refit
@ T0Refit
A special error was applied to account for the T0 refit (user defined via jobProperties)
Definition: MuonDriftCircleErrorStrategy.h:24
Muon::MuonDriftCircleErrorStrategy::WireSagGeomCorrection
@ WireSagGeomCorrection
Wire sag was applied, and so will affect errors.
Definition: MuonDriftCircleErrorStrategy.h:25
Muon::MuonDriftCircleErrorStrategy::FirstCalibWindowBit
@ FirstCalibWindowBit
First bit recording the calibration configuration.
Definition: MuonDriftCircleErrorStrategy.h:34
Muon::MuonDriftCircleErrorStrategy::SlewCorrection
@ SlewCorrection
Slewing correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:31
Muon::MuonDriftCircleErrorStrategy::FixedError
@ FixedError
A fixed error is given to this hit (user defined via jobProperties)
Definition: MuonDriftCircleErrorStrategy.h:20
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::MuonDriftCircleErrorStrategy::TofCorrection
@ TofCorrection
Time of flight correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:26
Muon::MuonDriftCircleErrorStrategy::m_bits
MuonDriftCircleErrorStrategyInput m_bits
0,1,2 are reserved for Strategy, 3-16 are Creation parameters, 17-20 are calib window bits
Definition: MuonDriftCircleErrorStrategy.h:50
Muon::MuonDriftCircleErrorStrategy::UnknownStrategy
@ UnknownStrategy
Definition: MuonDriftCircleErrorStrategy.h:17
Muon::MuonDriftCircleErrorStrategy::BackgroundCorrection
@ BackgroundCorrection
Background correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:32
Muon::MuonDriftCircleErrorStrategy::Segment
@ Segment
Treating a segment or a track.
Definition: MuonDriftCircleErrorStrategy.h:33
Muon::MuonDriftCircleErrorStrategy::ErrorAtPredictedPosition
@ ErrorAtPredictedPosition
Definition: MuonDriftCircleErrorStrategy.h:23
Muon::MuonDriftCircleErrorStrategy::MagFieldCorrection
@ MagFieldCorrection
Magnetic field correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:29
Muon::MuonDriftCircleErrorStrategy::StationError
@ StationError
A term is added to account for misaligned.
Definition: MuonDriftCircleErrorStrategy.h:22
LArNewCalib_PedestalAutoCorr.cp
cp
Definition: LArNewCalib_PedestalAutoCorr.py:185
Muon::MuonDriftCircleErrorStrategy::ParameterisedErrors
@ ParameterisedErrors
Use parameterised errors.
Definition: MuonDriftCircleErrorStrategy.h:21
Muon::MuonDriftCircleErrorStrategy::nCalibWindowBits
static constexpr std::size_t nCalibWindowBits
Allows up to 16 configurations to be recorded.
Definition: MuonDriftCircleErrorStrategy.h:36
Muon::MuonDriftCircleErrorStrategy::BroadError
@ BroadError
Definition: MuonDriftCircleErrorStrategy.h:18
Muon::MuonDriftCircleErrorStrategy::ScaledError
@ ScaledError
Definition: MuonDriftCircleErrorStrategy.h:19