CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Attributes
HcalCellType Class Reference

#include <HcalCellType.h>

Classes

struct  HcalCell
 

Public Member Functions

int actualReadoutDirection () const
 
double depth () const
 z or r position, depending on whether it's barrel or endcap More...
 
double depthMax () const
 
double depthMin () const
 
int depthSegment () const
 
bool depthType () const
 
HcalSubdetector detType () const
 
int etaBin () const
 which eta ring it belongs to, starting from one More...
 
double etaMax () const
 cell edge, always positive & greater than etaMin More...
 
double etaMin () const
 lower cell edge. Always positive More...
 
double halfSize () const
 
 HcalCellType (HcalSubdetector detType, int etaBin, int zside, int depthSegment, const HcalCell &cell, int readoutDirection=0, double samplingFactor=0, double halfSize=0)
 
 HcalCellType (const HcalCellType &right)
 
int nPhiBins () const
 the number of these cells in a ring More...
 
int nPhiModule () const
 
const HcalCellTypeoperator= (const HcalCellType &right)
 
double phiBinWidth () const
 phi bin width More...
 
double phiOffset () const
 
std::vector< std::pair< int, double > > phis () const
 Phi modules and the central phi values. More...
 
double samplingFactor () const
 ratio of real particle energy to deposited energy in the SimHi More...
 
void setDepth (int bin, double dmin, double dmax)
 
void setEta (int bin, double etamin, double etamax)
 
void setPhi (const std::vector< std::pair< int, double >> &phis, const std::vector< int > &iphiMiss, double foff, double dphi, int unit)
 
void setPhi (const std::vector< std::pair< int, double >> &phis)
 
int unitPhi () const
 
int zside () const
 
 ~HcalCellType ()
 

Protected Member Functions

 HcalCellType ()
 

Private Attributes

int theActualReadoutDirection
 
double theDepthMax
 
double theDepthMin
 
int theDepthSegment
 
HcalSubdetector theDetType
 
int theEtaBin
 
double theEtaMax
 
double theEtaMin
 
double theHalfSize
 
double thePhiBinWidth
 
double thePhiOffset
 
std::vector< std::pair< int, double > > thePhis
 
bool theRzFlag
 
double theSamplingFactor
 
int theSide
 
int theUnitPhi
 

Detailed Description

Definition at line 13 of file HcalCellType.h.

Constructor & Destructor Documentation

HcalCellType::HcalCellType ( HcalSubdetector  detType,
int  etaBin,
int  zside,
int  depthSegment,
const HcalCell cell,
int  readoutDirection = 0,
double  samplingFactor = 0,
double  halfSize = 0 
)

Definition at line 12 of file HcalCellType.cc.

References HcalCellType::HcalCell::deta, HcalCellType::HcalCell::dphi, HcalCellType::HcalCell::drz, HcalCellType::HcalCell::eta, HcalCellType::HcalCell::flagrz, HcalCellType::HcalCell::rz, theDepthMax, theDepthMin, theEtaMax, theEtaMin, theHalfSize, thePhiBinWidth, thePhiOffset, theRzFlag, and theUnitPhi.

15  :
19 
20  theEtaMin = cell.eta - cell.deta;
21  theEtaMax = cell.eta + cell.deta;
22  theRzFlag = cell.flagrz;
23  theDepthMin = (cell.rz - cell.drz)/CLHEP::cm;
24  theDepthMax = (cell.rz + cell.drz)/CLHEP::cm;
25  thePhiBinWidth = 2*(cell.dphi)/CLHEP::deg;
26  thePhiOffset = 0;
27  theUnitPhi = 1;
28  theHalfSize = halfSize/CLHEP::cm;
29 }
int etaBin() const
which eta ring it belongs to, starting from one
Definition: HcalCellType.h:39
int theDepthSegment
Definition: HcalCellType.h:95
double samplingFactor() const
ratio of real particle energy to deposited energy in the SimHi
Definition: HcalCellType.h:84
double halfSize() const
Definition: HcalCellType.h:81
int theActualReadoutDirection
Definition: HcalCellType.h:97
double theHalfSize
Definition: HcalCellType.h:107
HcalSubdetector theDetType
Definition: HcalCellType.h:92
HcalSubdetector detType() const
Definition: HcalCellType.h:36
double theEtaMin
Definition: HcalCellType.h:101
double theSamplingFactor
Definition: HcalCellType.h:108
int zside() const
Definition: HcalCellType.h:40
double theEtaMax
Definition: HcalCellType.h:102
double theDepthMin
Definition: HcalCellType.h:103
double thePhiOffset
Definition: HcalCellType.h:105
double thePhiBinWidth
Definition: HcalCellType.h:106
int depthSegment() const
Definition: HcalCellType.h:46
double theDepthMax
Definition: HcalCellType.h:104
HcalCellType::HcalCellType ( const HcalCellType right)

Definition at line 31 of file HcalCellType.cc.

References theActualReadoutDirection, theDepthMax, theDepthMin, theDepthSegment, theDetType, theEtaBin, theEtaMax, theEtaMin, theHalfSize, thePhiBinWidth, thePhiOffset, thePhis, theRzFlag, theSamplingFactor, theSide, and theUnitPhi.

31  {
32 
33  theDetType = right.theDetType;
34  theEtaBin = right.theEtaBin;
35  theSide = right.theSide;
36  theUnitPhi = right.theUnitPhi;
39  theRzFlag = right.theRzFlag;
40  theEtaMin = right.theEtaMin;
41  theEtaMax = right.theEtaMax;
42  theDepthMin = right.theDepthMin;
43  theDepthMax = right.theDepthMax;
45  thePhiOffset = right.thePhiOffset;
46  theHalfSize = right.theHalfSize;
48  thePhis = right.thePhis;
49 }
int theDepthSegment
Definition: HcalCellType.h:95
int theActualReadoutDirection
Definition: HcalCellType.h:97
double theHalfSize
Definition: HcalCellType.h:107
HcalSubdetector theDetType
Definition: HcalCellType.h:92
double theEtaMin
Definition: HcalCellType.h:101
double theSamplingFactor
Definition: HcalCellType.h:108
double theEtaMax
Definition: HcalCellType.h:102
double theDepthMin
Definition: HcalCellType.h:103
double thePhiOffset
Definition: HcalCellType.h:105
double thePhiBinWidth
Definition: HcalCellType.h:106
double theDepthMax
Definition: HcalCellType.h:104
std::vector< std::pair< int, double > > thePhis
Definition: HcalCellType.h:110
HcalCellType::~HcalCellType ( )

Definition at line 73 of file HcalCellType.cc.

Referenced by HcalCellType::HcalCell::HcalCell().

73 {}
HcalCellType::HcalCellType ( )
protected

Member Function Documentation

int HcalCellType::actualReadoutDirection ( ) const
inline

which cell will actually do the readout for this cell 1 means move hits in this cell up, and -1 means down 0 means do nothing

Definition at line 65 of file HcalCellType.h.

References theActualReadoutDirection.

Referenced by operator<<().

int theActualReadoutDirection
Definition: HcalCellType.h:97
double HcalCellType::depth ( void  ) const
inline

z or r position, depending on whether it's barrel or endcap

Definition at line 77 of file HcalCellType.h.

References theDepthMax, and theDepthMin.

77 {return (theDepthMin+theDepthMax)/2;}
double theDepthMin
Definition: HcalCellType.h:103
double theDepthMax
Definition: HcalCellType.h:104
double HcalCellType::depthMax ( ) const
inline

Definition at line 79 of file HcalCellType.h.

References theDepthMax.

Referenced by HcalDDDGeometryLoader::makeCell(), and operator<<().

79 {return theDepthMax;}
double theDepthMax
Definition: HcalCellType.h:104
double HcalCellType::depthMin ( ) const
inline

Definition at line 78 of file HcalCellType.h.

References theDepthMin.

Referenced by HcalDDDGeometryLoader::makeCell(), and operator<<().

78 {return theDepthMin;}
double theDepthMin
Definition: HcalCellType.h:103
int HcalCellType::depthSegment ( ) const
inline

which depth segment it is, starting from 1 absolute within the tower, so HE depth of the overlap doesn't start at 1.

Definition at line 46 of file HcalCellType.h.

References setDepth(), and theDepthSegment.

Referenced by HcalCellType::HcalCell::HcalCell(), and operator<<().

46 {return theDepthSegment;}
int theDepthSegment
Definition: HcalCellType.h:95
bool HcalCellType::depthType ( ) const
inline

Definition at line 80 of file HcalCellType.h.

References theRzFlag.

Referenced by HcalDDDGeometryLoader::makeCell(), and operator<<().

80 {return theRzFlag;}
HcalSubdetector HcalCellType::detType ( ) const
inline

1=HB, 2=HE, 3=HO, 4=HF (sub detector type) as in DataFormats/HcalDetId/interface/HcalSubdetector.h

Definition at line 36 of file HcalCellType.h.

References theDetType.

Referenced by HcalCellType::HcalCell::HcalCell(), and operator<<().

36 {return theDetType;}
HcalSubdetector theDetType
Definition: HcalCellType.h:92
int HcalCellType::etaBin ( ) const
inline

which eta ring it belongs to, starting from one

Definition at line 39 of file HcalCellType.h.

References theEtaBin.

Referenced by HcalCellType::HcalCell::HcalCell(), and operator<<().

39 {return theEtaBin;}
double HcalCellType::etaMax ( ) const
inline

cell edge, always positive & greater than etaMin

Definition at line 71 of file HcalCellType.h.

References theEtaMax.

Referenced by HcalDDDGeometryLoader::makeCell(), and operator<<().

71 {return theEtaMax;}
double theEtaMax
Definition: HcalCellType.h:102
double HcalCellType::etaMin ( ) const
inline

lower cell edge. Always positive

Definition at line 68 of file HcalCellType.h.

References theEtaMin.

Referenced by HcalDDDGeometryLoader::makeCell(), and operator<<().

68 {return theEtaMin;}
double theEtaMin
Definition: HcalCellType.h:101
double HcalCellType::halfSize ( ) const
inline

Definition at line 81 of file HcalCellType.h.

References theHalfSize.

Referenced by HcalCellType::HcalCell::HcalCell(), HcalDDDGeometryLoader::makeCell(), and operator<<().

81 {return theHalfSize;}
double theHalfSize
Definition: HcalCellType.h:107
int HcalCellType::nPhiBins ( ) const
inline

the number of these cells in a ring

Definition at line 50 of file HcalCellType.h.

References thePhis.

Referenced by operator<<().

50 {return (int)(thePhis.size());}
std::vector< std::pair< int, double > > thePhis
Definition: HcalCellType.h:110
int HcalCellType::nPhiModule ( ) const
inline

Definition at line 51 of file HcalCellType.h.

References thePhiBinWidth.

Referenced by operator<<().

51 {return static_cast<int>(20.*CLHEP::deg/thePhiBinWidth);}
double thePhiBinWidth
Definition: HcalCellType.h:106
const HcalCellType & HcalCellType::operator= ( const HcalCellType right)

Definition at line 51 of file HcalCellType.cc.

References theActualReadoutDirection, theDepthMax, theDepthMin, theDepthSegment, theDetType, theEtaBin, theEtaMax, theEtaMin, theHalfSize, thePhiBinWidth, thePhiOffset, thePhis, theRzFlag, theSamplingFactor, theSide, and theUnitPhi.

Referenced by HcalCellType::HcalCell::HcalCell().

51  {
52 
53  theDetType = right.theDetType;
54  theEtaBin = right.theEtaBin;
55  theSide = right.theSide;
56  theUnitPhi = right.theUnitPhi;
59  theRzFlag = right.theRzFlag;
60  theEtaMin = right.theEtaMin;
61  theEtaMax = right.theEtaMax;
62  theDepthMin = right.theDepthMin;
63  theDepthMax = right.theDepthMax;
65  thePhiOffset = right.thePhiOffset;
66  theHalfSize = right.theHalfSize;
68  thePhis = right.thePhis;
69 
70  return *this;
71 }
int theDepthSegment
Definition: HcalCellType.h:95
int theActualReadoutDirection
Definition: HcalCellType.h:97
double theHalfSize
Definition: HcalCellType.h:107
HcalSubdetector theDetType
Definition: HcalCellType.h:92
double theEtaMin
Definition: HcalCellType.h:101
double theSamplingFactor
Definition: HcalCellType.h:108
double theEtaMax
Definition: HcalCellType.h:102
double theDepthMin
Definition: HcalCellType.h:103
double thePhiOffset
Definition: HcalCellType.h:105
double thePhiBinWidth
Definition: HcalCellType.h:106
double theDepthMax
Definition: HcalCellType.h:104
std::vector< std::pair< int, double > > thePhis
Definition: HcalCellType.h:110
double HcalCellType::phiBinWidth ( ) const
inline

phi bin width

Definition at line 54 of file HcalCellType.h.

References thePhiBinWidth.

Referenced by operator<<().

54 {return thePhiBinWidth;}
double thePhiBinWidth
Definition: HcalCellType.h:106
double HcalCellType::phiOffset ( ) const
inline

Definition at line 55 of file HcalCellType.h.

References thePhiOffset.

Referenced by operator<<().

55 {return thePhiOffset;}
double thePhiOffset
Definition: HcalCellType.h:105
std::vector<std::pair<int,double> > HcalCellType::phis ( ) const
inline

Phi modules and the central phi values.

Definition at line 74 of file HcalCellType.h.

References thePhis.

Referenced by setDepth(), setPhi(), and unitPhi().

74 {return thePhis;}
std::vector< std::pair< int, double > > thePhis
Definition: HcalCellType.h:110
double HcalCellType::samplingFactor ( ) const
inline

ratio of real particle energy to deposited energy in the SimHi

Definition at line 84 of file HcalCellType.h.

References HcalCellType(), and theSamplingFactor.

Referenced by HcalCellType::HcalCell::HcalCell(), and operator<<().

84 {return theSamplingFactor;}
double theSamplingFactor
Definition: HcalCellType.h:108
void HcalCellType::setDepth ( int  bin,
double  dmin,
double  dmax 
)

Definition at line 81 of file HcalCellType.cc.

References stringResolutionProvider_cfi::bin, spr::find(), phi, phis(), setPhi(), theDepthMax, theDepthMin, theDepthSegment, thePhiBinWidth, thePhiOffset, thePhis, theUnitPhi, and csvLumiCalc::unit.

Referenced by depthSegment().

81  {
83  theDepthMin = dmin;
84  theDepthMax = dmax;
85 }
int theDepthSegment
Definition: HcalCellType.h:95
bin
set the eta bin as selection string.
double theDepthMin
Definition: HcalCellType.h:103
double theDepthMax
Definition: HcalCellType.h:104
void HcalCellType::setEta ( int  bin,
double  etamin,
double  etamax 
)

Definition at line 75 of file HcalCellType.cc.

References stringResolutionProvider_cfi::bin, theEtaBin, theEtaMax, and theEtaMin.

Referenced by zside().

75  {
76  theEtaBin = bin;
77  theEtaMin = etamin;
78  theEtaMax = etamax;
79 }
double theEtaMin
Definition: HcalCellType.h:101
bin
set the eta bin as selection string.
double theEtaMax
Definition: HcalCellType.h:102
void HcalCellType::setPhi ( const std::vector< std::pair< int, double >> &  phis,
const std::vector< int > &  iphiMiss,
double  foff,
double  dphi,
int  unit 
)
void HcalCellType::setPhi ( const std::vector< std::pair< int, double >> &  phis)
inline

Definition at line 60 of file HcalCellType.h.

References phis(), and thePhis.

60 {thePhis = phis;}
std::vector< std::pair< int, double > > phis() const
Phi modules and the central phi values.
Definition: HcalCellType.h:74
std::vector< std::pair< int, double > > thePhis
Definition: HcalCellType.h:110
int HcalCellType::unitPhi ( ) const
inline

Definition at line 56 of file HcalCellType.h.

References HcalCellType::HcalCell::dphi, phis(), setPhi(), theUnitPhi, and csvLumiCalc::unit.

Referenced by operator<<().

56 {return theUnitPhi;}
int HcalCellType::zside ( ) const
inline

Definition at line 40 of file HcalCellType.h.

References stringResolutionProvider_cfi::bin, setEta(), and theSide.

Referenced by HcalCellType::HcalCell::HcalCell(), and operator<<().

40 {return theSide;}

Member Data Documentation

int HcalCellType::theActualReadoutDirection
private

Definition at line 97 of file HcalCellType.h.

Referenced by actualReadoutDirection(), HcalCellType(), and operator=().

double HcalCellType::theDepthMax
private

Definition at line 104 of file HcalCellType.h.

Referenced by depth(), depthMax(), HcalCellType(), operator=(), and setDepth().

double HcalCellType::theDepthMin
private

Definition at line 103 of file HcalCellType.h.

Referenced by depth(), depthMin(), HcalCellType(), operator=(), and setDepth().

int HcalCellType::theDepthSegment
private

Definition at line 95 of file HcalCellType.h.

Referenced by depthSegment(), HcalCellType(), operator=(), and setDepth().

HcalSubdetector HcalCellType::theDetType
private

Definition at line 92 of file HcalCellType.h.

Referenced by detType(), HcalCellType(), and operator=().

int HcalCellType::theEtaBin
private

Definition at line 93 of file HcalCellType.h.

Referenced by etaBin(), HcalCellType(), operator=(), and setEta().

double HcalCellType::theEtaMax
private

Definition at line 102 of file HcalCellType.h.

Referenced by etaMax(), HcalCellType(), operator=(), and setEta().

double HcalCellType::theEtaMin
private

Definition at line 101 of file HcalCellType.h.

Referenced by etaMin(), HcalCellType(), operator=(), and setEta().

double HcalCellType::theHalfSize
private

Definition at line 107 of file HcalCellType.h.

Referenced by halfSize(), HcalCellType(), and operator=().

double HcalCellType::thePhiBinWidth
private

Definition at line 106 of file HcalCellType.h.

Referenced by HcalCellType(), nPhiModule(), operator=(), phiBinWidth(), and setDepth().

double HcalCellType::thePhiOffset
private

Definition at line 105 of file HcalCellType.h.

Referenced by HcalCellType(), operator=(), phiOffset(), and setDepth().

std::vector<std::pair<int,double> > HcalCellType::thePhis
private

Definition at line 110 of file HcalCellType.h.

Referenced by HcalCellType(), nPhiBins(), operator=(), phis(), setDepth(), and setPhi().

bool HcalCellType::theRzFlag
private

Definition at line 99 of file HcalCellType.h.

Referenced by depthType(), HcalCellType(), and operator=().

double HcalCellType::theSamplingFactor
private

Definition at line 108 of file HcalCellType.h.

Referenced by HcalCellType(), operator=(), and samplingFactor().

int HcalCellType::theSide
private

Definition at line 94 of file HcalCellType.h.

Referenced by HcalCellType(), operator=(), and zside().

int HcalCellType::theUnitPhi
private

Definition at line 96 of file HcalCellType.h.

Referenced by HcalCellType(), operator=(), setDepth(), and unitPhi().