Belle II Software development
|
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. | |
void | construct (gidTYPE dbObjId, gidTYPE element, gidTYPE param) |
Construct label for given DB object id and its element and parameter. | |
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. | |
gidTYPE | setParameterId (gidTYPE paramId) |
Usefull setter to quickly change only the parameter id and return back the encoded label (for use in RecoHits) | |
int | label () |
Returns encoded Pede label. | |
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. | |
static void | setComponents (const std::set< unsigned short > &components) |
Set which DB objects have non-zero labels (by their id) | |
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. | |
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. | |
static const gidTYPE | maxTEID = 9999 |
max time-dep. | |
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 | |
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) | |
Private Member Functions | |
void | construct (gidTYPE elementId, gidTYPE paramId) |
Constructor for any detector. | |
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.
typedef unsigned int gidTYPE |
shortcut for main data type (unsigned int)
Definition at line 45 of file GlobalLabel.h.
|
inline |
Default constuctor. Members initialized in declaration.
Definition at line 62 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.
|
static |
Forget all previously registered time dependent parameters.
Definition at line 66 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 95 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.
void dump | ( | int | level = 0 | ) | const |
Dumps the label to std::cout.
Definition at line 128 of file GlobalLabel.cc.
|
inlinestatic |
Get current time id.
Definition at line 214 of file GlobalLabel.h.
|
inlinestatic |
Returns reference to current time id.
Definition at line 199 of file GlobalLabel.h.
Reference to dictionary/map TEIDPID -> EIDPID.
Definition at line 282 of file GlobalLabel.h.
|
inline |
Returns the element id (like VxdID for silicon sensors) to identify sets of parameters in DB objects.
Definition at line 161 of file GlobalLabel.h.
|
inline |
Get the last time id, where this label is valid.
Definition at line 179 of file GlobalLabel.h.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Reference to map EIDPID -> (TEIDPID, time intervals)
Definition at line 274 of file GlobalLabel.h.
|
inline |
Returns the global id identifing DB object for constantwith this label.
Definition at line 156 of file GlobalLabel.h.
|
inline |
|
inline |
Helper to compose elemnt id & param id.
Definition at line 290 of file GlobalLabel.h.
|
inline |
|
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 107 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.
|
private |
element id
Definition at line 299 of file GlobalLabel.h.
Offset of detector element id = 100.
Definition at line 52 of file GlobalLabel.h.
|
private |
global id
Definition at line 296 of file GlobalLabel.h.
|
staticprivate |
Set of global ids of components for which to return non-zero labels.
Definition at line 221 of file GlobalLabel.h.
|
static |
max 9.999.999 detector elements 1..9999999 (NOT time-dep-)
Definition at line 47 of file GlobalLabel.h.
|
static |
|
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 |
max 99 parameter types 1..99
Definition at line 46 of file GlobalLabel.h.
|
static |
|
static |
max time slices for a parameter 1..999
Definition at line 50 of file GlobalLabel.h.
|
static |
|
private |
parameter id
Definition at line 302 of file GlobalLabel.h.
|
static |
parameter number are the last 2 decimal digits
Definition at line 51 of file GlobalLabel.h.
Offset of time dependent element(detector+parameter) = 100.
Definition at line 54 of file GlobalLabel.h.
|
private |
time id
Definition at line 305 of file GlobalLabel.h.
Offset of time slice id = 1.000.000.
Definition at line 55 of file GlobalLabel.h.
|
private |
time identification flag
Definition at line 308 of file GlobalLabel.h.
Offset of time flag = 1.000.000.000.
Definition at line 53 of file GlobalLabel.h.