Skip to content

Commit 9eda1e2

Browse files
Preet-BhanjanPreet Patialibuild
authored
[PWGCF] Rectification in PID track selection (#12633)
Co-authored-by: Preet Pati <preet@preet-6.local> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 9295aa4 commit 9eda1e2

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

PWGCF/TwoParticleCorrelations/Tasks/pidDiHadron.cxx

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -193,19 +193,19 @@ struct PidDiHadron {
193193

194194
// Event Counter
195195
if (doprocessSame && cfgUseAdditionalEventCut) {
196-
registry.add("hEventCountSpecific", "Number of Event;; Count", {HistType::kTH1D, {{12, 0, 12}}});
197-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(1, "after sel8");
198-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(2, "kNoSameBunchPileup");
199-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(3, "kNoITSROFrameBorder");
200-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(4, "kNoTimeFrameBorder");
201-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(5, "kIsGoodZvtxFT0vsPV");
202-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(6, "kNoCollInTimeRangeStandard");
203-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(7, "kIsGoodITSLayersAll");
204-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(8, "kNoCollInRofStandard");
205-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(9, "kNoHighMultCollInPrevRof");
206-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(10, "occupancy");
207-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(11, "MultCorrelation");
208-
registry.get<TH1>(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(12, "cfgEvSelV0AT0ACut");
196+
registry.add("hEventCount", "Number of Event;; Count", {HistType::kTH1D, {{12, 0, 12}}});
197+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(1, "after sel8");
198+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(2, "kNoSameBunchPileup");
199+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(3, "kNoITSROFrameBorder");
200+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(4, "kNoTimeFrameBorder");
201+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(5, "kIsGoodZvtxFT0vsPV");
202+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(6, "kNoCollInTimeRangeStandard");
203+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(7, "kIsGoodITSLayersAll");
204+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(8, "kNoCollInRofStandard");
205+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(9, "kNoHighMultCollInPrevRof");
206+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(10, "occupancy");
207+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(11, "MultCorrelation");
208+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(12, "cfgEvSelV0AT0ACut");
209209
}
210210

211211
if (cfgUseAdditionalEventCut) {
@@ -311,9 +311,6 @@ struct PidDiHadron {
311311
template <typename TTrack>
312312
bool trackSelected(TTrack track)
313313
{
314-
if (cfgPIDParticle && getNsigmaPID(track) != cfgPIDParticle) {
315-
return false;
316-
}
317314
return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu));
318315
}
319316

@@ -363,6 +360,8 @@ struct PidDiHadron {
363360
for (auto const& track1 : tracks) {
364361
if (!trackSelected(track1))
365362
continue;
363+
if (cfgPIDParticle && getNsigmaPID(track1) != cfgPIDParticle)
364+
continue; // if PID is selected, check if the track has the right PID
366365
if (!getEfficiencyCorrection(weff1, track1.eta(), track1.pt(), vtxz))
367366
continue;
368367
registry.fill(HIST("Phi"), RecoDecay::constrainAngle(track1.phi(), 0.0));
@@ -426,6 +425,8 @@ struct PidDiHadron {
426425

427426
if (!trackSelected(track1))
428427
continue;
428+
if (cfgPIDParticle && getNsigmaPID(track1) != cfgPIDParticle)
429+
continue; // if PID is selected, check if the track has the right PID
429430
if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ))
430431
continue;
431432
if (system == SameEvent) {
@@ -489,61 +490,61 @@ struct PidDiHadron {
489490
template <typename TCollision>
490491
bool eventSelected(TCollision collision, const int multTrk, const float centrality, const bool fillCounter)
491492
{
492-
registry.fill(HIST("hEventCountSpecific"), 0.5);
493+
registry.fill(HIST("hEventCount"), 0.5);
493494
if (cfgEvSelkNoSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) {
494495
// rejects collisions which are associated with the same "found-by-T0" bunch crossing
495496
// https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof
496497
return 0;
497498
}
498499
if (fillCounter && cfgEvSelkNoSameBunchPileup)
499-
registry.fill(HIST("hEventCountSpecific"), 1.5);
500+
registry.fill(HIST("hEventCount"), 1.5);
500501
if (cfgEvSelkNoITSROFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) {
501502
return 0;
502503
}
503504
if (fillCounter && cfgEvSelkNoITSROFrameBorder)
504-
registry.fill(HIST("hEventCountSpecific"), 2.5);
505+
registry.fill(HIST("hEventCount"), 2.5);
505506
if (cfgEvSelkNoTimeFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
506507
return 0;
507508
}
508509
if (fillCounter && cfgEvSelkNoTimeFrameBorder)
509-
registry.fill(HIST("hEventCountSpecific"), 3.5);
510+
registry.fill(HIST("hEventCount"), 3.5);
510511
if (cfgEvSelkIsGoodZvtxFT0vsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) {
511512
// removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference
512513
// use this cut at low multiplicities with caution
513514
return 0;
514515
}
515516
if (fillCounter && cfgEvSelkIsGoodZvtxFT0vsPV)
516-
registry.fill(HIST("hEventCountSpecific"), 4.5);
517+
registry.fill(HIST("hEventCount"), 4.5);
517518
if (cfgEvSelkNoCollInTimeRangeStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
518519
// no collisions in specified time range
519520
return 0;
520521
}
521522
if (fillCounter && cfgEvSelkNoCollInTimeRangeStandard)
522-
registry.fill(HIST("hEventCountSpecific"), 5.5);
523+
registry.fill(HIST("hEventCount"), 5.5);
523524
if (cfgEvSelkIsGoodITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
524525
// from Jan 9 2025 AOT meeting
525526
// cut time intervals with dead ITS staves
526527
return 0;
527528
}
528529
if (fillCounter && cfgEvSelkIsGoodITSLayersAll)
529-
registry.fill(HIST("hEventCountSpecific"), 6.5);
530+
registry.fill(HIST("hEventCount"), 6.5);
530531
if (cfgEvSelkNoCollInRofStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
531532
// no other collisions in this Readout Frame with per-collision multiplicity above threshold
532533
return 0;
533534
}
534535
if (fillCounter && cfgEvSelkNoCollInRofStandard)
535-
registry.fill(HIST("hEventCountSpecific"), 7.5);
536+
registry.fill(HIST("hEventCount"), 7.5);
536537
if (cfgEvSelkNoHighMultCollInPrevRof && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) {
537538
// veto an event if FT0C amplitude in previous ITS ROF is above threshold
538539
return 0;
539540
}
540541
if (fillCounter && cfgEvSelkNoHighMultCollInPrevRof)
541-
registry.fill(HIST("hEventCountSpecific"), 8.5);
542+
registry.fill(HIST("hEventCount"), 8.5);
542543
auto occupancy = collision.trackOccupancyInTimeRange();
543544
if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh))
544545
return 0;
545546
if (fillCounter && cfgEvSelOccupancy)
546-
registry.fill(HIST("hEventCountSpecific"), 9.5);
547+
registry.fill(HIST("hEventCount"), 9.5);
547548

548549
auto multNTracksPV = collision.multNTracksPV();
549550
if (cfgEvSelMultCorrelation) {
@@ -557,14 +558,14 @@ struct PidDiHadron {
557558
return 0;
558559
}
559560
if (fillCounter && cfgEvSelMultCorrelation)
560-
registry.fill(HIST("hEventCountSpecific"), 10.5);
561+
registry.fill(HIST("hEventCount"), 10.5);
561562

562563
// V0A T0A 5 sigma cut
563564
float sigma = 5.0;
564565
if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > sigma * fT0AV0ASigma->Eval(collision.multFT0A())))
565566
return 0;
566567
if (fillCounter && cfgEvSelV0AT0ACut)
567-
registry.fill(HIST("hEventCountSpecific"), 11.5);
568+
registry.fill(HIST("hEventCount"), 11.5);
568569

569570
return 1;
570571
}

0 commit comments

Comments
 (0)