Belle II Software
release-08-01-10
|
Class to convert to/from global labels for Millepede II to/from detector & parameter identificators. More...
#include <GlobalLabel.h>
Classes | |
struct | TimeInterval |
Struct to hold intervals of validity. More... | |
Public Types | |
typedef unsigned int | gidTYPE |
shortcut for main data type (unsigned int) | |
Public Member Functions | |
GlobalLabel () | |
Default constuctor. Members initialized in declaration. | |
GlobalLabel (gidTYPE globalLabel) | |
Constructor from Pede label Depends on registered time dependent parameters if the time flag in the label is non-zero. More... | |
void | construct (gidTYPE dbObjId, gidTYPE element, gidTYPE param) |
Construct label for given DB object id and its element and parameter. More... | |
void | registerTimeDependent (gidTYPE start, gidTYPE end=maxTID) |
Register this Detector element and parameter as time dependent with instance starting at "start" time index and ending at "end" index. More... | |
gidTYPE | setParameterId (gidTYPE paramId) |
Usefull setter to quickly change only the parameter id and return back the encoded label (for use in RecoHits) More... | |
int | label () |
Returns encoded Pede label. More... | |
operator int () | |
Cast to encoded Pede label. | |
operator unsigned int () | |
Cast to encoded Pede label. | |
gidTYPE | getUniqueId () const |
Returns the global id identifing DB object for constantwith this label. | |
gidTYPE | getElementId () const |
Returns the element id (like VxdID for silicon sensors) to identify sets of parameters in DB objects. | |
gidTYPE | getParameterId () const |
Get id of alignment/calibration parameter. | |
gidTYPE | getTimeId () const |
Get time id. | |
bool | getTimeFlag () const |
Is label time-dependent? | |
bool | isValid () |
Is label valid? (non-zero) | |
void | dump (int level=0) const |
Dumps the label to std::cout. | |
int | getEndOfValidity () |
Get the last time id, where this label is valid. | |
gidTYPE | makeEIDPID (gidTYPE eid_, gidTYPE pid_) |
Helper to compose elemnt id & param id. | |
gidTYPE | makeTEIDPID (gidTYPE teid_, gidTYPE pid_) |
Helper to compose time elemnt id & param id. | |
Static Public Member Functions | |
template<class DBObjType > | |
static GlobalLabel | construct (gidTYPE element, gidTYPE param) |
Construct label for given DB object (template argument) and its element and parameter. More... | |
static void | setComponents (const std::set< unsigned short > &components) |
Set which DB objects have non-zero labels (by their id) More... | |
static void | clearTimeDependentParamaters () |
Forget all previously registered time dependent parameters. | |
static unsigned int & | getCurrentTimeIntervalRef () |
Returns reference to current time id. | |
static void | setCurrentTimeInterval (gidTYPE time) |
Sets current time id. More... | |
static gidTYPE | getCurrentTimeInterval () |
Get current time id. | |
static std::map< gidTYPE, TimeInterval > & | getTimeIntervals () |
Reference to map EIDPID -> (TEIDPID, time intervals) | |
static std::map< gidTYPE, gidTYPE > & | getDictionary () |
Reference to dictionary/map TEIDPID -> EIDPID. | |
Static Public Attributes | |
static const gidTYPE | maxPID = 99 |
max 99 parameter types 1..99 | |
static const gidTYPE | maxEID = 9999999 |
max 9.999.999 detector elements 1..9999999 (NOT time-dep-) | |
static const gidTYPE | maxTIF = 1 |
time-dep. More... | |
static const gidTYPE | maxTEID = 9999 |
max time-dep. More... | |
static const gidTYPE | maxTID = 999 |
max time slices for a parameter 1..999 | |
static const gidTYPE | pidOffset = 1 |
parameter number are the last 2 decimal digits | |
static const gidTYPE | eidOffest = pidOffset * (maxPID + 1) |
Offset of detector element id = 100. | |
static const gidTYPE | tifOffset = eidOffest * (maxEID + 1) |
Offset of time flag = 1.000.000.000. | |
static const gidTYPE | teidOffset = eidOffest |
Offset of time dependent element(detector+parameter) = 100. | |
static const gidTYPE | tidOffset = eidOffest * (maxTEID + 1) |
Offset of time slice id = 1.000.000. | |
static const gidTYPE | maxGID |
max internal id = 1.999.999.999 More... | |
static const gidTYPE | maxLabel |
Label and internal id ("gid") are the same numbers (label is signed but 0 and <0 values are invalid to give to Pede) More... | |
Private Member Functions | |
void | construct (gidTYPE elementId, gidTYPE paramId) |
Constructor for any detector. More... | |
Private Attributes | |
gidTYPE | gid {0} |
global id | |
gidTYPE | eid {0} |
element id | |
gidTYPE | pid {0} |
parameter id | |
gidTYPE | tid {0} |
time id | |
gidTYPE | tif {0} |
time identification flag | |
Static Private Attributes | |
static std::set< unsigned short > | m_components = {} |
Set of global ids of components for which to return non-zero labels. | |
Class to convert to/from global labels for Millepede II to/from detector & parameter identificators.
The labels are in following form (the example shows maximal allowed labels):
|TIF| EID |PID| | 0|9999999 |99 | & TEID=0 & TID=0, or
|TIF|TID|TEID|PID| | 1|999|9999|99 | & (EID,PID)=dictionary(TEID,PID).
where
Definition at line 41 of file GlobalLabel.h.
|
explicit |
Constructor from Pede label Depends on registered time dependent parameters if the time flag in the label is non-zero.
globalLabel | The encoded label |
Definition at line 19 of file GlobalLabel.cc.
Construct label for given DB object id and its element and parameter.
dbObjId | id of the DB object in global calibration |
element | Element id in DB object (wire, sensor etc.) |
param | Paremetr id of the element (shift, angle, etc.) |
Definition at line 96 of file GlobalLabel.h.
|
inlinestatic |
Construct label for given DB object (template argument) and its element and parameter.
element | Element id in DB object (wire, sensor etc.) |
param | Paremetr id of the element (shift, angle, etc.) |
Definition at line 81 of file GlobalLabel.h.
|
private |
Constructor for any detector.
elementId | Unique id of Belle2 detector element (sensor, layer, wire...) |
paramId | id of the parameter of the element |
Definition at line 81 of file GlobalLabel.cc.
|
inline |
void registerTimeDependent | ( | GlobalLabel::gidTYPE | start, |
GlobalLabel::gidTYPE | end = maxTID |
||
) |
Register this Detector element and parameter as time dependent with instance starting at "start" time index and ending at "end" index.
Call this for each time interval, in which the parameter is allowed to have different value (from that at interval 0-0)
start | Start time of parameter time-dep. instance (the instance has number "start" from start to end). The instance number before is 0 if not set. |
end | End time of parameter instance. The number after "end" is 0 if not set. |
Definition at line 45 of file GlobalLabel.cc.
|
inlinestatic |
Set which DB objects have non-zero labels (by their id)
components | set of global ids of DB objects |
Definition at line 108 of file GlobalLabel.h.
|
inlinestatic |
GlobalLabel::gidTYPE setParameterId | ( | GlobalLabel::gidTYPE | paramId | ) |
Usefull setter to quickly change only the parameter id and return back the encoded label (for use in RecoHits)
paramId | Id of calibration/alignment parameter |
Definition at line 72 of file GlobalLabel.cc.
|
static |
max internal id = 1.999.999.999
Definition at line 56 of file GlobalLabel.h.
|
static |
Label and internal id ("gid") are the same numbers (label is signed but 0 and <0 values are invalid to give to Pede)
Definition at line 58 of file GlobalLabel.h.
|
static |
|
static |