File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1616// / \file upcRhoAnalysis.cxx
1717
1818#include " Common/DataModel/PIDResponse.h"
19- // #include "Common/Core/RecoDecay.h"
19+ // #include "Common/Core/RecoDecay.h" // need to use something from this to restrict angle ranges
2020
2121#include " PWGUD/Core/UPCTauCentralBarrelHelperRL.h"
2222#include " PWGUD/DataModel/UDTables.h"
@@ -525,10 +525,11 @@ struct UpcRhoAnalysis {
525525 double deltaPhi (const ROOT::Math::PxPyPzMVector& p1, const ROOT::Math::PxPyPzMVector& p2)
526526 {
527527 double dPhi = p1.Phi () - p2.Phi ();
528- if (dPhi > o2::constants::math::PI)
529- dPhi -= o2::constants::math::TwoPI;
530- else if (dPhi < -o2::constants::math::PI)
531- dPhi += o2::constants::math::TwoPI;
528+ dPhi = std::fmod (dPhi + o2::constants::math::PI, o2::constants::math::TwoPI) - o2::constants::math::PI; // normalize to (-pi, pi)
529+ // if (dPhi > o2::constants::math::PI)
530+ // dPhi -= o2::constants::math::TwoPI;
531+ // else if (dPhi < -o2::constants::math::PI)
532+ // dPhi += o2::constants::math::TwoPI;
532533 return dPhi; // calculate delta phi in (-pi, pi)
533534 }
534535
You can’t perform that action at this time.
0 commit comments