Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions PWGHF/TableProducer/candidateCreator2Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
Configurable<double> minParamChange{"minParamChange", 1.e-3, "stop iterations if largest change of any X is smaller than this"};
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
Configurable<bool> fillHistograms{"fillHistograms", true, "do validation plots"};
Configurable<int> occEstimator{"occEstimator", 1, "Occupancy estimation (1: ITS, 2: FT0C)"};
// magnetic field setting from CCDB
Configurable<bool> isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"};
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Expand Down Expand Up @@ -750,7 +751,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);

/// monitor the satisfied event selections
Expand All @@ -768,7 +769,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);

/// monitor the satisfied event selections
Expand All @@ -786,7 +787,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);

/// monitor the satisfied event selections
Expand All @@ -809,7 +810,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, CentralityEstimator::None, aod::BcFullInfos>(collision, centrality, ccdb, registry, bcs);

/// monitor the satisfied event selections
Expand Down Expand Up @@ -919,7 +920,7 @@
// D0(bar) → π+ K−, π+ K− π0, π+ π−, π+ π− π0, K+ K−
for (const auto& [channelMain, finalState] : daughtersD0Main) {
std::array<int, 2> arrPdgDaughtersMain2Prongs = std::array{finalState[0], finalState[1]};
if (finalState.size() == 3) { // o2-linter: disable=magic-number (partially reconstructed 3-prong decays)

Check failure on line 923 in PWGHF/TableProducer/candidateCreator2Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 923 in PWGHF/TableProducer/candidateCreator2Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, Pdg::kD0, arrPdgDaughtersMain2Prongs, true, &sign, FinalStateDepth, &nKinkedTracks, &nInteractionsWithMaterial);
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
Expand All @@ -938,7 +939,7 @@
indexRec = -1; // Reset indexRec if the generated decay does not match the reconstructed one
}
}
} else if (finalState.size() == 2) { // o2-linter: disable=magic-number (fully reconstructed 2-prong decays)

Check failure on line 942 in PWGHF/TableProducer/candidateCreator2Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 942 in PWGHF/TableProducer/candidateCreator2Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kD0, arrPdgDaughtersMain2Prongs, true, &sign, FinalStateDepth, &nKinkedTracks, &nInteractionsWithMaterial);
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
Expand Down
9 changes: 5 additions & 4 deletions PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
Configurable<double> minParamChange{"minParamChange", 1.e-3, "stop iterations if largest change of any X is smaller than this"};
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
Configurable<bool> fillHistograms{"fillHistograms", true, "do validation plots"};
Configurable<int> occEstimator{"occEstimator", 1, "Occupancy estimation (1: ITS, 2: FT0C)"};
// magnetic field setting from CCDB
Configurable<bool> isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"};
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Expand Down Expand Up @@ -894,7 +895,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);

/// monitor the satisfied event selections
Expand All @@ -912,7 +913,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);

/// monitor the satisfied event selections
Expand All @@ -930,7 +931,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);

/// monitor the satisfied event selections
Expand All @@ -953,7 +954,7 @@

/// bitmask with event. selection info
float centrality{-1.f};
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
float occupancy = getOccupancyColl(collision, occEstimator);
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, CentralityEstimator::None, aod::BcFullInfos>(collision, centrality, ccdb, registry, bcs);

/// monitor the satisfied event selections
Expand Down Expand Up @@ -1108,7 +1109,7 @@
}
}
}
} else if (finalState.size() == 3) { // o2-linter: disable=magic-number(fully reconstructed 3-prong decays)

Check failure on line 1112 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 1112 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, pdgMother, arrPdgDaughtersMain3Prongs, true, &sign, depthMainMax, &nKinkedTracks, &nInteractionsWithMaterial);
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
Expand Down
Loading