@@ -56,12 +56,12 @@ struct HfTaskMiniCandidateCreator2Prong {
5656
5757 // vertexing parameters
5858 Configurable<float > magneticField{" magneticField" , 5 .f , " magnetic field [kG]" };
59- Configurable<bool > propagateToPCA{" propagateToPCA" , true , " create tracks version propagated to PCA" };
59+ Configurable<bool > propagateToPCA{" propagateToPCA" , true , " Create tracks version propagated to PCA" };
6060 Configurable<bool > useAbsDCA{" useAbsDCA" , false , " Minimise abs. distance rather than chi2" };
61- Configurable<float > maxR{" maxR" , 200 .f , " reject PCA's above this radius" };
62- Configurable<float > maxDZIni{" maxDZIni" , 4 .f , " reject (if>0) PCA candidate if tracks DZ exceeds threshold" };
63- Configurable<float > minParamChange{" minParamChange" , 1 .e -3f , " stop iterations if largest change of any X is smaller than this" };
64- Configurable<float > minRelChi2Change{" minRelChi2Change" , 0 .9f , " stop iterations if chi2/chi2old > this" };
61+ Configurable<float > maxR{" maxR" , 200 .f , " Reject PCA's above this radius" };
62+ Configurable<float > maxDZIni{" maxDZIni" , 4 .f , " Reject (if>0) PCA candidate if tracks DZ exceeds threshold" };
63+ Configurable<float > minParamChange{" minParamChange" , 1 .e -3f , " Stop iterations if largest change of any X is smaller than this" };
64+ Configurable<float > minRelChi2Change{" minRelChi2Change" , 0 .9f , " Stop iterations if chi2/chi2old > this" };
6565
6666 o2::vertexing::DCAFitterN<2 > fitter{}; // 2-prong vertex fitter
6767
@@ -71,9 +71,9 @@ struct HfTaskMiniCandidateCreator2Prong {
7171
7272 void init (InitContext&)
7373 {
74- registry.add (" hMass" , " D^{0} candidates;inv. mass (#pi K) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 0 ., 5 .}}});
74+ registry.add (" hMass" , " D^{0} candidates;inv. mass (#pi K) (GeV/#it{c}^{2});entries" , {HistType::kTH1F , {{500 , 0 ., 5 .}}});
7575
76- // Configure the vertexer
76+ // Configure the vertexer.
7777 fitter.setBz (magneticField);
7878 fitter.setPropagateToPCA (propagateToPCA);
7979 fitter.setMaxR (maxR);
@@ -99,17 +99,15 @@ struct HfTaskMiniCandidateCreator2Prong {
9999 if (fitter.process (trackParVarPos1, trackParVarNeg1) == 0 ) {
100100 continue ;
101101 }
102+ // get secondary vertex
102103 const auto & secondaryVertex = fitter.getPCACandidate ();
103- auto & trackParVar0{fitter.getTrack (0 )};
104- auto & trackParVar1{fitter.getTrack (1 )};
105-
106104 // get track momenta
107105 std::array<float , 3 > pVec0{};
108106 std::array<float , 3 > pVec1{};
109- trackParVar0 .getPxPyPzGlo (pVec0);
110- trackParVar1 .getPxPyPzGlo (pVec1);
107+ fitter. getTrack ( 0 ) .getPxPyPzGlo (pVec0);
108+ fitter. getTrack ( 1 ) .getPxPyPzGlo (pVec1);
111109
112- // fill candidate table rows
110+ // fill candidate table row
113111 rowCandidateBase (collision.globalIndex (),
114112 collision.posX (), collision.posY (), collision.posZ (),
115113 secondaryVertex[0 ], secondaryVertex[1 ], secondaryVertex[2 ],
@@ -121,8 +119,8 @@ struct HfTaskMiniCandidateCreator2Prong {
121119 // calculate invariant masses
122120 const std::array arrayMomenta{pVec0, pVec1};
123121 const auto massPiK{RecoDecay::m (arrayMomenta, std::array{MassPiPlus, MassKPlus})};
124- // const auto massKPi{RecoDecay::m(arrayMomenta, std::array{MassKPlus, MassPiPlus})};
125122 registry.fill (HIST (" hMass" ), massPiK);
123+ // const auto massKPi{RecoDecay::m(arrayMomenta, std::array{MassKPlus, MassPiPlus})};
126124 // registry.fill(HIST("hMass"), massKPi);
127125 }
128126 }
@@ -141,15 +139,15 @@ struct HfTaskMiniCandidateCreator2ProngExpressions {
141139struct HfTaskMiniCandidateSelectorD0 {
142140 Produces<aod::HfTSelD0> hfSelD0Candidate;
143141
144- Configurable<float > ptCandMin{" ptCandMin" , 0 .f , " Lower bound of candidate pT" };
145- Configurable<float > ptCandMax{" ptCandMax" , 50 .f , " Upper bound of candidate pT" };
142+ Configurable<float > ptCandMin{" ptCandMin" , 0 .f , " Min. candidate pT [GeV/c] " };
143+ Configurable<float > ptCandMax{" ptCandMax" , 50 .f , " Max. candidate pT [GeV/c] " };
146144 // TPC
147- Configurable<float > ptPidTpcMin{" ptPidTpcMin" , 0 .15f , " Lower bound of track pT for TPC PID" };
148- Configurable<float > ptPidTpcMax{" ptPidTpcMax" , 5 .f , " Upper bound of track pT for TPC PID" };
149- Configurable<float > nSigmaTpcMax{" nSigmaTpcMax" , 3 .f , " Nsigma cut on TPC only " };
145+ Configurable<float > ptPidTpcMin{" ptPidTpcMin" , 0 .15f , " Min. track pT for TPC PID [GeV/c] " };
146+ Configurable<float > ptPidTpcMax{" ptPidTpcMax" , 5 .f , " Max. track pT for TPC PID [GeV/c] " };
147+ Configurable<float > nSigmaTpcMax{" nSigmaTpcMax" , 3 .f , " Max. TPC N_sigma " };
150148 // topological cuts
151149 Configurable<float > cpaMin{" cpaMin" , 0 .98f , " Min. cosine of pointing angle" };
152- Configurable<float > massWindow{" massWindow" , 0 .4f , " Half-width of the invariant-mass window" };
150+ Configurable<float > massWindow{" massWindow" , 0 .4f , " Half-width of the invariant-mass window [Gev/c^2] " };
153151
154152 TrackSelectorPi selectorPion{};
155153 TrackSelectorKa selectorKaon{};
@@ -214,18 +212,18 @@ struct HfTaskMiniCandidateSelectorD0 {
214212 int statusD0 = 0 ;
215213 int statusD0bar = 0 ;
216214
217- const auto & trackPos = candidate.prong0_as <TracksWithPid>(); // positive daughter
218- const auto & trackNeg = candidate.prong1_as <TracksWithPid>(); // negative daughter
219-
220215 // conjugate-independent topological selection
221216 if (!selectionTopol (candidate)) {
222217 hfSelD0Candidate (statusD0, statusD0bar);
223218 continue ;
224219 }
225220
226- // conjugate-dependent topological selection for D0
221+ // conjugate-dependent topological selection
222+ const auto & trackPos = candidate.prong0_as <TracksWithPid>(); // positive daughter
223+ const auto & trackNeg = candidate.prong1_as <TracksWithPid>(); // negative daughter
224+ // D0 hypothesis
227225 const auto topolD0 = selectionTopolConjugate (candidate, trackPos, trackNeg);
228- // conjugate-dependent topological selection for D0bar
226+ // D0bar hypothesis
229227 const auto topolD0bar = selectionTopolConjugate (candidate, trackNeg, trackPos);
230228
231229 if (!topolD0 && !topolD0bar) {
@@ -295,8 +293,8 @@ struct HfTaskMiniD0 {
295293 const TString strTitle = " D^{0} candidates" ;
296294 const TString strPt = " #it{p}_{T} (GeV/#it{c})" ;
297295 const TString strEntries = " entries" ;
298- registry.add (" hPtCand" , strTitle + " ;" + strPt + " ;" + strEntries, {HistType::kTH1D , {{100 , 0 ., 10 .}}});
299- registry.add (" hMass" , strTitle + " ;" + " inv. mass (#pi K) (GeV/#it{c}^{2})" + " ;" + strEntries, {HistType::kTH1D , {{500 , 0 ., 5 .}}});
296+ registry.add (" hPtCand" , strTitle + " ;" + strPt + " ;" + strEntries, {HistType::kTH1F , {{100 , 0 ., 10 .}}});
297+ registry.add (" hMass" , strTitle + " ;" + " inv. mass (#pi K) (GeV/#it{c}^{2})" + " ;" + strEntries, {HistType::kTH1F , {{500 , 0 ., 5 .}}});
300298 registry.add (" hCpaVsPtCand" , strTitle + " ;" + " cosine of pointing angle" + " ;" + strPt + " ;" + strEntries, {HistType::kTH2F , {{110 , -1.1 , 1.1 }, {100 , 0 ., 10 .}}});
301299 }
302300
0 commit comments