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
159 std::set<Belle2::VxdID>::iterator itPxdLadders = pxdLadders.begin();
160
161 while (itPxdLadders != pxdLadders.end()) {
162
164 std::set<Belle2::VxdID>::iterator itPxdSensors = pxdSensors.begin();
165
166 while (itPxdSensors != pxdSensors.end()) {
167
169
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;
185 ROIHistoAccumulateAndFill* aHAAF = new ROIHistoAccumulateAndFill {
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 };
192
193
194
195
196
198
199
200 name = "hCoorU_" + sensorid;
201 title = "U coordinate of the extrapolation in U for sensor " + sensorid;
203 (
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 (
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 (
234 tmp2D,
236 )
237 )
238 );
239
240
241
242 name = "hStatErrU_" + sensorid;
243 title = "stat error of the extrapolation in U for sensor " + sensorid;
245 (
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 (
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 (
273 tmp1D,
276 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
277 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
278 hPtr->Fill(inter->getCoorU() - aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID()));
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 (
292 tmp1D,
295 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
296 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
297 hPtr->Fill(inter->getCoorV() - aSensorInfo.getVCellPosition(it.getVCellID()));
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 (
313 tmp2D,
316 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
317 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
318 double residU = inter->getCoorU() - aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID());
319 double residV = inter->getCoorV() - aSensorInfo.getVCellPosition(it.getVCellID());
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 (
336 tmp2D,
339 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
340 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
341 double residU = inter->getCoorU() - aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID());
342 double residV = inter->getCoorV() + aSensorInfo.getVCellPosition(it.getVCellID());
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 (
359 tmp2D,
362 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
363 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
364 double residU = inter->getCoorU() + aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID());
365 double residV = inter->getCoorV() - aSensorInfo.getVCellPosition(it.getVCellID());
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 (
382 tmp2D,
385 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
386 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
387 double residU = inter->getCoorU() + aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID());
388 double residV = inter->getCoorV() + aSensorInfo.getVCellPosition(it.getVCellID());
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 (
406 tmp2D,
409 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
410 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
411 double resid = inter->getCoorU() - aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID());
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 (
428 tmp2D,
431 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
432 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
433 double resid = inter->getCoorV() - aSensorInfo.getVCellPosition(it.getVCellID());
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 (
451 tmp2D,
454 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
455 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
456 double resid = inter->getCoorU() - aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID());
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 (
473 tmp2D,
476 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
477 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
478 double resid = inter->getCoorV() - aSensorInfo.getVCellPosition(it.getVCellID());
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 (
498 tmp2D,
501 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
502 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
503 double resid = inter->getCoorU() - aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID());
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 (
520 tmp2D,
523 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
524 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
525 double resid = inter->getCoorV() - aSensorInfo.getVCellPosition(it.getVCellID());
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 (
544 tmp2D,
547 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
548 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
549 hPtr->Fill(inter->getCoorU(), aSensorInfo.getUCellPosition(it.getUCellID(), it.getVCellID()));
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 (
566 tmp2D,
569 if ((
int)it.getSensorID() == (
int)inter->
getSensorID()) {
570 const VXD::SensorInfoBase& aSensorInfo = m_aGeometry.getSensorInfo(it.getSensorID());
571 hPtr->Fill(inter->getCoorV(), aSensorInfo.getVCellPosition(it.getVCellID()));
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 (
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 (
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 (
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 (
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 (
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 (
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 (
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}
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
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
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
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.