Belle II Software development
CDCAlignment Class Reference

CDC alignment constants. More...

#include <CDCAlignment.h>

Inheritance diagram for CDCAlignment:
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

 CDCAlignment ()
 Constructor.
 
double getBwdWireShiftX (int ICLayer, int ILayer) const
 Getter to X shift of bwd wire.
 
double getBwdWireShiftY (int ICLayer, int ILayer) const
 Getter to Y shift of bwd wire.
 
double getBwdWireShiftZ (int ICLayer, int ILayer) const
 Getter to Z shift of bwd wire.
 
double getFwdWireShiftX (int ICLayer, int ILayer) const
 Getter to X shift of fwd wire.
 
double getFwdWireShiftY (int ICLayer, int ILayer) const
 Getter to Y shift of fwd wire.
 
double getFwdWireShiftZ (int ICLayer, int ILayer) const
 Getter to Z shift of fwd wire.
 
double getWireTension (int ICLayer, int ILayer) const
 Getter to wire tension.
 
 ~CDCAlignment ()
 Destructor.
 
double getGlobalParam (unsigned short element, unsigned short param) const
 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 ()
 list stored global parameters TODO FIXME CDC not ready
 
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 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 wireFwdX = 4
 Wire X position w.r.t. nominal on forward endplate.
 
static const baseType wireFwdY = 5
 Wire Y position w.r.t. nominal on forward endplate.
 
static const baseType wireFwdZ = 6
 Wire Z position w.r.t. nominal on forward endplate.
 
static const baseType wireTension = 21
 Wire tension w.r.t. nominal (=50. ?)
 
static const baseType layerX = 1
 Layer shift in global X at backward endplate.
 
static const baseType layerY = 2
 Layer shift in global Y at backward endplate.
 
static const baseType layerPhi = 6
 Layer rotation in global X-Y plane (gamma) at backward endplate.
 
static const baseType layerDx = 11
 Layer shift in global X dX = foward - backward endplate.
 
static const baseType layerDy = 12
 Layer shift in global Y dY = foward - backward endplate.
 
static const baseType layerDPhi = 16
 Layer rotation in global X-Y plane (gamma) dPhi = foward - backward endplate.
 

Private Member Functions

 ClassDef (CDCAlignment, 2)
 Storage for CDC alignment constants (mainly now for Millepede)
 

Private Attributes

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

Detailed Description

CDC alignment constants.

Definition at line 24 of file CDCAlignment.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

◆ CDCAlignment()

CDCAlignment ( )
inline

Constructor.

Definition at line 64 of file CDCAlignment.h.

◆ ~CDCAlignment()

~CDCAlignment ( )
inline

Destructor.

Definition at line 105 of file CDCAlignment.h.

105{}

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}

◆ getBwdWireShiftX()

double getBwdWireShiftX ( int  ICLayer,
int  ILayer 
) const
inline

Getter to X shift of bwd wire.

Definition at line 67 of file CDCAlignment.h.

68 {
69 return get(WireID(ICLayer, ILayer), wireBwdX);
70 }
static const baseType wireBwdX
Wire X position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:29

◆ getBwdWireShiftY()

double getBwdWireShiftY ( int  ICLayer,
int  ILayer 
) const
inline

Getter to Y shift of bwd wire.

Definition at line 72 of file CDCAlignment.h.

73 {
74 return get(WireID(ICLayer, ILayer), wireBwdY);
75 }
static const baseType wireBwdY
Wire Y position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:31

◆ getBwdWireShiftZ()

double getBwdWireShiftZ ( int  ICLayer,
int  ILayer 
) const
inline

Getter to Z shift of bwd wire.

Definition at line 77 of file CDCAlignment.h.

78 {
79 return get(WireID(ICLayer, ILayer), wireBwdZ);
80 }
static const baseType wireBwdZ
Wire Z position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:33

◆ getFwdWireShiftX()

double getFwdWireShiftX ( int  ICLayer,
int  ILayer 
) const
inline

Getter to X shift of fwd wire.

Definition at line 83 of file CDCAlignment.h.

84 {
85 return get(WireID(ICLayer, ILayer), wireFwdX);
86 }
static const baseType wireFwdX
Wire X position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:35

◆ getFwdWireShiftY()

double getFwdWireShiftY ( int  ICLayer,
int  ILayer 
) const
inline

Getter to Y shift of fwd wire.

Definition at line 88 of file CDCAlignment.h.

89 {
90 return get(WireID(ICLayer, ILayer), wireFwdY);
91 }
static const baseType wireFwdY
Wire Y position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:37

◆ getFwdWireShiftZ()

double getFwdWireShiftZ ( int  ICLayer,
int  ILayer 
) const
inline

Getter to Z shift of fwd wire.

Definition at line 93 of file CDCAlignment.h.

94 {
95 return get(WireID(ICLayer, ILayer), wireFwdZ);
96 }
static const baseType wireFwdZ
Wire Z position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:39

◆ getGlobalParam()

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

Get global parameter.

Definition at line 111 of file CDCAlignment.h.

112 {
113 return get(element, param);
114 }

◆ getGlobalUniqueID()

static unsigned short getGlobalUniqueID ( )
inlinestatic

Get global unique id.

Definition at line 109 of file CDCAlignment.h.

109{return 27;}

◆ getMap()

const ElementParameterMap & getMap ( )
inlineinherited

Get the underlying map of constants.

Definition at line 48 of file DBObjCalibrationConstMapBase.h.

48{return m_constants;}

◆ getWireTension()

double getWireTension ( int  ICLayer,
int  ILayer 
) const
inline

Getter to wire tension.

Definition at line 99 of file CDCAlignment.h.

100 {
101 return get(WireID(ICLayer, ILayer), wireTension);
102 }
static const baseType wireTension
Wire tension w.r.t. nominal (=50. ?)
Definition: CDCAlignment.h:43

◆ listGlobalParams()

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

list stored global parameters TODO FIXME CDC not ready

Definition at line 121 of file CDCAlignment.h.

122 {
123 return {};
124 }

◆ 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 116 of file CDCAlignment.h.

117 {
118 set(element, param, value);
119 }

Member Data Documentation

◆ layerDPhi

const baseType layerDPhi = 16
static

Layer rotation in global X-Y plane (gamma) dPhi = foward - backward endplate.

Definition at line 61 of file CDCAlignment.h.

◆ layerDx

const baseType layerDx = 11
static

Layer shift in global X dX = foward - backward endplate.

Definition at line 57 of file CDCAlignment.h.

◆ layerDy

const baseType layerDy = 12
static

Layer shift in global Y dY = foward - backward endplate.

Definition at line 59 of file CDCAlignment.h.

◆ layerPhi

const baseType layerPhi = 6
static

Layer rotation in global X-Y plane (gamma) at backward endplate.

Definition at line 54 of file CDCAlignment.h.

◆ layerX

const baseType layerX = 1
static

Layer shift in global X at backward endplate.

Definition at line 50 of file CDCAlignment.h.

◆ layerY

const baseType layerY = 2
static

Layer shift in global Y at backward endplate.

Definition at line 52 of file CDCAlignment.h.

◆ m_constants

ElementParameterMap m_constants
privateinherited

Map of map of all calibration elements' constants.

Definition at line 68 of file DBObjCalibrationConstMapBase.h.

◆ wireBwdX

const baseType wireBwdX = 0
static

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

Definition at line 29 of file CDCAlignment.h.

◆ wireBwdY

const baseType wireBwdY = 1
static

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

Definition at line 31 of file CDCAlignment.h.

◆ wireBwdZ

const baseType wireBwdZ = 2
static

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

Definition at line 33 of file CDCAlignment.h.

◆ wireFwdX

const baseType wireFwdX = 4
static

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

Definition at line 35 of file CDCAlignment.h.

◆ wireFwdY

const baseType wireFwdY = 5
static

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

Definition at line 37 of file CDCAlignment.h.

◆ wireFwdZ

const baseType wireFwdZ = 6
static

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

Definition at line 39 of file CDCAlignment.h.

◆ wireTension

const baseType wireTension = 21
static

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

Definition at line 43 of file CDCAlignment.h.


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