CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RectangularEtaPhiRegion Class Reference

#include <RectangularEtaPhiRegion.h>

Public Member Functions

auto etaHigh () const
 
auto etaLow () const
 
bool inRegion (float eta, float phi) const
 
auto phiHigh () const
 
auto phiLow () const
 
 RectangularEtaPhiRegion (float etaLow, float etaHigh, float phiLow, float phiHigh)
 

Private Attributes

float ceta
 
float cphi
 
float deta
 
float dphi
 

Detailed Description

Definition at line 6 of file RectangularEtaPhiRegion.h.

Constructor & Destructor Documentation

◆ RectangularEtaPhiRegion()

RectangularEtaPhiRegion::RectangularEtaPhiRegion ( float  etaLow,
float  etaHigh,
float  phiLow,
float  phiHigh 
)
inline

Definition at line 8 of file RectangularEtaPhiRegion.h.

9  : ceta(0.5f * (etaHigh + etaLow)), deta(0.5f * std::abs(etaHigh - etaLow)) {
11  constexpr float c1 = 2. * M_PI;
12  if (phiHigh < phiLow)
13  phiHigh += c1;
14  dphi = 0.5f * (phiHigh - phiLow);
15  cphi = phiLow + dphi;
16  }

References alignmentValidation::c1, cphi, dphi, M_PI, phiHigh(), phiLow(), and proxim().

Member Function Documentation

◆ etaHigh()

auto RectangularEtaPhiRegion::etaHigh ( ) const
inline

Definition at line 23 of file RectangularEtaPhiRegion.h.

23 { return ceta + deta; }

References ceta, and deta.

◆ etaLow()

auto RectangularEtaPhiRegion::etaLow ( ) const
inline

Definition at line 22 of file RectangularEtaPhiRegion.h.

22 { return ceta - deta; }

References ceta, and deta.

◆ inRegion()

bool RectangularEtaPhiRegion::inRegion ( float  eta,
float  phi 
) const
inline

Definition at line 18 of file RectangularEtaPhiRegion.h.

18  {
19  return std::abs(eta - ceta) < deta && std::abs(proxim(phi, cphi) - cphi) < dphi;
20  }

References funct::abs(), ceta, cphi, deta, dphi, PVValHelper::eta, phi, and proxim().

◆ phiHigh()

auto RectangularEtaPhiRegion::phiHigh ( ) const
inline

Definition at line 25 of file RectangularEtaPhiRegion.h.

25 { return cphi + dphi; }

References cphi, and dphi.

Referenced by RectangularEtaPhiRegion().

◆ phiLow()

auto RectangularEtaPhiRegion::phiLow ( ) const
inline

Definition at line 24 of file RectangularEtaPhiRegion.h.

24 { return cphi - dphi; }

References cphi, and dphi.

Referenced by RectangularEtaPhiRegion().

Member Data Documentation

◆ ceta

float RectangularEtaPhiRegion::ceta
private

Definition at line 28 of file RectangularEtaPhiRegion.h.

Referenced by etaHigh(), etaLow(), and inRegion().

◆ cphi

float RectangularEtaPhiRegion::cphi
private

Definition at line 30 of file RectangularEtaPhiRegion.h.

Referenced by inRegion(), phiHigh(), phiLow(), and RectangularEtaPhiRegion().

◆ deta

float RectangularEtaPhiRegion::deta
private

Definition at line 29 of file RectangularEtaPhiRegion.h.

Referenced by VBF.VBF::__str__(), etaHigh(), etaLow(), and inRegion().

◆ dphi

float RectangularEtaPhiRegion::dphi
private
RectangularEtaPhiRegion::etaHigh
auto etaHigh() const
Definition: RectangularEtaPhiRegion.h:23
RectangularEtaPhiRegion::phiHigh
auto phiHigh() const
Definition: RectangularEtaPhiRegion.h:25
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
proxim
constexpr T proxim(T b, T a)
Definition: normalizedPhi.h:14
PVValHelper::eta
Definition: PVValidationHelpers.h:70
RectangularEtaPhiRegion::ceta
float ceta
Definition: RectangularEtaPhiRegion.h:28
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
RectangularEtaPhiRegion::cphi
float cphi
Definition: RectangularEtaPhiRegion.h:30
DDAxes::phi
RectangularEtaPhiRegion::deta
float deta
Definition: RectangularEtaPhiRegion.h:29
RectangularEtaPhiRegion::phiLow
auto phiLow() const
Definition: RectangularEtaPhiRegion.h:24
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RectangularEtaPhiRegion::dphi
float dphi
Definition: RectangularEtaPhiRegion.h:31
RectangularEtaPhiRegion::etaLow
auto etaLow() const
Definition: RectangularEtaPhiRegion.h:22