@@ -196,7 +196,7 @@ struct JetHFAngularityTask {
196196 // DATA
197197
198198 using D0CandidatesData = aod::CandidatesD0Data;
199-
199+
200200 using D0DataJets = soa::Join<aod::D0ChargedJets,
201201 aod::D0ChargedJetConstituents>;
202202
@@ -477,7 +477,7 @@ struct JetHFAngularityTask {
477477 }
478478
479479 // Helper: jet invariant mass
480-
480+
481481 template <typename TRACKS , typename CANDIDATES >
482482 float computeJetMass (TRACKS const & tracks,
483483 CANDIDATES const & candidates,
@@ -487,16 +487,13 @@ struct JetHFAngularityTask {
487487 double energyTot = 0 .;
488488
489489 for (auto const & trk : tracks) {
490- const std::array<double , 3 > mom{trk.px (), trk.py (), trk.pz ()};
491- momTotal[0 ] += mom[0 ];
492- momTotal[1 ] += mom[1 ];
493- momTotal[2 ] += mom[2 ];
494- energyTot += RecoDecay::e (mom, 0 .); // massless approximation for ordinary tracks
490+ momTotal[0 ] += trk.px ();
491+ momTotal[1 ] += trk.py ();
492+ momTotal[2 ] += trk.pz ();
493+ energyTot += RecoDecay::p (trk.px (), trk.py (), trk.pz ()); // massless approximation for ordinary tracks
495494 }
496495
497496 for (auto const & cand : candidates) {
498- const std::array<double , 3 > mom{cand.px (), cand.py (), cand.pz ()};
499-
500497 double m;
501498 if (candMass > 0 .) {
502499 m = candMass;
@@ -506,10 +503,10 @@ struct JetHFAngularityTask {
506503 m = 0 .;
507504 }
508505
509- momTotal[0 ] += mom[ 0 ] ;
510- momTotal[1 ] += mom[ 1 ] ;
511- momTotal[2 ] += mom[ 2 ] ;
512- energyTot += RecoDecay::e (mom , m);
506+ momTotal[0 ] += cand. px () ;
507+ momTotal[1 ] += cand. py () ;
508+ momTotal[2 ] += cand. pz () ;
509+ energyTot += RecoDecay::e (cand. px (), cand. py (), cand. pz () , m);
513510 }
514511
515512 const double mass2 = RecoDecay::m2 (momTotal, energyTot);
0 commit comments