Skip to content

Commit 882a5f3

Browse files
author
Christopher Klumm
committed
Compile time fixes
1 parent dca8320 commit 882a5f3

File tree

1 file changed

+35
-43
lines changed

1 file changed

+35
-43
lines changed

PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskForSpecificAnalysis.cxx

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct FemtoDreamProducerTaskForSpecificAnalysis {
5656
Configurable<int> confNumberOfTracks{"confNumberOfTracks", 0, "Number of tracks"};
5757
Configurable<int> confNumberOfV0{"confNumberOfV0", 1, "Number of V0"};
5858
Configurable<int> confNumberOfCascades{"confNumberOfCascades", 0, "Number of Cascades"};
59-
Configurable<int> confNumberOfReso{"confNumberOfV0", 1, "Number of Reso"};
59+
Configurable<int> confNumberOfReso{"confNumberOfReso", 1, "Number of Reso"};
6060

6161
/// Track selection
6262
Configurable<float> confPIDthrMom{"confPIDthrMom", 1.f, "Momentum threshold from which TPC and TOF are required for PID"};
@@ -84,41 +84,38 @@ struct FemtoDreamProducerTaskForSpecificAnalysis {
8484
Configurable<float> confMinInvMassCascade{"confMinInvMassCascade", 1.2, "Minimum invariant mass of Cascade (particle)"};
8585
Configurable<float> confMaxInvMassCascade{"confMaxInvMassCascade", 1.5, "Maximum invariant mass of Cascade (particle)"};
8686

87-
88-
struct : ConfigurableGroup { //set loosest cuts
87+
struct : ConfigurableGroup { // set loosest cuts
8988
std::string prefix = std::string("Reso");
9089
Configurable<int> pdgCode{"pdgCode", 333, "PDG code of particle 2 Reso"};
9190

9291
Configurable<float> confMinInvMassReso{"confMinInvMassReso", 0.86, "Minimum invariant mass of Reso (particle)"};
9392
Configurable<float> confMaxInvMassReso{"confMaxInvMassReso", 1.3, "Maximum invariant mass of Reso (particle)"};
9493

94+
Configurable<aod::femtodreamparticle::cutContainerType> daughPosCutBit{"daughPosCutBit", 2401446, "Selection bit for positive child of V02"}; // K+
95+
Configurable<aod::femtodreamparticle::cutContainerType> daughPosTPCBit{"daughPosTPCBit", 4096, "PID TPC bit for positive child of V02"};
96+
Configurable<aod::femtodreamparticle::cutContainerType> daughPosTPCTOFBit{"daughPosTPCTOFBit", 2048, "PID TOF bit for positive child of V02"};
97+
Configurable<aod::femtodreamparticle::cutContainerType> daughNegCutBit{"daughNegCutBit", 2401445, "Selection bit for negative child of V02"}; // K-
98+
Configurable<aod::femtodreamparticle::cutContainerType> daughNegMergedTPCBit{"daughNegMergedTPCBit", 16386, "PID TPC bit for negative child of V02"};
99+
Configurable<aod::femtodreamparticle::cutContainerType> daughNegMergedTPCTOFBit{"daughNegMergedTPCTOFBit", 8194, "PID TOF bit for negative child of V02"};
95100

96-
Configurable<femtodreamparticle::cutContainerType> daughPosCutBit{"daughPosCutBit", 2401446, "Selection bit for positive child of V02"}; // K+
97-
Configurable<femtodreamparticle::cutContainerType> daughPosTPCBit{"daughPosTPCBit", 4096, "PID TPC bit for positive child of V02"};
98-
Configurable<femtodreamparticle::cutContainerType> daughPosTPCTOFBit{"daughPosTPCTOFBit", 2048, "PID TOF bit for positive child of V02"};
99-
Configurable<femtodreamparticle::cutContainerType> daughNegCutBit{"daughNegCutBit", 2401445, "Selection bit for negative child of V02"}; // K-
100-
Configurable<femtodreamparticle::cutContainerType> daughNegMergedTPCBit{"daughNegMergedTPCBit", 16386, "PID TPC bit for negative child of V02"};
101-
Configurable<femtodreamparticle::cutContainerType> daughNegMergedTPCTOFBit{"daughNegMergedTPCTOFBit", 8194, "PID TOF bit for negative child of V02"};
102-
103-
Configurable<aod::femtodreamparticle::partType> partType1{"partType1", kResoPosdaughTPC_NegdaughTPC};
104-
Configurable<aod::femtodreamparticle::partType> partType2{"partType2", kResoPosdaughTOF_NegdaughTOF};
105-
Configurable<aod::femtodreamparticle::partType> partType3{"partType3", kResoPosdaughTOF_NegdaughTPC};
106-
Configurable<aod::femtodreamparticle::partType> partType4{"partType4", kResoPosdaughTPC_NegdaughTOF};
101+
Configurable<aod::femtodreamparticle::partType> partType1{"partType1", aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTPC};
102+
Configurable<aod::femtodreamparticle::partType> partType2{"partType2", aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTOF};
103+
Configurable<aod::femtodreamparticle::partType> partType3{"partType3", aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTPC};
104+
Configurable<aod::femtodreamparticle::partType> partType4{"partType4", aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTOF};
107105

108106
} Reso;
109107

110108
// Partition for selected particles
111109
Partition<aod::FDParticles> selectedV0s = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0));
112110
Partition<aod::FDParticles> selectedCascades = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade));
113111

114-
Partition<aod::FDParticles> selectedResos = (ifnode(aod::femtodreamparticle::partType == uint8_t(Reso.partType1), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) ||
115-
ifnode(aod::femtodreamparticle::partType == uint8_t(Reso.partType1), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false) ||
116-
ifnode(aod::femtodreamparticle::partType == uint8_t(Reso.partType1), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) ||
117-
ifnode(aod::femtodreamparticle::partType == uint8_t(Reso.partType1), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false)) &&
118-
(aod::femtodreamparticle::mLambda > Reso.confMinInvMassReso) &&
119-
(aod::femtodreamparticle::mLambda < Reso.confMaxInvMassReso);
112+
Partition<aod::FDParticles> selectedResos = (ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso.daughNegMergedTPCBit), false) ||
113+
ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso.daughNegMergedTPCTOFBit), false) ||
114+
ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso.daughNegMergedTPCBit), false) ||
115+
ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso.daughNegMergedTPCTOFBit), false)) &&
116+
(aod::femtodreamparticle::mLambda > Reso.confMinInvMassReso) &&
117+
(aod::femtodreamparticle::mLambda < Reso.confMaxInvMassReso);
120118

121-
122119
HistogramRegistry eventRegistry{"eventRegistry", {}, OutputObjHandlingPolicy::AnalysisObject};
123120

124121
static constexpr uint32_t kSignPlusMask = 1 << 1;
@@ -419,11 +416,10 @@ struct FemtoDreamProducerTaskForSpecificAnalysis {
419416
}
420417
PROCESS_SWITCH(FemtoDreamProducerTaskForSpecificAnalysis, processCollisionsWithNTracksAndNCascades, "Enable producing data with tracks and Cascades collisions for data", true);
421418

422-
423419
template <bool isMC, typename PartitionType, typename PartType>
424-
void createSpecifiedDerivedDataV0Reso(const o2::aod::FDCollision& col, PartitionType groupSelectedV0s, PartitionType groupSelectedResos, PartType parts)
420+
void createSpecifiedDerivedDataV0Reso(const o2::aod::FDCollision& col, PartitionType groupSelectedV0s, PartitionType groupSelectedResos, PartType parts)
425421
{
426-
//check v0's
422+
// check v0's
427423
int v0Count = 0;
428424
int antiV0Count = 0;
429425
int ResoCount = 0; // no antiparticles
@@ -462,23 +458,21 @@ struct FemtoDreamProducerTaskForSpecificAnalysis {
462458
}
463459
}
464460

465-
466461
for (const auto& reso : groupSelectedResos) {
467462

468463
if (confRequireBitmask) {
469464

470-
const auto& posChild = parts.iteratorAt(reso.index() - 2);
471-
const auto& negChild = parts.iteratorAt(reso.index() - 1);
465+
const auto& posresoChild = parts.iteratorAt(reso.index() - 2);
466+
const auto& negresoChild = parts.iteratorAt(reso.index() - 1);
472467

473-
if (((posresoChild.cut() & Reso2.daughPosCutBit) == Reso2.daughPosCutBit) &&
474-
((negresoChild.cut() & Reso2.daughNegCutBit) == Reso2.daughNegCutBit)) {
468+
if (((posresoChild.cut() & Reso.daughPosCutBit) == Reso.daughPosCutBit) &&
469+
((negresoChild.cut() & Reso.daughNegCutBit) == Reso.daughNegCutBit)) {
475470

476-
ResoCount++;
471+
ResoCount++;
477472
}
478473
} else {
479-
ResoCount++;
474+
ResoCount++;
480475
}
481-
482476
}
483477

484478
std::vector<int> tmpIDtrack;
@@ -541,14 +535,14 @@ struct FemtoDreamProducerTaskForSpecificAnalysis {
541535
femtoParticle.mAntiLambda());
542536
}
543537

544-
if ( (Reso.partType1 == femtoParticle.partType()) ||
545-
(Reso.partType2 == femtoParticle.partType()) ||
546-
(Reso.partType3 == femtoParticle.partType()) ||
547-
(Reso.partType4 == femtoParticle.partType()) ) {
538+
if ((aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTPC == femtoParticle.partType()) || // later as configurable
539+
(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTOF == femtoParticle.partType()) ||
540+
(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTPC == femtoParticle.partType()) ||
541+
(aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTOF == femtoParticle.partType())) {
548542

549-
const int rowOfLastTrack = outputParts.lastIndex(); //überprüfen
550-
std::vector<int> childIDs = {rowOfLastTrack - 1, rowOfLastTrack}; //überprüfen
551-
outputParts(outputCollision.lastIndex(),
543+
const int rowOfLastTrack = outputParts.lastIndex(); // überprüfen
544+
std::vector<int> childIDs = {rowOfLastTrack - 1, rowOfLastTrack}; // überprüfen
545+
outputParts(outputCollision.lastIndex(),
552546
femtoParticle.pt(),
553547
femtoParticle.eta(),
554548
femtoParticle.phi(),
@@ -566,9 +560,8 @@ struct FemtoDreamProducerTaskForSpecificAnalysis {
566560
}
567561
}
568562

569-
570-
void processCollisionsWithNV0AndNReso(const o2::aod::FDCollision& col,
571-
const o2::aod::FDParticles& parts)
563+
void processCollisionsWithNV0AndNReso(const o2::aod::FDCollision& col,
564+
const o2::aod::FDParticles& parts)
572565
{
573566
eventRegistry.fill(HIST("hStatistiscs"), 0);
574567
auto thegroupSelectedResos = selectedResos->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
@@ -577,7 +570,6 @@ struct FemtoDreamProducerTaskForSpecificAnalysis {
577570
createSpecifiedDerivedDataV0Reso<false>(col, thegroupSelectedV0s, thegroupSelectedResos, parts);
578571
}
579572
PROCESS_SWITCH(FemtoDreamProducerTaskForSpecificAnalysis, processCollisionsWithNV0AndNReso, "Enable producing data with pp collisions for data v0-reso", true);
580-
581573
};
582574

583575
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)