Skip to content
Snippets Groups Projects
Commit 9940d49e authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Delete PhiHelper

The methods have been moved to `CxxUtils/phihelper.h`. Note that
the equivalent of `HLT::phiMean` is `CxxUtils::phiBisect`.
parent 7ff223e3
No related branches found
No related tags found
No related merge requests found
// emacs: this is -*- c++ -*-
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
//
// @file phiHelper.h
//
//
// $Id: phiHelper.h, v0.0 Sun 20 Jun 2010 20:21:49 BST sutt $
#ifndef PHIHELPER_H
#define PHIHELPER_H
namespace HLT {
inline double wrapPhi( double phi ) {
static const double M_2PI = 2*M_PI;
while (phi> M_PI) phi -= M_2PI;
while (phi<-M_PI) phi += M_2PI;
return phi;
}
inline double phiMean( double phimin, double phimax) {
double phi = 0.5*(phimin+phimax);
if ( phimin>phimax ) phi += M_PI;
return wrapPhi(phi);
}
inline double deltaPhi( double phimax, double phimin) {
return wrapPhi(phimax-phimin);
}
}
#endif // __PHIHELPER_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment