Skip to content

Commit f7af3ba

Browse files
committed
fix comments from vit
1 parent 91efd9e commit f7af3ba

File tree

4 files changed

+64
-51
lines changed

4 files changed

+64
-51
lines changed

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,18 @@ struct HfCandidateCreator2Prong {
114114
{
115115
std::array<bool, 8> doprocessDF{doprocessPvRefitWithDCAFitterN, doprocessNoPvRefitWithDCAFitterN,
116116
doprocessPvRefitWithDCAFitterNCentFT0C, doprocessNoPvRefitWithDCAFitterNCentFT0C,
117-
doprocessPvRefitWithDCAFitterNCentFT0M, doprocessNoPvRefitWithDCAFitterNCentFT0M, doprocessPvRefitWithDCAFitterNUPC, doprocessNoPvRefitWithDCAFitterNUPC};
117+
doprocessPvRefitWithDCAFitterNCentFT0M, doprocessNoPvRefitWithDCAFitterNCentFT0M, doprocessPvRefitWithDCAFitterNUpc, doprocessNoPvRefitWithDCAFitterNUpc};
118118
std::array<bool, 8> doprocessKF{doprocessPvRefitWithKFParticle, doprocessNoPvRefitWithKFParticle,
119119
doprocessPvRefitWithKFParticleCentFT0C, doprocessNoPvRefitWithKFParticleCentFT0C,
120-
doprocessPvRefitWithKFParticleCentFT0M, doprocessNoPvRefitWithKFParticleCentFT0M, doprocessPvRefitWithKFParticleUPC, doprocessNoPvRefitWithKFParticleUPC};
120+
doprocessPvRefitWithKFParticleCentFT0M, doprocessNoPvRefitWithKFParticleCentFT0M, doprocessPvRefitWithKFParticleUpc, doprocessNoPvRefitWithKFParticleUpc};
121121
if ((std::accumulate(doprocessDF.begin(), doprocessDF.end(), 0) + std::accumulate(doprocessKF.begin(), doprocessKF.end(), 0)) != 1) {
122122
LOGP(fatal, "One and only one process function must be enabled at a time.");
123123
}
124124

125-
std::array<bool, 4> processesCollisions = {doprocessCollisions, doprocessCollisionsCentFT0C, doprocessCollisionsCentFT0M, doprocessCollisionsUPC};
125+
std::array<bool, 4> processesCollisions = {doprocessCollisions, doprocessCollisionsCentFT0C, doprocessCollisionsCentFT0M, doprocessCollisionsUpc};
126126
const int nProcessesCollisions = std::accumulate(processesCollisions.begin(), processesCollisions.end(), 0);
127-
std::array<bool, 5> processesCollisionsUPC = {doprocessPvRefitWithDCAFitterNUPC, doprocessNoPvRefitWithDCAFitterNUPC, doprocessPvRefitWithKFParticleUPC, doprocessNoPvRefitWithKFParticleUPC, doprocessCollisionsUPC};
128-
const int nProcessesCollisionsUPC = std::accumulate(processesCollisionsUPC.begin(), processesCollisionsUPC.end(), 0);
127+
std::array<bool, 5> processesCollisionsUpc = {doprocessPvRefitWithDCAFitterNUpc, doprocessNoPvRefitWithDCAFitterNUpc, doprocessPvRefitWithKFParticleUpc, doprocessNoPvRefitWithKFParticleUpc, doprocessCollisionsUpc};
128+
const int nProcessesCollisionsUpc = std::accumulate(processesCollisionsUpc.begin(), processesCollisionsUpc.end(), 0);
129129
if (nProcessesCollisions > 1) {
130130
LOGP(fatal, "At most one process function for collision monitoring can be enabled at a time.");
131131
}
@@ -140,7 +140,7 @@ struct HfCandidateCreator2Prong {
140140
LOGP(fatal, "Process function for collision monitoring not correctly enabled. Did you enable \"processCollisionsCentFT0M\"?");
141141
}
142142
}
143-
if (nProcessesCollisionsUPC > 1 && isRun2) {
143+
if (nProcessesCollisionsUpc > 0 && isRun2) {
144144
LOGP(fatal, "Process function for UPC is only available in Run 3!");
145145
}
146146

@@ -190,7 +190,7 @@ struct HfCandidateCreator2Prong {
190190
setLabelHistoCands(hCandidates);
191191
}
192192

193-
template <bool doPvRefit, bool useUpcSel = false, o2::hf_centrality::CentralityEstimator centEstimator, typename Coll, typename CandType, typename TTracks, typename BCsType>
193+
template <bool doPvRefit, bool useUpcSel, o2::hf_centrality::CentralityEstimator centEstimator, typename Coll, typename CandType, typename TTracks, typename BCsType>
194194
void runCreator2ProngWithDCAFitterN(Coll const&,
195195
CandType const& rowsTrackIndexProng2,
196196
TTracks const&,
@@ -204,7 +204,7 @@ struct HfCandidateCreator2Prong {
204204
float centrality{-1.f};
205205
uint32_t rejectionMask{0};
206206
if constexpr (useUpcSel) {
207-
rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUPC<true, centEstimator, BCsType>(collision, centrality, ccdb, registry, bcs);
207+
rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, centEstimator, BCsType>(collision, centrality, ccdb, registry, bcs);
208208
} else {
209209
rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, centEstimator, BCsType>(collision, centrality, ccdb, registry);
210210
}
@@ -343,7 +343,7 @@ struct HfCandidateCreator2Prong {
343343
}
344344
}
345345

346-
template <bool doPvRefit, bool useUpcSel = false, o2::hf_centrality::CentralityEstimator centEstimator, typename Coll, typename CandType, typename TTracks, typename BCsType>
346+
template <bool doPvRefit, bool useUpcSel, o2::hf_centrality::CentralityEstimator centEstimator, typename Coll, typename CandType, typename TTracks, typename BCsType>
347347
void runCreator2ProngWithKFParticle(Coll const&,
348348
CandType const& rowsTrackIndexProng2,
349349
TTracks const&,
@@ -357,7 +357,7 @@ struct HfCandidateCreator2Prong {
357357
float centrality{-1.f};
358358
uint32_t rejectionMask{0};
359359
if constexpr (useUpcSel) {
360-
rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUPC<true, centEstimator, BCsType>(collision, centrality, ccdb, registry, bcs);
360+
rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, centEstimator, BCsType>(collision, centrality, ccdb, registry, bcs);
361361
} else {
362362
rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, centEstimator, BCsType>(collision, centrality, ccdb, registry);
363363
}
@@ -645,7 +645,7 @@ struct HfCandidateCreator2Prong {
645645
/////////////////////////////////////////////
646646

647647
/// @brief process function using DCA fitter w/ PV refit and w/ centrality selection on UPC
648-
void processPvRefitWithDCAFitterNUPC(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
648+
void processPvRefitWithDCAFitterNUpc(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
649649
soa::Join<aod::Hf2Prongs, aod::HfPvRefit2Prong> const& rowsTrackIndexProng2,
650650
TracksWCovExtraPidPiKa const& tracks,
651651
aod::BCFullInfos const& bcWithTimeStamps,
@@ -656,10 +656,10 @@ struct HfCandidateCreator2Prong {
656656
{
657657
runCreator2ProngWithDCAFitterN</*doPvRefit*/ true, true, CentralityEstimator::None>(collisions, rowsTrackIndexProng2, tracks, bcWithTimeStamps);
658658
}
659-
PROCESS_SWITCH(HfCandidateCreator2Prong, processPvRefitWithDCAFitterNUPC, "Run candidate creator using DCA fitter w/ PV refit and w/ centrality selection on UltraPeripheral Collision", false);
659+
PROCESS_SWITCH(HfCandidateCreator2Prong, processPvRefitWithDCAFitterNUpc, "Run candidate creator using DCA fitter w/ PV refit and w/ centrality selection on UltraPeripheral Collision", false);
660660

661661
/// @brief process function using DCA fitter w/o PV refit and w/ centrality selection UPC
662-
void processNoPvRefitWithDCAFitterNUPC(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
662+
void processNoPvRefitWithDCAFitterNUpc(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
663663
aod::Hf2Prongs const& rowsTrackIndexProng2,
664664
TracksWCovExtraPidPiKa const& tracks,
665665
aod::BCFullInfos const& bcWithTimeStamps,
@@ -670,10 +670,10 @@ struct HfCandidateCreator2Prong {
670670
{
671671
runCreator2ProngWithDCAFitterN</*doPvRefit*/ false, true, CentralityEstimator::None>(collisions, rowsTrackIndexProng2, tracks, bcWithTimeStamps);
672672
}
673-
PROCESS_SWITCH(HfCandidateCreator2Prong, processNoPvRefitWithDCAFitterNUPC, "Run candidate creator using DCA fitter w/o PV refit and w/ centrality selection UltraPeripheral Collision", false);
673+
PROCESS_SWITCH(HfCandidateCreator2Prong, processNoPvRefitWithDCAFitterNUpc, "Run candidate creator using DCA fitter w/o PV refit and w/ centrality selection UltraPeripheral Collision", false);
674674

675675
/// @brief process function using KFParticle package w/ PV refit and w/ centrality selection on UPC
676-
void processPvRefitWithKFParticleUPC(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
676+
void processPvRefitWithKFParticleUpc(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
677677
soa::Join<aod::Hf2Prongs, aod::HfPvRefit2Prong> const& rowsTrackIndexProng2,
678678
TracksWCovExtraPidPiKa const& tracks,
679679
aod::BCFullInfos const& bcWithTimeStamps,
@@ -684,10 +684,10 @@ struct HfCandidateCreator2Prong {
684684
{
685685
runCreator2ProngWithKFParticle</*doPvRefit*/ true, true, CentralityEstimator::None>(collisions, rowsTrackIndexProng2, tracks, bcWithTimeStamps);
686686
}
687-
PROCESS_SWITCH(HfCandidateCreator2Prong, processPvRefitWithKFParticleUPC, "Run candidate creator using KFParticle package w/ PV refit and w/ centrality selection on UltraPeripheral Collision", false);
687+
PROCESS_SWITCH(HfCandidateCreator2Prong, processPvRefitWithKFParticleUpc, "Run candidate creator using KFParticle package w/ PV refit and w/ centrality selection on UltraPeripheral Collision", false);
688688

689689
/// @brief process function using KFParticle package w/o PV refit and w/o centrality selections on UPC
690-
void processNoPvRefitWithKFParticleUPC(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
690+
void processNoPvRefitWithKFParticleUpc(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
691691
aod::Hf2Prongs const& rowsTrackIndexProng2,
692692
TracksWCovExtraPidPiKa const& tracks,
693693
aod::BCFullInfos const& bcWithTimeStamps,
@@ -698,7 +698,7 @@ struct HfCandidateCreator2Prong {
698698
{
699699
runCreator2ProngWithKFParticle</*doPvRefit*/ false, true, CentralityEstimator::None>(collisions, rowsTrackIndexProng2, tracks, bcWithTimeStamps);
700700
}
701-
PROCESS_SWITCH(HfCandidateCreator2Prong, processNoPvRefitWithKFParticleUPC, "Run candidate creator using KFParticle package w/o PV refit and w/ centrality selection on UltraPeripheral Collision", false);
701+
PROCESS_SWITCH(HfCandidateCreator2Prong, processNoPvRefitWithKFParticleUpc, "Run candidate creator using KFParticle package w/o PV refit and w/ centrality selection on UltraPeripheral Collision", false);
702702

703703
///////////////////////////////////////////////////////////
704704
/// ///
@@ -761,22 +761,27 @@ struct HfCandidateCreator2Prong {
761761
PROCESS_SWITCH(HfCandidateCreator2Prong, processCollisionsCentFT0M, "Collision monitoring - FT0M centrality", false);
762762

763763
/// @brief process function to monitor collisions - UPC collision
764-
void processCollisionsUPC(soa::Join<aod::Collisions, aod::EvSels> const& collisions, aod::BCFullInfos const& bcs, aod::FT0s const& /*ft0s*/, aod::FV0As const& /*fv0as*/, aod::FDDs const& /*fdds*/, aod::Zdcs const& /*zdcs*/)
764+
void processCollisionsUpc(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
765+
aod::BCFullInfos const& bcs,
766+
aod::FT0s const& /*ft0s*/,
767+
aod::FV0As const& /*fv0as*/,
768+
aod::FDDs const& /*fdds*/,
769+
aod::Zdcs const& /*zdcs*/)
765770
{
766771
/// loop over collisions
767772
for (const auto& collision : collisions) {
768773

769774
/// bitmask with event. selection info
770775
float centrality{-1.f};
771776
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
772-
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUPC<true, CentralityEstimator::None, aod::BCFullInfos>(collision, centrality, ccdb, registry, bcs);
777+
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, CentralityEstimator::None, aod::BCFullInfos>(collision, centrality, ccdb, registry, bcs);
773778

774779
/// monitor the satisfied event selections
775780
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy);
776781

777782
} /// end loop over collisions
778783
}
779-
PROCESS_SWITCH(HfCandidateCreator2Prong, processCollisionsUPC, "Collision monitoring - UPC", false);
784+
PROCESS_SWITCH(HfCandidateCreator2Prong, processCollisionsUpc, "Collision monitoring - UPC", false);
780785
};
781786

782787
/// Extends the base table with expression columns.

0 commit comments

Comments
 (0)