File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -184,8 +184,11 @@ class EMPair : public EMTrack
184184 void setPositiveLegPxPyPzM (float px, float py, float pz, float m)
185185 {
186186 float pt = std::sqrt (px * px + py * py);
187- float eta = std::atanh (pz / sqrt (std::pow (px, 2 ) + std::pow (py, 2 ) + std::pow (pz, 2 )));
187+ float eta = std::atanh (pz / std:: sqrt (std::pow (px, 2 ) + std::pow (py, 2 ) + std::pow (pz, 2 )));
188188 float phi = std::atan2 (py, px);
189+ if (phi < 0 .f ) {
190+ phi += 2 .f * M_PI;
191+ }
189192
190193 fVPos .SetPt (pt);
191194 fVPos .SetEta (eta);
@@ -195,8 +198,11 @@ class EMPair : public EMTrack
195198 void setNegativeLegPxPyPzM (float px, float py, float pz, float m)
196199 {
197200 float pt = std::sqrt (px * px + py * py);
198- float eta = std::atanh (pz / std::sqrt (pow (px, 2 ) + std::pow (py, 2 ) + std::pow (pz, 2 )));
201+ float eta = std::atanh (pz / std::sqrt (std:: pow (px, 2 ) + std::pow (py, 2 ) + std::pow (pz, 2 )));
199202 float phi = std::atan2 (py, px);
203+ if (phi < 0 .f ) {
204+ phi += 2 .f * M_PI;
205+ }
200206
201207 fVNeg .SetPt (pt);
202208 fVNeg .SetEta (eta);
You can’t perform that action at this time.
0 commit comments