Skip to content

Commit d30cc80

Browse files
committed
added nTPCclus to pions, NoITSROFrameBorder and kNoTimeFrameBorder to event selection. removed nITSclus to 3H and pions.
1 parent f838219 commit d30cc80

File tree

2 files changed

+37
-40
lines changed

2 files changed

+37
-40
lines changed

PWGLF/DataModel/LFLnnTables.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ DECLARE_SOA_COLUMN(TPCmom3H, tpcMom3H, float); // TPC
6060
DECLARE_SOA_COLUMN(TPCmomPi, tpcMomPi, float); // TPC momentum of the Pi daughter
6161
DECLARE_SOA_COLUMN(MassTrTOF, mass2TrTOF, float); // TOF 3H mass
6262
DECLARE_SOA_COLUMN(TPCchi3H, tpcChi3H, float); // tpcChi3H
63-
DECLARE_SOA_COLUMN(ITSclusterSizes3H, itsClusterSizes3H, uint32_t); // ITS cluster size of the 3H daughter
64-
DECLARE_SOA_COLUMN(ITSclusterSizesPi, itsClusterSizesPi, uint32_t); // ITS cluster size of the Pi daughter
6563
DECLARE_SOA_COLUMN(Dca3H, dca3H, float); // DCA between 3H daughter and V0
6664
DECLARE_SOA_COLUMN(DcaPi, dcaPi, float); // DCA between pi daughter and V0
6765
DECLARE_SOA_COLUMN(GenPt, genPt, float); // Pt of the lnn
@@ -89,9 +87,7 @@ DECLARE_SOA_TABLE(DataLnnCands, "AOD", "LNNCANDS",
8987
lnnrec::DcaV0Daug, lnnrec::Dca3H, lnnrec::DcaPi,
9088
lnnrec::NSigma3H, lnnrec::NTPCclus3H, lnnrec::NTPCclusPi,
9189
lnnrec::TPCmom3H, lnnrec::TPCmomPi, lnnrec::TPCsignal3H, lnnrec::TPCsignalPi,
92-
lnnrec::MassTrTOF, lnnrec::TPCchi3H,
93-
lnnrec::ITSclusterSizes3H, lnnrec::ITSclusterSizesPi,
94-
lnnrec::Flags);
90+
lnnrec::MassTrTOF, lnnrec::TPCchi3H, lnnrec::Flags);
9591

9692
DECLARE_SOA_TABLE(MCLnnCands, "AOD", "MCLNNCANDS",
9793
o2::soa::Index<>,
@@ -105,9 +101,7 @@ DECLARE_SOA_TABLE(MCLnnCands, "AOD", "MCLNNCANDS",
105101
lnnrec::DcaV0Daug, lnnrec::Dca3H, lnnrec::DcaPi,
106102
lnnrec::NSigma3H, lnnrec::NTPCclus3H, lnnrec::NTPCclusPi,
107103
lnnrec::TPCmom3H, lnnrec::TPCmomPi, lnnrec::TPCsignal3H, lnnrec::TPCsignalPi,
108-
lnnrec::MassTrTOF, lnnrec::TPCchi3H,
109-
lnnrec::ITSclusterSizes3H, lnnrec::ITSclusterSizesPi,
110-
lnnrec::Flags,
104+
lnnrec::MassTrTOF, lnnrec::TPCchi3H, lnnrec::Flags,
111105
lnnrec::GenPt,
112106
lnnrec::GenPhi,
113107
lnnrec::GenEta,

PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ std::shared_ptr<TH1> hCentFV0A;
7272
std::shared_ptr<TH2> hNsigma3HSel;
7373
std::shared_ptr<TH2> hNsigma3HSelTOF;
7474
std::shared_ptr<TH2> hdEdx3HSel;
75-
std::shared_ptr<TH2> hdEdx3HPosTrack;
7675
std::shared_ptr<TH2> hdEdxTot;
7776
std::shared_ptr<TH2> h3HMassPtTOF;
7877
std::shared_ptr<TH2> h3HSignalPtTOF;
@@ -130,8 +129,6 @@ struct lnnCandidate {
130129
uint16_t tpcSignalPi = 0u;
131130
uint8_t nTPCClusters3H = 0u;
132131
uint8_t nTPCClustersPi = 0u;
133-
uint32_t clusterSizeITS3H = 0u;
134-
uint32_t clusterSizeITSPi = 0u;
135132
bool isMatter = false;
136133
bool isSignal = false; // true MC signal
137134
bool isReco = false; // true if the candidate is actually reconstructed
@@ -159,6 +156,7 @@ struct lnnRecoTask {
159156
Configurable<float> nSigmaCutMinTPC{"nSigmaCutMinTPC", -5, "triton dEdx cut (n sigma)"};
160157
Configurable<float> nSigmaCutMaxTPC{"nSigmaCutMaxTPC", 5, "triton dEdx cut (n sigma)"};
161158
Configurable<float> nTPCClusMin3H{"nTPCClusMin3H", 80, "triton NTPC clusters cut"};
159+
Configurable<float> nTPCClusMinPi{"nTPCClusMinPi", 80, "pion NTPC clusters cut"};
162160
Configurable<float> ptMinTOF{"ptMinTOF", 0.8, "minimum pt for TOF cut"};
163161
Configurable<float> TrTOFMass2Cut{"TrTOFMass2Cut", 5.5, "minimum Triton mass square to TOF"};
164162
Configurable<float> BetaTrTOF{"BetaTrTOF", 0.4, "minimum beta TOF cut"};
@@ -254,7 +252,6 @@ struct lnnRecoTask {
254252
hNsigma3HSel = qaRegistry.add<TH2>("hNsigma3HSel", "; #it{p}_{TPC}/z (GeV/#it{c}); n_{#sigma} ({}^{3}H)", HistType::kTH2F, {rigidityAxis, nSigma3HAxis});
255253
hNsigma3HSelTOF = qaRegistry.add<TH2>("hNsigma3HSelTOF", "; Signed p_{T} ({}^{3}H) (GeV/#it{c^2}); n#sigma_{TOF} ({}^{3}H)", HistType::kTH2F, {PtTrAxis, nSigma3HAxis});
256254
hdEdx3HSel = qaRegistry.add<TH2>("hdEdx3HSel", ";#it{p}_{TPC}/z (GeV/#it{c}); dE/dx", HistType::kTH2F, {rigidityAxis, dEdxAxis});
257-
hdEdx3HPosTrack = qaRegistry.add<TH2>("hdEdx3HPosTrack", "; #it{p}^{TPC}({}^{3}H); dE/dx", HistType::kTH2F, {TritMomAxis, dEdxAxis});
258255
hdEdxTot = qaRegistry.add<TH2>("hdEdxTot", ";p_{TPC}/z (GeV/#it{c}); dE/dx", HistType::kTH2F, {rigidityAxis, dEdxAxis});
259256
h3HMassPtTOF = qaRegistry.add<TH2>("hTrMassPtTOF", "; #it{p}_{T}({}^{3}H) (#it{GeV}^2/#it{c}^4); m^{2}/z", HistType::kTH2F, {PtTrAxis, MassTOFAxis});
260257
h3HSignalPtTOF = qaRegistry.add<TH2>("h3HSignalPtTOF", "; #it{p}_{T}({}^{3}H) (GeV/#it{c}); #beta (TOF)", HistType::kTH2F, {PtTrAxis, BetaAxis});
@@ -264,7 +261,7 @@ struct lnnRecoTask {
264261
hNSigma3HTPC_preselection = qaRegistry.add<TH2>("hNSigma3HTPC_preselection", "#it{p}/z (GeV/#it{c}); n#sigma_{TPC}(^{3}H)", HistType::kTH2F, {rigidityAxis, nSigma3HAxis});
265262

266263
hEvents->GetXaxis()->SetBinLabel(1, "All");
267-
hEvents->GetXaxis()->SetBinLabel(2, "sel8");
264+
hEvents->GetXaxis()->SetBinLabel(2, "Selected");
268265
hLnnCandLoss->GetYaxis()->SetTitle("#it{N}_{candidates}");
269266
hLnnCandLoss->GetXaxis()->SetTitle("Cuts");
270267
hLnnCandLoss->GetXaxis()->SetBinLabel(1, "Initial LnnCandidates");
@@ -392,32 +389,32 @@ struct lnnRecoTask {
392389
continue;
393390
}
394391
auto& h3track = lnnCand.isMatter ? posTrack : negTrack;
392+
auto& pitrack = lnnCand.isMatter ? negTrack : posTrack;
395393
auto& h3Rigidity = lnnCand.isMatter ? posRigidity : negRigidity;
396394

397395
if (h3Rigidity < TPCRigidityMin3H ||
398-
h3track.tpcNClsFound() < nTPCClusMin3H ||
396+
h3track.tpcNClsFound() < nTPCClusMin3H ||
397+
pitrack.tpcNClsFound() < nTPCClusMinPi ||
399398
h3track.tpcChi2NCl() < Chi2nClusTPCMin ||
400399
h3track.tpcChi2NCl() > Chi2nClusTPCMax ||
401400
h3track.itsChi2NCl() > Chi2nClusITS) {
402401
continue;
403402
}
404403

405-
lnnCand.tpcChi3H = lnnCand.isMatter ? h3track.tpcChi2NCl() : negTrack.tpcChi2NCl();
404+
lnnCand.tpcChi3H = h3track.tpcChi2NCl();
406405
lnnCand.nSigma3H = lnnCand.isMatter ? nSigmaTPCpos : nSigmaTPCneg;
407-
lnnCand.nTPCClusters3H = lnnCand.isMatter ? h3track.tpcNClsFound() : negTrack.tpcNClsFound();
408-
lnnCand.tpcSignal3H = lnnCand.isMatter ? h3track.tpcSignal() : negTrack.tpcSignal();
409-
lnnCand.clusterSizeITS3H = lnnCand.isMatter ? h3track.itsClusterSizes() : negTrack.itsClusterSizes();
410-
lnnCand.nTPCClustersPi = !lnnCand.isMatter ? h3track.tpcNClsFound() : negTrack.tpcNClsFound();
411-
lnnCand.tpcSignalPi = !lnnCand.isMatter ? h3track.tpcSignal() : negTrack.tpcSignal();
412-
lnnCand.clusterSizeITSPi = !lnnCand.isMatter ? h3track.itsClusterSizes() : negTrack.itsClusterSizes();
413-
lnnCand.mom3HTPC = lnnCand.isMatter ? posRigidity : negRigidity;
414-
lnnCand.momPiTPC = !lnnCand.isMatter ? posRigidity : negRigidity;
415-
416-
lnnCand.flags |= lnnCand.isMatter ? static_cast<uint8_t>((posTrack.pidForTracking() & 0xF) << 4) : static_cast<uint8_t>((negTrack.pidForTracking() & 0xF) << 4);
417-
lnnCand.flags |= lnnCand.isMatter ? static_cast<uint8_t>(negTrack.pidForTracking() & 0xF) : static_cast<uint8_t>(posTrack.pidForTracking() & 0xF);
418-
419-
auto posTrackCov = getTrackParCov(posTrack);
420-
auto negTrackCov = getTrackParCov(negTrack);
406+
lnnCand.nTPCClusters3H = h3track.tpcNClsFound();
407+
lnnCand.nTPCClustersPi = pitrack.tpcNClsFound();
408+
lnnCand.tpcSignal3H = h3track.tpcSignal();
409+
lnnCand.tpcSignalPi = pitrack.tpcSignal();
410+
lnnCand.mom3HTPC = h3track.tpcInnerParam();
411+
lnnCand.momPiTPC = pitrack.tpcInnerParam() ;
412+
413+
lnnCand.flags |= lnnCand.isMatter ? static_cast<uint8_t>((h3track.pidForTracking() & 0xF) << 4) : static_cast<uint8_t>((pitrack.pidForTracking() & 0xF) << 4);
414+
lnnCand.flags |= lnnCand.isMatter ? static_cast<uint8_t>(pitrack.pidForTracking() & 0xF) : static_cast<uint8_t>(h3track.pidForTracking() & 0xF);
415+
416+
auto h3TrackCov = getTrackParCov(h3track);
417+
auto piTrackCov = getTrackParCov(pitrack);
421418
int chargeFactor = -1 + 2 * lnnCand.isMatter;
422419

423420
float beta = -1.f;
@@ -436,7 +433,7 @@ struct lnnRecoTask {
436433

437434
int nCand = 0;
438435
try {
439-
nCand = fitter.process(posTrackCov, negTrackCov);
436+
nCand = fitter.process(h3TrackCov, piTrackCov);
440437
} catch (...) {
441438
LOG(error) << "Exception caught in DCA fitter process call!";
442439
continue;
@@ -445,8 +442,8 @@ struct lnnRecoTask {
445442
continue;
446443
}
447444

448-
auto& h3PropTrack = lnnCand.isMatter ? fitter.getTrack(0) : fitter.getTrack(1);
449-
auto& piPropTrack = lnnCand.isMatter ? fitter.getTrack(1) : fitter.getTrack(0);
445+
auto& h3PropTrack = fitter.getTrack(0);
446+
auto& piPropTrack = fitter.getTrack(1);
450447
h3PropTrack.getPxPyPzGlo(lnnCand.mom3H);
451448
piPropTrack.getPxPyPzGlo(lnnCand.momPi);
452449

@@ -505,10 +502,10 @@ struct lnnRecoTask {
505502

506503
// if survived all selections, propagate decay daughters to PV
507504
gpu::gpustd::array<float, 2> dcaInfo;
508-
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, h3PropTrack, 2.f, fitter.getMatCorrType(), &dcaInfo);
505+
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, h3TrackCov, 2.f, fitter.getMatCorrType(), &dcaInfo);
509506
lnnCand.h3DCAXY = dcaInfo[0];
510507

511-
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, piPropTrack, 2.f, fitter.getMatCorrType(), &dcaInfo);
508+
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, piTrackCov, 2.f, fitter.getMatCorrType(), &dcaInfo);
512509
lnnCand.piDCAXY = dcaInfo[0];
513510

514511
// finally, push back the candidate
@@ -584,6 +581,14 @@ struct lnnRecoTask {
584581
initCCDB(bc);
585582

586583
hEvents->Fill(0.);
584+
if (!collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
585+
continue;
586+
}
587+
588+
if ((!collision.sel8()) || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder) || std::abs(collision.posZ()) > 10) {
589+
continue;
590+
}
591+
587592
if ((!collision.sel8()) || std::abs(collision.posZ()) > 10) {
588593
continue;
589594
}
@@ -610,8 +615,7 @@ struct lnnRecoTask {
610615
lnnCand.dcaV0dau, lnnCand.h3DCAXY, lnnCand.piDCAXY,
611616
lnnCand.nSigma3H, lnnCand.nTPCClusters3H, lnnCand.nTPCClustersPi,
612617
lnnCand.mom3HTPC, lnnCand.momPiTPC, lnnCand.tpcSignal3H, lnnCand.tpcSignalPi,
613-
lnnCand.mass2TrTOF, lnnCand.tpcChi3H,
614-
lnnCand.clusterSizeITS3H, lnnCand.clusterSizeITSPi, lnnCand.flags);
618+
lnnCand.mass2TrTOF, lnnCand.tpcChi3H, lnnCand.flags);
615619
}
616620
}
617621
}
@@ -634,7 +638,7 @@ struct lnnRecoTask {
634638

635639
hEvents->Fill(0.);
636640

637-
if (std::abs(collision.posZ()) > 10) {
641+
if ((!collision.sel8()) || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder) || std::abs(collision.posZ()) > 10) {
638642
continue;
639643
}
640644
hEvents->Fill(1.);
@@ -670,8 +674,7 @@ struct lnnRecoTask {
670674
lnnCand.dcaV0dau, lnnCand.h3DCAXY, lnnCand.piDCAXY,
671675
lnnCand.nSigma3H, lnnCand.nTPCClusters3H, lnnCand.nTPCClustersPi,
672676
lnnCand.mom3HTPC, lnnCand.momPiTPC, lnnCand.tpcSignal3H, lnnCand.tpcSignalPi,
673-
lnnCand.mass2TrTOF, lnnCand.tpcChi3H,
674-
lnnCand.clusterSizeITS3H, lnnCand.clusterSizeITSPi, lnnCand.flags,
677+
lnnCand.mass2TrTOF, lnnCand.tpcChi3H, lnnCand.flags,
675678
chargeFactor * lnnCand.genPt(), lnnCand.genPhi(), lnnCand.genEta(), lnnCand.genPt3H(),
676679
lnnCand.gDecVtx[0], lnnCand.gDecVtx[1], lnnCand.gDecVtx[2], lnnCand.isReco, lnnCand.isSignal, lnnCand.survEvSelection);
677680
}
@@ -740,7 +743,6 @@ struct lnnRecoTask {
740743
-1, -1, -1,
741744
-1, -1, -1,
742745
-1, -1, -1, -1,
743-
-1, -1,
744746
-1, -1, -1,
745747
chargeFactor * lnnCand.genPt(), lnnCand.genPhi(), lnnCand.genEta(), lnnCand.genPt3H(),
746748
lnnCand.gDecVtx[0], lnnCand.gDecVtx[1], lnnCand.gDecVtx[2], lnnCand.isReco, lnnCand.isSignal, lnnCand.survEvSelection);
@@ -755,3 +757,4 @@ WorkflowSpec
755757
return WorkflowSpec{
756758
adaptAnalysisTask<lnnRecoTask>(cfgc)};
757759
}
760+

0 commit comments

Comments
 (0)