-
Notifications
You must be signed in to change notification settings - Fork 685
[PWGDQ] Track rotation ep preserving mepm rotated legs #17983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ec8659b
4b3f0df
c7d5ef1
73d4a77
e85c101
4896ea8
99c6855
8ea40f2
3c4f361
1cc3502
2a7605a
20dee4c
bc7e0e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1495,6 +1495,8 @@ class VarManager : public TObject | |
| static void FillPair(T1 const& t1, T2 const& t2, float* values = nullptr); | ||
| template <int pairType, uint32_t fillMap, typename T1, typename T2> | ||
| static void FillPairRotation(T1 const& t1, T2 const& t2, int rotation, float* values = nullptr); | ||
| template <typename T> | ||
| static void FillPairRotation_ME(T const& t1, T const& t2, int rotation, float* values = nullptr); | ||
| template <int pairType, uint32_t fillMap, typename C, typename T1, typename T2> | ||
| static void FillPairCollision(C const& collision, T1 const& t1, T2 const& t2, float* values = nullptr); | ||
| template <int pairType, uint32_t fillMap, typename C, typename T1, typename T2, typename M, typename P> | ||
|
|
@@ -4084,7 +4086,11 @@ void VarManager::FillPairRotation(T1 const& t1, T2 const& t2, int rotation, floa | |
| rotationphi2 = 2 * values[kPsi2A] - t2.phi() + o2::constants::math::PI; | ||
| } | ||
|
|
||
| rotationphi2 = RecoDecay::constrainAngle(rotationphi2); | ||
| if (rotationphi2 >= o2::constants::math::TwoPI) { | ||
| rotationphi2 -= o2::constants::math::TwoPI; | ||
| } else if (rotationphi2 < 0) { | ||
| rotationphi2 += o2::constants::math::TwoPI; | ||
| } | ||
|
|
||
| values[kCharge] = t1.sign() + t2.sign(); | ||
| values[kCharge1] = t1.sign(); | ||
|
|
@@ -4547,6 +4553,51 @@ void VarManager::FillPairME(T1 const& t1, T2 const& t2, float* values) | |
| } | ||
| } | ||
|
|
||
| template <typename T> | ||
| void VarManager::FillPairRotation_ME(T const& t1, T const& t2, int rotation, float* values) | ||
| { | ||
| if (!values) { | ||
| values = fgValues; | ||
| } | ||
|
|
||
| float m1 = o2::constants::physics::MassElectron; | ||
| double rotationphi2 = t2.phi; | ||
|
|
||
| if (rotation == 1) { | ||
| rotationphi2 = t2.phi + o2::constants::math::PI; | ||
| } else if (rotation == 2) { | ||
| rotationphi2 = 2 * values[kPsi2A] - t2.phi; | ||
| } else if (rotation == 3) { | ||
| rotationphi2 = 2 * values[kPsi2A] - t2.phi + o2::constants::math::PI; | ||
| } | ||
|
|
||
| if (rotationphi2 >= o2::constants::math::TwoPI) { | ||
| rotationphi2 -= o2::constants::math::TwoPI; | ||
| } else if (rotationphi2 < 0) { | ||
| rotationphi2 += o2::constants::math::TwoPI; | ||
| } | ||
|
Comment on lines
+4574
to
+4578
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, this should be done with |
||
|
|
||
| ROOT::Math::PtEtaPhiMVector v1(t1.pt, t1.eta, t1.phi, m1); | ||
| ROOT::Math::PtEtaPhiMVector v2(t2.pt, t2.eta, rotationphi2, m1); | ||
| ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; | ||
|
Comment on lines
+4580
to
+4582
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please consider using |
||
| values[kMass] = v12.M(); | ||
| values[kPt] = v12.Pt(); | ||
| values[kEta] = v12.Eta(); | ||
| // values[kPhi] = v12.Phi(); | ||
| values[kPhi] = RecoDecay::constrainAngle(v12.Phi()); | ||
| values[kRap] = -v12.Rapidity(); | ||
| double Ptot1 = TMath::Sqrt(v1.Px() * v1.Px() + v1.Py() * v1.Py() + v1.Pz() * v1.Pz()); | ||
| double Ptot2 = TMath::Sqrt(v2.Px() * v2.Px() + v2.Py() * v2.Py() + v2.Pz() * v2.Pz()); | ||
|
Comment on lines
+4589
to
+4590
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please consider using |
||
| values[kDeltaPtotTracks] = Ptot1 - Ptot2; | ||
|
|
||
| values[kPt1] = t1.pt; | ||
| values[kEta1] = t1.eta; | ||
| values[kPhi1] = t1.phi; | ||
| values[kPt2] = t2.pt; | ||
| values[kEta2] = t2.eta; | ||
| values[kPhi2] = rotationphi2; | ||
| } | ||
|
|
||
| template <typename T> | ||
| void VarManager::FillPairMEAcrossTFs(T const& t1, T const& t2, float* values) | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayatsujiringo Why did you replace the
constrainAnglefunction?