CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 16 of file CaloCellId.h.

Member Enumeration Documentation

Enumerator
Barrel 
Endcap 
Forward 

Definition at line 20 of file CaloCellId.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file CaloCellId.cc.

21  :
22  etaMin(theEtaMin),etaMax(theEtaMax),phiMin(thePhiMin),phiMax(thePhiMax),subSys(theSubSys)
23 {}
double phiMin
Definition: CaloCellId.h:42
System subSys
Definition: CaloCellId.h:44
double phiMax
Definition: CaloCellId.h:43
double etaMax
Definition: CaloCellId.h:41
double etaMin
Definition: CaloCellId.h:40
CaloCellId::CaloCellId ( const CaloCellId id)

Definition at line 25 of file CaloCellId.cc.

25  :
27 {}
double phiMin
Definition: CaloCellId.h:42
System subSys
Definition: CaloCellId.h:44
double phiMax
Definition: CaloCellId.h:43
double etaMax
Definition: CaloCellId.h:41
double etaMin
Definition: CaloCellId.h:40
CaloCellId::~CaloCellId ( )
virtual

Definition at line 29 of file CaloCellId.cc.

29 {}

Member Function Documentation

double CaloCellId::getEtaMax ( ) const
inline

Definition at line 27 of file CaloCellId.h.

References etaMax.

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

Definition at line 26 of file CaloCellId.h.

References etaMin.

Referenced by MBUEandQCDValidation::analyze().

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

Definition at line 29 of file CaloCellId.h.

References phiMax.

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

Definition at line 28 of file CaloCellId.h.

References phiMin.

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

Definition at line 30 of file CaloCellId.h.

References subSys.

Referenced by MBUEandQCDValidation::analyze().

30 { return subSys; }
System subSys
Definition: CaloCellId.h:44
double CaloCellId::getThetaCell ( )

Definition at line 49 of file CaloCellId.cc.

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

Referenced by MBUEandQCDValidation::analyze().

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

Definition at line 37 of file CaloCellId.cc.

References etaMin, phiMax, phiMin, and pi.

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

Definition at line 31 of file CaloCellId.cc.

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

31  {
32 
33  return (etaMin == id.etaMin && etaMax == id.etaMax && phiMin == id.phiMin && phiMax == id.phiMax && subSys == id.subSys) ? true : false ;
34 
35 }
double phiMin
Definition: CaloCellId.h:42
System subSys
Definition: CaloCellId.h:44
double phiMax
Definition: CaloCellId.h:43
double etaMax
Definition: CaloCellId.h:41
double etaMin
Definition: CaloCellId.h:40

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

System CaloCellId::subSys
private

Definition at line 44 of file CaloCellId.h.

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