CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CaloCellId Class Reference

#include <CaloCellId.h>

List of all members.

Public Types

enum  System { Barrel = 1, Endcap = 2, Forward = 3 }

Public Member Functions

 CaloCellId (double theEtaMin, double theEtaMax, double thePhiMin, double thePhiMax, System theSubSys)
 CaloCellId (const CaloCellId &)
double getEtaMax () const
double getEtaMin () const
double getPhiMax () const
double getPhiMin () const
System getSubSys () const
double getThetaCell ()
bool isInCell (double thisEta, double thisPhi)
bool operator== (const CaloCellId &) const
virtual ~CaloCellId ()

Private Attributes

double etaMax
double etaMin
double phiMax
double phiMin
System subSys

Detailed Description

Definition at line 16 of file CaloCellId.h.


Member Enumeration Documentation

Enumerator:
Barrel 
Endcap 
Forward 

Definition at line 20 of file CaloCellId.h.

{ Barrel=1,Endcap=2,Forward=3 };

Constructor & Destructor Documentation

CaloCellId::CaloCellId ( double  theEtaMin,
double  theEtaMax,
double  thePhiMin,
double  thePhiMax,
System  theSubSys 
)

Definition at line 21 of file CaloCellId.cc.

                                                                                                                :
  etaMin(theEtaMin),etaMax(theEtaMax),phiMin(thePhiMin),phiMax(thePhiMax),subSys(theSubSys)
{}
CaloCellId::CaloCellId ( const CaloCellId id)

Definition at line 25 of file CaloCellId.cc.

CaloCellId::~CaloCellId ( ) [virtual]

Definition at line 29 of file CaloCellId.cc.

{}

Member Function Documentation

double CaloCellId::getEtaMax ( ) const [inline]

Definition at line 27 of file CaloCellId.h.

References etaMax.

{ return etaMax; }
double CaloCellId::getEtaMin ( ) const [inline]

Definition at line 26 of file CaloCellId.h.

References etaMin.

Referenced by MBUEandQCDValidation::analyze().

{ return etaMin; }
double CaloCellId::getPhiMax ( ) const [inline]

Definition at line 29 of file CaloCellId.h.

References phiMax.

{ return phiMax; }
double CaloCellId::getPhiMin ( ) const [inline]

Definition at line 28 of file CaloCellId.h.

References phiMin.

{ return phiMin; }
System CaloCellId::getSubSys ( ) const [inline]

Definition at line 30 of file CaloCellId.h.

References subSys.

Referenced by MBUEandQCDValidation::analyze().

{ return subSys; }
double CaloCellId::getThetaCell ( )

Definition at line 49 of file CaloCellId.cc.

References etaMax, etaMin, funct::exp(), and theta().

Referenced by MBUEandQCDValidation::analyze().

                               {

  double etaAve = 0.5*(etaMax+etaMin);
  double theta = 2.*std::atan(std::exp(-1.*etaAve));
  return theta;

}
bool CaloCellId::isInCell ( double  thisEta,
double  thisPhi 
)

Definition at line 37 of file CaloCellId.cc.

References etaMin, phiMax, phiMin, and pi.

                                                       {

  double myPhi = thisPhi;

  bool itIs = false;
  if ( myPhi < -1.*CLHEP::pi ) { myPhi = myPhi+CLHEP::twopi; }
  else if ( myPhi > CLHEP::pi ) { myPhi = myPhi-CLHEP::twopi; }
  if ( thisEta >= etaMin && thisEta < etaMax && myPhi >= phiMin && myPhi < phiMax ) { itIs = true; }
  return itIs;

}
bool CaloCellId::operator== ( const CaloCellId id) const

Definition at line 31 of file CaloCellId.cc.

References etaMax, etaMin, funct::false, phiMax, phiMin, and subSys.

                                                      {

  return (etaMin == id.etaMin && etaMax == id.etaMax && phiMin == id.phiMin && phiMax == id.phiMax && subSys == id.subSys) ? true : false ; 

}

Member Data Documentation

double CaloCellId::etaMax [private]

Definition at line 41 of file CaloCellId.h.

Referenced by getEtaMax(), getThetaCell(), and operator==().

double CaloCellId::etaMin [private]

Definition at line 40 of file CaloCellId.h.

Referenced by getEtaMin(), getThetaCell(), isInCell(), and operator==().

double CaloCellId::phiMax [private]

Definition at line 43 of file CaloCellId.h.

Referenced by getPhiMax(), isInCell(), and operator==().

double CaloCellId::phiMin [private]

Definition at line 42 of file CaloCellId.h.

Referenced by getPhiMin(), isInCell(), and operator==().

Definition at line 44 of file CaloCellId.h.

Referenced by getSubSys(), and operator==().