@@ -149,6 +149,10 @@ struct lambdaspincorrderived {
149149 template <typename T>
150150 bool selectionV0 (T const & candidate)
151151 {
152+ auto particle = ROOT::Math::PtEtaPhiMVector (candidate.lambdaPt (), candidate.lambdaEta (), candidate.lambdaPhi (), candidate.lambdaMass ());
153+ if (std::abs (particle.Rapidity ()) > rapidity || std::abs (particle.Eta ()) > v0eta) {
154+ return false ;
155+ }
152156 if (candidate.v0Cospa () < cosPA) {
153157 return false ;
154158 }
@@ -298,12 +302,6 @@ struct lambdaspincorrderived {
298302 histos.fill (HIST (" etaCent" ), v0.lambdaEta (), centrality);
299303 proton = ROOT::Math::PtEtaPhiMVector (v0.protonPt (), v0.protonEta (), v0.protonPhi (), o2::constants::physics::MassProton);
300304 lambda = ROOT::Math::PtEtaPhiMVector (v0.lambdaPt (), v0.lambdaEta (), v0.lambdaPhi (), v0.lambdaMass ());
301- if (std::abs (lambda.Rapidity ()) > rapidity) {
302- continue ;
303- }
304- if (std::abs (lambda.Eta ()) > v0eta) {
305- continue ;
306- }
307305 for (const auto & v02 : V0s) {
308306 if (v02.index () <= v0.index ()) {
309307 continue ;
@@ -320,13 +318,6 @@ struct lambdaspincorrderived {
320318 proton2 = ROOT::Math::PtEtaPhiMVector (v02.protonPt (), v02.protonEta (), v02.protonPhi (), o2::constants::physics::MassProton);
321319 lambda2 = ROOT::Math::PtEtaPhiMVector (v02.lambdaPt (), v02.lambdaEta (), v02.lambdaPhi (), v02.lambdaMass ());
322320 histos.fill (HIST (" deltaPhiSame" ), std::abs (RecoDecay::constrainAngle (v0.lambdaPhi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (v02.lambdaPhi (), 0 .0F , harmonic)));
323- if (std::abs (lambda2.Rapidity ()) > rapidity) {
324- continue ;
325- }
326- if (std::abs (lambda2.Eta ()) > v0eta) {
327- continue ;
328- }
329- histos.fill (HIST (" deltaPhiSame" ), std::abs (RecoDecay::constrainAngle (v0.lambdaPhi (), 0 .0F ) - RecoDecay::constrainAngle (v02.lambdaPhi (), 0 .0F )));
330321 if (v0.v0Status () == 0 && v02.v0Status () == 0 ) {
331322 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, centrality, 0 , 1.0 );
332323 }
@@ -399,19 +390,6 @@ struct lambdaspincorrderived {
399390 proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
400391 lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
401392 histos.fill (HIST (" deltaPhiMix" ), std::abs (RecoDecay::constrainAngle (t3.lambdaPhi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (t2.lambdaPhi (), 0 .0F , harmonic)));
402- if (std::abs (lambda.Rapidity ()) > rapidity) {
403- continue ;
404- }
405- if (std::abs (lambda.Eta ()) > v0eta) {
406- continue ;
407- }
408- if (std::abs (lambda2.Rapidity ()) > rapidity) {
409- continue ;
410- }
411- if (std::abs (lambda2.Eta ()) > v0eta) {
412- continue ;
413- }
414- histos.fill (HIST (" deltaPhiMix" ), std::abs (RecoDecay::constrainAngle (t3.lambdaPhi (), 0 .0F ) - RecoDecay::constrainAngle (t2.lambdaPhi (), 0 .0F )));
415393 if (t3.v0Status () == 0 && t2.v0Status () == 0 ) {
416394 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, centrality, 1 , 1.0 );
417395 }
@@ -484,10 +462,10 @@ struct lambdaspincorrderived {
484462 }
485463
486464 // reconstruct 4-vectors
487- auto proton = ROOT::Math::PtEtaPhiMVector (t3.protonPt (), t3.protonEta (), t3.protonPhi (), o2::constants::physics::MassProton);
488- auto lambda = ROOT::Math::PtEtaPhiMVector (t3.lambdaPt (), t3.lambdaEta (), t3.lambdaPhi (), t3.lambdaMass ());
489- auto proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
490- auto lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
465+ proton = ROOT::Math::PtEtaPhiMVector (t3.protonPt (), t3.protonEta (), t3.protonPhi (), o2::constants::physics::MassProton);
466+ lambda = ROOT::Math::PtEtaPhiMVector (t3.lambdaPt (), t3.lambdaEta (), t3.lambdaPhi (), t3.lambdaMass ());
467+ proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
468+ lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
491469
492470 float dPhi = std::fabs (RecoDecay::constrainAngle (lambda.Phi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (lambda2.Phi (), 0 .0F , harmonic));
493471 histos.fill (HIST (" deltaPhiMix" ), dPhi, invN);
0 commit comments