Skip to content

Commit fb8ab99

Browse files
committed
Update
1 parent ec2e0c5 commit fb8ab99

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ALICE3/TableProducer/OTF/onTheFlyTOFPID.cxx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,13 @@ struct OnTheFlyTofPid {
146146
}
147147

148148
if (plotsConfig.doQAplots) {
149+
const AxisSpec axisdNdeta{200, 0.0f, 1000.0f, Form("dN/d#eta in |#eta| < %f", simConfig.multiplicityEtaRange.value)};
150+
151+
histos.add("h1dNdeta", "h2dNdeta", kTH1F, {axisdNdeta});
149152
histos.add("h2dEventTime", "h2dEventTime", kTH2F, {{200, -1000, 1000, "computed"}, {200, -1000, 1000, "generated"}});
150153
histos.add("h1dEventTimegen", "h1dEventTimegen", kTH1F, {{200, -1000, 1000, "generated"}});
151154
histos.add("h1dEventTimerec", "h1dEventTimerec", kTH1F, {{200, -1000, 1000, "computed"}});
152-
histos.add("h1dEventTimeres", "h1dEventTimeres", kTH1F, {{300, 0, 300, "resolution"}});
155+
histos.add("h2dEventTimeres", "h2dEventTimeres", kTH2F, {axisdNdeta, {300, 0, 300, "resolution"}});
153156

154157
const AxisSpec axisMomentum{static_cast<int>(plotsConfig.nBinsP), 0.0f, +10.0f, "#it{p} (GeV/#it{c})"};
155158
const AxisSpec axisMomentumSmall{static_cast<int>(plotsConfig.nBinsP), 0.0f, +1.0f, "#it{p} (GeV/#it{c})"};
@@ -347,6 +350,7 @@ struct OnTheFlyTofPid {
347350
float sum = 0.;
348351
float sumw = 0.;
349352

353+
// Todo: check the different mass hypothesis iteratively
350354
for (const auto& track : tracks) {
351355
auto pdgInfo = pdg->GetParticle(track.mPdgCode);
352356
if (pdgInfo == nullptr) {
@@ -423,7 +427,7 @@ struct OnTheFlyTofPid {
423427

424428
std::array<float, 6> mcPvCov = {0.};
425429
o2::dataformats::VertexBase mcPvVtx({0.0f, 0.0f, 0.0f}, mcPvCov);
426-
const float eventCollisionTimePS = (considerEventTime.value ? collision.collisionTime() * 1e3 : 0.f); // convert ns to ps
430+
const float eventCollisionTimePS = (simConfig.considerEventTime.value ? collision.collisionTime() * 1e3 : 0.f); // convert ns to ps
427431
if (collision.has_mcCollision()) {
428432
auto mcCollision = collision.mcCollision();
429433
mcPvVtx.setX(mcCollision.posX());
@@ -455,6 +459,9 @@ struct OnTheFlyTofPid {
455459
dNdEta += 1.f;
456460
}
457461
}
462+
if (plotsConfig.doQAplots) {
463+
histos.fill(HIST("h1dNdeta"), dNdEta);
464+
}
458465

459466
tracksWithTime.clear(); // clear the vector of tracks with time to prepare the cache for the next event
460467
tracksWithTime.reserve(tracks.size());
@@ -515,7 +522,7 @@ struct OnTheFlyTofPid {
515522
// Now we compute the event time for the tracks
516523

517524
std::array<float, 2> tzero = {0.f, 0.f};
518-
if (considerEventTime.value) {
525+
if (simConfig.considerEventTime.value) {
519526
const bool etStatus = eventTime(tracksWithTime, tzero);
520527
if (!etStatus) {
521528
LOG(warning) << "Event time calculation failed with " << tracksWithTime.size() << " tracks";
@@ -526,7 +533,7 @@ struct OnTheFlyTofPid {
526533
histos.fill(HIST("h2dEventTime"), tzero[0], eventCollisionTimePS);
527534
histos.fill(HIST("h1dEventTimegen"), eventCollisionTimePS);
528535
histos.fill(HIST("h1dEventTimerec"), tzero[0]);
529-
histos.fill(HIST("h1dEventTimeres"), tzero[1]);
536+
histos.fill(HIST("h2dEventTimeres"), dNdEta, tzero[1]);
530537
}
531538

532539
// Then we do a second loop to compute the measured quantities with the measured event time
@@ -541,6 +548,7 @@ struct OnTheFlyTofPid {
541548
const float trackLengthRecoOuterTOF = trkWithTime.mTrackLengthOuterTOF.first;
542549
const float trackLengthInnerTOF = trkWithTime.mTrackLengthInnerTOF.second;
543550
const float trackLengthOuterTOF = trkWithTime.mTrackLengthOuterTOF.second;
551+
// Todo: remove the bias of the track used in the event time calculation for low multiplicity events
544552
const float measuredTimeInnerTOF = trkWithTime.mInnerTOFTime.first - tzero[0];
545553
const float measuredTimeOuterTOF = trkWithTime.mOuterTOFTime.first - tzero[0];
546554
const float momentum = trkWithTime.mMomentum.first;

0 commit comments

Comments
 (0)