Skip to content

Commit a902c68

Browse files
committed
Flag to enable/disable soft-pi ITS hitmap for Sc.
1 parent 6ec95e2 commit a902c68

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ struct HfCandidateCreatorSigmac0plusplus {
8585
Configurable<bool> applyGlobalTrkWoDcaCutsSoftPi{"applyGlobalTrkWoDcaCutsSoftPi", false, "Switch on the application of the global-track w/o dca cuts for soft pion BEFORE ALL OTHER CUSTOM CUTS"};
8686
Configurable<float> softPiEtaMax{"softPiEtaMax", 0.9f, "Soft pion max value for pseudorapidity (abs vale)"};
8787
Configurable<float> softPiChi2Max{"softPiChi2Max", 36.f, "Soft pion max value for chi2 ITS"};
88+
Configurable<int> softPiApplyCustomITSHitMap{"softPiApplyCustomITSHitMap", true, "Flag to enable/disable the application of the custom ITS hitmap requirement for the candidate soft pion"};
8889
Configurable<int> softPiItsHitMap{"softPiItsHitMap", 127, "Soft pion ITS hitmap"};
8990
Configurable<int> softPiItsHitsMin{"softPiItsHitsMin", 1, "Minimum number of ITS layers crossed by the soft pion among those in \"softPiItsHitMap\""};
9091
Configurable<float> softPiDcaXYMax{"softPiDcaXYMax", 0.065, "Soft pion max dcaXY (cm)"};
@@ -164,22 +165,24 @@ struct HfCandidateCreatorSigmac0plusplus {
164165
// ITS chi2
165166
softPiCuts.SetMaxChi2PerClusterITS(softPiChi2Max);
166167
// ITS hitmap
167-
std::set<uint8_t> setSoftPiItsHitMap; // = {};
168-
constexpr std::size_t NLayersIts = 7;
169-
for (std::size_t idItsLayer = 0u; idItsLayer < NLayersIts; idItsLayer++) {
170-
if (TESTBIT(softPiItsHitMap, idItsLayer)) {
171-
setSoftPiItsHitMap.insert(static_cast<uint8_t>(idItsLayer));
168+
if (softPiApplyCustomITSHitMap) {
169+
std::set<uint8_t> setSoftPiItsHitMap; // = {};
170+
constexpr std::size_t NLayersIts = 7;
171+
for (std::size_t idItsLayer = 0u; idItsLayer < NLayersIts; idItsLayer++) {
172+
if (TESTBIT(softPiItsHitMap, idItsLayer)) {
173+
setSoftPiItsHitMap.insert(static_cast<uint8_t>(idItsLayer));
174+
}
172175
}
176+
LOG(info) << "### ITS hitmap for soft pion";
177+
LOG(info) << " >>> setSoftPiItsHitMap.size(): " << setSoftPiItsHitMap.size();
178+
LOG(info) << " >>> Custom ITS hitmap dfchecked: ";
179+
for (const auto it : setSoftPiItsHitMap) {
180+
LOG(info) << " Layer " << static_cast<int>(it) << " ";
181+
}
182+
LOG(info) << "############";
183+
softPiCuts.SetRequireITSRefit();
184+
softPiCuts.SetRequireHitsInITSLayers(softPiItsHitsMin, setSoftPiItsHitMap);
173185
}
174-
LOG(info) << "### ITS hitmap for soft pion";
175-
LOG(info) << " >>> setSoftPiItsHitMap.size(): " << setSoftPiItsHitMap.size();
176-
LOG(info) << " >>> Custom ITS hitmap dfchecked: ";
177-
for (const auto it : setSoftPiItsHitMap) {
178-
LOG(info) << " Layer " << static_cast<int>(it) << " ";
179-
}
180-
LOG(info) << "############";
181-
softPiCuts.SetRequireITSRefit();
182-
softPiCuts.SetRequireHitsInITSLayers(softPiItsHitsMin, setSoftPiItsHitMap);
183186

184187
/// CCDB for dcaXY, dcaZ recalculation of soft pions reassigned to another collision
185188
ccdb->setURL(ccdbUrl);

0 commit comments

Comments
 (0)