CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
EcalEtaPhiRegion Class Reference

#include <EcalEtaPhiRegion.h>

Public Member Functions

 EcalEtaPhiRegion (double etaLow, double etaHigh, double phiLow, double phiHigh)
 
double etaHigh () const
 
double etaLow () const
 
bool inRegion (const GlobalPoint &position) const
 
double phiHigh () const
 
double phiLow () const
 
 ~EcalEtaPhiRegion ()
 

Private Attributes

double etaHigh_
 
double etaLow_
 
double phiHigh_
 
double phiLow_
 

Detailed Description

Definition at line 6 of file EcalEtaPhiRegion.h.

Constructor & Destructor Documentation

EcalEtaPhiRegion::EcalEtaPhiRegion ( double  etaLow,
double  etaHigh,
double  phiLow,
double  phiHigh 
)

Definition at line 3 of file EcalEtaPhiRegion.cc.

References phiHigh_, phiLow_, Geom::pi(), and Geom::twoPi().

3  :
5 {
6  // put phi in range -pi to pi
7  if(phiLow_ > Geom::pi()) phiLow_ -= Geom::twoPi();
8  if(phiLow_ < -Geom::pi()) phiLow_ += Geom::twoPi();
10  if(phiHigh_ < -Geom::pi()) phiHigh_ += Geom::twoPi();
11 }
double phiHigh() const
double etaLow() const
double etaHigh() const
double pi()
Definition: Pi.h:31
double twoPi()
Definition: Pi.h:32
double phiLow() const
EcalEtaPhiRegion::~EcalEtaPhiRegion ( )
inline

Definition at line 11 of file EcalEtaPhiRegion.h.

11 {};

Member Function Documentation

double EcalEtaPhiRegion::etaHigh ( ) const
inline

Definition at line 14 of file EcalEtaPhiRegion.h.

References etaHigh_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

14 { return etaHigh_; }
double EcalEtaPhiRegion::etaLow ( ) const
inline

Definition at line 13 of file EcalEtaPhiRegion.h.

References etaLow_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

13 { return etaLow_; }
bool EcalEtaPhiRegion::inRegion ( const GlobalPoint position) const

Definition at line 13 of file EcalEtaPhiRegion.cc.

References PV3DBase< T, PVType, FrameType >::eta(), etaHigh_, etaLow_, phi, PV3DBase< T, PVType, FrameType >::phi(), phiHigh_, phiLow_, Geom::pi(), and Geom::twoPi().

13  {
14 
15  double phi = position.phi();
16  double phihightemp = phiHigh_;
17 
18  if(phihightemp<phiLow_) phihightemp += Geom::twoPi();
19 
20  // put phi in range -pi to pi
21  if(phi > Geom::pi()) phi -= Geom::twoPi();
22  if(phi < -Geom::pi()) phi += Geom::twoPi();
23  if(phi<phiLow_) phi += Geom::twoPi();
24 
25 
26  return (position.eta() > etaLow_ && position.eta() < etaHigh_ &&
27  phi > phiLow_ && phi < phihightemp);
28 
29 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T eta() const
Definition: PV3DBase.h:76
double pi()
Definition: Pi.h:31
double twoPi()
Definition: Pi.h:32
Definition: DDAxes.h:10
double EcalEtaPhiRegion::phiHigh ( ) const
inline

Definition at line 16 of file EcalEtaPhiRegion.h.

References phiHigh_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

16 { return phiHigh_; }
double EcalEtaPhiRegion::phiLow ( ) const
inline

Definition at line 15 of file EcalEtaPhiRegion.h.

References phiLow_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

15 { return phiLow_; }

Member Data Documentation

double EcalEtaPhiRegion::etaHigh_
private

Definition at line 23 of file EcalEtaPhiRegion.h.

Referenced by etaHigh(), and inRegion().

double EcalEtaPhiRegion::etaLow_
private

Definition at line 22 of file EcalEtaPhiRegion.h.

Referenced by etaLow(), and inRegion().

double EcalEtaPhiRegion::phiHigh_
private

Definition at line 25 of file EcalEtaPhiRegion.h.

Referenced by EcalEtaPhiRegion(), inRegion(), and phiHigh().

double EcalEtaPhiRegion::phiLow_
private

Definition at line 24 of file EcalEtaPhiRegion.h.

Referenced by EcalEtaPhiRegion(), inRegion(), and phiLow().