173{
174
175
176
177 std::string name;
178 std::string title;
179 TH2F* tmp2D;
180 TH1F* tmp1D;
181
183
185 std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
186
189 svdLayers.clear();
191 itSvdLayers = svdLayers.begin();
192 } else {
193 B2INFO(
"No specific SVD layer (3,4,5,6) selected (m_specificLayer = " <<
m_specificLayer <<
194 "). Producing plots for all SVD layers.");
195 }
196
197 while (itSvdLayers != svdLayers.end()) {
198
200 std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
201
202 while (itSvdLadders != svdLadders.end()) {
203
205 std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
206
207 while (itSvdSensors != svdSensors.end()) {
208
210
212
213 const int nPixelsU = wSensorInfo.
getUCells();
214 const int nPixelsV = wSensorInfo.
getVCells();
215 std::string sensorid = std::to_string(itSvdSensors->getLayerNumber()) + "_" + std::to_string(
216 itSvdSensors->getLadderNumber()) + "_" +
217 std::to_string(itSvdSensors->getSensorNumber());
218
219
220
222
223 name = "hNROIs_" + sensorid;
224 title = "number of ROIs for sensor " + sensorid;
225 double value = 0;
226 ROIHistoAccumulateAndFill* aHAAF = new ROIHistoAccumulateAndFill {
227 new TH1F(name.c_str(), title.c_str(), 25, 0, 25),
228 [](
const ROIid*,
double & val) {val++;},
229 [](TH1 * hPtr, double & val) { hPtr->Fill(val); },
230 value
231 };
233
234
235
236
237
239
240
241 name = "hCoorU_" + sensorid;
242 title = "U coordinate of the extrapolation in U for sensor " + sensorid;
244 (
247 new TH1F(name.c_str(), title.c_str(), 100, -5, 5),
248 [](TH1 * hPtr,
const SVDIntercept * inter) { hPtr->Fill(inter->getCoorU()); }
249 )
250 )
251 );
252
253 name = "hCoorV_" + sensorid;
254 title = "V coordinate of the extrapolation in V for sensor " + sensorid;
256 (
259 new TH1F(name.c_str(), title.c_str(), 100, -5, 5),
260 [](TH1 * hPtr,
const SVDIntercept * inter) { hPtr->Fill(inter->getCoorV()); }
261 )
262 )
263 );
264
265
266 name = "hCoorU_vs_CoorV_" + sensorid;
267 title = "U vs V intercept (cm) " + sensorid;
268 tmp2D = new TH2F(name.c_str(), title.c_str(), 100, -5, 5, 100, -5, 5);
269 tmp2D->GetXaxis()->SetTitle("intercept U coor (cm)");
270 tmp2D->GetYaxis()->SetTitle("intercept V coor (cm)");
272 (
275 tmp2D,
277 )
278 )
279 );
280
281
282
283 name = "hStatErrU_" + sensorid;
284 title = "stat error of the extrapolation in U for sensor " + sensorid;
286 (
289 new TH1F(name.c_str(), title.c_str(), 100, 0, 0.35),
290 [](TH1 * hPtr,
const SVDIntercept * inter) { hPtr->Fill(inter->getSigmaU()); }
291 )
292 )
293 );
294 name = "hStatErrV_" + sensorid;
295 title = "stat error of the extrapolation in V for sensor " + sensorid;
297 (
300 new TH1F(name.c_str(), title.c_str(), 100, 0, 0.35),
301 [](TH1 * hPtr,
const SVDIntercept * inter) { hPtr->Fill(inter->getSigmaV()); }
302 )
303 )
304 );
305
306
307 name = "hResidU_" + sensorid;
308 title = "U residuals = intercept - digit, for sensor " + sensorid;
309 tmp1D = new TH1F(name.c_str(), title.c_str(), 1000, -5, 5);
311 (
314 tmp1D,
316
318 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
319 if (it.isUStrip()) {
320 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
321 hPtr->Fill(inter->getCoorU() - aSensorInfo.getUCellPosition(it.getCellID()));
322 }
323 }
324 }
325 )
326 )
327 );
328
329 name = "hResidV_" + sensorid;
330 title = "V residuals = intercept - digit, for sensor " + sensorid;
331 tmp1D = new TH1F(name.c_str(), title.c_str(), 1000, -5, 5);
333 (
336 tmp1D,
338
339 for (auto& it : this->m_SVDShaperDigits)
340 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
341 if (!it.isUStrip()) {
342 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
343 hPtr->Fill(inter->getCoorV() - aSensorInfo.getVCellPosition(it.getCellID()));
344 }
345 }
346 }
347 )
348 )
349 );
350
351
352
353 name = "hResidU_vs_CoorU_" + sensorid;
354 title = "U residual (cm) vs coor U (cm) " + sensorid;
355 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
356 tmp2D->GetYaxis()->SetTitle("U resid (cm)");
357 tmp2D->GetXaxis()->SetTitle("U coor (cm)");
359 (
362 tmp2D,
364
365 for (auto& it : this->m_SVDShaperDigits)
366 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && it.isUStrip()) {
367 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
368 double resid = inter->getCoorU() - aSensorInfo.getUCellPosition(it.getCellID());
369 hPtr->Fill(inter->getCoorU(), resid);
370 }
371 }
372 )
373 )
374 );
375
376 name = "hResidV_vs_CoorV_" + sensorid;
377 title = "V residual (cm) vs coor V (cm) " + sensorid;
378 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
379 tmp2D->GetYaxis()->SetTitle("V resid (cm)");
380 tmp2D->GetXaxis()->SetTitle("V coor (cm)");
382 (
385 tmp2D,
387
388 for (auto& it : this->m_SVDShaperDigits)
389 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (!it.isUStrip())) {
390 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
391 double resid = inter->getCoorV() - aSensorInfo.getVCellPosition(it.getCellID());
392 hPtr->Fill(inter->getCoorV(), resid);
393 }
394 }
395 )
396 )
397 );
398
399
400
401
403 name = "hResidU_vs_charge_" + sensorid;
404 title = "U residual (cm) vs charge " + sensorid;
405 tmp2D = new TH2F(name.c_str(), title.c_str(), 250, 0, 250, 100, -5, 5);
406 tmp2D->GetYaxis()->SetTitle("U resid (cm)");
407 tmp2D->GetXaxis()->SetTitle("charge");
409 (
412 tmp2D,
414
416 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (it.isUStrip())) {
417 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
418 double resid = inter->getCoorU() - aSensorInfo.getUCellPosition(it.getCellID());
419 hPtr->Fill(it.getCharge(), resid);
420 }
421 }
422 )
423 )
424 );
425
426 name = "hResidV_vs_charge_" + sensorid;
427 title = "V residual (cm) vs charge " + sensorid;
428 tmp2D = new TH2F(name.c_str(), title.c_str(), 250, 0, 250, 100, -5, 5);
429 tmp2D->GetYaxis()->SetTitle("V resid (cm)");
430 tmp2D->GetXaxis()->SetTitle("charge");
432 (
435 tmp2D,
437
438 for (auto& it : this->m_SVDRecoDigits)
439 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (!it.isUStrip())) {
440 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
441 double resid = inter->getCoorV() - aSensorInfo.getVCellPosition(it.getCellID());
442 hPtr->Fill(it.getCharge(), resid);
443 }
444 }
445 )
446 )
447 );
448 }
449
450
451 name = "hClusterResidU_" + sensorid;
452 title = "Cluster U residuals = intercept - cluster, for sensor " + sensorid;
453 tmp1D = new TH1F(name.c_str(), title.c_str(), 1000, -5, 5);
455 (
458 tmp1D,
460
462 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
463 if (it.isUCluster()) {
464 hPtr->Fill(inter->getCoorU() - it.getPosition(inter->getCoorV()));
465 }
466 }
467 }
468 )
469 )
470 );
471
472 name = "hClusterResidV_" + sensorid;
473 title = "Cluster V residuals = intercept - cluster, for sensor " + sensorid;
474 tmp1D = new TH1F(name.c_str(), title.c_str(), 1000, -5, 5);
476 (
479 tmp1D,
481
482 for (auto& it : this->m_SVDClusters)
483 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
484 if (!it.isUCluster()) {
485 hPtr->Fill(inter->getCoorV() - it.getPosition());
486 }
487 }
488 }
489 )
490 )
491 );
492
493
494 name = "hClusterResidU_vs_CoorU_" + sensorid;
495 title = "Cluster U residual (cm) vs coor U (cm) " + sensorid;
496 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
497 tmp2D->GetYaxis()->SetTitle("Cluster U resid (cm)");
498 tmp2D->GetXaxis()->SetTitle("U coor (cm)");
500 (
503 tmp2D,
505
506 for (auto& it : this->m_SVDClusters)
507 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && it.isUCluster()) {
508 double resid = inter->getCoorU() - it.getPosition(inter->getCoorV());
509 hPtr->Fill(inter->getCoorU(), resid);
510 }
511 }
512 )
513 )
514 );
515
516 name = "hClusterResidV_vs_CoorV_" + sensorid;
517 title = "Cluster V residual (cm) vs coor V (cm) " + sensorid;
518 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
519 tmp2D->GetYaxis()->SetTitle("Cluster V resid (cm)");
520 tmp2D->GetXaxis()->SetTitle("V coor (cm)");
522 (
525 tmp2D,
527
528 for (auto& it : this->m_SVDClusters)
529 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (!it.isUCluster())) {
530 double resid = inter->getCoorV() - it.getPosition();
531 hPtr->Fill(inter->getCoorV(), resid);
532 }
533 }
534 )
535 )
536 );
537
538
539
540 name = "hClusterResidU_vs_charge_" + sensorid;
541 title = "Cluster U residual (cm) vs charge " + sensorid;
542 tmp2D = new TH2F(name.c_str(), title.c_str(), 250, 0, 250, 100, -5, 5);
543 tmp2D->GetYaxis()->SetTitle("U resid (cm)");
544 tmp2D->GetXaxis()->SetTitle("charge (ke-)");
546 (
549 tmp2D,
551
552 for (auto& it : this->m_SVDClusters)
553 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (it.isUCluster())) {
554 double resid = inter->getCoorU() - it.getPosition(inter->getCoorV());
555 hPtr->Fill(it.getCharge() / 1000., resid);
556 }
557 }
558 )
559 )
560 );
561
562 name = "hClusterResidV_vs_charge_" + sensorid;
563 title = "Cluster V residual (cm) vs charge " + sensorid;
564 tmp2D = new TH2F(name.c_str(), title.c_str(), 250, 0, 250, 100, -5, 5);
565 tmp2D->GetYaxis()->SetTitle("Cluster V resid (cm)");
566 tmp2D->GetXaxis()->SetTitle("charge (ke-)");
568 (
571 tmp2D,
573
574 for (auto& it : this->m_SVDClusters)
575 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (!it.isUCluster())) {
576 double resid = inter->getCoorV() - it.getPosition();
577 hPtr->Fill(it.getCharge() / 1000., resid);
578 }
579 }
580 )
581 )
582 );
583
584
585 name = "hClusterResidU_vs_time_" + sensorid;
586 title = "Cluster U residual (cm) vs time " + sensorid;
587 tmp2D = new TH2F(name.c_str(), title.c_str(), 400, -200, 200, 100, -5, 5);
588 tmp2D->GetYaxis()->SetTitle("U resid (cm)");
589 tmp2D->GetXaxis()->SetTitle("time (ns)");
591 (
594 tmp2D,
596
597 for (auto& it : this->m_SVDClusters)
598 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (it.isUCluster())) {
599 double resid = inter->getCoorU() - it.getPosition(inter->getCoorV());
600 hPtr->Fill(it.getClsTime(), resid);
601 }
602 }
603 )
604 )
605 );
606
607 name = "hClusterResidV_vs_time_" + sensorid;
608 title = "Cluster V residual (cm) vs time " + sensorid;
609 tmp2D = new TH2F(name.c_str(), title.c_str(), 400, -200, 200, 100, -5, 5);
610 tmp2D->GetYaxis()->SetTitle("Cluster V resid (cm)");
611 tmp2D->GetXaxis()->SetTitle("time (ns)");
613 (
616 tmp2D,
618
619 for (auto& it : this->m_SVDClusters)
620 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (!it.isUCluster())) {
621 double resid = inter->getCoorV() - it.getPosition();
622 hPtr->Fill(it.getClsTime(), resid);
623 }
624 }
625 )
626 )
627 );
628
629
630 name = "hCoorU_vs_UDigit_" + sensorid;
631 title = "U intercept (cm) vs U Digit (ID) " + sensorid;
632 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
633 tmp2D->GetXaxis()->SetTitle("intercept U coor (cm)");
634 tmp2D->GetYaxis()->SetTitle("digit U coor (cm)");
636 (
639 tmp2D,
641
642 for (auto& it : this->m_SVDShaperDigits)
643 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (it.isUStrip())) {
644 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
645 hPtr->Fill(inter->getCoorU(), aSensorInfo.getUCellPosition(it.getCellID()));
646
647 }
648 }
649 )
650 )
651 );
652
653 name = "hCoorV_vs_VDigit_" + sensorid;
654 title = "V intercept (cm) vs V Digit (ID) " + sensorid;
655 tmp2D = new TH2F(name.c_str(), title.c_str(), 1000, -5, 5, 1000, -5, 5);
656 tmp2D->GetXaxis()->SetTitle("intercept V coor (cm)");
657 tmp2D->GetYaxis()->SetTitle("digi V coor (cm)");
659 (
662 tmp2D,
664
665 for (auto& it : this->m_SVDShaperDigits) {
666 if (((
int)it.getSensorID() == (
int)inter->
getSensorID()) && (!it.isUStrip())) {
667 const VXD::SensorInfoBase& aSensorInfo = m_geoCache.getSensorInfo(it.getSensorID());
668 hPtr->Fill(inter->getCoorV(), aSensorInfo.getVCellPosition(it.getCellID()));
669
670 }
671 }
672 }
673 )
674 )
675 );
676
677
678
679
680
681
682
684
685
686 name = "hminU_" + sensorid;
687 title = "ROI min in U for sensor " + sensorid;
689 (
692 new TH1F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU),
693 [](TH1 * hPtr,
const ROIid * roi) { hPtr->Fill(roi->getMinUid()); }
694 )
695 )
696 );
697 name = "hminV_" + sensorid;
698 title = "ROI min in V for sensor " + sensorid;
700 (
703 new TH1F(name.c_str(), title.c_str(), nPixelsV, 0, nPixelsV),
704 [](TH1 * hPtr,
const ROIid * roi) { hPtr->Fill(roi->getMinVid()); }
705 )
706 )
707 );
708
709
710 name = "hmaxU_" + sensorid;
711 title = "ROI max in U for sensor " + sensorid;
713 (
716 new TH1F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU),
717 [](TH1 * hPtr,
const ROIid * roi) { hPtr->Fill(roi->getMaxUid()); }
718 )
719 )
720 );
721 name = "hmaxV_" + sensorid;
722 title = "ROI max in V for sensor " + sensorid;
724 (
727 new TH1F(name.c_str(), title.c_str(), nPixelsV, 0, nPixelsV),
728 [](TH1 * hPtr,
const ROIid * roi) { hPtr->Fill(roi->getMaxVid()); }
729 )
730 )
731 );
732
733
734
735 name = "hwidthU_" + sensorid;
736 title = "ROI width in U for sensor " + sensorid;
738 (
741 new TH1F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU),
742 [](TH1 * hPtr,
const ROIid * roi) { hPtr->Fill(roi->getMaxUid() - roi->getMinUid()); }
743 )
744 )
745 );
746 name = "hwidthV_" + sensorid;
747 title = "ROI width in V for sensor " + sensorid;
749 (
752 new TH1F(name.c_str(), title.c_str(), nPixelsV, 0, nPixelsV),
753 [](TH1 * hPtr,
const ROIid * roi) { hPtr->Fill(roi->getMaxVid() - roi->getMinVid()); }
754 )
755 )
756 );
757
758
759 name = "hROIcenter_" + sensorid;
760 title = "ROI center " + sensorid;
761 tmp2D = new TH2F(name.c_str(), title.c_str(), nPixelsU, 0, nPixelsU, nPixelsV, 0, nPixelsV);
762 tmp2D->GetXaxis()->SetTitle(" U (ID)");
763 tmp2D->GetYaxis()->SetTitle(" V (ID)");
765 (
768 tmp2D,
769 [](TH1 * hPtr,
const ROIid * roi) { hPtr->Fill((roi->getMaxUid() + roi->getMinUid()) / 2, (roi->getMaxVid() + roi->getMinVid()) / 2); }
770 )
771 )
772 );
773
774
775
776 ++itSvdSensors;
777 }
778 ++itSvdLadders;
779 }
780 ++itSvdLayers;
781 }
782
783}
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
SVDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an SVD ...
std::pair< TH1 *, std::function< void(TH1 *, const SVDIntercept *) > > InterHistoAndFill
typedef: histograms to be filled once per intercept + filling function
StoreArray< SVDCluster > m_SVDClusters
svd cluster store array
VXD::GeoCache & m_geoCache
the geo cache instance
std::pair< TH1 *, std::function< void(TH1 *, const ROIid *) > > ROIHistoAndFill
typedef: histograms to be filled once per roi + filling function
StoreArray< SVDShaperDigit > m_SVDShaperDigits
shaper digit store array
StoreArray< SVDRecoDigit > m_SVDRecoDigits
reco digit store array
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
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
Base class to provide Sensor Information for PXD and SVD.
int getVCells() const
Return number of pixel/strips in v direction.
int getUCells() const
Return number of pixel/strips in u direction.