ATLAS Offline Software
TIDARoiParameters.cxx
Go to the documentation of this file.
1 
10 #include <cmath>
11 
13 
15 
16 
17 #ifndef M_PI
19 #define M_PI 3.141592653589793238462643383279502884197
20 #endif
21 
22 #ifndef M_2PI
23 static const float M_2PI = 2*M_PI;
24 #endif
25 
26 #ifndef M_PIF
27 static const float M_PIF = float(M_PI);
28 #endif
29 
30 double _phicheck(double phi) {
31  if ( !(phi > -M_PIF && phi < M_PIF ) ) { // use ! of range rather than range to also catch nan etc
32  if ( phi < -M_PIF ) phi += M_2PI;
33  else phi -= M_2PI;
34  }
35  return phi;
36 }
37 
38 
39 
41  m_eta(0), m_phi(0), m_zed(0),
42  m_etaMinus(0), m_etaPlus(0),
43  m_phiMinus(0), m_phiPlus(0),
44  m_zedMinus(0), m_zedPlus(0)
45 { }
46 
47 TIDARoiParameters::TIDARoiParameters(double eta, double etaMinus, double etaPlus,
48  double phi, double phiMinus, double phiPlus,
49  double zed, double zedMinus, double zedPlus ) :
50  m_eta(eta), m_phi(phi), m_zed(zed),
51  m_etaMinus(etaMinus), m_etaPlus(etaPlus),
52  // m_phiMinus(_phicheck(phiMinus)), m_phiPlus(_phicheck(phiPlus)),
53  m_phiMinus(phiMinus), m_phiPlus(phiPlus),
54  m_zedMinus(zedMinus), m_zedPlus(zedPlus)
55 {
56  // std::cout << "TIDAParameters phi: " << phiMinus << " -> " << m_phiMinus << " : " << phiPlus << " -> " << m_phiPlus << std::endl;
57 }
58 
59 
61 
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
TIDARoiParameters
Definition: TIDARoiParameters.h:29
TIDARoiParameters::TIDARoiParameters
TIDARoiParameters()
Definition: TIDARoiParameters.cxx:40
_phicheck
double _phicheck(double phi)
Definition: TIDARoiParameters.cxx:30
M_PI
#define M_PI
ClassImp
ClassImp(TIDARoiParameters) static const float M_2PI
Define M_PI ONLY if it is not already defined in <cmath>
TIDARoiParameters::~TIDARoiParameters
virtual ~TIDARoiParameters()
Definition: TIDARoiParameters.cxx:60
TIDARoiParameters.h
Class to store the eta, phi, zed, parameters and ranges for the TIDARoiDescriptor class.
M_2PI
#define M_2PI
Definition: CaloGpuGeneral_fnc.cxx:8
readCCLHist.float
float
Definition: readCCLHist.py:83