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 (const CaloCellId &)
 
 CaloCellId (double theEtaMin, double theEtaMax, double thePhiMin, double thePhiMax, System theSubSys)
 
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

◆ System

Enumerator
Barrel 
Endcap 
Forward 

Definition at line 16 of file CaloCellId.h.

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

Constructor & Destructor Documentation

◆ CaloCellId() [1/2]

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

Definition at line 19 of file CaloCellId.cc.

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

◆ CaloCellId() [2/2]

CaloCellId::CaloCellId ( const CaloCellId id)

Definition at line 22 of file CaloCellId.cc.

23  : etaMin(id.etaMin), etaMax(id.etaMax), phiMin(id.phiMin), phiMax(id.phiMax), subSys(id.subSys) {}

◆ ~CaloCellId()

CaloCellId::~CaloCellId ( )
virtual

Definition at line 25 of file CaloCellId.cc.

25 {}

Member Function Documentation

◆ getEtaMax()

double CaloCellId::getEtaMax ( ) const
inline

Definition at line 23 of file CaloCellId.h.

23 { return etaMax; }

References etaMax.

◆ getEtaMin()

double CaloCellId::getEtaMin ( ) const
inline

Definition at line 22 of file CaloCellId.h.

22 { return etaMin; }

References etaMin.

Referenced by MBUEandQCDValidation::analyze().

◆ getPhiMax()

double CaloCellId::getPhiMax ( ) const
inline

Definition at line 25 of file CaloCellId.h.

25 { return phiMax; }

References phiMax.

◆ getPhiMin()

double CaloCellId::getPhiMin ( ) const
inline

Definition at line 24 of file CaloCellId.h.

24 { return phiMin; }

References phiMin.

◆ getSubSys()

System CaloCellId::getSubSys ( ) const
inline

Definition at line 26 of file CaloCellId.h.

26 { return subSys; }

References subSys.

Referenced by MBUEandQCDValidation::analyze().

◆ getThetaCell()

double CaloCellId::getThetaCell ( )

Definition at line 49 of file CaloCellId.cc.

49  {
50  double etaAve = 0.5 * (etaMax + etaMin);
51  double theta = 2. * std::atan(std::exp(-1. * etaAve));
52  return theta;
53 }

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

Referenced by MBUEandQCDValidation::analyze().

◆ isInCell()

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

Definition at line 34 of file CaloCellId.cc.

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

References etaMin, phiMax, phiMin, and pi.

◆ operator==()

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

Definition at line 27 of file CaloCellId.cc.

27  {
28  return (etaMin == id.etaMin && etaMax == id.etaMax && phiMin == id.phiMin && phiMax == id.phiMax &&
29  subSys == id.subSys)
30  ? true
31  : false;
32 }

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

Member Data Documentation

◆ etaMax

double CaloCellId::etaMax
private

Definition at line 36 of file CaloCellId.h.

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

◆ etaMin

double CaloCellId::etaMin
private

Definition at line 35 of file CaloCellId.h.

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

◆ phiMax

double CaloCellId::phiMax
private

Definition at line 38 of file CaloCellId.h.

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

◆ phiMin

double CaloCellId::phiMin
private

Definition at line 37 of file CaloCellId.h.

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

◆ subSys

System CaloCellId::subSys
private

Definition at line 39 of file CaloCellId.h.

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

CaloCellId::Barrel
Definition: CaloCellId.h:16
CaloCellId::Endcap
Definition: CaloCellId.h:16
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
CaloCellId::subSys
System subSys
Definition: CaloCellId.h:39
funct::true
true
Definition: Factorize.h:173
CaloCellId::phiMin
double phiMin
Definition: CaloCellId.h:37
CaloCellId::Forward
Definition: CaloCellId.h:16
CaloCellId::phiMax
double phiMax
Definition: CaloCellId.h:38
CaloCellId::etaMax
double etaMax
Definition: CaloCellId.h:36
pi
const Double_t pi
Definition: trackSplitPlot.h:36
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
CaloCellId::etaMin
double etaMin
Definition: CaloCellId.h:35