Skip to content

Commit 21cc8df

Browse files
committed
Please consider the following formatting changes
1 parent 3b5f08b commit 21cc8df

File tree

2 files changed

+82
-89
lines changed

2 files changed

+82
-89
lines changed

EventFiltering/PWGHF/HFFilter.cxx

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -149,21 +149,21 @@ 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<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"};
165165
} configSigmaC;
166-
166+
167167
// parameters for charm baryons to Xi bachelor
168168
Configurable<LabeledArray<float>> cutsXiCascades{"cutsXiCascades", {cutsCascades[0], 1, 8, labelsEmpty, labelsColumnsCascades}, "Selections for cascades (Xi) for Xi+bachelor triggers"};
169169
Configurable<LabeledArray<float>> cutsXiBachelor{"cutsXiBachelor", {cutsCharmBaryons[0], 1, 11, labelsEmpty, labelsColumnsCharmBarCuts}, "Selections for charm baryons (Xi+Pi, Xi+Ka, Xi+Pi+Pi)"};
@@ -224,7 +224,7 @@ struct HfFilter { // Main struct for HF triggers
224224
int currentRun{0}; // needed to detect if the run changed and trigger update of calibrations etc.
225225

226226
// array of BDT thresholds
227-
std::array<LabeledArray<double>, kNCharmParticles+1> thresholdBDTScores;
227+
std::array<LabeledArray<double>, kNCharmParticles + 1> thresholdBDTScores;
228228

229229
o2::vertexing::DCAFitterN<2> df2; // fitter for Charm Hadron vertex (2-prong vertex fitter)
230230
o2::vertexing::DCAFitterN<3> df3; // fitter for Charm/Beauty Hadron vertex (3-prong vertex fitter)
@@ -387,7 +387,7 @@ struct HfFilter { // Main struct for HF triggers
387387
// ThetaC
388388
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]});
389389
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
390+
// SigmaC-p
391391
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]});
392392

393393
for (int iBeautyPart{0}; iBeautyPart < kNBeautyParticles; ++iBeautyPart) {
@@ -475,7 +475,7 @@ struct HfFilter { // Main struct for HF triggers
475475
bool isSelectedITSROFBorder = evSel.applyITSROFBorderCut ? collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) : true;
476476
bool isSelectedPvZ = (std::fabs(collision.posZ()) < evSel.maxPvZ);
477477
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]);
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]);
479479
continue;
480480
}
481481

@@ -1580,57 +1580,57 @@ struct HfFilter { // Main struct for HF triggers
15801580

15811581
// check the charge for SigmaC++K- candidates
15821582

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);
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);
15871587

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;
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;
16021602

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-
}
1612-
}
1613-
if (isPiKPOk) {
1614-
if (TESTBIT(whichSigmaC, 2)) {
1615-
hMassVsPtC[kNCharmParticles + 11]->Fill(ptSigmaCKaon, deltaMassXicResoPiKP);
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+
}
16161612
}
1617-
if (TESTBIT(whichSigmaC, 3)) {
1618-
hMassVsPtC[kNCharmParticles + 12]->Fill(ptSigmaCKaon, deltaMassXicResoPiKP);
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+
}
16191620
}
16201621
}
16211622
}
16221623
}
16231624
}
1624-
}
16251625
}
16261626
float deltaEta = std::abs(RecoDecay::eta(pVecSigmaC) - track.eta() && pt3Prong < 3.0);
16271627
if (configSigmaC.isTrigSigmaCP && isTrackProton && deltaEta < 1.0) {
1628-
1629-
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+
auto tagBDT = helper.isBDTSelected(scores[2], thresholdBDTScores[5]);
1630+
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+
}
16341634
}
16351635
} // end SigmaC++ candidate
16361636
} // end loop over tracks (soft pi)
@@ -2028,7 +2028,7 @@ struct HfFilter { // Main struct for HF triggers
20282028
}
20292029
}
20302030

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]);
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]);
20322032

20332033
if (!std::accumulate(keepEvent, keepEvent + kNtriggersHF, 0)) {
20342034
hProcessedEvents->Fill(1);

0 commit comments

Comments
 (0)