Belle II Software development
CDCCalibration Class Reference

CDC alignment and calibration constants. More...

#include <CDCCalibration.h>

Inheritance diagram for CDCCalibration:
DBObjCalibrationConstMapBase

Public Types

typedef int baseType
 The underlying element type (also for param id)
 
typedef std::pair< baseType, baseTypeElementParameter
 (element, parameter)
 
typedef std::map< ElementParameter, double > ElementParameterMap
 Map of (element, parameter) and its values.
 

Public Member Functions

 CDCCalibration ()
 Constructor.
 
double getLayerShiftX (int ICLayer)
 Direct getter to X shift of layer.
 
double getLayerShiftY (int ICLayer)
 Direct getter to Y shift of layer.
 
 ~CDCCalibration ()
 Destructor.
 
double getGlobalParam (unsigned short element, unsigned short param)
 Get global parameter.
 
void setGlobalParam (double value, unsigned short element, unsigned short param)
 Set global parameter.
 
std::vector< std::pair< unsigned short, unsigned short > > listGlobalParams ()
 TODO: list stored global parameters.
 
void readFromResult (std::vector< std::tuple< unsigned short, unsigned short, unsigned short, double > > &)
 Not used.
 
const ElementParameterMapgetMap ()
 Get the underlying map of constants.
 
virtual double get (baseType id, baseType param) const
 Get parameter value for given element and parameter number.
 
virtual void set (baseType id, baseType param, double value)
 Set parameter correction for given WireID and parameter number.
 
virtual double add (baseType id, baseType param, double value, bool subtractInsteadOfAdd=false)
 Add correction to already stored (or to 0. if not set yet) constant value (optionally with minus sign)
 
virtual void dump () const
 Write all elements' parameters' values to standard output.
 

Static Public Member Functions

static unsigned short getGlobalUniqueID ()
 Get global unique id.
 

Static Public Attributes

static const baseType WireNone = 511
 Last bit for wire (actually over 100 unused - but useful for us)
 
static const baseType ICLayerNone = 63
 Last bit for continous layer (unused)
 
static const baseType Wire4Layers = 400
 layer = (ICLayer, 400)
 
static const baseType Wire4SuperLayers = 405
 SuperLayer = (SuperLayer, 0, 405)
 
static const baseType Wire4EndPartOuter = 410
 Outer conical end part = (63, 405)
 
static const baseType Wire4EndPartMiddle = 411
 Middle conical end part = (63, 411)
 
static const baseType Wire4EndPartInner = 412
 Inner conical end part = (63, 412)
 
static const baseType wireBwdX = 0
 Wire X position w.r.t. nominal on backward endplate.
 
static const baseType wireBwdY = 1
 Wire Y position w.r.t. nominal on backward endplate.
 
static const baseType wireBwdZ = 2
 Wire Z position w.r.t. nominal on backward endplate.
 
static const baseType wireFwdDx = 4
 Wire X position on forward enplate taking wireBwdX as new nominal.
 
static const baseType wireFwdDy = 5
 Wire Y position on forward enplate taking wireBwdY as new nominal.
 
static const baseType wireFwdDz = 6
 Wire Z position on forward enplate taking wireBwdZ as new nominal.
 
static const baseType layerX = 0
 Layer X position w.r.t. geometry.
 
static const baseType layerY = 1
 Layer Y position w.r.t. geometry.
 
static const baseType wireT0 = 11
 Wire T0 correction w.r.t. common board T0.
 
static const baseType boardT0 = 13
 Board common T0 correction.
 
static const baseType wireTension = 21
 Wire tension w.r.t. nominal (=50. ?)
 
static const baseType xTlayerP0 = 31
 Layer dependent constant (order 0) correction to x-t relation.
 
static const baseType endPlateBwdPhi = 46
 Backward endplate rotation w.r.t. nominal (geometry)
 
static const baseType endPlateFwdDphi = 47
 Forward enplate rotation taking endPlateBwdPhi as new nominal.
 

Private Member Functions

 ClassDef (CDCCalibration, 2)
 Storage for CDC alignment and calibration constants (mainly now for Millepede)
 

Private Attributes

ElementParameterMap m_constants
 Map of map of all calibration elements' constants.
 

Detailed Description

CDC alignment and calibration constants.

Definition at line 21 of file CDCCalibration.h.

Member Typedef Documentation

◆ baseType

typedef int baseType
inherited

The underlying element type (also for param id)

Definition at line 41 of file DBObjCalibrationConstMapBase.h.

◆ ElementParameter

typedef std::pair<baseType, baseType> ElementParameter
inherited

(element, parameter)

Definition at line 43 of file DBObjCalibrationConstMapBase.h.

◆ ElementParameterMap

typedef std::map<ElementParameter, double> ElementParameterMap
inherited

Map of (element, parameter) and its values.

Definition at line 45 of file DBObjCalibrationConstMapBase.h.

Constructor & Destructor Documentation

◆ CDCCalibration()

CDCCalibration ( )
inline

Constructor.

Definition at line 82 of file CDCCalibration.h.

◆ ~CDCCalibration()

~CDCCalibration ( )
inline

Destructor.

Definition at line 89 of file CDCCalibration.h.

89{}

Member Function Documentation

◆ add()

double add ( DBObjCalibrationConstMapBase::baseType  id,
DBObjCalibrationConstMapBase::baseType  param,
double  value,
bool  subtractInsteadOfAdd = false 
)
virtualinherited

Add correction to already stored (or to 0. if not set yet) constant value (optionally with minus sign)

Definition at line 44 of file DBObjCalibrationConstMapBase.cc.

46{
47 double original = get(id, param);
48 double newValue = (subtractInsteadOfAdd) ? (original - value) : (original + value);
49 set(id, param, newValue);
50 return newValue;
51}
virtual void set(baseType id, baseType param, double value)
Set parameter correction for given WireID and parameter number.
virtual double get(baseType id, baseType param) const
Get parameter value for given element and parameter number.

◆ dump()

void dump ( ) const
virtualinherited

Write all elements' parameters' values to standard output.

Definition at line 14 of file DBObjCalibrationConstMapBase.cc.

15{
16 for (auto& elementParam : m_constants) {
17 std::cout << " Element " << elementParam.first.first << " Param " << elementParam.first.second << " Value = " << elementParam.second
18 << std::endl;
19 }
20}
ElementParameterMap m_constants
Map of map of all calibration elements' constants.

◆ get()

double get ( DBObjCalibrationConstMapBase::baseType  id,
DBObjCalibrationConstMapBase::baseType  param 
) const
virtualinherited

Get parameter value for given element and parameter number.

Definition at line 27 of file DBObjCalibrationConstMapBase.cc.

29{
30
31 auto constant = m_constants.find({id, param});
32 if (constant == m_constants.end()) {
33 return 0.;
34 }
35 return constant->second;
36}

◆ getGlobalParam()

double getGlobalParam ( unsigned short  element,
unsigned short  param 
)
inline

Get global parameter.

Definition at line 95 of file CDCCalibration.h.

95{return get(element, param);}

◆ getGlobalUniqueID()

static unsigned short getGlobalUniqueID ( )
inlinestatic

Get global unique id.

Definition at line 93 of file CDCCalibration.h.

93{return 20;}

◆ getLayerShiftX()

double getLayerShiftX ( int  ICLayer)
inline

Direct getter to X shift of layer.

Definition at line 85 of file CDCCalibration.h.

85{return get(WireID(ICLayer, Wire4Layers), layerX);}
static const baseType Wire4Layers
layer = (ICLayer, 400)
static const baseType layerX
Layer X position w.r.t. geometry.

◆ getLayerShiftY()

double getLayerShiftY ( int  ICLayer)
inline

Direct getter to Y shift of layer.

Definition at line 87 of file CDCCalibration.h.

87{return get(WireID(ICLayer, Wire4Layers), layerY);}
static const baseType layerY
Layer Y position w.r.t. geometry.

◆ getMap()

const ElementParameterMap & getMap ( )
inlineinherited

Get the underlying map of constants.

Definition at line 48 of file DBObjCalibrationConstMapBase.h.

48{return m_constants;}

◆ listGlobalParams()

std::vector< std::pair< unsigned short, unsigned short > > listGlobalParams ( )
inline

TODO: list stored global parameters.

Definition at line 99 of file CDCCalibration.h.

99{return {};}

◆ readFromResult()

void readFromResult ( std::vector< std::tuple< unsigned short, unsigned short, unsigned short, double > > &  )
inline

Not used.

Definition at line 101 of file CDCCalibration.h.

101{}

◆ set()

void set ( DBObjCalibrationConstMapBase::baseType  id,
DBObjCalibrationConstMapBase::baseType  param,
double  value 
)
virtualinherited

Set parameter correction for given WireID and parameter number.

Definition at line 38 of file DBObjCalibrationConstMapBase.cc.

40{
41 m_constants[ {id, param}] = value;
42}

◆ setGlobalParam()

void setGlobalParam ( double  value,
unsigned short  element,
unsigned short  param 
)
inline

Set global parameter.

Definition at line 97 of file CDCCalibration.h.

97{set(element, param, value);}

Member Data Documentation

◆ boardT0

const baseType boardT0 = 13
static

Board common T0 correction.

Definition at line 65 of file CDCCalibration.h.

◆ endPlateBwdPhi

const baseType endPlateBwdPhi = 46
static

Backward endplate rotation w.r.t. nominal (geometry)

Definition at line 77 of file CDCCalibration.h.

◆ endPlateFwdDphi

const baseType endPlateFwdDphi = 47
static

Forward enplate rotation taking endPlateBwdPhi as new nominal.

Definition at line 79 of file CDCCalibration.h.

◆ ICLayerNone

const baseType ICLayerNone = 63
static

Last bit for continous layer (unused)

Definition at line 28 of file CDCCalibration.h.

◆ layerX

const baseType layerX = 0
static

Layer X position w.r.t. geometry.

Definition at line 56 of file CDCCalibration.h.

◆ layerY

const baseType layerY = 1
static

Layer Y position w.r.t. geometry.

Definition at line 58 of file CDCCalibration.h.

◆ m_constants

ElementParameterMap m_constants
privateinherited

Map of map of all calibration elements' constants.

Definition at line 68 of file DBObjCalibrationConstMapBase.h.

◆ Wire4EndPartInner

const baseType Wire4EndPartInner = 412
static

Inner conical end part = (63, 412)

Definition at line 38 of file CDCCalibration.h.

◆ Wire4EndPartMiddle

const baseType Wire4EndPartMiddle = 411
static

Middle conical end part = (63, 411)

Definition at line 36 of file CDCCalibration.h.

◆ Wire4EndPartOuter

const baseType Wire4EndPartOuter = 410
static

Outer conical end part = (63, 405)

Definition at line 34 of file CDCCalibration.h.

◆ Wire4Layers

const baseType Wire4Layers = 400
static

layer = (ICLayer, 400)

Definition at line 30 of file CDCCalibration.h.

◆ Wire4SuperLayers

const baseType Wire4SuperLayers = 405
static

SuperLayer = (SuperLayer, 0, 405)

Definition at line 32 of file CDCCalibration.h.

◆ wireBwdX

const baseType wireBwdX = 0
static

Wire X position w.r.t. nominal on backward endplate.

Definition at line 42 of file CDCCalibration.h.

◆ wireBwdY

const baseType wireBwdY = 1
static

Wire Y position w.r.t. nominal on backward endplate.

Definition at line 44 of file CDCCalibration.h.

◆ wireBwdZ

const baseType wireBwdZ = 2
static

Wire Z position w.r.t. nominal on backward endplate.

Definition at line 46 of file CDCCalibration.h.

◆ wireFwdDx

const baseType wireFwdDx = 4
static

Wire X position on forward enplate taking wireBwdX as new nominal.

Definition at line 48 of file CDCCalibration.h.

◆ wireFwdDy

const baseType wireFwdDy = 5
static

Wire Y position on forward enplate taking wireBwdY as new nominal.

Definition at line 50 of file CDCCalibration.h.

◆ wireFwdDz

const baseType wireFwdDz = 6
static

Wire Z position on forward enplate taking wireBwdZ as new nominal.

Definition at line 52 of file CDCCalibration.h.

◆ WireNone

const baseType WireNone = 511
static

Last bit for wire (actually over 100 unused - but useful for us)

Definition at line 26 of file CDCCalibration.h.

◆ wireT0

const baseType wireT0 = 11
static

Wire T0 correction w.r.t. common board T0.

Definition at line 63 of file CDCCalibration.h.

◆ wireTension

const baseType wireTension = 21
static

Wire tension w.r.t. nominal (=50. ?)

Definition at line 69 of file CDCCalibration.h.

◆ xTlayerP0

const baseType xTlayerP0 = 31
static

Layer dependent constant (order 0) correction to x-t relation.

Definition at line 73 of file CDCCalibration.h.


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