142{
143
144
145
146 std::string name;
147 std::string title;
148 TH2F* tmp2D;
149 TH1F* tmp1D;
150
152
154 std::set<Belle2::VxdID>::iterator itPxdLayers = pxdLayers.begin();
155
156 while (itPxdLayers != pxdLayers.end()) {
157
158 std::set<Belle2::VxdID> pxdLadders =
m_aGeometry.getLadders(*itPxdLayers);
159 std::set<Belle2::VxdID>::iterator itPxdLadders = pxdLadders.begin();
160
161 while (itPxdLadders != pxdLadders.end()) {
162
163 std::set<Belle2::VxdID> pxdSensors =
m_aGeometry.getSensors(*itPxdLadders);
164 std::set<Belle2::VxdID>::iterator itPxdSensors = pxdSensors.begin();
165
166 while (itPxdSensors != pxdSensors.end()) {
167
169
170 const VXD::SensorInfoBase& wSensorInfo =
m_aGeometry.getSensorInfo(*itPxdSensors);
171
172 const int nPixelsU = wSensorInfo.
getUCells();
173 const int nPixelsV = wSensorInfo.
getVCells();
174 std::string sensorid = std::to_string(itPxdSensors->getLayerNumber()) + "_" + std::to_string(
175 itPxdSensors->getLadderNumber()) + "_" +
176 std::to_string(itPxdSensors->getSensorNumber());
177
178
179
181
182 name = "hNROIs_" + sensorid;
183 title = "number of m_roiIDs for sensor " + sensorid;
184 double value = 0;
186 new TH1F(name.c_str(), title.c_str(), 25, 0, 25),
187 [](const ROIid*, double & val) {val++;},
188 [](TH1 * hPtr, double & val) { hPtr->Fill(val); },
189 value
190 };
191 m_hROIDictionaryEvt.insert(std::pair< Belle2::VxdID, ROIHistoAccumulateAndFill& > ((Belle2::VxdID)*itPxdSensors, *aHAAF));
192
193
194
195
196
198
199
200 name = "hCoorU_" + sensorid;
201 title = "U coordinate of the extrapolation in U for sensor " + sensorid;
203 (
204 (Belle2::VxdID)*itPxdSensors,
206 new TH1F(name.c_str(), title.c_str(), 100, -5, 5),
207 [](TH1 * hPtr, const PXDIntercept * inter) { hPtr->Fill(inter->getCoorU()); }
208 )
209 )
210 );
211
212 name = "hCoorV_" + sensorid;
213 title = "V coordinate of the extrapolation in V for sensor " + sensorid;
215 (
216 (Belle2::VxdID)*itPxdSensors,
218 new TH1F(name.c_str(), title.c_str(), 100, -5, 5),
219 [](TH1 * hPtr, const PXDIntercept * inter) { hPtr->Fill(inter->getCoorV()); }
220 )
221 )
222 );
223
224
225 name = "hCoorU_vs_CoorV_" + sensorid;
226 title = "U vs V intercept (cm) " + sensorid;
227 tmp2D = new TH2F(name.c_str(), title.c_str(), 100, -5, 5, 100, -5, 5);
228 tmp2D->GetXaxis()->SetTitle("intercept U coor (cm)");
229 tmp2D->GetYaxis()->SetTitle("intercept V coor (cm)");
231 (
232 (Belle2::VxdID)*itPxdSensors,
234 tmp2D,
235 [](TH1 * hPtr,
const PXDIntercept * inter) { hPtr->Fill(inter->
getCoorU(), inter->
getCoorV()); }
236 )
237 )
238 );
239
240
241
242 name = "hStatErrU_" + sensorid;
243 title = "stat error of the extrapolation in U for sensor " + sensorid;
245 (
246 (Belle2::VxdID)*itPxdSensors,
248 new TH1F(name.c_str(), title.c_str(), 100, 0, 0.35),
249 [](TH1 * hPtr, const PXDIntercept * inter) { hPtr->Fill(inter->getSigmaU()); }
250 )
251 )
252 );
253 name = "hStatErrV_" + sensorid;
254 title = "stat error of the extrapolation in V for sensor " + sensorid;
256 (
257 (Belle2::VxdID)*itPxdSensors,
259 new TH1F(name.c_str(), title.c_str(), 100, 0, 0.35),
260 [](TH1 * hPtr, const PXDIntercept * inter) { hPtr->Fill(inter->getSigmaV()); }
261 )
262 )
263 );
264
265
266 name = "hResidU_" + sensorid;
267 title = "U residuals = intercept - digit, for sensor " + sensorid;
268 tmp1D = new TH1F(name.c_str(), title.c_str(), 1000, -5, 5);
270 (
271 (Belle2::VxdID)*itPxdSensors,
273 tmp1D,
274 [this](TH1 * hPtr, const PXDIntercept * inter) {
276 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
277 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
279 }
280 }
281 )
282 )
283 );
284
285 name = "hResidV_" + sensorid;
286 title = "V residuals = intercept - digit, for sensor " + sensorid;
287 tmp1D = new TH1F(name.c_str(), title.c_str(), 1000, -5, 5);
289 (
290 (Belle2::VxdID)*itPxdSensors,
292 tmp1D,
293 [this](TH1 * hPtr, const PXDIntercept * inter) {
295 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
296 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
298 }
299 }
300 )
301 )
302 );
303
304 name = "hResidV_vs_ResidU_" + sensorid;
305 title = "V vs U residuals = intercept - digit, for sensor " + sensorid;
306 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
307 tmp2D->GetXaxis()->SetTitle("U resid (cm)");
308 tmp2D->GetYaxis()->SetTitle("V resid (cm)");
310 (
311 (Belle2::VxdID)*itPxdSensors,
313 tmp2D,
314 [this](TH1 * hPtr, const PXDIntercept * inter) {
316 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
317 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
320 hPtr->Fill(residU, residV);
321 }
322 }
323 )
324 )
325 );
326
327 name = "hResidVm_vs_ResidU_" + sensorid;
328 title = "V vs U residuals = intercept - digit, for sensor " + sensorid;
329 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
330 tmp2D->GetXaxis()->SetTitle("U resid (cm)");
331 tmp2D->GetYaxis()->SetTitle("V* resid (cm)");
333 (
334 (Belle2::VxdID)*itPxdSensors,
336 tmp2D,
337 [this](TH1 * hPtr, const PXDIntercept * inter) {
339 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
340 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
343 hPtr->Fill(residU, residV);
344 }
345 }
346 )
347 )
348 );
349
350 name = "hResidV_vs_ResidUm_" + sensorid;
351 title = "V vs U residuals = intercept - digit, for sensor " + sensorid;
352 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
353 tmp2D->GetXaxis()->SetTitle("U* resid (cm)");
354 tmp2D->GetYaxis()->SetTitle("V resid (cm)");
356 (
357 (Belle2::VxdID)*itPxdSensors,
359 tmp2D,
360 [this](TH1 * hPtr, const PXDIntercept * inter) {
362 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
363 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
366 hPtr->Fill(residU, residV);
367 }
368 }
369 )
370 )
371 );
372
373 name = "hResidVm_vs_ResidUm_" + sensorid;
374 title = "V vs U residuals = intercept - digit, for sensor " + sensorid;
375 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
376 tmp2D->GetXaxis()->SetTitle("U* resid (cm)");
377 tmp2D->GetYaxis()->SetTitle("V* resid (cm)");
379 (
380 (Belle2::VxdID)*itPxdSensors,
382 tmp2D,
383 [this](TH1 * hPtr, const PXDIntercept * inter) {
385 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
386 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
389 hPtr->Fill(residU, residV);
390 }
391 }
392 )
393 )
394 );
395
396
397 name = "hResidU_vs_CoorU_" + sensorid;
398 title = "U residual (cm) vs coor U (cm) " + sensorid;
399 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
400 tmp2D->GetYaxis()->SetTitle("U resid (cm)");
401 tmp2D->GetXaxis()->SetTitle("U coor (cm)");
403 (
404 (Belle2::VxdID)*itPxdSensors,
406 tmp2D,
407 [this](TH1 * hPtr, const PXDIntercept * inter) {
409 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
410 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
412 hPtr->Fill(inter->
getCoorU(), resid);
413 }
414 }
415 )
416 )
417 );
418
419 name = "hResidV_vs_CoorV_" + sensorid;
420 title = "V residual (cm) vs coor V (cm) " + sensorid;
421 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
422 tmp2D->GetYaxis()->SetTitle("V resid (cm)");
423 tmp2D->GetXaxis()->SetTitle("V coor (cm)");
425 (
426 (Belle2::VxdID)*itPxdSensors,
428 tmp2D,
429 [this](TH1 * hPtr, const PXDIntercept * inter) {
431 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
432 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
434 hPtr->Fill(inter->
getCoorV(), resid);
435 }
436 }
437 )
438 )
439 );
440
441
442 name = "hResidU_vs_CoorV_" + sensorid;
443 title = "U residual (cm) vs coor V (cm) " + sensorid;
444 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
445 tmp2D->GetYaxis()->SetTitle("U resid (cm)");
446 tmp2D->GetXaxis()->SetTitle("V coor (cm)");
448 (
449 (Belle2::VxdID)*itPxdSensors,
451 tmp2D,
452 [this](TH1 * hPtr, const PXDIntercept * inter) {
454 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
455 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
457 hPtr->Fill(inter->
getCoorV(), resid);
458 }
459 }
460 )
461 )
462 );
463
464 name = "hResidV_vs_CoorU_" + sensorid;
465 title = "V residual (cm) vs coor U (cm) " + sensorid;
466 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
467 tmp2D->GetYaxis()->SetTitle("V resid (cm)");
468 tmp2D->GetXaxis()->SetTitle("U coor (cm)");
470 (
471 (Belle2::VxdID)*itPxdSensors,
473 tmp2D,
474 [this](TH1 * hPtr, const PXDIntercept * inter) {
476 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
477 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
479 hPtr->Fill(inter->
getCoorU(), resid);
480 }
481 }
482 )
483 )
484 );
485
486
487
488
489 name = "hResidU_vs_charge_" + sensorid;
490 title = "U residual (cm) vs charge " + sensorid;
491 tmp2D = new TH2F(name.c_str(), title.c_str(), 250, 0, 250, 100, -5, 5);
492 tmp2D->GetYaxis()->SetTitle("U resid (cm)");
493 tmp2D->GetXaxis()->SetTitle("charge");
495 (
496 (Belle2::VxdID)*itPxdSensors,
498 tmp2D,
499 [this](TH1 * hPtr, const PXDIntercept * inter) {
501 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
502 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
504 hPtr->Fill(it.getCharge(), resid);
505 }
506 }
507 )
508 )
509 );
510
511 name = "hResidV_vs_charge_" + sensorid;
512 title = "V residual (cm) vs charge " + sensorid;
513 tmp2D = new TH2F(name.c_str(), title.c_str(), 250, 0, 250, 100, -5, 5);
514 tmp2D->GetYaxis()->SetTitle("V resid (cm)");
515 tmp2D->GetXaxis()->SetTitle("charge");
517 (
518 (Belle2::VxdID)*itPxdSensors,
520 tmp2D,
521 [this](TH1 * hPtr, const PXDIntercept * inter) {
523 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
524 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
526 hPtr->Fill(it.getCharge(), resid);
527 }
528 }
529 )
530 )
531 );
532
533
534
535 name = "hCoorU_vs_UDigit_" + sensorid;
536 title = "U intercept (cm) vs U Digit (ID) " + sensorid;
537 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
538 tmp2D->GetXaxis()->SetTitle("intercept U coor (cm)");
539 tmp2D->GetYaxis()->SetTitle("digit U coor (cm)");
541 (
542 (Belle2::VxdID)*itPxdSensors,
544 tmp2D,
545 [this](TH1 * hPtr, const PXDIntercept * inter) {
547 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
548 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
550
551 }
552 }
553 )
554 )
555 );
556
557 name = "hCoorV_vs_VDigit_" + sensorid;
558 title = "V intercept (cm) vs V Digit (ID) " + sensorid;
559 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
560 tmp2D->GetXaxis()->SetTitle("intercept V coor (cm)");
561 tmp2D->GetYaxis()->SetTitle("digi V coor (cm)");
563 (
564 (Belle2::VxdID)*itPxdSensors,
566 tmp2D,
567 [this](TH1 * hPtr, const PXDIntercept * inter) {
569 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
570 const VXD::SensorInfoBase& aSensorInfo =
m_aGeometry.getSensorInfo(it.getSensorID());
572
573 }
574 }
575 }
576 )
577 )
578 );
579
580
581
582
584
585
586 name = "hminU_" + sensorid;
587 title = "ROI min in U for sensor " + sensorid;
589 (
590 (Belle2::VxdID)*itPxdSensors,
592 new TH1F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU),
593 [](TH1 * hPtr, const ROIid * roi) { hPtr->Fill(roi->getMinUid()); }
594 )
595 )
596 );
597 name = "hminV_" + sensorid;
598 title = "ROI min in V for sensor " + sensorid;
600 (
601 (Belle2::VxdID)*itPxdSensors,
603 new TH1F(name.c_str(), title.c_str(), nPixelsV, 0, nPixelsV),
604 [](TH1 * hPtr, const ROIid * roi) { hPtr->Fill(roi->getMinVid()); }
605 )
606 )
607 );
608
609
610 name = "hmaxU_" + sensorid;
611 title = "ROI max in U for sensor " + sensorid;
613 (
614 (Belle2::VxdID)*itPxdSensors,
616 new TH1F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU),
617 [](TH1 * hPtr, const ROIid * roi) { hPtr->Fill(roi->getMaxUid()); }
618 )
619 )
620 );
621 name = "hmaxV_" + sensorid;
622 title = "ROI max in V for sensor " + sensorid;
624 (
625 (Belle2::VxdID)*itPxdSensors,
627 new TH1F(name.c_str(), title.c_str(), nPixelsV, 0, nPixelsV),
628 [](TH1 * hPtr, const ROIid * roi) { hPtr->Fill(roi->getMaxVid()); }
629 )
630 )
631 );
632
633
634
635 name = "hwidthU_" + sensorid;
636 title = "ROI width in U for sensor " + sensorid;
638 (
639 (Belle2::VxdID)*itPxdSensors,
641 new TH1F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU),
642 [](TH1 * hPtr, const ROIid * roi) { hPtr->Fill(roi->getMaxUid() - roi->getMinUid()); }
643 )
644 )
645 );
646 name = "hwidthV_" + sensorid;
647 title = "ROI width in V for sensor " + sensorid;
649 (
650 (Belle2::VxdID)*itPxdSensors,
652 new TH1F(name.c_str(), title.c_str(), nPixelsV, 0, nPixelsV),
653 [](TH1 * hPtr, const ROIid * roi) { hPtr->Fill(roi->getMaxVid() - roi->getMinVid()); }
654 )
655 )
656 );
657
658
659 name = "hROIcenter_" + sensorid;
660 title = "ROI center " + sensorid;
661 tmp2D = new TH2F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU, nPixelsV, 0, nPixelsV);
662 tmp2D->GetXaxis()->SetTitle(" U (ID)");
663 tmp2D->GetYaxis()->SetTitle(" V (ID)");
665 (
666 (Belle2::VxdID)*itPxdSensors,
668 tmp2D,
669 [](TH1 * hPtr, const ROIid * roi) { hPtr->Fill((roi->getMaxUid() + roi->getMinUid()) / 2, (roi->getMaxVid() + roi->getMinVid()) / 2); }
670 )
671 )
672 );
673
674
675
676 ++itPxdSensors;
677 }
678 ++itPxdLadders;
679 }
680 ++itPxdLayers;
681 }
682
683}
VXD::GeoCache & m_aGeometry
the geometry
std::pair< TH1 *, std::function< void(TH1 *, const PXDIntercept *) > > InterHistoAndFill
typedef: histograms to be filled once per intercept + filling function
std::pair< TH1 *, std::function< void(TH1 *, const ROIid *) > > ROIHistoAndFill
typedef: histograms to be filled once per roi + filling function
StoreArray< PXDDigit > m_pxdDigits
the PXDDigits dataobjects collection
double getCoorV() const
return the V coordinate of the intercept
VxdID::baseType getSensorID() const
return the sensor ID
double getCoorU() const
return the U coordinate of the intercept
double getVCellPosition(int vID) const
Return the position of a specific strip/pixel in v direction.
double getUCellPosition(int uID, int vID=-1) const
Return the position of a specific strip/pixel in u direction.
int getVCells() const
Return number of pixel/strips in v direction.
int getUCells() const
Return number of pixel/strips in u direction.
struct: histograms to be filled once per event + filling function + accumulate function