ATLAS Offline Software
Static Public Member Functions | Static Private Attributes | List of all members
CaloPhiRange Class Reference

This class defines the phi convention for Calorimeters. More...

#include <CaloPhiRange.h>

Collaboration diagram for CaloPhiRange:

Static Public Member Functions

static double twopi ()
 
static double phi_min ()
 
static double phi_max ()
 
static double fix (double phi)
 
static double diff (double phi1, double phi2)
 simple phi1 - phi2 calculation, but result is fixed to respect range. More...
 

Static Private Attributes

constexpr static const double m_phi_min = -std::numbers::pi
 
constexpr static const double m_twopi = 2*std::numbers::pi
 
constexpr static const double m_phi_max = std::numbers::pi
 

Detailed Description

This class defines the phi convention for Calorimeters.

 up to Release 8.3.0 (included) : 0->2pi

 as of 8.4.0 : -pi -> pi

Definition at line 27 of file CaloPhiRange.h.

Member Function Documentation

◆ diff()

double CaloPhiRange::diff ( double  phi1,
double  phi2 
)
static

simple phi1 - phi2 calculation, but result is fixed to respect range.

Definition at line 22 of file CaloPhiRange.cxx.

23 {
24  double res = fix(phi1) - fix(phi2);
25  return fix(res);
26 }

◆ fix()

double CaloPhiRange::fix ( double  phi)
static

Definition at line 14 of file CaloPhiRange.cxx.

15 {
16  if (phi < m_phi_min) return (phi+m_twopi);
17  if (phi > m_phi_max) return (phi-m_twopi);
18  return phi;
19 }

◆ phi_max()

double CaloPhiRange::phi_max ( )
inlinestatic

Definition at line 52 of file CaloPhiRange.h.

53 { return m_phi_max;}

◆ phi_min()

double CaloPhiRange::phi_min ( )
inlinestatic

Definition at line 49 of file CaloPhiRange.h.

50 { return m_phi_min;}

◆ twopi()

double CaloPhiRange::twopi ( )
inlinestatic

Definition at line 46 of file CaloPhiRange.h.

47 { return m_twopi;}

Member Data Documentation

◆ m_phi_max

constexpr static const double CaloPhiRange::m_phi_max = std::numbers::pi
staticconstexprprivate

Definition at line 43 of file CaloPhiRange.h.

◆ m_phi_min

constexpr static const double CaloPhiRange::m_phi_min = -std::numbers::pi
staticconstexprprivate

Definition at line 41 of file CaloPhiRange.h.

◆ m_twopi

constexpr static const double CaloPhiRange::m_twopi = 2*std::numbers::pi
staticconstexprprivate

Definition at line 42 of file CaloPhiRange.h.


The documentation for this class was generated from the following files:
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CaloPhiRange::m_phi_max
constexpr static const double m_phi_max
Definition: CaloPhiRange.h:43
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
CaloPhiRange::m_twopi
constexpr static const double m_twopi
Definition: CaloPhiRange.h:42
CaloPhiRange::m_phi_min
constexpr static const double m_phi_min
Definition: CaloPhiRange.h:41
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:14