1818// / \author Deepa Thomas <[email protected] >, UT Austin1919// / \author Antonio Palasciano <[email protected] >, Università degli Studi di Bari & INFN, Sezione di Bari2020
21+ #include < memory>
22+ #include < string>
23+ #include < vector>
24+
2125#include " CommonConstants/PhysicsConstants.h"
2226#include " DCAFitter/DCAFitterN.h"
2327#include " Framework/AnalysisTask.h"
@@ -79,9 +83,6 @@ struct HfCandidateCreatorBplus {
7983 o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
8084 int runNumber;
8185
82- double massPi{0 .};
83- double massD0{0 .};
84- double massBplus{0 .};
8586 double invMass2D0PiMin{0 .};
8687 double invMass2D0PiMax{0 .};
8788 double bz{0 .};
@@ -110,11 +111,8 @@ struct HfCandidateCreatorBplus {
110111 void init (InitContext const &)
111112 {
112113 // invariant-mass window cut
113- massPi = MassPiPlus;
114- massD0 = MassD0;
115- massBplus = MassBPlus;
116- invMass2D0PiMin = (massBplus - invMassWindowBplus) * (massBplus - invMassWindowBplus);
117- invMass2D0PiMax = (massBplus + invMassWindowBplus) * (massBplus + invMassWindowBplus);
114+ invMass2D0PiMin = (MassBPlus - invMassWindowBplus) * (MassBPlus - invMassWindowBplus);
115+ invMass2D0PiMax = (MassBPlus + invMassWindowBplus) * (MassBPlus + invMassWindowBplus);
118116
119117 // Initialise fitter for B vertex
120118 dfB.setPropagateToPCA (propagateToPCA);
@@ -173,16 +171,8 @@ struct HfCandidateCreatorBplus {
173171 aod::BCsWithTimestamps const &)
174172 {
175173
176- static int nCol = 0 ;
177-
178174 for (const auto & collision : collisions) {
179175 auto primaryVertex = getPrimaryVertex (collision);
180-
181- if (nCol % 10000 == 0 ) {
182- LOG (debug) << nCol << " collisions parsed" ;
183- }
184- nCol++;
185-
186176 // / Set the magnetic field from ccdb.
187177 // / The static instance of the propagator was already modified in the HFTrackIndexSkimCreator,
188178 // / but this is not true when running on Run2 data/MC already converted into AO2Ds.
@@ -294,7 +284,6 @@ struct HfCandidateCreatorBplus {
294284 auto trackParCovPi = getTrackParCov (trackPion);
295285 std::array<float , 3 > pVecD0 = {0 ., 0 ., 0 .};
296286 std::array<float , 3 > pVecBach = {0 ., 0 ., 0 .};
297- std::array<float , 3 > pVecBCand = {0 ., 0 ., 0 .};
298287
299288 // find the DCA between the D0 and the bachelor track, for B+
300289 hCandidatesB->Fill (SVFitting::BeforeFit);
@@ -318,8 +307,6 @@ struct HfCandidateCreatorBplus {
318307 auto covMatrixPCA = dfB.calcPCACovMatrixFlat ();
319308 hCovSVXX->Fill (covMatrixPCA[0 ]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.
320309
321- pVecBCand = RecoDecay::pVec (pVecD0, pVecBach);
322-
323310 // get track impact parameters
324311 // This modifies track momenta!
325312 auto covMatrixPV = primaryVertex.getCov ();
@@ -336,7 +323,7 @@ struct HfCandidateCreatorBplus {
336323 auto errorDecayLengthXY = std::sqrt (getRotatedCovMatrixXX (covMatrixPV, phi, 0 .) + getRotatedCovMatrixXX (covMatrixPCA, phi, 0 .));
337324
338325 // compute invariant mass square and apply selection
339- auto invMass2D0Pi = RecoDecay::m2 (std::array{pVecD0, pVecBach}, std::array{massD0, massPi });
326+ auto invMass2D0Pi = RecoDecay::m2 (std::array{pVecD0, pVecBach}, std::array{MassD0, MassPiPlus });
340327 if ((invMass2D0Pi < invMass2D0PiMin) || (invMass2D0Pi > invMass2D0PiMax)) {
341328 continue ;
342329 }
0 commit comments