@@ -66,15 +66,24 @@ namespace full
6666{
6767DECLARE_SOA_COLUMN (M, m, float ); // ! Invariant mass of candidate (GeV/c2)
6868DECLARE_SOA_COLUMN (Pt, pt, float ); // ! Transverse momentum of candidate (GeV/c)
69- // ML scores
7069DECLARE_SOA_COLUMN (MlScore0, mlScore0, float ); // ! ML score of the first configured index
7170DECLARE_SOA_COLUMN (MlScore1, mlScore1, float ); // ! ML score of the second configured index
71+ DECLARE_SOA_COLUMN (ScalarProd, scalarProd, float ); // ! Scalar product
72+ DECLARE_SOA_COLUMN (Cent, cent, float ); // ! Centrality
7273} // namespace full
73- DECLARE_SOA_TABLE (HfCandPtCent , " AOD" , " HFCANDPTCENT " ,
74+ DECLARE_SOA_TABLE (HfCandMPtInfos , " AOD" , " HFCANDMPTINFO " ,
7475 full::M,
7576 full::Pt,
7677 full::MlScore0,
7778 full::MlScore1);
79+
80+ DECLARE_SOA_TABLE (HfCandFlowInfos, " AOD" , " HFCANDFLOWINFO" ,
81+ full::M,
82+ full::Pt,
83+ full::MlScore0,
84+ full::MlScore1,
85+ full::ScalarProd,
86+ full::Cent);
7887} // namespace o2::aod
7988
8089enum DecayChannel { DplusToPiKPi = 0 ,
@@ -98,7 +107,8 @@ enum QvecEstimator { FV0A = 0,
98107 TPCTot };
99108
100109struct HfTaskFlowCharmHadrons {
101- Produces<o2::aod::HfCandPtCent> rowCandidateMassPtMlScores;
110+ Produces<o2::aod::HfCandMPtInfos> rowCandMassPtMl;
111+ Produces<o2::aod::HfCandFlowInfos> rowCandMassPtMlSpCent;
102112
103113 Configurable<int > harmonic{" harmonic" , 2 , " harmonic number" };
104114 Configurable<int > qvecDetector{" qvecDetector" , 3 , " Detector for Q vector estimation (FV0A: 0, FT0M: 1, FT0A: 2, FT0C: 3, TPC Pos: 4, TPC Neg: 5, TPC Tot: 6)" };
@@ -108,7 +118,9 @@ struct HfTaskFlowCharmHadrons {
108118 Configurable<float > centralityMax{" centralityMax" , 100 ., " Maximum centrality accepted in SP/EP computation (not applied in resolution process)" };
109119 Configurable<bool > storeEP{" storeEP" , false , " Flag to store EP-related axis" };
110120 Configurable<bool > storeMl{" storeMl" , false , " Flag to store ML scores" };
111- Configurable<bool > fillMassPtMlTree{" fillMassPtMlTree" , false , " Flag to fill mass and pt tree" };
121+ Configurable<bool > fillMassPtMlTree{" fillMassPtMlTree" , false , " Flag to fill mass, pt and ML scores tree" };
122+ Configurable<bool > fillMassPtMlSpCentTree{" fillMassPtMlSpCentTree" , false , " Flag to fill mass, pt, ML scores, SP and centrality tree" };
123+ Configurable<bool > fillSparse{" fillSparse" , true , " Flag to fill sparse" };
112124 Configurable<float > downSampleFactor{" downSampleFactor" , 1 ., " Fraction of candidates to keep in TTree" };
113125 Configurable<float > ptDownSampleMax{" ptDownSampleMax" , 10 ., " Maximum pt for the application of the downsampling factor" };
114126 Configurable<bool > storeResoOccu{" storeResoOccu" , false , " Flag to store Occupancy in resolution ThnSparse" };
@@ -296,20 +308,6 @@ struct HfTaskFlowCharmHadrons {
296308 }
297309 }; // end init
298310
299- // / Fill the mass, pt and ML scores of a candidate
300- // / \param mass is the candidate mass
301- // / \param pt is the candidate transverse momentum
302- // / \param mlscore0 is the first ML score
303- // / \param mlscore1 is the second ML score
304- void fillMassPt (const float mass, const float pt, const float mlscore0, const float mlscore1)
305- {
306- rowCandidateMassPtMlScores (
307- mass,
308- pt,
309- mlscore0,
310- mlscore1);
311- }
312-
313311 // / Compute the Q vector for the candidate's tracks
314312 // / \param cand is the candidate
315313 // / \param tracksQx is the X component of the Q vector for the tracks
@@ -697,15 +695,21 @@ struct HfTaskFlowCharmHadrons {
697695 float const scalprodCand = cosNPhi * xQVec + sinNPhi * yQVec;
698696 float const cosDeltaPhi = std::cos (harmonic * (phiCand - evtPl));
699697
700- if (fillMassPtMlTree && storeMl ) {
698+ if (fillMassPtMlTree || fillMassPtMlSpCentTree ) {
701699 if (downSampleFactor < 1 .) {
702700 float const pseudoRndm = ptCand * 1000 . - static_cast <int64_t >(ptCand * 1000 );
703701 if (ptCand < ptDownSampleMax && pseudoRndm >= downSampleFactor) {
704702 continue ;
705703 }
706704 }
707- fillMassPt (massCand, ptCand, outputMl[0 ], outputMl[1 ]);
708- } else {
705+ if (fillMassPtMlTree) {
706+ rowCandMassPtMl (massCand, ptCand, outputMl[0 ], outputMl[1 ]);
707+ }
708+ if (fillMassPtMlSpCentTree) {
709+ rowCandMassPtMlSpCent (massCand, ptCand, outputMl[0 ], outputMl[1 ], scalprodCand, cent);
710+ }
711+ }
712+ if (fillSparse) {
709713 fillThn (massCand, ptCand, cent, cosNPhi, sinNPhi, cosDeltaPhi, scalprodCand, outputMl, occupancy, hfevflag);
710714 }
711715 }
0 commit comments