Belle II Software development
VXDAlignment Class Reference

VXD alignment (and maybe some calibration) parameters. More...

#include <VXDAlignment.h>

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

 VXDAlignment ()
 Constructor.
 
 ~VXDAlignment ()
 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 (optionaly 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 dU = 1
 Sensor/layer/ladder alignment in local u.
 
static const baseType dV = 2
 Sensor/layer/ladder alignment in local v.
 
static const baseType dW = 3
 Sensor/layer/ladder alignment in local w.
 
static const baseType dAlpha = 4
 Sensor/layer/ladder alignment in local alpha.
 
static const baseType dBeta = 5
 Sensor/layer/ladder alignment in local beta.
 
static const baseType dGamma = 6
 Sensor/layer/ladder alignment in local gamma.
 
static const baseType dLorentzAngle = 11
 Correction of common Lorentz shift w.r.t. nominal.
 
static const baseType dLayerLorentzAngle = 12
 Correction of Lorentz shift w.r.t. common per layer.
 

Private Member Functions

 ClassDef (VXDAlignment, 2)
 VXD allignment and calibration constants.
 

Private Attributes

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

Detailed Description

VXD alignment (and maybe some calibration) parameters.

Definition at line 19 of file VXDAlignment.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

◆ VXDAlignment()

VXDAlignment ( )
inline

Constructor.

Definition at line 41 of file VXDAlignment.h.

◆ ~VXDAlignment()

~VXDAlignment ( )
inline

Destructor.

Definition at line 43 of file VXDAlignment.h.

43{}

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 (optionaly 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 49 of file VXDAlignment.h.

49{return get(element, param);}

◆ getGlobalUniqueID()

static unsigned short getGlobalUniqueID ( )
inlinestatic

Get global unique id.

Definition at line 47 of file VXDAlignment.h.

47{return 10;}

◆ 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 53 of file VXDAlignment.h.

53{return {};}

◆ readFromResult()

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

Not used.

Definition at line 55 of file VXDAlignment.h.

55{}

◆ 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 51 of file VXDAlignment.h.

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

Member Data Documentation

◆ dAlpha

const baseType dAlpha = 4
static

Sensor/layer/ladder alignment in local alpha.

Definition at line 29 of file VXDAlignment.h.

◆ dBeta

const baseType dBeta = 5
static

Sensor/layer/ladder alignment in local beta.

Definition at line 31 of file VXDAlignment.h.

◆ dGamma

const baseType dGamma = 6
static

Sensor/layer/ladder alignment in local gamma.

Definition at line 33 of file VXDAlignment.h.

◆ dLayerLorentzAngle

const baseType dLayerLorentzAngle = 12
static

Correction of Lorentz shift w.r.t. common per layer.

Definition at line 38 of file VXDAlignment.h.

◆ dLorentzAngle

const baseType dLorentzAngle = 11
static

Correction of common Lorentz shift w.r.t. nominal.

Definition at line 36 of file VXDAlignment.h.

◆ dU

const baseType dU = 1
static

Sensor/layer/ladder alignment in local u.

Definition at line 23 of file VXDAlignment.h.

◆ dV

const baseType dV = 2
static

Sensor/layer/ladder alignment in local v.

Definition at line 25 of file VXDAlignment.h.

◆ dW

const baseType dW = 3
static

Sensor/layer/ladder alignment in local w.

Definition at line 27 of file VXDAlignment.h.

◆ m_constants

ElementParameterMap m_constants
privateinherited

Map of map of all calibration elements' constants.

Definition at line 68 of file DBObjCalibrationConstMapBase.h.


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