99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
1111
12- // / \file taskMixingDstarCandTreeCreator .cxx
12+ // / \file treeCreatorDstarSpinAlignMixing .cxx
1313// / \brief Writer of D*+ → D0 ( → π+ K-) π+ candidates in the form of flat tables to be stored in TTrees.
1414// / Intended for Mix-candidate analysis in spin alignment measurement.
1515// / Serving as a correction for detector acceptance and reconstruction efficiency.
@@ -49,52 +49,47 @@ namespace mixing_dstar
4949DECLARE_SOA_INDEX_COLUMN (Collision, collision);
5050// D0 related variables
5151DECLARE_SOA_COLUMN (MD0 , mD0 , float );
52- DECLARE_SOA_COLUMN (PtD0, ptD0, float );
53- DECLARE_SOA_COLUMN (PD0 , pD0, float );
54- DECLARE_SOA_COLUMN (EtaD0, etaD0, float );
55- DECLARE_SOA_COLUMN (PhiD0, phiD0, float );
56- DECLARE_SOA_COLUMN (YD0 , yD0, float );
52+ // DECLARE_SOA_COLUMN(PtD0, ptD0, float);
53+ // DECLARE_SOA_COLUMN(PD0, pD0, float);
54+ // DECLARE_SOA_COLUMN(EtaD0, etaD0, float);
55+ // DECLARE_SOA_COLUMN(PhiD0, phiD0, float);
56+ // DECLARE_SOA_COLUMN(YD0, yD0, float);
5757// soft pion related variables
5858DECLARE_SOA_COLUMN (PtSoftPi, ptSoftPi, float );
59- DECLARE_SOA_COLUMN (PSoftPi, pSoftPi, float );
59+ // DECLARE_SOA_COLUMN(PSoftPi, pSoftPi, float);
6060DECLARE_SOA_COLUMN (EtaSoftPi, etaSoftPi, float );
6161DECLARE_SOA_COLUMN (PhiSoftPi, phiSoftPi, float );
62- DECLARE_SOA_COLUMN (YSoftPi, ySoftPi, float );
62+ // DECLARE_SOA_COLUMN(YSoftPi, ySoftPi, float);
6363// Dstar related variables
6464DECLARE_SOA_COLUMN (M, m, float );
6565DECLARE_SOA_COLUMN (Pt, pt, float );
66- DECLARE_SOA_COLUMN (P, p, float );
66+ // DECLARE_SOA_COLUMN(P, p, float);
6767DECLARE_SOA_COLUMN (Eta, eta, float );
6868DECLARE_SOA_COLUMN (Phi, phi, float );
6969DECLARE_SOA_COLUMN (Y, y, float );
7070DECLARE_SOA_COLUMN (MlProbDstarToD0PiBkg, mlProbDstarToD0PiBkg, float );
7171DECLARE_SOA_COLUMN (MlProbDstarToD0PiPrompt, mlProbDstarToD0PiPrompt, float );
7272DECLARE_SOA_COLUMN (MlProbDstarToD0PiNonPrompt, mlProbDstarToD0PiNonPrompt, float );
7373// Events
74- DECLARE_SOA_COLUMN (ZVec, zVec , float );
74+ DECLARE_SOA_COLUMN (ZVtx, zVtx , float );
7575DECLARE_SOA_COLUMN (Centrality, centrality, float );
76- DECLARE_SOA_COLUMN (Multiplicity, multiplicity, int );
76+ DECLARE_SOA_COLUMN (NPvContrib, nPvContrib, uint16_t );
7777DECLARE_SOA_COLUMN (Occupancy, occupancy, int );
7878DECLARE_SOA_COLUMN (XQVec, xQVec, float );
7979DECLARE_SOA_COLUMN (YQVec, yQVec, float );
8080DECLARE_SOA_COLUMN (GIndexCol, gIndexCol , int );
8181DECLARE_SOA_COLUMN (TimeStamp, timeStamp, int64_t );
8282// Tracks
8383DECLARE_SOA_COLUMN (MinAbsEtaTrack, minAbsEtaTrack, float );
84- DECLARE_SOA_COLUMN (MinNumItsCls, minNumItsCls, int );
85- DECLARE_SOA_COLUMN (MinNumTpcCls, minNumTpcCls, int );
84+ DECLARE_SOA_COLUMN (MinNumItsCls, minNumItsCls, uint8_t );
85+ DECLARE_SOA_COLUMN (MinNumTpcCls, minNumTpcCls, uint8_t );
8686} // namespace mixing_dstar
8787
8888DECLARE_SOA_TABLE (HfCandDstMix, " AOD" , " HFCANDDSTMIX" ,
8989 mixing_dstar::MD0 ,
90- // mixing_dstar::PtD0,
91- // mixing_dstar::EtaD0,
92- // mixing_dstar::PhiD0,
93- // mixing_dstar::YD0,
9490 mixing_dstar::PtSoftPi,
9591 mixing_dstar::EtaSoftPi,
9692 mixing_dstar::PhiSoftPi,
97- // mixing_dstar::YSoftPi,
9893 mixing_dstar::M,
9994 mixing_dstar::Pt,
10095 mixing_dstar::Eta,
@@ -103,9 +98,9 @@ DECLARE_SOA_TABLE(HfCandDstMix, "AOD", "HFCANDDSTMIX",
10398 mixing_dstar::MlProbDstarToD0PiBkg,
10499 mixing_dstar::MlProbDstarToD0PiPrompt,
105100 mixing_dstar::MlProbDstarToD0PiNonPrompt,
106- mixing_dstar::ZVec ,
101+ mixing_dstar::ZVtx ,
107102 mixing_dstar::Centrality,
108- // mixing_dstar::Multiplicity ,
103+ mixing_dstar::NPvContrib ,
109104 mixing_dstar::Occupancy,
110105 mixing_dstar::XQVec,
111106 mixing_dstar::YQVec,
@@ -117,12 +112,9 @@ DECLARE_SOA_TABLE(HfCandDstMix, "AOD", "HFCANDDSTMIX",
117112} // namespace o2::aod
118113
119114// / Writes the full information in an output TTree
120- struct HfTaskMixingDstarCandTreeCreator {
115+ struct HfTreeCreatorDstarSpinAlignMixing {
121116 Produces<o2::aod::HfCandDstMix> rowCandidateMix;
122117
123- Configurable<bool > selectionFlagDstarToD0Pi{" selectionFlagDstarToD0Pi" , true , " Selection Flag for D* decay to D0 & Pi" };
124- Configurable<bool > fillMixingCandidateTable{" fillMixingCandidateTable" , false , " Switch to fill lite table with candidate properties" };
125-
126118 Configurable<int > qVecDetector{" qVecDetector" , 2 , " Detector for Q vector estimation (FV0A: 0, FT0M: 1, FT0C: 2)" };
127119 Configurable<int > centEstimator{" centEstimator" , 2 , " Centrality estimator ((None: 0, FT0C: 2, FT0M: 3))" };
128120 Configurable<int > occEstimator{" occEstimator" , 2 , " If enabled, replace number of PV contributors with occupancy estimation (0: don't use, 1: ITS, 2: FT0C)" };
@@ -132,7 +124,7 @@ struct HfTaskMixingDstarCandTreeCreator {
132124 using CandDstarWSelFlag = soa::Join<aod::HfCandDstars, aod::HfSelDstarToD0Pi>;
133125 using FilteredCandDstarWSelFlagAndMl = soa::Filtered<soa::Join<CandDstarWSelFlag, aod::HfMlDstarToD0Pi>>;
134126
135- Filter filterSelectDstarCandidates = aod::hf_sel_candidate_dstar::isSelDstarToD0Pi == selectionFlagDstarToD0Pi ;
127+ Filter filterSelectDstarCandidates = aod::hf_sel_candidate_dstar::isSelDstarToD0Pi == true ;
136128
137129 Preslice<FilteredCandDstarWSelFlagAndMl> dstarWithMlPerCollision = aod::hf_cand::collisionId;
138130
@@ -193,35 +185,30 @@ struct HfTaskMixingDstarCandTreeCreator {
193185 getTrackingInfos (std::vector{trackProng0, trackProng1, trackProng2}, absEtaTrackMin, numItsClsMin, numTpcClsMin);
194186 std::array<float , 3 > const Qvector = getQvec (collision, qVecDetector.value );
195187
196- if (fillMixingCandidateTable) {
197- rowCandidateMix (
198- massD0,
199- // candidate.ptD0(),
200- // candidate.etaD0(),
201- // candidate.phiD0(),
202- // candidate.yD0(),
203- candidate.ptSoftPi (),
204- etaSoftPi,
205- phiSoftPi,
206- massDStar,
207- candidate.pt (),
208- candidate.eta (),
209- candidate.phi (),
210- candidate.y (constants::physics::MassDStar),
211- candidate.mlProbDstarToD0Pi ()[0 ],
212- candidate.mlProbDstarToD0Pi ()[1 ],
213- candidate.mlProbDstarToD0Pi ()[2 ],
214- collision.posZ (),
215- getCentralityColl (collision, centEstimator),
216- getOccupancyColl (collision, occEstimator),
217- Qvector[0 ],
218- Qvector[1 ],
219- absEtaTrackMin,
220- numItsClsMin,
221- numTpcClsMin,
222- collision.globalIndex (),
223- timeStamp);
224- }
188+ rowCandidateMix (
189+ massD0,
190+ candidate.ptSoftPi (),
191+ etaSoftPi,
192+ phiSoftPi,
193+ massDStar,
194+ candidate.pt (),
195+ candidate.eta (),
196+ candidate.phi (),
197+ candidate.y (constants::physics::MassDStar),
198+ candidate.mlProbDstarToD0Pi ()[0 ],
199+ candidate.mlProbDstarToD0Pi ()[1 ],
200+ candidate.mlProbDstarToD0Pi ()[2 ],
201+ collision.posZ (),
202+ getCentralityColl (collision, centEstimator),
203+ collision.numContrib (),
204+ getOccupancyColl (collision, occEstimator),
205+ Qvector[0 ],
206+ Qvector[1 ],
207+ absEtaTrackMin,
208+ numItsClsMin,
209+ numTpcClsMin,
210+ collision.globalIndex (),
211+ timeStamp);
225212 }
226213
227214 void processData (CollsWithQVecs const & collisions,
@@ -237,10 +224,10 @@ struct HfTaskMixingDstarCandTreeCreator {
237224 }
238225 }
239226 }
240- PROCESS_SWITCH (HfTaskMixingDstarCandTreeCreator , processData, " Process data" , true );
227+ PROCESS_SWITCH (HfTreeCreatorDstarSpinAlignMixing , processData, " Process data" , true );
241228};
242229
243230WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
244231{
245- return WorkflowSpec{adaptAnalysisTask<HfTaskMixingDstarCandTreeCreator >(cfgc)};
232+ return WorkflowSpec{adaptAnalysisTask<HfTreeCreatorDstarSpinAlignMixing >(cfgc)};
246233}
0 commit comments