@@ -149,14 +149,13 @@ struct HfFilter { // Main struct for HF triggers
149149
150150 // parameters for Sigma_C proton trigger
151151 Configurable<LabeledArray<float >> cutsSigmaCPr{
152- " cutsSigmaCPr" ,
153- {cutsSigmaCPrDefault[0 ],
154- static_cast <uint32_t >(labelsRowsSigmaCPr.size ()),
155- static_cast <uint32_t >(labelsColumnsSigmaCPr.size ()),
156- labelsRowsSigmaCPr,
157- labelsColumnsSigmaCPr},
158- " Cuts for SigmaCPr trigger (proton pT and TOF threshold pT)"
159- };
152+ " cutsSigmaCPr" ,
153+ {cutsSigmaCPrDefault[0 ],
154+ static_cast <uint32_t >(labelsRowsSigmaCPr.size ()),
155+ static_cast <uint32_t >(labelsColumnsSigmaCPr.size ()),
156+ labelsRowsSigmaCPr,
157+ labelsColumnsSigmaCPr},
158+ " Cuts for SigmaCPr trigger (proton pT and TOF threshold pT)" };
160159 Configurable<bool > forceTofProtonForSigmaCPr{" forceTofProtonForSigmaCPr" , true , " flag to force TOF PID for protons in SigmaCPr trigger" };
161160
162161 // parameters for charm baryons to Xi bachelor
@@ -301,10 +300,10 @@ struct HfFilter { // Main struct for HF triggers
301300 cutsPtDeltaMassCharmReso->get (0u , 13u ), // min ΔM
302301 cutsPtDeltaMassCharmReso->get (1u , 13u ), // max ΔM
303302 cutsPtDeltaMassCharmReso->get (2u , 13u ), // min pT SigmaC
304- cutsSigmaCPr->get (0u , 0u ), // min pT proton
305- cutsSigmaCPr->get (1u , 0u ), // max pT proton
306- cutsSigmaCPr->get (2u , 2u ), // TOF pT threshold
307- forceTofProtonForSigmaCPr // set True for force TOF on proton candidate after threshold
303+ cutsSigmaCPr->get (0u , 0u ), // min pT proton
304+ cutsSigmaCPr->get (1u , 0u ), // max pT proton
305+ cutsSigmaCPr->get (2u , 2u ), // TOF pT threshold
306+ forceTofProtonForSigmaCPr // set True for force TOF on proton candidate after threshold
308307 );
309308 dfStrangeness.setMatCorrType (matCorr);
310309 dfStrangeness3.setMatCorrType (matCorr);
@@ -392,7 +391,7 @@ struct HfFilter { // Main struct for HF triggers
392391 // ThetaC
393392 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 ]});
394393 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 ]});
395- // SigmaC-p
394+ // SigmaC-p
396395 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 ]});
397396
398397 for (int iBeautyPart{0 }; iBeautyPart < kNBeautyParticles ; ++iBeautyPart) {
@@ -482,7 +481,7 @@ struct HfFilter { // Main struct for HF triggers
482481 bool isSelectedITSROFBorder = evSel.applyITSROFBorderCut ? collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder ) : true ;
483482 bool isSelectedPvZ = (std::fabs (collision.posZ ()) < evSel.maxPvZ );
484483 if (!isSelectedTVX || !isSelectedTFBorder || !isSelectedITSROFBorder || !isSelectedPvZ) {
485- 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[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 ], keepEvent[kSigmaCPr ]);
484+ 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[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 ], keepEvent[kSigmaCPr ]);
486485 continue ;
487486 }
488487
@@ -1594,65 +1593,65 @@ struct HfFilter { // Main struct for HF triggers
15941593 // check the mass of the SigmaC++ candidate
15951594 auto pVecSigmaC = RecoDecay::pVec (pVecFirst, pVecSecond, pVecThird, pVecSoftPi);
15961595 auto ptSigmaC = RecoDecay::pt (pVecSigmaC);
1597- int8_t whichSigmaC = helper.isSelectedSigmaCInDeltaMassRange <2 >(pVecFirst, pVecThird, pVecSecond, pVecSoftPi, ptSigmaC, is3Prong[2 ], hMassVsPtC[kNCharmParticles + 9 ], activateQA); // put charge = -1, it ensure the function is not looking charge and calculate the bit for ground state of SigmaC in the specified mass range
1596+ int8_t whichSigmaC = helper.isSelectedSigmaCInDeltaMassRange <2 >(pVecFirst, pVecThird, pVecSecond, pVecSoftPi, ptSigmaC, is3Prong[2 ], hMassVsPtC[kNCharmParticles + 9 ], activateQA); // put charge = -1, it ensure the function is not looking charge and calculate the bit for ground state of SigmaC in the specified mass range
15981597 if (whichSigmaC > 0 ) {
15991598 // / let's build a candidate SigmaC++K- pair
16001599 // / and keep it only if:
16011600 // / - it has the correct charge (±1)
16021601 // / - it is in the correct mass range
16031602 // check the charge for SigmaC++K- candidates
1604- if (!keepEvent[kSigmaCPPK ] && (std::abs (chargeSc + track.sign ()) == 1 && std::abs (chargeSc) == 2 )){
1605- // check the invariant mass
1606- float massSigmaCPKPi{-999 .}, massSigmaCPiKP{-999 .}, deltaMassXicResoPKPi{-999 .}, deltaMassXicResoPiKP{-999 .};
1607- float ptSigmaCKaon = RecoDecay::pt (pVecSigmaC, pVecFourth);
1608-
1609- if (ptSigmaCKaon > cutsPtDeltaMassCharmReso->get (2u , 10u )) {
1610- if (TESTBIT (whichSigmaC, 0 )) {
1611- massSigmaCPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massProton, massKa, massPi, massPi});
1612- deltaMassXicResoPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massProton, massKa, massPi, massPi, massKa}) - massSigmaCPKPi;
1613- }
1614- if (TESTBIT (whichSigmaC, 1 )) {
1615- massSigmaCPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massPi, massKa, massProton, massPi});
1616- deltaMassXicResoPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massPi, massKa, massProton, massPi, massKa}) - massSigmaCPiKP;
1617- }
1618- bool isPKPiOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPKPi && deltaMassXicResoPKPi < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1619- bool isPiKPOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPiKP && deltaMassXicResoPiKP < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1620- if ((isPKPiOk || isPiKPOk) && isTrackKaon) {
1621- // / This is a good SigmaC++K- event
1622- keepEvent[kSigmaCPPK ] = true ;
1603+ if (!keepEvent[kSigmaCPPK ] && (std::abs (chargeSc + track.sign ()) == 1 && std::abs (chargeSc) == 2 )) {
1604+ // check the invariant mass
1605+ float massSigmaCPKPi{-999 .}, massSigmaCPiKP{-999 .}, deltaMassXicResoPKPi{-999 .}, deltaMassXicResoPiKP{-999 .};
1606+ float ptSigmaCKaon = RecoDecay::pt (pVecSigmaC, pVecFourth);
16231607
1624- // / QA plot
1625- if (activateQA) {
1626- if (isPKPiOk) {
1627- if (TESTBIT (whichSigmaC, 2 )) {
1628- hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
1629- }
1630- if (TESTBIT (whichSigmaC, 3 )) {
1631- hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
1632- }
1633- }
1634- if (isPiKPOk) {
1635- if (TESTBIT (whichSigmaC, 2 )) {
1636- hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
1608+ if (ptSigmaCKaon > cutsPtDeltaMassCharmReso->get (2u , 10u )) {
1609+ if (TESTBIT (whichSigmaC, 0 )) {
1610+ massSigmaCPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massProton, massKa, massPi, massPi});
1611+ deltaMassXicResoPKPi = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massProton, massKa, massPi, massPi, massKa}) - massSigmaCPKPi;
1612+ }
1613+ if (TESTBIT (whichSigmaC, 1 )) {
1614+ massSigmaCPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi}, std::array{massPi, massKa, massProton, massPi});
1615+ deltaMassXicResoPiKP = RecoDecay::m (std::array{pVecFirst, pVecSecond, pVecThird, pVecSoftPi, pVecFourth}, std::array{massPi, massKa, massProton, massPi, massKa}) - massSigmaCPiKP;
1616+ }
1617+ bool isPKPiOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPKPi && deltaMassXicResoPKPi < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1618+ bool isPiKPOk = (cutsPtDeltaMassCharmReso->get (0u , 10u ) < deltaMassXicResoPiKP && deltaMassXicResoPiKP < cutsPtDeltaMassCharmReso->get (1u , 10u ));
1619+ if ((isPKPiOk || isPiKPOk) && isTrackKaon) {
1620+ // / This is a good SigmaC++K- event
1621+ keepEvent[kSigmaCPPK ] = true ;
1622+
1623+ // / QA plot
1624+ if (activateQA) {
1625+ if (isPKPiOk) {
1626+ if (TESTBIT (whichSigmaC, 2 )) {
1627+ hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
1628+ }
1629+ if (TESTBIT (whichSigmaC, 3 )) {
1630+ hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPKPi);
1631+ }
16371632 }
1638- if (TESTBIT (whichSigmaC, 3 )) {
1639- hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
1633+ if (isPiKPOk) {
1634+ if (TESTBIT (whichSigmaC, 2 )) {
1635+ hMassVsPtC[kNCharmParticles + 11 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
1636+ }
1637+ if (TESTBIT (whichSigmaC, 3 )) {
1638+ hMassVsPtC[kNCharmParticles + 12 ]->Fill (ptSigmaCKaon, deltaMassXicResoPiKP);
1639+ }
16401640 }
16411641 }
16421642 }
16431643 }
16441644 }
1645- }
16461645 }
1647- // now from here we are looking for SigmaC-proton trigger
1648- // DeltaEta is the difference in Eta between SigmaC candiate and proton
1646+ // now from here we are looking for SigmaC-proton trigger
1647+ // DeltaEta is the difference in Eta between SigmaC candiate and proton
16491648 float deltaEta = std::abs (RecoDecay::eta (pVecSigmaC) - track.eta ());
16501649 if (!keepEvent[kSigmaCPr ] && (isTrackProton && deltaEta < 1.0 )) {
1651- auto tagBDT = helper.isBDTSelected (scores[2 ], thresholdBDTScoreScForSigmaCPr.value );
1652- int8_t whichSigmaC = helper.isSelectedSigmaCInDeltaMassRange <-1 >(pVecFirst, pVecThird, pVecSecond, pVecSoftPi, ptSigmaC, is3Prong[2 ], hMassVsPtC[kNCharmParticles + 23 ], activateQA); // put charge {-1} for not looking charge specific SigmaC ground state, it will return bit 4 corresponding to it
1653- if (TESTBIT (whichSigmaC, 4 ) && TESTBIT (tagBDT, RecoDecay::OriginType::Prompt)) {
1650+ auto tagBDT = helper.isBDTSelected (scores[2 ], thresholdBDTScoreScForSigmaCPr.value );
1651+ int8_t whichSigmaC = helper.isSelectedSigmaCInDeltaMassRange <-1 >(pVecFirst, pVecThird, pVecSecond, pVecSoftPi, ptSigmaC, is3Prong[2 ], hMassVsPtC[kNCharmParticles + 23 ], activateQA); // put charge {-1} for not looking charge specific SigmaC ground state, it will return bit 4 corresponding to it
1652+ if (TESTBIT (whichSigmaC, 4 ) && TESTBIT (tagBDT, RecoDecay::OriginType::Prompt)) {
16541653 keepEvent[kSigmaCPr ] = true ;
1655- }
1654+ }
16561655 }
16571656 } // end SigmaC++ candidate
16581657 } // end loop over tracks (soft pi)
0 commit comments