Skip to content

Commit 1786c8f

Browse files
remove unnecessary plot
1 parent 4897009 commit 1786c8f

1 file changed

Lines changed: 12 additions & 21 deletions

File tree

‎Detectors/Upgrades/ALICE3/IOTOF/macros/CheckTimeResolutionIOTOF.C‎

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void drawTimeSpectra(TCanvas* canv, std::array<std::array<TH1F*, kNEtaRegions>,
216216

217217
void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::string hitfile = "o2sim_HitsTF3.root", std::string kinefile = "o2sim_Kine.root",
218218
std::string inputGeom = "o2sim_geometry.root", std::string collContextFile = "collisioncontext.root",
219-
int pdgSel = 211, float ptMin = 1.f, float ptMax = 10.f, float etaCut = 0.5f,
219+
int pdgSel = 211, float ptMin = 1.f, float ptMax = 10.f, float etaCut = 0.5f, float dtMaxPs = 1e4f,
220220
std::string cfgStr = "IOTOFBase.segmentedInnerTOF=true;IOTOFBase.segmentedOuterTOF=true;IOTOFBase.enableForwardTOF=false;IOTOFBase.enableBackwardTOF=false;")
221221
{
222222
gStyle->SetPalette(55);
@@ -261,7 +261,7 @@ void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::stri
261261

262262
std::array<TH1F*, kNLayers> hTTrue, hTDig, hDt;
263263
std::array<TH2F*, kNLayers> hTDigVsTTrue, hDtVsTTrue, hDtVsXLoc, hDtVsZLoc, hDtVsZGlo;
264-
std::array<TProfile2D*, kNLayers> pDtChip, pDtInPixel;
264+
std::array<TProfile2D*, kNLayers> pDtInPixel;
265265
std::array<std::array<TH1F*, kNEtaRegions>, kNLayers> hTdcSpectrumDig, hTdcSpectrumTrue;
266266
for (int il = 0; il < kNLayers; ++il) {
267267
const char* ln = kLayerName[il];
@@ -278,8 +278,6 @@ void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::stri
278278
100, -halfSizeCol, halfSizeCol, 200, -dtRangePs, dtRangePs);
279279
hDtVsZGlo[il] = new TH2F(Form("h_dt_vs_zGlo_%s", ln), Form("%s: time residual vs global z;z_{global} of the pixel (cm);t_{digit} - t_{true} (ps);Digits", ln),
280280
200, -400, 400, 200, -dtRangePs, dtRangePs);
281-
pDtChip[il] = new TProfile2D(Form("p_dt_vs_chip_%s", ln), Form("%s: mean time residual vs position in the chip;x_{local} of the pixel (cm);z_{local} of the pixel (cm);#LTt_{digit} - t_{true}#GT (ps)", ln),
282-
50, -halfSizeRow, halfSizeRow, 50, -halfSizeCol, halfSizeCol, "s");
283281
pDtInPixel[il] = new TProfile2D(Form("p_dt_vs_inpixel_%s", ln), Form("%s: mean time residual vs position in the pixel;x_{hit} - x_{pixel} (#mum);z_{hit} - z_{pixel} (#mum);#LTt_{digit} - t_{true}#GT (ps)", ln),
284282
40, -halfPitchRowUm, halfPitchRowUm, 40, -halfPitchColUm, halfPitchColUm, "s");
285283
for (int ie = 0; ie < kNEtaRegions; ++ie) {
@@ -361,7 +359,7 @@ void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::stri
361359
o2::dataformats::ConstMCTruthContainer<o2::MCCompLabel> labels;
362360
plabelsArr->copyandflatten(labels);
363361

364-
int nNoHit = 0, nNoCollision = 0;
362+
int nNoHit = 0, nNoCollision = 0, nOutliers = 0;
365363
std::array<double, kNLayers> sumRadius{0., 0.};
366364
std::array<long, kNLayers> nRadius{0, 0};
367365

@@ -450,6 +448,12 @@ void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::stri
450448
eta, pt, float(pdg), float(tTrueNS), float(tDigNS), dtPs};
451449
nt->Fill(ntVars);
452450

451+
// Reject digits with an unphysical residual (e.g. a corrupted digit time): kept in the ntuple, excluded from the histograms
452+
if (std::abs(dtPs) > dtMaxPs) {
453+
nOutliers++;
454+
continue;
455+
}
456+
453457
hTTrue[subDetID]->Fill(tTrueNS);
454458
hTDig[subDetID]->Fill(tDigNS);
455459
hTDigVsTTrue[subDetID]->Fill(tTrueNS, tDigNS);
@@ -458,7 +462,6 @@ void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::stri
458462
hDtVsXLoc[subDetID]->Fill(xD, dtPs);
459463
hDtVsZLoc[subDetID]->Fill(zD, dtPs);
460464
hDtVsZGlo[subDetID]->Fill(gloD.Z(), dtPs);
461-
pDtChip[subDetID]->Fill(xD, zD, dtPs);
462465
pDtInPixel[subDetID]->Fill(dxPixUm, dzPixUm, dtPs);
463466
sumRadius[subDetID] += radius;
464467
nRadius[subDetID]++;
@@ -476,8 +479,9 @@ void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::stri
476479

477480
} // end loop on ROFRecords
478481

479-
if (nNoHit || nNoCollision) {
480-
Warning("CheckTimeResolutionIOTOF", "Skipped digits: %d without matching hit, %d without matching collision", nNoHit, nNoCollision);
482+
if (nNoHit || nNoCollision || nOutliers) {
483+
Warning("CheckTimeResolutionIOTOF", "Skipped digits: %d without matching hit, %d without matching collision, %d with |dt| > %g ps",
484+
nNoHit, nNoCollision, nOutliers, dtMaxPs);
481485
}
482486

483487
// Arrival time of a beta = 1 particle at eta = 0, in TDC units
@@ -530,19 +534,6 @@ void CheckTimeResolutionIOTOF(std::string digifile = "tf3digits.root", std::stri
530534
}
531535
closePdf(pdfDt);
532536

533-
// Time residual as a function of the position in the chip
534-
const char* pdfChip = "tf3digits_dt_vs_chip_position.pdf";
535-
openPdf(pdfChip);
536-
for (int il = 0; il < kNLayers; ++il) {
537-
printPage(canv, pdfChip, hDtVsXLoc[il], "colz");
538-
printPage(canv, pdfChip, hDtVsZLoc[il], "colz");
539-
printPage(canv, pdfChip, pDtChip[il], "colz");
540-
auto hSpread = profileToSpread(pDtChip[il], Form("h_sigmadt_vs_chip_%s", kLayerName[il]),
541-
Form("%s: RMS of the time residual vs position in the chip;x_{local} of the pixel (cm);z_{local} of the pixel (cm);RMS(t_{digit} - t_{true}) (ps)", kLayerName[il]));
542-
printPage(canv, pdfChip, hSpread, "colz");
543-
}
544-
closePdf(pdfChip);
545-
546537
// Time residual as a function of the position inside the pixel
547538
const char* pdfInPixel = "tf3digits_dt_inpixel.pdf";
548539
openPdf(pdfInPixel);

0 commit comments

Comments
 (0)