Skip to content

Commit 65c5b03

Browse files
committed
fix linter issues
1 parent 9ed27cd commit 65c5b03

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

PWGHF/TableProducer/treeCreatorOmegacSt.cxx

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
/// \file taskOmegacSt.cxx
12+
/// \file treeCreatorOmegacSt.cxx
1313
/// \brief Task to reconstruct Ωc from strangeness-tracked Ω and pion/kaon
1414
///
1515
/// \author Jochen Klein
@@ -118,7 +118,7 @@ DECLARE_SOA_COLUMN(PxPionOrKaon, pxPionOrKaon, float);
118118
DECLARE_SOA_COLUMN(PyPionOrKaon, pyPionOrKaon, float);
119119
DECLARE_SOA_COLUMN(PzPionOrKaon, pzPionOrKaon, float);
120120
DECLARE_SOA_COLUMN(IsPositivePionOrKaon, isPositivePionOrKaon, bool);
121-
DECLARE_SOA_COLUMN(ITSClusterMapPionOrKaon, itsClusterMapPionOrKaon, uint8_t);
121+
DECLARE_SOA_COLUMN(ItsClusterMapPionOrKaon, itsClusterMapPionOrKaon, uint8_t);
122122
DECLARE_SOA_COLUMN(CpaCharmedBaryon, cpaCharmedBaryon, float);
123123
DECLARE_SOA_COLUMN(CpaXYCharmedBaryon, cpaXYCharmedBaryon, float);
124124
DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, float);
@@ -174,7 +174,7 @@ DECLARE_SOA_TABLE(HfStChBars, "AOD", "HFSTCHBAR",
174174
hf_st_charmed_baryon::PyPionOrKaon,
175175
hf_st_charmed_baryon::PzPionOrKaon,
176176
hf_st_charmed_baryon::IsPositivePionOrKaon,
177-
hf_st_charmed_baryon::ITSClusterMapPionOrKaon,
177+
hf_st_charmed_baryon::ItsClusterMapPionOrKaon,
178178
hf_st_charmed_baryon::CpaCharmedBaryon,
179179
hf_st_charmed_baryon::CpaXYCharmedBaryon,
180180
hf_st_charmed_baryon::CpaCasc,
@@ -210,9 +210,6 @@ struct HfTreeCreatorOmegacSt {
210210
Produces<aod::HfStChBars> outputTable;
211211
Produces<aod::HfStChBarGens> outputTableGen;
212212

213-
Zorro zorro;
214-
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
215-
216213
Configurable<int> materialCorrectionType{"materialCorrectionType", static_cast<int>(o2::base::Propagator::MatCorrType::USEMatCorrLUT), "Type of material correction"};
217214
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
218215
Configurable<std::string> grpMagPath{"grpMagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
@@ -227,7 +224,7 @@ struct HfTreeCreatorOmegacSt {
227224
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations if chi2/chi2old > this"};
228225
Configurable<int> minNoClsTrackedCascade{"minNoClsTrackedCascade", 70, "Minimum number of clusters required for daughters of tracked cascades"};
229226
Configurable<int> minNoClsTrackedPionOrKaon{"minNoClsTrackedPionOrKaon", 70, "Minimum number of clusters required for associated pions/kaons"};
230-
Configurable<int> filterCollisions{"filterCollisions", 8, "0: no filtering; 8: sel8"};
227+
Configurable<bool> useSel8Trigger{"useSel8Trigger", true, "filter collisions on sel 8 trigger"};
231228
Configurable<float> massWindowTrackedOmega{"massWindowTrackedOmega", 0.05, "Inv. mass window for tracked Omega"};
232229
Configurable<float> massWindowXiExclTrackedOmega{"massWindowXiExclTrackedOmega", 0.005, "Inv. mass window for exclusion of Xi for tracked Omega-"};
233230
Configurable<float> massWindowTrackedXi{"massWindowTrackedXi", 0., "Inv. mass window for tracked Xi"};
@@ -243,6 +240,11 @@ struct HfTreeCreatorOmegacSt {
243240
Configurable<float> maxNSigmaKaon{"maxNSigmaKaon", 5., "Max Nsigma for kaon to be paired with Omega"};
244241
Configurable<bool> bzOnly{"bzOnly", true, "Use B_z instead of full field map"};
245242

243+
const int minItsNCls = 4;
244+
const float fractionTpcNclsFindable = 0.8;
245+
const float maxTpcChi2Ncl = 4.;
246+
const float maxItsChi2Ncl = 36.;
247+
246248
SliceCache cache;
247249
Service<o2::ccdb::BasicCCDBManager> ccdb;
248250
o2::vertexing::DCAFitterN<2> df2;
@@ -255,8 +257,7 @@ struct HfTreeCreatorOmegacSt {
255257
using TracksExt = soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra, aod::TracksDCA, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCPr, aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFPr>;
256258
using TracksExtMc = soa::Join<TracksExt, aod::McTrackLabels>;
257259

258-
Filter collisionFilter = (filterCollisions.node() == 0) ||
259-
(filterCollisions.node() == 8 && o2::aod::evsel::sel8 == true);
260+
Filter collisionFilter = (!useSel8Trigger.node()) || (o2::aod::evsel::sel8 == true);
260261

261262
// Preslice<aod::Tracks> perCol = aod::track::collisionId;
262263
PresliceUnsorted<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
@@ -291,6 +292,9 @@ struct HfTreeCreatorOmegacSt {
291292
{"hDeltaPtVsPt", "Delta pt;p_{T} (GeV/#it{c});#Delta p_{T} / p_{T}", {HistType::kTH2D, {{200, 0., 10.}, {200, -1., 1.}}}},
292293
}};
293294

295+
Zorro zorro;
296+
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
297+
294298
void init(InitContext const&)
295299
{
296300
df2.setPropagateToPCA(propToDCA);
@@ -332,6 +336,7 @@ struct HfTreeCreatorOmegacSt {
332336
int8_t nKaToPiCasc{0}, nKaToPiOmegac0{0};
333337
std::vector<int> idxBhadMothers{};
334338
int decayChannel = -1; // flag for different decay channels
339+
const int nProngs = 2;
335340

336341
void processMc(aod::McCollisions const&,
337342
aod::McParticles const& mcParticles)
@@ -342,7 +347,7 @@ struct HfTreeCreatorOmegacSt {
342347
const bool isXiC = std::abs(mcParticle.pdgCode()) == constants::physics::Pdg::kXiC0;
343348
if (isOmegaC || isXiC) {
344349
const auto daughters = mcParticle.daughters_as<aod::McParticles>();
345-
if (daughters.size() == 2) {
350+
if (daughters.size() == nProngs) {
346351
int idxPionDaughter = -1;
347352
int idxCascDaughter = -1;
348353
int idxKaonDaughter = -1;
@@ -573,19 +578,19 @@ struct HfTreeCreatorOmegacSt {
573578
o2::base::Propagator::Instance()->propagateToDCABxByBz(primaryVertex, trackParCovPi, 2.f, matCorr, &impactParameterPi);
574579
}
575580

576-
for (auto trackId : groupedTrackIds) {
581+
for (const auto& trackId : groupedTrackIds) {
577582
const auto track = trackId.template track_as<TracksType>();
578583
if (track.globalIndex() == v0TrackPr.globalIndex() ||
579584
track.globalIndex() == v0TrackPi.globalIndex() ||
580585
track.globalIndex() == bachelor.globalIndex()) {
581586
continue;
582587
}
583-
if ((track.itsNCls() >= 4) &&
588+
if ((track.itsNCls() >= minItsNCls) &&
584589
(track.tpcNClsFound() >= minNoClsTrackedPionOrKaon) &&
585590
(track.tpcNClsCrossedRows() >= minNoClsTrackedPionOrKaon) &&
586-
(track.tpcNClsCrossedRows() >= 0.8 * track.tpcNClsFindable()) &&
587-
(track.tpcChi2NCl() <= 4.f) &&
588-
(track.itsChi2NCl() <= 36.f) &&
591+
(track.tpcNClsCrossedRows() >= fractionTpcNclsFindable * track.tpcNClsFindable()) &&
592+
(track.tpcChi2NCl() <= maxTpcChi2Ncl) &&
593+
(track.itsChi2NCl() <= maxItsChi2Ncl) &&
589594
(std::abs(track.tpcNSigmaPi()) < maxNSigmaPion || std::abs(track.tpcNSigmaKa()) < maxNSigmaKaon)) {
590595
LOGF(debug, " .. combining with pion/kaon candidate %d", track.globalIndex());
591596
int trackMotherId = -1;

0 commit comments

Comments
 (0)