@@ -72,7 +72,6 @@ std::shared_ptr<TH1> hCentFV0A;
7272std::shared_ptr<TH2> hNsigma3HSel;
7373std::shared_ptr<TH2> hNsigma3HSelTOF;
7474std::shared_ptr<TH2> hdEdx3HSel;
75- std::shared_ptr<TH2> hdEdx3HPosTrack;
7675std::shared_ptr<TH2> hdEdxTot;
7776std::shared_ptr<TH2> h3HMassPtTOF;
7877std::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