CMS 3D CMS Logo

EcalEtaPhiRegion Class Reference

#include <RecoEcal/EgammaCoreTools/interface/EcalEtaPhiRegion.h>

List of all members.

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().

00003                                                                                               :
00004   etaLow_(etaLow),etaHigh_(etaHigh),phiLow_(phiLow),phiHigh_(phiHigh)
00005 {
00006   // put phi in range -pi to pi
00007   if(phiLow_ > Geom::pi()) phiLow_ -= Geom::twoPi();
00008   if(phiLow_ < -Geom::pi()) phiLow_ += Geom::twoPi();
00009   if(phiHigh_ > Geom::pi()) phiHigh_ -= Geom::twoPi();
00010   if(phiHigh_ < -Geom::pi()) phiHigh_ += Geom::twoPi();
00011 }

EcalEtaPhiRegion::~EcalEtaPhiRegion (  )  [inline]

Definition at line 11 of file EcalEtaPhiRegion.h.

00011 {};


Member Function Documentation

double EcalEtaPhiRegion::etaHigh (  )  const [inline]

Definition at line 14 of file EcalEtaPhiRegion.h.

References etaHigh_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

00014 { return etaHigh_; }

double EcalEtaPhiRegion::etaLow (  )  const [inline]

Definition at line 13 of file EcalEtaPhiRegion.h.

References etaLow_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

00013 { 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_, PV3DBase< T, PVType, FrameType >::phi(), phi, phiHigh_, phiLow_, Geom::pi(), and Geom::twoPi().

00013                                                                  {
00014 
00015   double phi = position.phi();
00016   double phihightemp = phiHigh_;
00017 
00018   if(phihightemp<phiLow_) phihightemp += Geom::twoPi();
00019 
00020   // put phi in range -pi to pi
00021   if(phi > Geom::pi()) phi -= Geom::twoPi();
00022   if(phi < -Geom::pi()) phi += Geom::twoPi();
00023   if(phi<phiLow_) phi += Geom::twoPi();
00024 
00025 
00026   return (position.eta() > etaLow_ && position.eta() < etaHigh_ &&
00027           phi > phiLow_ && phi < phihightemp);
00028 
00029 }

double EcalEtaPhiRegion::phiHigh (  )  const [inline]

Definition at line 16 of file EcalEtaPhiRegion.h.

References phiHigh_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

00016 { return phiHigh_; }

double EcalEtaPhiRegion::phiLow (  )  const [inline]

Definition at line 15 of file EcalEtaPhiRegion.h.

References phiLow_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

00015 { 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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:34 2009 for CMSSW by  doxygen 1.5.4