CMS 3D CMS Logo

Public Member Functions | Private Attributes

EcalEtaPhiRegion Class Reference

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

EcalEtaPhiRegion::~EcalEtaPhiRegion ( ) [inline]

Definition at line 11 of file EcalEtaPhiRegion.h.

{};

Member Function Documentation

double EcalEtaPhiRegion::etaHigh ( ) const [inline]

Definition at line 14 of file EcalEtaPhiRegion.h.

References etaHigh_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

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

Definition at line 13 of file EcalEtaPhiRegion.h.

References etaLow_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

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

                                                                 {

  double phi = position.phi();
  double phihightemp = phiHigh_;

  if(phihightemp<phiLow_) phihightemp += Geom::twoPi();

  // put phi in range -pi to pi
  if(phi > Geom::pi()) phi -= Geom::twoPi();
  if(phi < -Geom::pi()) phi += Geom::twoPi();
  if(phi<phiLow_) phi += Geom::twoPi();


  return (position.eta() > etaLow_ && position.eta() < etaHigh_ &&
          phi > phiLow_ && phi < phihightemp);

}
double EcalEtaPhiRegion::phiHigh ( ) const [inline]

Definition at line 16 of file EcalEtaPhiRegion.h.

References phiHigh_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

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

Definition at line 15 of file EcalEtaPhiRegion.h.

References phiLow_.

Referenced by EcalElectronicsMapping::GetListofFEDs().

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