@@ -90,9 +90,9 @@ struct HfTaskPtFlucCharmHadrons {
9090 Configurable<float > etaTrkMax{" etaTrkMax" , 0 .8f , " Track eta max" };
9191
9292 Configurable<float > ptTrkMin{" ptTrkMin" , 0 .2f , " Track pT min for <pT> (charged hadrons)" };
93- Configurable<float > ptTrkMax{" ptTrkMax" , 2 .0f , " Track pT max for <pT> (charged hadrons)" };
94- Configurable<float > ptTrkMinD{ " ptTrkMinD " , 0 .2f , " Track pT min for D" };
95- Configurable<float > ptTrkMaxD{ " ptTrkMaxD " , 2 .0f , " Track pT max for D" };
93+ Configurable<float > ptTrkMax{" ptTrkMax" , 5 .0f , " Track pT max for <pT> (charged hadrons)" };
94+ Configurable<float > ptCandMin{ " ptCandMin " , 0 .2f , " Min pT for D candidates " };
95+ Configurable<float > ptCandMax{ " ptCandMax " , 12 .0f , " Max pT for D candidates " };
9696 Configurable<int > minNTrk{" minNTrk" , 5 , " Min charged tracks in each subevent to compute <pT>" };
9797
9898 // Use ML in denominator AND numerator consistently
@@ -128,16 +128,16 @@ struct HfTaskPtFlucCharmHadrons {
128128 ConfigurableAxis axisInvMass{" axisInvMass" , {100 , 1.78 , 2.05 }, " Inv mass axis" };
129129 ConfigurableAxis axisPt{" axisPt" , {VARIABLE_WIDTH, 0.2 , 0.5 , 1.0 , 1.5 , 2.0 , 2.5 , 3.0 , 4.0 , 5.0 , 6.5 , 8.0 , 10.0 }, " Candidate pT axis" };
130130 ConfigurableAxis axisCent{" axisCent" , {VARIABLE_WIDTH, 0.0 , 10.0 , 40.0 , 80.0 }, " Centrality axis" };
131- ConfigurableAxis axisSign{" axisSign" , {VARIABLE_WIDTH, -1.0 , 1 .0 }, " Sign axis" };
132- ConfigurableAxis axisMlOne{" axisMlOne" , {1000 , 0 ., 1 .}, " " };
133- ConfigurableAxis axisMlTwo{" axisMlTwo" , {100 , 0 ., 1 .}, " " };
134- ConfigurableAxis axisCandEta{" axisCandEta" , {20 , -1 ., 1 . }, " " };
135- ConfigurableAxis axisMPtTrkA{" axisMPtTrkA" , {50 , 0 ., 5 . }, " " };
136- ConfigurableAxis axisMPtTrkB{" axisMPtTrkB" , {50 , 0 ., 5 . }, " " };
137- ConfigurableAxis axisPtCandProduct{" axisPtCandProduct" , {50 , 0 ., 50 . }, " " };
138- ConfigurableAxis axisPtTrkProduct{" axisPtTrkProduct" , {50 , 0 ., 25 .}, " " };
139- ConfigurableAxis axisNTrkA{" axisNTrkA" , {2000 , 0 ., 2000 .}, " " };
140- ConfigurableAxis axisNTrkB{" axisNTrkB" , {2000 , 0 ., 2000 .}, " " };
131+ ConfigurableAxis axisSign{" axisSign" , {VARIABLE_WIDTH, -1.0 , 4 .0 }, " Sign axis" };
132+ ConfigurableAxis axisMlOne{" axisMlOne" , {1000 , 0 ., 1 .}, " ML score 1 axis " };
133+ ConfigurableAxis axisMlTwo{" axisMlTwo" , {100 , 0 ., 1 .}, " ML score 2 axis " };
134+ ConfigurableAxis axisCandEta{" axisCandEta" , {16 , -0.8 , 0.8 }, " Candidate eta axis " };
135+ ConfigurableAxis axisMPtTrkA{" axisMPtTrkA" , {150 , 0 ., 1.5 }, " Mean pT of tracks in subevent A " };
136+ ConfigurableAxis axisMPtTrkB{" axisMPtTrkB" , {150 , 0 ., 1.5 }, " Mean pT of tracks in subevent B " };
137+ ConfigurableAxis axisPtCandProduct{" axisPtCandProduct" , {150 , 0 ., 15 }, " Candidate pT * mean pT of tracks (A and B) product " };
138+ ConfigurableAxis axisPtTrkProduct{" axisPtTrkProduct" , {200 , 0 ., 2 .}, " Mean pT of tracks in A * Mean pT of tracks in B " };
139+ ConfigurableAxis axisNTrkA{" axisNTrkA" , {2000 , 0 ., 2000 .}, " N_{tracks} in subevent A " };
140+ ConfigurableAxis axisNTrkB{" axisNTrkB" , {2000 , 0 ., 2000 .}, " N_{tracks} in subevent B " };
141141
142142 HistogramRegistry registry{" registry" , {}, OutputObjHandlingPolicy::AnalysisObject};
143143
@@ -222,13 +222,13 @@ struct HfTaskPtFlucCharmHadrons {
222222 }
223223
224224 // / Get candidate mass
225- template <typename CandT, typename Trk>
226- std::pair<float , float > getCandMassAndSign (const CandT& cand, DecayChannel channel, Trk const & /* tracks */ )
225+ template <DecayChannel channel, typename CandT, typename TCands , typename Trk>
226+ std::pair<float , float > getCandMassAndSign (const CandT& cand)
227227 {
228- if constexpr (std::is_same_v<CandT , CandDplusDataWMl>) {
228+ if constexpr (std::is_same_v<TCands , CandDplusDataWMl>) {
229229 return {HfHelper::invMassDplusToPiKPi (cand), cand.template prong0_as <Trk>().sign ()};
230230 }
231- if constexpr (std::is_same_v<CandT , CandD0DataWMl>) {
231+ if constexpr (std::is_same_v<TCands , CandD0DataWMl>) {
232232 if (channel == DecayChannel::D0ToPiK) {
233233 return {HfHelper::invMassD0ToPiK (cand), cand.isSelD0bar () ? CandD0Type::ReflectedD0bar : CandD0Type::PureD0};
234234 }
@@ -431,7 +431,7 @@ struct HfTaskPtFlucCharmHadrons {
431431 }
432432
433433 // get candidate mass and sign
434- auto [invMass, sign] = getCandMassAndSign (cand, Channel, tracks );
434+ auto [invMass, sign] = getCandMassAndSign<Channel, decltype (cand), T1, Trk>(cand );
435435
436436 // fill charm-bulk correlation thnsparse
437437 registry.fill (HIST (" hCharmBulkCorrelations" ), invMass, cent, pt, sign, ml1, ml2, eta, meanPtA, meanPtB, candPtProduct);
@@ -451,7 +451,7 @@ struct HfTaskPtFlucCharmHadrons {
451451 continue ;
452452 }
453453 float pt = cand.pt ();
454- if (pt < ptTrkMinD .value || pt >= ptTrkMaxD .value ) {
454+ if (pt < ptCandMin .value || pt >= ptCandMax .value ) {
455455 continue ;
456456 }
457457
@@ -477,10 +477,10 @@ struct HfTaskPtFlucCharmHadrons {
477477 }
478478
479479 // compute mass
480- auto [massCand, signCand] = getCandMassAndSign (candidate, Channel, tracks );
480+ auto [massCand, signCand] = getCandMassAndSign<Channel, decltype (candidate), T1, Trk>(candidate );
481481
482482 const double ptCand = candidate.pt ();
483- if (ptCand < ptTrkMinD .value || ptCand >= ptTrkMaxD .value ) {
483+ if (ptCand < ptCandMin .value || ptCand >= ptCandMax .value ) {
484484 continue ;
485485 }
486486
0 commit comments