CMS 3D CMS Logo

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

#include <CaloCellId.h>

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 14 of file CaloCellId.h.

Member Enumeration Documentation

Enumerator
Barrel 
Endcap 
Forward 

Definition at line 18 of file CaloCellId.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file CaloCellId.cc.

19  :
20  etaMin(theEtaMin),etaMax(theEtaMax),phiMin(thePhiMin),phiMax(thePhiMax),subSys(theSubSys)
21 {}
double phiMin
Definition: CaloCellId.h:40
System subSys
Definition: CaloCellId.h:42
double phiMax
Definition: CaloCellId.h:41
double etaMax
Definition: CaloCellId.h:39
double etaMin
Definition: CaloCellId.h:38
CaloCellId::CaloCellId ( const CaloCellId id)

Definition at line 23 of file CaloCellId.cc.

23  :
25 {}
double phiMin
Definition: CaloCellId.h:40
System subSys
Definition: CaloCellId.h:42
double phiMax
Definition: CaloCellId.h:41
double etaMax
Definition: CaloCellId.h:39
double etaMin
Definition: CaloCellId.h:38
CaloCellId::~CaloCellId ( )
virtual

Definition at line 27 of file CaloCellId.cc.

27 {}

Member Function Documentation

double CaloCellId::getEtaMax ( ) const
inline

Definition at line 25 of file CaloCellId.h.

References etaMax.

25 { return etaMax; }
double etaMax
Definition: CaloCellId.h:39
double CaloCellId::getEtaMin ( ) const
inline

Definition at line 24 of file CaloCellId.h.

References etaMin.

Referenced by MBUEandQCDValidation::analyze().

24 { return etaMin; }
double etaMin
Definition: CaloCellId.h:38
double CaloCellId::getPhiMax ( ) const
inline

Definition at line 27 of file CaloCellId.h.

References phiMax.

27 { return phiMax; }
double phiMax
Definition: CaloCellId.h:41
double CaloCellId::getPhiMin ( ) const
inline

Definition at line 26 of file CaloCellId.h.

References phiMin.

26 { return phiMin; }
double phiMin
Definition: CaloCellId.h:40
System CaloCellId::getSubSys ( ) const
inline

Definition at line 28 of file CaloCellId.h.

References getThetaCell(), isInCell(), operator==(), and subSys.

Referenced by MBUEandQCDValidation::analyze().

28 { return subSys; }
System subSys
Definition: CaloCellId.h:42
double CaloCellId::getThetaCell ( )

Definition at line 47 of file CaloCellId.cc.

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

Referenced by MBUEandQCDValidation::analyze(), and getSubSys().

47  {
48 
49  double etaAve = 0.5*(etaMax+etaMin);
50  double theta = 2.*std::atan(std::exp(-1.*etaAve));
51  return theta;
52 
53 }
Geom::Theta< T > theta() const
double etaMax
Definition: CaloCellId.h:39
double etaMin
Definition: CaloCellId.h:38
bool CaloCellId::isInCell ( double  thisEta,
double  thisPhi 
)

Definition at line 35 of file CaloCellId.cc.

References etaMin, phiMax, phiMin, and pi.

Referenced by getSubSys().

35  {
36 
37  double myPhi = thisPhi;
38 
39  bool itIs = false;
40  if ( myPhi < -1.*CLHEP::pi ) { myPhi = myPhi+CLHEP::twopi; }
41  else if ( myPhi > CLHEP::pi ) { myPhi = myPhi-CLHEP::twopi; }
42  if ( thisEta >= etaMin && thisEta < etaMax && myPhi >= phiMin && myPhi < phiMax ) { itIs = true; }
43  return itIs;
44 
45 }
const Double_t pi
double phiMin
Definition: CaloCellId.h:40
double phiMax
Definition: CaloCellId.h:41
double etaMin
Definition: CaloCellId.h:38
bool CaloCellId::operator== ( const CaloCellId id) const

Definition at line 29 of file CaloCellId.cc.

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

Referenced by getSubSys().

29  {
30 
31  return (etaMin == id.etaMin && etaMax == id.etaMax && phiMin == id.phiMin && phiMax == id.phiMax && subSys == id.subSys) ? true : false ;
32 
33 }
double phiMin
Definition: CaloCellId.h:40
System subSys
Definition: CaloCellId.h:42
double phiMax
Definition: CaloCellId.h:41
double etaMax
Definition: CaloCellId.h:39
double etaMin
Definition: CaloCellId.h:38

Member Data Documentation

double CaloCellId::etaMax
private

Definition at line 39 of file CaloCellId.h.

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

double CaloCellId::etaMin
private

Definition at line 38 of file CaloCellId.h.

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

double CaloCellId::phiMax
private

Definition at line 41 of file CaloCellId.h.

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

double CaloCellId::phiMin
private

Definition at line 40 of file CaloCellId.h.

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

System CaloCellId::subSys
private

Definition at line 42 of file CaloCellId.h.

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