ATLAS Offline Software
Loading...
Searching...
No Matches
CaloPhiRange.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 Liquid Argon detector description package
7 -----------------------------------------
8 ***************************************************************************/
9
10
12
13double
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}
20
21double
22CaloPhiRange::diff ( double phi1, double phi2 )
23{
24 double res = fix(phi1) - fix(phi2);
25 return fix(res);
26}
Scalar phi() const
phi method
CaloPhiRange class declaration.
std::pair< std::vector< unsigned int >, bool > res
static constexpr const double m_phi_max
static constexpr const double m_twopi
static double fix(double phi)
static constexpr const double m_phi_min
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.