@@ -69,12 +69,18 @@ DECLARE_SOA_COLUMN(Pt, pt, float); //! Transverse momentum of candidate (GeV/c)
6969// ML scores
7070DECLARE_SOA_COLUMN (MlScore0, mlScore0, float ); // ! ML score of the first configured index
7171DECLARE_SOA_COLUMN (MlScore1, mlScore1, float ); // ! ML score of the second configured index
72+ DECLARE_SOA_COLUMN (ScalarProd, scalarProd, float ); // ! Scalar product
73+ DECLARE_SOA_COLUMN (Cent, cent, float ); // ! Centrality
7274} // namespace full
73- DECLARE_SOA_TABLE (HfCandPtCent , " AOD" , " HFCANDPTCENT " ,
75+ DECLARE_SOA_TABLE (HfCandMassPts , " AOD" , " HFCANDMASSPT " ,
7476 full::M,
75- full::Pt,
77+ full::Pt);
78+ DECLARE_SOA_TABLE (HfCandScores, " AOD" , " HFCANDSCORE" ,
7679 full::MlScore0,
7780 full::MlScore1);
81+ DECLARE_SOA_TABLE (HfCandSPCents, " AOD" , " HFCANDSPCENT" ,
82+ full::ScalarProd,
83+ full::Cent);
7884} // namespace o2::aod
7985
8086enum DecayChannel { DplusToPiKPi = 0 ,
@@ -98,7 +104,9 @@ enum QvecEstimator { FV0A = 0,
98104 TPCTot };
99105
100106struct HfTaskFlowCharmHadrons {
101- Produces<o2::aod::HfCandPtCent> rowCandidateMassPtMlScores;
107+ Produces<o2::aod::HfCandMassPts> rowCandMassPt;
108+ Produces<o2::aod::HfCandScores> rowCandMlScores;
109+ Produces<o2::aod::HfCandSPCents> rowCandSpCent;
102110
103111 Configurable<int > harmonic{" harmonic" , 2 , " harmonic number" };
104112 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 +116,10 @@ struct HfTaskFlowCharmHadrons {
108116 Configurable<float > centralityMax{" centralityMax" , 100 ., " Maximum centrality accepted in SP/EP computation (not applied in resolution process)" };
109117 Configurable<bool > storeEP{" storeEP" , false , " Flag to store EP-related axis" };
110118 Configurable<bool > storeMl{" storeMl" , false , " Flag to store ML scores" };
111- Configurable<bool > fillMassPtMlTree{" fillMassPtMlTree" , false , " Flag to fill mass and pt tree" };
119+ Configurable<bool > fillMassPtTree{" fillMassPtTree" , false , " Flag to fill mass and pt tree" };
120+ Configurable<bool > fillMlTree{" fillMlTree" , false , " Flag to fill ML scores tree" };
121+ Configurable<bool > fillSpCentTree{" fillSpCentTree" , false , " Flag to fill SP and centrality tree" };
122+ Configurable<bool > fillSparse{" fillSparse" , true , " Flag to fill sparse" };
112123 Configurable<float > downSampleFactor{" downSampleFactor" , 1 ., " Fraction of candidates to keep in TTree" };
113124 Configurable<float > ptDownSampleMax{" ptDownSampleMax" , 10 ., " Maximum pt for the application of the downsampling factor" };
114125 Configurable<bool > storeResoOccu{" storeResoOccu" , false , " Flag to store Occupancy in resolution ThnSparse" };
@@ -297,20 +308,6 @@ struct HfTaskFlowCharmHadrons {
297308 }
298309 }; // end init
299310
300- // / Fill the mass, pt and ML scores of a candidate
301- // / \param mass is the candidate mass
302- // / \param pt is the candidate transverse momentum
303- // / \param mlscore0 is the first ML score
304- // / \param mlscore1 is the second ML score
305- void fillMassPt (const float mass, const float pt, const float mlscore0, const float mlscore1)
306- {
307- rowCandidateMassPtMlScores (
308- mass,
309- pt,
310- mlscore0,
311- mlscore1);
312- }
313-
314311 // / Compute the Q vector for the candidate's tracks
315312 // / \param cand is the candidate
316313 // / \param tracksQx is the X component of the Q vector for the tracks
@@ -698,15 +695,24 @@ struct HfTaskFlowCharmHadrons {
698695 float const scalprodCand = cosNPhi * xQVec + sinNPhi * yQVec;
699696 float const cosDeltaPhi = std::cos (harmonic * (phiCand - evtPl));
700697
701- if (fillMassPtMlTree && storeMl ) {
698+ if (fillMassPtTree || fillMlTree || fillSpCentTree ) {
702699 if (downSampleFactor < 1 .) {
703700 float const pseudoRndm = ptCand * 1000 . - static_cast <int64_t >(ptCand * 1000 );
704701 if (ptCand < ptDownSampleMax && pseudoRndm >= downSampleFactor) {
705702 continue ;
706703 }
707704 }
708- fillMassPt (massCand, ptCand, outputMl[0 ], outputMl[1 ]);
709- } else {
705+ if (fillMassPtTree) {
706+ rowCandMassPt (massCand, ptCand);
707+ }
708+ if (fillMlTree) {
709+ rowCandMlScores (outputMl[0 ], outputMl[1 ]);
710+ }
711+ if (fillSpCentTree) {
712+ rowCandSpCent (scalprodCand, cent);
713+ }
714+ }
715+ if (fillSparse) {
710716 fillThn (massCand, ptCand, cent, cosNPhi, sinNPhi, cosDeltaPhi, scalprodCand, outputMl, occupancy, hfevflag);
711717 }
712718 }
0 commit comments