@@ -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 }
@@ -260,9 +264,9 @@ struct lambdaspincorrderived {
260264 double weight2 = mixpairweight;
261265 double weight3 = mixpairweight;
262266 if (useweight) {
263- weight1 = mixpairweight * hweight1->GetBinContent (hweight1->FindBin (particle1.Pt (), particle1.Eta (), particle1.Phi ()));
264- weight2 = mixpairweight * hweight2->GetBinContent (hweight2->FindBin (particle1.Pt (), particle1.Eta (), particle1.Phi ()));
265- weight3 = mixpairweight * hweight3->GetBinContent (hweight3->FindBin (particle1.Pt (), particle1.Eta (), particle1.Phi ()));
267+ weight1 = mixpairweight * hweight1->GetBinContent (hweight1->FindBin (particle1.Pt (), particle1.Eta (), RecoDecay::constrainAngle ( particle1.Phi (), 0 . 0F , harmonic )));
268+ weight2 = mixpairweight * hweight2->GetBinContent (hweight2->FindBin (particle1.Pt (), particle1.Eta (), RecoDecay::constrainAngle ( particle1.Phi (), 0 . 0F , harmonic )));
269+ weight3 = mixpairweight * hweight3->GetBinContent (hweight3->FindBin (particle1.Pt (), particle1.Eta (), RecoDecay::constrainAngle ( particle1.Phi (), 0 . 0F , harmonic )));
266270 }
267271 histos.fill (HIST (" hPtYMix" ), particle1.Pt (), particle1.Rapidity ());
268272 if (tag1 == 0 && tag2 == 0 ) {
@@ -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,12 +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- }
329321 if (v0.v0Status () == 0 && v02.v0Status () == 0 ) {
330322 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, centrality, 0 , 1.0 );
331323 }
@@ -398,18 +390,6 @@ struct lambdaspincorrderived {
398390 proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
399391 lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
400392 histos.fill (HIST (" deltaPhiMix" ), std::abs (RecoDecay::constrainAngle (t3.lambdaPhi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (t2.lambdaPhi (), 0 .0F , harmonic)));
401- if (std::abs (lambda.Rapidity ()) > rapidity) {
402- continue ;
403- }
404- if (std::abs (lambda.Eta ()) > v0eta) {
405- continue ;
406- }
407- if (std::abs (lambda2.Rapidity ()) > rapidity) {
408- continue ;
409- }
410- if (std::abs (lambda2.Eta ()) > v0eta) {
411- continue ;
412- }
413393 if (t3.v0Status () == 0 && t2.v0Status () == 0 ) {
414394 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, centrality, 1 , 1.0 );
415395 }
@@ -482,10 +462,10 @@ struct lambdaspincorrderived {
482462 }
483463
484464 // reconstruct 4-vectors
485- auto proton = ROOT::Math::PtEtaPhiMVector (t3.protonPt (), t3.protonEta (), t3.protonPhi (), o2::constants::physics::MassProton);
486- auto lambda = ROOT::Math::PtEtaPhiMVector (t3.lambdaPt (), t3.lambdaEta (), t3.lambdaPhi (), t3.lambdaMass ());
487- auto proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
488- 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 ());
489469
490470 float dPhi = std::fabs (RecoDecay::constrainAngle (lambda.Phi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (lambda2.Phi (), 0 .0F , harmonic));
491471 histos.fill (HIST (" deltaPhiMix" ), dPhi, invN);
0 commit comments