Belle II Software development
alignment

Modules

 alignment data objects
 
 alignment modules
 

Classes

class  MillepedeAlgorithm
 Class implementing Millepede calibration algorithm. More...
 
class  MillepedeTreeConversionAlgorithm
 Creation of a plain TTree with residual and global derivative values from GBL data saved to a ROOT file. More...
 
class  CDCCalibration
 CDC alignment and calibration constants. More...
 
class  VXDAlignment
 VXD alignment (and maybe some calibration) parameters. More...
 
class  GblMultipleScatteringController
 TrackSegmentController for use with GblFitter in Belle2. More...
 
class  GlobalLabel
 Class to convert to/from global labels for Millepede II to/from detector & parameter identificators. More...
 
class  AlignableBKLMRecoHit
 Alignable BKLM hit. More...
 
class  AlignableCDCRecoHit
 This class is used to transfer CDC information to the track fit and Millepede. More...
 
class  AlignableEKLMRecoHit
 Alignable EKLM hit. More...
 
class  AlignablePXDRecoHit
 This class is used to transfer PXD information to the track fit. More...
 
class  AlignableSVDRecoHit
 This class is used to transfer SVD information to the track fit. More...
 
class  AlignableSVDRecoHit2D
 This class is used to transfer SVD information to the track fit. More...
 
class  GlobalLabelTest
 Test fixture. More...
 

Functions

 TEST_F (GlobalLabelTest, LargeNumberOfTimeDependentParameters)
 Test large number of time-dep params for registration and retrieval.
 
 TEST_F (GlobalLabelTest, TimeSettingWorkflow)
 Test that time dependence works.
 
 TEST_F (GlobalLabelTest, GettersSettersOperators)
 Test getters/setters, operators.
 
 TEST_F (GlobalLabelTest, QickTestNormalOperation)
 Test the default way of using this.
 

Detailed Description

Function Documentation

◆ TEST_F() [1/4]

TEST_F ( GlobalLabelTest  ,
GettersSettersOperators   
)

Test getters/setters, operators.

Definition at line 124 of file globalLabel.cc.

125 {
126 GlobalLabel vxdlabel1 = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
127 GlobalLabel vxdlabel2(100873609);
128
129 // getters
131 EXPECT_EQ(paramid, vxdlabel1.getParameterId());
132 EXPECT_EQ(0, vxdlabel1.getTimeFlag());
133 EXPECT_EQ(0, vxdlabel1.getTimeId());
134 EXPECT_EQ(vxdSensor, vxdlabel1.getElementId());
135
136 // cast operators
137 EXPECT_EQ(100873609, (int)vxdlabel1);
138 EXPECT_EQ(100873609, (unsigned int)vxdlabel1);
139
140 // getters (GlobalLabel from label)
142 EXPECT_EQ(paramid, vxdlabel2.getParameterId());
143 EXPECT_EQ(0, vxdlabel2.getTimeFlag());
144 EXPECT_EQ(0, vxdlabel2.getTimeId());
145 EXPECT_EQ(vxdSensor, vxdlabel2.getElementId());
146
147 // no detector mismatch (GlobalLabel from label)
148 // cats operator (GlobalLabel from label)
149 EXPECT_EQ(100873609, (int)vxdlabel2);
150 EXPECT_EQ(100873609, (unsigned int)vxdlabel2);
151
152 // Assignment
153 GlobalLabel other = GlobalLabel::construct<CDCAlignment>(cdcWire, 2);
154 EXPECT_EQ(270620402, other.label());
155 other = vxdlabel1;
156 EXPECT_EQ(100873609, other.label());
157 }
Class to convert to/from global labels for Millepede II to/from detector & parameter identificators.
Definition: GlobalLabel.h:41
int label()
Returns encoded Pede label.
Definition: GlobalLabel.h:141
gidTYPE getParameterId() const
Get id of alignment/calibration parameter.
Definition: GlobalLabel.h:164
bool getTimeFlag() const
Is label time-dependent?
Definition: GlobalLabel.h:170
gidTYPE getElementId() const
Returns the element id (like VxdID for silicon sensors) to identify sets of parameters in DB objects.
Definition: GlobalLabel.h:161
static unsigned int & getCurrentTimeIntervalRef()
Returns reference to current time id.
Definition: GlobalLabel.h:199
gidTYPE getTimeId() const
Get time id.
Definition: GlobalLabel.h:167

◆ TEST_F() [2/4]

TEST_F ( GlobalLabelTest  ,
LargeNumberOfTimeDependentParameters   
)

Test large number of time-dep params for registration and retrieval.

Definition at line 72 of file globalLabel.cc.

73 {
74 for (int ilayer = 1; ilayer < 6; ilayer++) {
75 for (unsigned int subrun = 0; subrun <= GlobalLabel::maxTID; subrun++) {
76 VxdID id(ilayer, 0, 0);
77 GlobalLabel lab = GlobalLabel::construct<VXDAlignment>(id.getID(), 1);
78 lab.registerTimeDependent(subrun, subrun);
79 lab.setParameterId(2);
80 lab.registerTimeDependent(subrun, subrun);
81 lab.setParameterId(3);
82 lab.registerTimeDependent(subrun, subrun);
83 }
84 }
85 // Ask 1000-times for time dep.label (could be in a single track)
86 for (int ilayer = 1; ilayer < 6; ilayer++) {
87 for (unsigned int i = 0; i <= GlobalLabel::maxTID; i++) {
88 setTime(i);
89 GlobalLabel movingLayer = GlobalLabel::construct<VXDAlignment>(VxdID(ilayer, 0, 0).getID(), 2);
90 GlobalLabel movingLayerStaticParam = GlobalLabel::construct<VXDAlignment>(VxdID(ilayer, 0, 0).getID(), 4);
91 GlobalLabel staticLayer = GlobalLabel::construct<VXDAlignment>(VxdID(6, 0, 0).getID(), 2);
92
93 EXPECT_EQ(i, movingLayer.getTimeId());
94 EXPECT_EQ(0, movingLayerStaticParam.getTimeId());
95 EXPECT_EQ(0, staticLayer.getTimeId());
96 }
97 }
98
99 }
gidTYPE setParameterId(gidTYPE paramId)
Usefull setter to quickly change only the parameter id and return back the encoded label (for use in ...
Definition: GlobalLabel.cc:72
static const gidTYPE maxTID
max time slices for a parameter 1..999
Definition: GlobalLabel.h:50
void registerTimeDependent(gidTYPE start, gidTYPE end=maxTID)
Register this Detector element and parameter as time dependent with instance starting at "start" time...
Definition: GlobalLabel.cc:45
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
Definition: calibTools.h:60

◆ TEST_F() [3/4]

TEST_F ( GlobalLabelTest  ,
QickTestNormalOperation   
)

Test the default way of using this.

Definition at line 160 of file globalLabel.cc.

161 {
162
163 // Test time indep. detector constructors
164 GlobalLabel vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
165 GlobalLabel cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
166 EXPECT_EQ(100873609, vxdlabel.label());
167 EXPECT_EQ(270620409, cdclabel.label());
168 EXPECT_EQ(paramid, vxdlabel.getParameterId());
169 EXPECT_EQ(paramid, cdclabel.getParameterId());
170 // Test time indep. label constructor
171 vxdlabel = GlobalLabel(100873609);
172 cdclabel = GlobalLabel(270620409);
173 EXPECT_EQ(paramid, vxdlabel.getParameterId());
174 EXPECT_EQ(paramid, cdclabel.getParameterId());
175
176 // Register time intervals
177 registerSomeTimeDepParams();
178
179 // Nothing to test on dump... (enable it and see the time-dep map:-)
180 //vxdlabel.dump(100);
181
182 // Test detector time dependent constructors
183 setTime(10);
184 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
185 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
186 EXPECT_EQ(1, vxdlabel.getTimeId());
187 EXPECT_EQ(1, cdclabel.getTimeId());
188 EXPECT_EQ(paramid, vxdlabel.getParameterId());
189 EXPECT_EQ(paramid, cdclabel.getParameterId());
190
191 // Test time dependent label constructor
192 vxdlabel = GlobalLabel(vxdlabel.label());
193 cdclabel = GlobalLabel(cdclabel.label());
194 EXPECT_EQ(paramid, vxdlabel.getParameterId());
195 EXPECT_EQ(paramid, cdclabel.getParameterId());
196 EXPECT_EQ(1, vxdlabel.getTimeId());
197 EXPECT_EQ(1, cdclabel.getTimeId());
198
199 // Test that time dependence works correctly
200 // on several subruns
201 setTime(0);
202 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
203 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
204 EXPECT_EQ(0, vxdlabel.getTimeId());
205 EXPECT_EQ(0, cdclabel.getTimeId());
206
207
208 setTime(1);
209 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
210 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
211 EXPECT_EQ(1, vxdlabel.getTimeId());
212 EXPECT_EQ(1, cdclabel.getTimeId());
213
214 setTime(51);
215 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
216 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
217 EXPECT_EQ(1, vxdlabel.getTimeId());
218 EXPECT_EQ(51, cdclabel.getTimeId());
219
220 setTime(80);
221 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
222 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
223 EXPECT_EQ(1, vxdlabel.getTimeId());
224 EXPECT_EQ(51, cdclabel.getTimeId());
225
226 setTime(100);
227 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
228 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
229 EXPECT_EQ(1, vxdlabel.getTimeId());
230 EXPECT_EQ(51, cdclabel.getTimeId());
231
232 setTime(101);
233 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
234 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
235 EXPECT_EQ(0, vxdlabel.getTimeId());
236 EXPECT_EQ(0, cdclabel.getTimeId());
237
238 // Reset time dependence
240 setTime(90);
241 vxdlabel = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
242 cdclabel = GlobalLabel::construct<CDCAlignment>(cdcWire, paramid);
243 EXPECT_EQ(0, vxdlabel.getTimeId());
244 EXPECT_EQ(0, cdclabel.getTimeId());
245
246 }
static void clearTimeDependentParamaters()
Forget all previously registered time dependent parameters.
Definition: GlobalLabel.cc:66

◆ TEST_F() [4/4]

TEST_F ( GlobalLabelTest  ,
TimeSettingWorkflow   
)

Test that time dependence works.

Definition at line 102 of file globalLabel.cc.

103 {
104 GlobalLabel vxdlabel1 = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
105 GlobalLabel Cvxdlabel1 = GlobalLabel::construct<VXDAlignment>(vxdSensor, 2);
106 EXPECT_EQ(0, vxdlabel1.getTimeId());
107 EXPECT_EQ(0, Cvxdlabel1.getTimeId());
108
109 registerSomeTimeDepParams();
110 GlobalLabel vxdlabel2 = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
111 GlobalLabel Cvxdlabel2 = GlobalLabel::construct<VXDAlignment>(vxdSensor, 2);
112 EXPECT_EQ(0, vxdlabel2.getTimeId());
113 EXPECT_EQ(0, Cvxdlabel2.getTimeId());
114
115 setTime(80);
116 GlobalLabel vxdlabel3 = GlobalLabel::construct<VXDAlignment>(vxdSensor, paramid);
117 GlobalLabel Cvxdlabel3 = GlobalLabel::construct<VXDAlignment>(vxdSensor, 2);
118 EXPECT_EQ(1, vxdlabel3.getTimeId());
119 EXPECT_EQ(0, Cvxdlabel3.getTimeId());
120
121 }