Skip to content

Commit ed04ce9

Browse files
authored
PWGEM/PhotonMeson: implement prefilter for dielectron (#3982)
1 parent 8638b23 commit ed04ce9

17 files changed

+468
-52
lines changed

PWGEM/PhotonMeson/Core/CutsLibrary.cxx

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,59 @@ DalitzEECut* o2::aod::dalitzeecuts::GetCut(const char* cutName)
226226
DalitzEECut* cut = new DalitzEECut(cutName, cutName);
227227
std::string nameStr = cutName;
228228

229+
if (!nameStr.compare("mee_all_tpchadrejortofreq_wo_phiv_lowB")) {
230+
// for pair
231+
232+
// for track
233+
cut->SetTrackPtRange(0.05f, 1e10f);
234+
cut->SetTrackEtaRange(-0.9, +0.9);
235+
cut->SetMinNCrossedRowsTPC(80);
236+
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
237+
cut->SetChi2PerClusterTPC(0.0, 4.0);
238+
cut->SetChi2PerClusterITS(0.0, 5.0);
239+
cut->SetNClustersITS(4, 7);
240+
cut->SetMaxDcaXY(1.0);
241+
cut->SetMaxDcaZ(1.0);
242+
243+
// for PID
244+
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq_lowB);
245+
cut->SetTOFbetaRange(true, 0.0, 0.95);
246+
cut->SetTPCNsigmaElRange(-2, +3);
247+
cut->SetTOFNsigmaElRange(-3, +3);
248+
cut->SetTPCNsigmaMuRange(-2, +2);
249+
cut->SetTPCNsigmaPiRange(-3, +3);
250+
cut->SetTPCNsigmaKaRange(-3, +3);
251+
cut->SetTPCNsigmaPrRange(-3, +3);
252+
cut->SetMuonExclusionTPC(true);
253+
return cut;
254+
}
255+
if (!nameStr.compare("mee_all_tpchadrejortofreq_wpf_lowB")) {
256+
// for pair
257+
cut->ApplyPrefilter(true);
258+
259+
// for track
260+
cut->SetTrackPtRange(0.05f, 1e10f);
261+
cut->SetTrackEtaRange(-0.9, +0.9);
262+
cut->SetMinNCrossedRowsTPC(80);
263+
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
264+
cut->SetChi2PerClusterTPC(0.0, 4.0);
265+
cut->SetChi2PerClusterITS(0.0, 5.0);
266+
cut->SetNClustersITS(4, 7);
267+
cut->SetMaxDcaXY(1.0);
268+
cut->SetMaxDcaZ(1.0);
269+
270+
// for PID
271+
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq_lowB);
272+
cut->SetTOFbetaRange(true, 0.0, 0.95);
273+
cut->SetTPCNsigmaElRange(-2, +3);
274+
cut->SetTOFNsigmaElRange(-3, +3);
275+
cut->SetTPCNsigmaMuRange(-2, +2);
276+
cut->SetTPCNsigmaPiRange(-3, +3);
277+
cut->SetTPCNsigmaKaRange(-3, +3);
278+
cut->SetTPCNsigmaPrRange(-3, +3);
279+
cut->SetMuonExclusionTPC(true);
280+
return cut;
281+
}
229282
if (!nameStr.compare("mee_all_tpchadrejortofreq_lowB")) {
230283
// for pair
231284
cut->SetMaxPhivPairMeeDep([](float mee) {
@@ -429,6 +482,29 @@ DalitzEECut* o2::aod::dalitzeecuts::GetCut(const char* cutName)
429482
cut->SetTPCNsigmaPiRange(-3, +3);
430483
return cut;
431484
}
485+
if (!nameStr.compare("mee_0_120_tpconly_wpf_lowB")) {
486+
// for pair
487+
cut->SetMeeRange(0., 0.12);
488+
cut->ApplyPrefilter(true);
489+
490+
// for track
491+
cut->SetTrackPtRange(0.05f, 1e10f);
492+
cut->SetTrackEtaRange(-0.9, +0.9);
493+
cut->SetMinNCrossedRowsTPC(80);
494+
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
495+
cut->SetChi2PerClusterTPC(0.0, 4.0);
496+
cut->SetChi2PerClusterITS(0.0, 5.0);
497+
cut->SetNClustersITS(4, 7);
498+
cut->SetMaxDcaXY(1.0);
499+
cut->SetMaxDcaZ(1.0);
500+
501+
// for PID
502+
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPConly_lowB);
503+
cut->SetTOFbetaRange(true, 0.0, 0.95);
504+
cut->SetTPCNsigmaElRange(-2, +3);
505+
cut->SetTPCNsigmaPiRange(-3, +3);
506+
return cut;
507+
}
432508
if (!nameStr.compare("mee_0_120_tpconly_lowB")) {
433509
// for pair
434510
cut->SetMeeRange(0., 0.12);
@@ -454,6 +530,29 @@ DalitzEECut* o2::aod::dalitzeecuts::GetCut(const char* cutName)
454530
cut->SetTPCNsigmaPiRange(-3, +3);
455531
return cut;
456532
}
533+
if (!nameStr.compare("mee_120_500_tpconly_wpf_lowB")) {
534+
// for pair
535+
cut->SetMeeRange(0.12, 0.5);
536+
cut->ApplyPrefilter(true);
537+
538+
// for track
539+
cut->SetTrackPtRange(0.05f, 1e10f);
540+
cut->SetTrackEtaRange(-0.9, +0.9);
541+
cut->SetMinNCrossedRowsTPC(80);
542+
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
543+
cut->SetChi2PerClusterTPC(0.0, 4.0);
544+
cut->SetChi2PerClusterITS(0.0, 5.0);
545+
cut->SetNClustersITS(4, 7);
546+
cut->SetMaxDcaXY(1.0);
547+
cut->SetMaxDcaZ(1.0);
548+
549+
// for PID
550+
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPConly_lowB);
551+
cut->SetTOFbetaRange(true, 0.0, 0.95);
552+
cut->SetTPCNsigmaElRange(-2, +3);
553+
cut->SetTPCNsigmaPiRange(-3, +3);
554+
return cut;
555+
}
457556
if (!nameStr.compare("mee_120_500_tpconly_lowB")) {
458557
// for pair
459558
cut->SetMeeRange(0.12, 0.5);
@@ -594,6 +693,92 @@ DalitzEECut* o2::aod::dalitzeecuts::GetCut(const char* cutName)
594693
cut->SetMuonExclusionTPC(true);
595694
return cut;
596695
}
696+
697+
if (!nameStr.compare("mee_0_120_tpchadrejortofreq_wpf_lowB")) {
698+
// for pair
699+
cut->SetMeeRange(0., 0.12);
700+
cut->ApplyPrefilter(true);
701+
702+
// for track
703+
cut->SetTrackPtRange(0.05f, 1e10f);
704+
cut->SetTrackEtaRange(-0.9, +0.9);
705+
cut->SetMinNCrossedRowsTPC(80);
706+
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
707+
cut->SetChi2PerClusterTPC(0.0, 4.0);
708+
cut->SetChi2PerClusterITS(0.0, 5.0);
709+
cut->SetNClustersITS(4, 7);
710+
cut->SetMaxDcaXY(1.0);
711+
cut->SetMaxDcaZ(1.0);
712+
713+
// for PID
714+
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq_lowB);
715+
cut->SetTOFbetaRange(true, 0.0, 0.95);
716+
cut->SetTPCNsigmaElRange(-2, +3);
717+
cut->SetTOFNsigmaElRange(-3, +3);
718+
cut->SetTPCNsigmaMuRange(-2, +2);
719+
cut->SetTPCNsigmaPiRange(-3, +3);
720+
cut->SetTPCNsigmaKaRange(-3, +3);
721+
cut->SetTPCNsigmaPrRange(-3, +3);
722+
cut->SetMuonExclusionTPC(true);
723+
return cut;
724+
}
725+
if (!nameStr.compare("mee_120_500_tpchadrejortofreq_wpf_lowB")) {
726+
// for pair
727+
cut->SetMeeRange(0.12, 0.5);
728+
cut->ApplyPrefilter(true);
729+
730+
// for track
731+
cut->SetTrackPtRange(0.05f, 1e10f);
732+
cut->SetTrackEtaRange(-0.9, +0.9);
733+
cut->SetMinNCrossedRowsTPC(80);
734+
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
735+
cut->SetChi2PerClusterTPC(0.0, 4.0);
736+
cut->SetChi2PerClusterITS(0.0, 5.0);
737+
cut->SetNClustersITS(4, 7);
738+
cut->SetMaxDcaXY(1.0);
739+
cut->SetMaxDcaZ(1.0);
740+
741+
// for PID
742+
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq_lowB);
743+
cut->SetTOFbetaRange(true, 0.0, 0.95);
744+
cut->SetTPCNsigmaElRange(-2, +3);
745+
cut->SetTOFNsigmaElRange(-3, +3);
746+
cut->SetTPCNsigmaMuRange(-2, +2);
747+
cut->SetTPCNsigmaPiRange(-3, +3);
748+
cut->SetTPCNsigmaKaRange(-3, +3);
749+
cut->SetTPCNsigmaPrRange(-3, +3);
750+
cut->SetMuonExclusionTPC(true);
751+
return cut;
752+
}
753+
if (!nameStr.compare("mee_0_500_tpchadrejortofreq_wpf_lowB")) {
754+
// for pair
755+
cut->SetMeeRange(0., 0.5);
756+
cut->ApplyPrefilter(true);
757+
758+
// for track
759+
cut->SetTrackPtRange(0.05f, 1e10f);
760+
cut->SetTrackEtaRange(-0.9, +0.9);
761+
cut->SetMinNCrossedRowsTPC(80);
762+
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
763+
cut->SetChi2PerClusterTPC(0.0, 4.0);
764+
cut->SetChi2PerClusterITS(0.0, 5.0);
765+
cut->SetNClustersITS(4, 7);
766+
cut->SetMaxDcaXY(1.0);
767+
cut->SetMaxDcaZ(1.0);
768+
769+
// for PID
770+
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq_lowB);
771+
cut->SetTOFbetaRange(true, 0.0, 0.95);
772+
cut->SetTPCNsigmaElRange(-2, +3);
773+
cut->SetTOFNsigmaElRange(-3, +3);
774+
cut->SetTPCNsigmaMuRange(-2, +2);
775+
cut->SetTPCNsigmaPiRange(-3, +3);
776+
cut->SetTPCNsigmaKaRange(-3, +3);
777+
cut->SetTPCNsigmaPrRange(-3, +3);
778+
cut->SetMuonExclusionTPC(true);
779+
return cut;
780+
}
781+
597782
if (!nameStr.compare("mmumu_0_1100_lowB")) {
598783
// for pair
599784
cut->SetMeeRange(0., 1.1);

PWGEM/PhotonMeson/Core/DalitzEECut.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ void DalitzEECut::SetMaxDcaXYPtDep(std::function<float(float)> ptDepCut)
106106
mMaxDcaXYPtDep = ptDepCut;
107107
LOG(info) << "DalitzEE Cut, set max DCA xy pt dep: " << mMaxDcaXYPtDep(1.0);
108108
}
109+
void DalitzEECut::ApplyPrefilter(bool flag)
110+
{
111+
mApplyPF = flag;
112+
LOG(info) << "DalitzEE Cut, apply prefilter: " << mApplyPF;
113+
}
109114

110115
void DalitzEECut::SetPIDScheme(PIDSchemes scheme)
111116
{

PWGEM/PhotonMeson/Core/DalitzEECut.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class DalitzEECut : public TNamed
6060
kDCAz,
6161
kITSNCls,
6262
kITSChi2NDF,
63+
kPrefilter,
6364
kNCuts
6465
};
6566
static const char* mCutNames[static_cast<int>(DalitzEECuts::kNCuts)];
@@ -169,6 +170,10 @@ class DalitzEECut : public TNamed
169170
return false;
170171
}
171172

173+
if (mApplyPF && !IsSelectedTrack(track, DalitzEECuts::kPrefilter)) {
174+
return false;
175+
}
176+
172177
// PID cuts here.
173178
if (!PassPID(track)) {
174179
return false;
@@ -352,6 +357,9 @@ class DalitzEECut : public TNamed
352357
case DalitzEECuts::kITSChi2NDF:
353358
return mMinChi2PerClusterITS < track.itsChi2NCl() && track.itsChi2NCl() < mMaxChi2PerClusterITS;
354359

360+
case DalitzEECuts::kPrefilter:
361+
return track.pfb() <= 0;
362+
355363
default:
356364
return false;
357365
}
@@ -391,6 +399,7 @@ class DalitzEECut : public TNamed
391399
void SetMaxDcaXY(float maxDcaXY);
392400
void SetMaxDcaZ(float maxDcaZ);
393401
void SetMaxDcaXYPtDep(std::function<float(float)> ptDepCut);
402+
void ApplyPrefilter(bool flag);
394403

395404
/// @brief Print the track selection
396405
void print() const;
@@ -419,6 +428,7 @@ class DalitzEECut : public TNamed
419428
float mMaxDcaXY{1.0f}; // max dca in xy plane
420429
float mMaxDcaZ{1.0f}; // max dca in z direction
421430
std::function<float(float)> mMaxDcaXYPtDep{}; // max dca in xy plane as function of pT
431+
bool mApplyPF{false};
422432

423433
// pid cuts
424434
PIDSchemes mPIDScheme{PIDSchemes::kUnDef};

PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -416,16 +416,13 @@ void o2::aod::emphotonhistograms::DefineHistograms(THashList* list, const char*
416416
for (int i = 0; i < nmgg04; i++) {
417417
mgg04[i] = 0.002 * i;
418418
}
419-
const int npTgg10 = 71;
419+
const int npTgg10 = 61;
420420
float pTgg10[npTgg10] = {};
421-
for (int i = 0; i < 10; i++) {
422-
pTgg10[i] = 0.01 * (i - 0) + 0.0; // from 0 to 0.1 GeV/c, every 0.01 GeV/c
423-
}
424-
for (int i = 10; i < 60; i++) {
425-
pTgg10[i] = 0.1 * (i - 10) + 0.1; // from 0.1 to 5 GeV/c, every 0.1 GeV/c
421+
for (int i = 0; i < 50; i++) {
422+
pTgg10[i] = 0.1 * (i - 0) + 0.0; // from 0 to 5 GeV/c, every 0.1 GeV/c
426423
}
427-
for (int i = 60; i < npTgg10; i++) {
428-
pTgg10[i] = 0.5 * (i - 60) + 5.0; // from 5 to 10 GeV/c, evety 0.5 GeV/c
424+
for (int i = 50; i < npTgg10; i++) {
425+
pTgg10[i] = 0.5 * (i - 50) + 5.0; // from 5 to 10 GeV/c, evety 0.5 GeV/c
429426
}
430427
if (TString(histClass) == "tagging_pi0") {
431428
list->Add(new TH2F("hMggPt_Same", "m_{ee#gamma} vs. p_{T,ee};m_{ee#gamma} (GeV/c^{2});p_{T,ee} (GeV/c)", nmgg04 - 1, mgg04, npTgg10 - 1, pTgg10));

PWGEM/PhotonMeson/DataModel/gammaTables.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ namespace o2::aod
3030

3131
namespace emreducedevent
3232
{
33-
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
34-
DECLARE_SOA_COLUMN(Tag, tag, uint64_t); //! Bit-field for storing event information (e.g. high level info, cut decisions)
33+
DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //!
34+
DECLARE_SOA_COLUMN(Tag, tag, uint64_t); //! Bit-field for storing event information (e.g. high level info, cut decisions)
3535
DECLARE_SOA_COLUMN(NgammaPCM, ngpcm, int);
3636
DECLARE_SOA_COLUMN(NgammaPHOS, ngphos, int);
3737
DECLARE_SOA_COLUMN(NgammaEMC, ngemc, int);
@@ -315,6 +315,7 @@ DECLARE_SOA_INDEX_COLUMN(EMReducedEvent, emreducedevent); //!
315315
DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //!
316316
DECLARE_SOA_COLUMN(TrackId, trackId, int); //!
317317
DECLARE_SOA_COLUMN(Sign, sign, int); //!
318+
DECLARE_SOA_COLUMN(PrefilterBit, pfb, uint8_t); //!
318319
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, [](float pt, float phi) -> float { return pt * std::cos(phi); });
319320
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, [](float pt, float phi) -> float { return pt * std::sin(phi); });
320321
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, [](float pt, float eta) -> float { return pt * std::sinh(eta); });
@@ -347,6 +348,10 @@ DECLARE_SOA_TABLE(EMPrimaryElectronEMReducedEventIds, "AOD", "PRMELEMEVENTID", e
347348
// iterators
348349
using EMPrimaryElectronEMReducedEventId = EMPrimaryElectronEMReducedEventIds::iterator;
349350

351+
DECLARE_SOA_TABLE(EMPrimaryElectronsPrefilterBit, "AOD", "PRMELEPFB", emprimaryelectron::PrefilterBit); // To be joined with EMPrimaryElectrons table at analysis level.
352+
// iterators
353+
using EMPrimaryElectronPrefilterBit = EMPrimaryElectronsPrefilterBit::iterator;
354+
350355
namespace dalitzee
351356
{
352357
DECLARE_SOA_INDEX_COLUMN(EMReducedEvent, emreducedevent); //!
@@ -380,6 +385,7 @@ DECLARE_SOA_INDEX_COLUMN(EMReducedEvent, emreducedevent); //!
380385
DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //!
381386
DECLARE_SOA_COLUMN(TrackId, trackId, int); //!
382387
DECLARE_SOA_COLUMN(Sign, sign, int); //!
388+
DECLARE_SOA_COLUMN(PrefilterBit, pfb, uint8_t); //!
383389
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, [](float pt, float phi) -> float { return pt * std::cos(phi); });
384390
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, [](float pt, float phi) -> float { return pt * std::sin(phi); });
385391
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, [](float pt, float eta) -> float { return pt * std::sinh(eta); });
@@ -412,6 +418,10 @@ DECLARE_SOA_TABLE(EMPrimaryMuonEMReducedEventIds, "AOD", "PRMMUEMEVENTID", empri
412418
// iterators
413419
using EMPrimaryMuonEMReducedEventId = EMPrimaryMuonEMReducedEventIds::iterator;
414420

421+
DECLARE_SOA_TABLE(EMPrimaryMuonsPrefilterBit, "AOD", "PRMMUPFB", emprimarymuon::PrefilterBit); // To be joined with EMPrimaryMuons table at analysis level.
422+
// iterators
423+
using EMPrimaryMuonPrefilterBit = EMPrimaryMuonsPrefilterBit::iterator;
424+
415425
namespace dalitzmumu
416426
{
417427
DECLARE_SOA_INDEX_COLUMN(EMReducedEvent, emreducedevent); //!

0 commit comments

Comments
 (0)