Skip to content

Commit 25ec3a8

Browse files
committed
Update
1 parent 8838044 commit 25ec3a8

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

ALICE3/DataModel/OTFTOF.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ DECLARE_SOA_COLUMN(InnerTOFTrackLength, innerTOFTrackLength, float); //! track l
3232
DECLARE_SOA_COLUMN(OuterTOFTrackTime, outerTOFTrackTime, float); //! Track time generated at the OuterTOF
3333
DECLARE_SOA_COLUMN(OuterTOFTrackLength, outerTOFTrackLength, float); //! track length for calculation of OuterTOF (generated)
3434

35+
DECLARE_SOA_COLUMN(TOFEventTime, tofEventTime, float); //! Event time reconstructed with the TOF
36+
DECLARE_SOA_COLUMN(TOFEventTimeErr, tofEventTimeErr, float); //! Uncertainty on the event time reconstructed with the TOF
3537
DECLARE_SOA_COLUMN(NSigmaElectronInnerTOF, nSigmaElectronInnerTOF, float); //! NSigma electron InnerTOF
3638
DECLARE_SOA_COLUMN(NSigmaMuonInnerTOF, nSigmaMuonInnerTOF, float); //! NSigma muon InnerTOF
3739
DECLARE_SOA_COLUMN(NSigmaPionInnerTOF, nSigmaPionInnerTOF, float); //! NSigma pion InnerTOF
@@ -55,6 +57,8 @@ DECLARE_SOA_TABLE(UpgradeTofMCs, "AOD", "UPGRADETOFMC",
5557
upgrade_tof::OuterTOFTrackLength);
5658

5759
DECLARE_SOA_TABLE(UpgradeTofs, "AOD", "UPGRADETOF",
60+
upgrade_tof::TOFEventTime,
61+
upgrade_tof::TOFEventTimeErr,
5862
upgrade_tof::NSigmaElectronInnerTOF,
5963
upgrade_tof::NSigmaMuonInnerTOF,
6064
upgrade_tof::NSigmaPionInnerTOF,

ALICE3/TableProducer/OTF/onTheFlyTOFPID.cxx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ struct OnTheFlyTOFPID {
150150

151151
if (plotsConfig.doQAplots) {
152152
histos.add("h2dEventTime", "h2dEventTime", kTH2F, {{200, -1000, 1000, "computed"}, {200, -1000, 1000, "generated"}});
153-
histos.add("h2dEventTimegen", "h2dEventTimegen", kTH1F, {{200, -1000, 1000, "generated"}});
154-
histos.add("h2dEventTimerec", "h2dEventTimerec", kTH1F, {{200, -1000, 1000, "computed"}});
153+
histos.add("h1dEventTimegen", "h1dEventTimegen", kTH1F, {{200, -1000, 1000, "generated"}});
154+
histos.add("h1dEventTimerec", "h1dEventTimerec", kTH1F, {{200, -1000, 1000, "computed"}});
155+
histos.add("h1dEventTimeres", "h1dEventTimeres", kTH1F, {{300, 0, 300, "resolution"}});
155156

156157
const AxisSpec axisMomentum{static_cast<int>(plotsConfig.nBinsP), 0.0f, +10.0f, "#it{p} (GeV/#it{c})"};
157158
const AxisSpec axisMomentumSmall{static_cast<int>(plotsConfig.nBinsP), 0.0f, +1.0f, "#it{p} (GeV/#it{c})"};
@@ -524,8 +525,9 @@ struct OnTheFlyTOFPID {
524525

525526
if (plotsConfig.doQAplots) {
526527
histos.fill(HIST("h2dEventTime"), tzero[0], eventCollisionTimePS);
527-
histos.fill(HIST("h2dEventTimegen"), eventCollisionTimePS);
528-
histos.fill(HIST("h2dEventTimerec"), tzero[0]);
528+
histos.fill(HIST("h1dEventTimegen"), eventCollisionTimePS);
529+
histos.fill(HIST("h1dEventTimerec"), tzero[0]);
530+
histos.fill(HIST("h1dEventTimeres"), tzero[1]);
529531
}
530532

531533
// Then we do a second loop to compute the measured quantities with the measured event time
@@ -657,9 +659,9 @@ struct OnTheFlyTOFPID {
657659
// and not the tracking itself. It's *probably* a fair assumption
658660
// but it should be tested further! --> FIXED IN THIS VERSION
659661
if (trackLengthInnerTOF > 0 && trackLengthRecoInnerTOF > 0)
660-
nSigmaInnerTOF[ii] = deltaTimeInnerTOF[ii] / innerTotalTimeReso;
662+
nSigmaInnerTOF[ii] = deltaTimeInnerTOF[ii] / std::sqrt(innerTotalTimeReso * innerTotalTimeReso + tzero[1] * tzero[1]);
661663
if (trackLengthOuterTOF > 0 && trackLengthRecoOuterTOF > 0)
662-
nSigmaOuterTOF[ii] = deltaTimeOuterTOF[ii] / outerTotalTimeReso;
664+
nSigmaOuterTOF[ii] = deltaTimeOuterTOF[ii] / std::sqrt(outerTotalTimeReso * outerTotalTimeReso + tzero[1] * tzero[1]);
663665
}
664666

665667
if (plotsConfig.doQAplots) {
@@ -762,7 +764,8 @@ struct OnTheFlyTOFPID {
762764
}
763765

764766
// Sigmas have been fully calculated. Please populate the NSigma helper table (once per track)
765-
upgradeTof(nSigmaInnerTOF[0], nSigmaInnerTOF[1], nSigmaInnerTOF[2], nSigmaInnerTOF[3], nSigmaInnerTOF[4],
767+
upgradeTof(tzero[0], tzero[1],
768+
nSigmaInnerTOF[0], nSigmaInnerTOF[1], nSigmaInnerTOF[2], nSigmaInnerTOF[3], nSigmaInnerTOF[4],
766769
measuredTimeInnerTOF, trackLengthRecoInnerTOF,
767770
nSigmaOuterTOF[0], nSigmaOuterTOF[1], nSigmaOuterTOF[2], nSigmaOuterTOF[3], nSigmaOuterTOF[4],
768771
measuredTimeOuterTOF, trackLengthRecoOuterTOF);

0 commit comments

Comments
 (0)