@@ -149,21 +149,19 @@ struct HfFilter { // Main struct for HF triggers
149149
150150 // parameters for Sigma_C
151151 struct : o2::framework::ConfigurableGroup {
152- Configurable<bool > isTrigSigmaCP{" isTrigSigmaCP" , true , " for SigmaCPPK trigger select True" };
153- Configurable<bool > isTrigSigmaCPPK{" isTrigSigmaCPPK" , true , " for SigmaCPPK trigger select True, False for SigmaCP" };
154- Configurable<std::vector<int >> trkPIDspecies{" trkPIDspecies" , std::vector<int >{o2::track::PID::Proton, o2::track::PID::Pion, o2::track::PID::Kaon}, " Trk sel: Particles species for PID, proton, pion, kaon" };
155- Configurable<std::vector<float >> pidTPCMax{" pidTPCMax" , std::vector<float >{3 ., 0 ., 0 .}, " maximum nSigma TPC" };
156- Configurable<std::vector<float >> pidTOFMax{" pidTOFMax" , std::vector<float >{3 ., 0 ., 0 .}, " maximum nSigma TOF" };
157- Configurable<bool > forceTOF{" forceTOF" , false , " fill PID information for associated tracks" };
158- Configurable<float > tofPIDThreshold{" tofPIDThreshold" , 1.0 , " minimum pT after which TOF PID is applicable" };
159- Configurable<float > minPtProton{" minPtProton" , 0.39 , " minimum pT for associated proton" };
160- Configurable<float > maxPtProton{" maxPtProton" , 4.51 , " maximum pT for associated proton" };
161- Configurable<float > minMassSigmaCCorr{" minMassSigmaCCorr" , 0.15 , " minimum mass of SigmaC for correlation with proton" };
162- Configurable<float > maxMassSigmaCCorr{" maxMassSigmaCCorr" , 0.19 , " maximum mass of SigmaC for correlation with proton" };
163- Configurable<float > minPtSigmaC{" minPtSigmaC" , 4.99 , " minimum pT of SigmaC for correlation with proton" };
164- Configurable<float > maxPtSigmaC{" maxPtSigmaC" , 12.0 , " maximum pT of SigmaC for correlation with proton" };
152+ Configurable<std::vector<int >> trkPIDspecies{" trkPIDspecies" , std::vector<int >{o2::track::PID::Proton, o2::track::PID::Pion, o2::track::PID::Kaon}, " Trk sel: Particles species for PID, proton, pion, kaon" };
153+ Configurable<std::vector<float >> pidTPCMax{" pidTPCMax" , std::vector<float >{3 ., 0 ., 0 .}, " maximum nSigma TPC" };
154+ Configurable<std::vector<float >> pidTOFMax{" pidTOFMax" , std::vector<float >{3 ., 0 ., 0 .}, " maximum nSigma TOF" };
155+ Configurable<bool > forceTOF{" forceTOF" , false , " fill PID information for associated tracks" };
156+ Configurable<float > tofPIDThreshold{" tofPIDThreshold" , 1.0 , " minimum pT after which TOF PID is applicable" };
157+ Configurable<float > minPtProton{" minPtProton" , 0.39 , " minimum pT for associated proton" };
158+ Configurable<float > maxPtProton{" maxPtProton" , 4.51 , " maximum pT for associated proton" };
159+ Configurable<float > minMassSigmaCCorr{" minMassSigmaCCorr" , 0.15 , " minimum mass of SigmaC for correlation with proton" };
160+ Configurable<float > maxMassSigmaCCorr{" maxMassSigmaCCorr" , 0.19 , " maximum mass of SigmaC for correlation with proton" };
161+ Configurable<float > minPtSigmaC{" minPtSigmaC" , 4.99 , " minimum pT of SigmaC for correlation with proton" };
162+ Configurable<float > maxPtSigmaC{" maxPtSigmaC" , 12.0 , " maximum pT of SigmaC for correlation with proton" };
165163 } configSigmaC;
166-
164+
167165 // parameters for charm baryons to Xi bachelor
168166 Configurable<LabeledArray<float >> cutsXiCascades{" cutsXiCascades" , {cutsCascades[0 ], 1 , 8 , labelsEmpty, labelsColumnsCascades}, " Selections for cascades (Xi) for Xi+bachelor triggers" };
169167 Configurable<LabeledArray<float >> cutsXiBachelor{" cutsXiBachelor" , {cutsCharmBaryons[0 ], 1 , 11 , labelsEmpty, labelsColumnsCharmBarCuts}, " Selections for charm baryons (Xi+Pi, Xi+Ka, Xi+Pi+Pi)" };
@@ -224,7 +222,7 @@ struct HfFilter { // Main struct for HF triggers
224222 int currentRun{0 }; // needed to detect if the run changed and trigger update of calibrations etc.
225223
226224 // array of BDT thresholds
227- std::array<LabeledArray<double >, kNCharmParticles + 1 > thresholdBDTScores;
225+ std::array<LabeledArray<double >, kNCharmParticles + 1 > thresholdBDTScores;
228226
229227 o2::vertexing::DCAFitterN<2 > df2; // fitter for Charm Hadron vertex (2-prong vertex fitter)
230228 o2::vertexing::DCAFitterN<3 > df3; // fitter for Charm/Beauty Hadron vertex (3-prong vertex fitter)
@@ -387,8 +385,8 @@ struct HfFilter { // Main struct for HF triggers
387385 // ThetaC
388386 hMassVsPtC[kNCharmParticles + 21 ] = registry.add <TH2>(" fMassVsPtCharmBaryonToDstarP" , " #it{M} vs. #it{p}_{T} distribution of triggered D^{*0}#p candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts" , HistType::kTH2D , {ptAxis, massAxisC[kNCharmParticles + 21 ]});
389387 hMassVsPtC[kNCharmParticles + 22 ] = registry.add <TH2>(" fMassVsPtCharmBaryonToDstarPWrongSign" , " #it{M} vs. #it{p}_{T} distribution of triggered D^{*0}#p wrong sign candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts" , HistType::kTH2D , {ptAxis, massAxisC[kNCharmParticles + 22 ]});
390- // SigmaC-p
391- hMassVsPtC[kNCharmParticles + 23 ] = registry.add <TH2>(" fMassVsPtSigmaCP " , " #it{M} vs. #it{p}_{T} distribution of #Sigma_{c} for SigmaCP trigger;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts" , HistType::kTH2D , {ptAxis, massAxisC[kNCharmParticles + 23 ]});
388+ // SigmaC-p
389+ hMassVsPtC[kNCharmParticles + 23 ] = registry.add <TH2>(" fMassVsPtSigmaCPr " , " #it{M} vs. #it{p}_{T} distribution of #Sigma_{c} for SigmaCPr trigger;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts" , HistType::kTH2D , {ptAxis, massAxisC[kNCharmParticles + 23 ]});
392390
393391 for (int iBeautyPart{0 }; iBeautyPart < kNBeautyParticles ; ++iBeautyPart) {
394392 hMassVsPtB[iBeautyPart] = registry.add <TH2>(Form (" fMassVsPt%s" , beautyParticleNames[iBeautyPart].data ()), Form (" #it{M} vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts" , beautyParticleNames[iBeautyPart].data ()), HistType::kTH2D , {ptAxis, massAxisB[iBeautyPart]});
@@ -475,7 +473,7 @@ struct HfFilter { // Main struct for HF triggers
475473 bool isSelectedITSROFBorder = evSel.applyITSROFBorderCut ? collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder ) : true ;
476474 bool isSelectedPvZ = (std::fabs (collision.posZ ()) < evSel.maxPvZ );
477475 if (!isSelectedTVX || !isSelectedTFBorder || !isSelectedITSROFBorder || !isSelectedPvZ) {
478- tags (keepEvent[kHighPt2P ], keepEvent[kHighPt3P ], keepEvent[kBeauty3P ], keepEvent[kBeauty4P ], keepEvent[kFemto2P ], keepEvent[kFemto3P ], keepEvent[kDoubleCharm2P ], keepEvent[kDoubleCharm3P ], keepEvent[kDoubleCharmMix ], keepEvent[kV0Charm2P ], keepEvent[kV0Charm3P ], keepEvent[kCharmBarToXiBach ], keepEvent[kSigmaCPPK ], keepEvent[kSigmaC0K0 ], keepEvent[kSigmaCP ], keepEvent[kPhotonCharm2P ], keepEvent[kPhotonCharm3P ], keepEvent[kSingleCharm2P ], keepEvent[kSingleCharm3P ], keepEvent[kSingleNonPromptCharm2P ], keepEvent[kSingleNonPromptCharm3P ], keepEvent[kCharmBarToXi2Bach ], keepEvent[kPrCharm2P ], keepEvent[kBtoJPsiKa ], keepEvent[kBtoJPsiKstar ], keepEvent[kBtoJPsiPhi ], keepEvent[kBtoJPsiPrKa ], keepEvent[kBtoJPsiPi ]);
476+ tags (keepEvent[kHighPt2P ], keepEvent[kHighPt3P ], keepEvent[kBeauty3P ], keepEvent[kBeauty4P ], keepEvent[kFemto2P ], keepEvent[kFemto3P ], keepEvent[kDoubleCharm2P ], keepEvent[kDoubleCharm3P ], keepEvent[kDoubleCharmMix ], keepEvent[kV0Charm2P ], keepEvent[kV0Charm3P ], keepEvent[kCharmBarToXiBach ], keepEvent[kSigmaCPPK ], keepEvent[kSigmaC0K0 ], keepEvent[kSigmaCPr ], keepEvent[kPhotonCharm2P ], keepEvent[kPhotonCharm3P ], keepEvent[kSingleCharm2P ], keepEvent[kSingleCharm3P ], keepEvent[kSingleNonPromptCharm2P ], keepEvent[kSingleNonPromptCharm3P ], keepEvent[kCharmBarToXi2Bach ], keepEvent[kPrCharm2P ], keepEvent[kBtoJPsiKa ], keepEvent[kBtoJPsiKstar ], keepEvent[kBtoJPsiPhi ], keepEvent[kBtoJPsiPrKa ], keepEvent[kBtoJPsiPi ]);
479477 continue ;
480478 }
481479
@@ -1532,7 +1530,7 @@ struct HfFilter { // Main struct for HF triggers
15321530 bool isTrackKaon = helper.isSelectedKaonFromXicResoToSigmaC <true >(track);
15331531 bool isTrackProton = helper.isSelectedTrack4Corr (track, configSigmaC.trkPIDspecies , configSigmaC.pidTPCMax , configSigmaC.pidTOFMax , configSigmaC.minPtProton , configSigmaC.maxPtProton , configSigmaC.tofPIDThreshold , configSigmaC.forceTOF );
15341532
1535- if (!( keepEvent[kSigmaCPPK ] || keepEvent[kSigmaCP ]) && is3Prong[2 ] > 0 && is3ProngInMass[2 ] > 0 && isSignalTagged[2 ] > 0 && (isTrackKaon || isTrackProton)) {
1533+ if ((! keepEvent[kSigmaCPPK ] || ! keepEvent[kSigmaCPr ]) && is3Prong[2 ] > 0 && is3ProngInMass[2 ] > 0 && isSignalTagged[2 ] > 0 && (isTrackKaon || isTrackProton)) {
15361534 // we need a candidate Lc->pKpi and a candidate soft kaon
15371535
15381536 // look for SigmaC++ candidates
@@ -1573,64 +1571,64 @@ struct HfFilter { // Main struct for HF triggers
15731571 auto ptSigmaC = RecoDecay::pt (pVecSigmaC);
15741572 int8_t whichSigmaC = helper.isSelectedSigmaCInDeltaMassRange <2 >(pVecFirst, pVecThird, pVecSecond, pVecSoftPi, ptSigmaC, is3Prong[2 ], hMassVsPtC[kNCharmParticles + 9 ], activateQA);
15751573 if (whichSigmaC > 0 ) {
1576- // / let's build a candidate SigmaC++K- pair and SigmaC++,0K - proton
1574+ // / let's build a candidate SigmaC++K- pair
15771575 // / and keep it only if:
15781576 // / - it has the correct charge (±1)
15791577 // / - it is in the correct mass range
15801578
15811579 // check the charge for SigmaC++K- candidates
15821580
1583- if (std::abs (chargeSc + track.sign ()) == 1 && std::abs (chargeSc) == 2 && configSigmaC. isTrigSigmaCPPK ) {
1584- // check the invariant mass
1585- float massSigmaCPKPi{-999 .}, massSigmaCPiKP{-999 .}, deltaMassXicResoPKPi{-999 .}, deltaMassXicResoPiKP{-999 .};
1586- float ptSigmaCKaon = RecoDecay::pt (pVecSigmaC, pVecFourth);
1581+ if (!keepEvent[ kSigmaCPPK ] && (std::abs (chargeSc + track.sign ()) == 1 && std::abs (chargeSc) == 2 )) {
1582+ // check the invariant mass
1583+ float massSigmaCPKPi{-999 .}, massSigmaCPiKP{-999 .}, deltaMassXicResoPKPi{-999 .}, deltaMassXicResoPiKP{-999 .};
1584+ float ptSigmaCKaon = RecoDecay::pt (pVecSigmaC, pVecFourth);
15871585
1588- if (ptSigmaCKaon > cutsPtDeltaMassCharmReso->get (2u , 10u )) {
1589- if (TESTBIT (whichSigmaC, 0 )) {
1590- massSigmaCPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massProton, massKa, massPi, massPi});
1591- deltaMassXicResoPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massProton, massKa, massPi, massPi, massKa}) - massSigmaCPKPi;
1592- }
1593- if (TESTBIT (whichSigmaC, 1 )) {
1594- massSigmaCPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massPi, massKa, massProton, massPi});
1595- deltaMassXicResoPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massPi, massKa, massProton, massPi, massKa}) - massSigmaCPiKP;
1596- }
1597- bool isPKPiOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPKPi && deltaMassXicResoPKPi < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1598- bool isPiKPOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPiKP && deltaMassXicResoPiKP < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1599- if ((isPKPiOk || isPiKPOk) && isTrackKaon) {
1600- // / This is a good SigmaC++K- event
1601- keepEvent[kSigmaCPPK ] = true ;
1586+ if (ptSigmaCKaon > cutsPtDeltaMassCharmReso->get (2u , 10u )) {
1587+ if (TESTBIT (whichSigmaC, 0 )) {
1588+ massSigmaCPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massProton, massKa, massPi, massPi});
1589+ deltaMassXicResoPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massProton, massKa, massPi, massPi, massKa}) - massSigmaCPKPi;
1590+ }
1591+ if (TESTBIT (whichSigmaC, 1 )) {
1592+ massSigmaCPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massPi, massKa, massProton, massPi});
1593+ deltaMassXicResoPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massPi, massKa, massProton, massPi, massKa}) - massSigmaCPiKP;
1594+ }
1595+ bool isPKPiOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPKPi && deltaMassXicResoPKPi < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1596+ bool isPiKPOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPiKP && deltaMassXicResoPiKP < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1597+ if ((isPKPiOk || isPiKPOk) && isTrackKaon) {
1598+ // / This is a good SigmaC++K- event
1599+ keepEvent[kSigmaCPPK ] = true ;
16021600
1603- // / QA plot
1604- if (activateQA) {
1605- if (isPKPiOk) {
1606- if (TESTBIT (whichSigmaC, 2 )) {
1607- hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
1608- }
1609- if (TESTBIT (whichSigmaC, 3 )) {
1610- hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
1611- }
1601+ // / QA plot
1602+ if (activateQA) {
1603+ if (isPKPiOk) {
1604+ if (TESTBIT (whichSigmaC, 2 )) {
1605+ hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
16121606 }
1613- if (isPiKPOk) {
1614- if (TESTBIT (whichSigmaC, 2 )) {
1615- hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
1616- }
1617- if (TESTBIT (whichSigmaC, 3 )) {
1618- hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
1619- }
1607+ if (TESTBIT (whichSigmaC, 3 )) {
1608+ hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
1609+ }
1610+ }
1611+ if (isPiKPOk) {
1612+ if (TESTBIT (whichSigmaC, 2 )) {
1613+ hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
1614+ }
1615+ if (TESTBIT (whichSigmaC, 3 )) {
1616+ hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
16201617 }
16211618 }
16221619 }
16231620 }
16241621 }
1622+ }
16251623 }
1626- float deltaEta = std::abs (RecoDecay::eta (pVecSigmaC) - track.eta () && pt3Prong < 3.0 );
1627- if (configSigmaC. isTrigSigmaCP && isTrackProton && deltaEta < 1.0 ) {
1628-
1629- auto tagBDT = helper.isBDTSelected (scores[2 ], thresholdBDTScores[5 ]);
1624+ float deltaEta = std::abs (RecoDecay::eta (pVecSigmaC) - track.eta ());
1625+ if (!keepEvent[ kSigmaCPr ] && ( isTrackProton && deltaEta < 1.0 && pt3Prong > 3.0 ) ) {
1626+
1627+ auto tagBDT = helper.isBDTSelected (scores[2 ], thresholdBDTScores[5 ]);
16301628
1631- if (helper.selectionSigmaCForScPCorr (pVecFirst, pVecThird, pVecSecond, pVecSoftPi, ptSigmaC, is3Prong[2 ], hMassVsPtC[kNCharmParticles + 23 ], activateQA, configSigmaC.minMassSigmaCCorr , configSigmaC.maxMassSigmaCCorr , configSigmaC.minPtSigmaC , configSigmaC.maxPtSigmaC ) && TESTBIT (tagBDT, RecoDecay::OriginType::Prompt)) {
1632- keepEvent[kSigmaCP ] = true ;
1633- }
1629+ if (helper.selectionSigmaCForScPCorr (pVecFirst, pVecThird, pVecSecond, pVecSoftPi, ptSigmaC, is3Prong[2 ], hMassVsPtC[kNCharmParticles + 23 ], activateQA, configSigmaC.minMassSigmaCCorr , configSigmaC.maxMassSigmaCCorr , configSigmaC.minPtSigmaC , configSigmaC.maxPtSigmaC ) && TESTBIT (tagBDT, RecoDecay::OriginType::Prompt)) {
1630+ keepEvent[kSigmaCPr ] = true ;
1631+ }
16341632 }
16351633 } // end SigmaC++ candidate
16361634 } // end loop over tracks (soft pi)
@@ -2028,7 +2026,7 @@ struct HfFilter { // Main struct for HF triggers
20282026 }
20292027 }
20302028
2031- tags (keepEvent[kHighPt2P ], keepEvent[kHighPt3P ], keepEvent[kBeauty3P ], keepEvent[kBeauty4P ], keepEvent[kFemto2P ], keepEvent[kFemto3P ], keepEvent[kDoubleCharm2P ], keepEvent[kDoubleCharm3P ], keepEvent[kDoubleCharmMix ], keepEvent[kV0Charm2P ], keepEvent[kV0Charm3P ], keepEvent[kCharmBarToXiBach ], keepEvent[kSigmaCPPK ], keepEvent[kSigmaC0K0 ], keepEvent[kSigmaCP ], keepEvent[kPhotonCharm2P ], keepEvent[kPhotonCharm3P ], keepEvent[kSingleCharm2P ], keepEvent[kSingleCharm3P ], keepEvent[kSingleNonPromptCharm2P ], keepEvent[kSingleNonPromptCharm3P ], keepEvent[kCharmBarToXi2Bach ], keepEvent[kPrCharm2P ], keepEvent[kBtoJPsiKa ], keepEvent[kBtoJPsiKstar ], keepEvent[kBtoJPsiPhi ], keepEvent[kBtoJPsiPrKa ], keepEvent[kBtoJPsiPi ]);
2029+ tags (keepEvent[kHighPt2P ], keepEvent[kHighPt3P ], keepEvent[kBeauty3P ], keepEvent[kBeauty4P ], keepEvent[kFemto2P ], keepEvent[kFemto3P ], keepEvent[kDoubleCharm2P ], keepEvent[kDoubleCharm3P ], keepEvent[kDoubleCharmMix ], keepEvent[kV0Charm2P ], keepEvent[kV0Charm3P ], keepEvent[kCharmBarToXiBach ], keepEvent[kSigmaCPPK ], keepEvent[kSigmaC0K0 ], keepEvent[kSigmaCPr ], keepEvent[kPhotonCharm2P ], keepEvent[kPhotonCharm3P ], keepEvent[kSingleCharm2P ], keepEvent[kSingleCharm3P ], keepEvent[kSingleNonPromptCharm2P ], keepEvent[kSingleNonPromptCharm3P ], keepEvent[kCharmBarToXi2Bach ], keepEvent[kPrCharm2P ], keepEvent[kBtoJPsiKa ], keepEvent[kBtoJPsiKstar ], keepEvent[kBtoJPsiPhi ], keepEvent[kBtoJPsiPrKa ], keepEvent[kBtoJPsiPi ]);
20322030
20332031 if (!std::accumulate (keepEvent, keepEvent + kNtriggersHF , 0 )) {
20342032 hProcessedEvents->Fill (1 );
0 commit comments