CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 phiBin, int depthSegment, const HcalCell &cell, int readoutDirection=0, double samplingFactor=0, int numberZ=0, int nmodule=0, double halfSize=0, int units=0)
 
 HcalCellType (const HcalCellType &right)
 
std::vector< int > missingPhiMinus () const
 
std::vector< int > missingPhiPlus () const
 missing phi rings More...
 
int nHalves () const
 Number of halves (forward/backward) More...
 
int nPhiBins () const
 the number of these cells in a ring More...
 
int nPhiMissingBins () const
 
int nPhiModule () const
 
const HcalCellTypeoperator= (const HcalCellType &right)
 
double phiBinWidth () const
 phi bin width, in degrees More...
 
double phiOffset () const
 phi offset in degrees 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 setMissingPhi (std::vector< int > &, std::vector< int > &)
 
void setPhi (int bins, int unit, double dphi, double phioff)
 
int unitPhi () 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
 
std::vector< int > theMissingPhiMinus
 
std::vector< int > theMissingPhiPlus
 
int theNumberOfPhiBins
 
int theNumberOfZ
 
double thePhiBinWidth
 
double thePhiOffset
 
bool theRzFlag
 
double theSamplingFactor
 
int theUnitPhi
 

Detailed Description

Definition at line 12 of file HcalCellType.h.

Constructor & Destructor Documentation

HcalCellType::HcalCellType ( HcalSubdetector  detType,
int  etaBin,
int  phiBin,
int  depthSegment,
const HcalCell cell,
int  readoutDirection = 0,
double  samplingFactor = 0,
int  numberZ = 0,
int  nmodule = 0,
double  halfSize = 0,
int  units = 0 
)

Definition at line 11 of file HcalCellType.cc.

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

15  :
17  theNumberOfZ(numberZ), theActualReadoutDirection(readoutDirection),
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  int nphi = (int)(10*CLHEP::deg/cell.dphi);
26  theNumberOfPhiBins = nphi*nmodule;
27  double phimin = cell.phi - cell.dphi;
28  thePhiOffset = (phimin - 2*(phiBin-1)*cell.dphi)/CLHEP::deg;
29  thePhiBinWidth = 2*(cell.dphi)/CLHEP::deg;
30  theHalfSize = halfSize/CLHEP::cm;
31 }
int etaBin() const
which eta ring it belongs to, starting from one
Definition: HcalCellType.h:41
int theNumberOfPhiBins
Definition: HcalCellType.h:100
int theDepthSegment
Definition: HcalCellType.h:99
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:102
double theHalfSize
Definition: HcalCellType.h:113
HcalSubdetector theDetType
Definition: HcalCellType.h:97
HcalSubdetector detType() const
Definition: HcalCellType.h:38
double theEtaMin
Definition: HcalCellType.h:107
double theSamplingFactor
Definition: HcalCellType.h:114
double theEtaMax
Definition: HcalCellType.h:108
double theDepthMin
Definition: HcalCellType.h:111
TString units(TString variable, Char_t axis)
double thePhiOffset
Definition: HcalCellType.h:109
double thePhiBinWidth
Definition: HcalCellType.h:110
int depthSegment() const
Definition: HcalCellType.h:47
double theDepthMax
Definition: HcalCellType.h:112
HcalCellType::HcalCellType ( const HcalCellType right)

Definition at line 33 of file HcalCellType.cc.

References theActualReadoutDirection, theDepthMax, theDepthMin, theDepthSegment, theDetType, theEtaBin, theEtaMax, theEtaMin, theHalfSize, theMissingPhiMinus, theMissingPhiPlus, theNumberOfPhiBins, theNumberOfZ, thePhiBinWidth, thePhiOffset, theRzFlag, theSamplingFactor, and theUnitPhi.

33  {
34 
35  theDetType = right.theDetType;
36  theEtaBin = right.theEtaBin;
39  theNumberOfZ = right.theNumberOfZ;
41  theUnitPhi = right.theUnitPhi;
42  theRzFlag = right.theRzFlag;
43  theEtaMin = right.theEtaMin;
44  theEtaMax = right.theEtaMax;
45  thePhiOffset = right.thePhiOffset;
47  theDepthMin = right.theDepthMin;
48  theDepthMax = right.theDepthMax;
49  theHalfSize = right.theHalfSize;
53 }
int theNumberOfPhiBins
Definition: HcalCellType.h:100
std::vector< int > theMissingPhiPlus
Definition: HcalCellType.h:116
std::vector< int > theMissingPhiMinus
Definition: HcalCellType.h:117
int theDepthSegment
Definition: HcalCellType.h:99
int theActualReadoutDirection
Definition: HcalCellType.h:102
double theHalfSize
Definition: HcalCellType.h:113
HcalSubdetector theDetType
Definition: HcalCellType.h:97
double theEtaMin
Definition: HcalCellType.h:107
double theSamplingFactor
Definition: HcalCellType.h:114
double theEtaMax
Definition: HcalCellType.h:108
double theDepthMin
Definition: HcalCellType.h:111
double thePhiOffset
Definition: HcalCellType.h:109
double thePhiBinWidth
Definition: HcalCellType.h:110
double theDepthMax
Definition: HcalCellType.h:112
HcalCellType::~HcalCellType ( )

Definition at line 79 of file HcalCellType.cc.

79 {}
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 68 of file HcalCellType.h.

References theActualReadoutDirection.

Referenced by operator<<().

int theActualReadoutDirection
Definition: HcalCellType.h:102
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:111
double theDepthMax
Definition: HcalCellType.h:112
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:112
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:111
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 47 of file HcalCellType.h.

References theDepthSegment.

Referenced by operator<<().

47 {return theDepthSegment;}
int theDepthSegment
Definition: HcalCellType.h:99
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 38 of file HcalCellType.h.

References theDetType.

Referenced by operator<<().

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

which eta ring it belongs to, starting from one

Definition at line 41 of file HcalCellType.h.

References theEtaBin.

Referenced by operator<<().

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

cell edge, always positive & greater than etaMin

Definition at line 74 of file HcalCellType.h.

References theEtaMax.

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

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

lower cell edge. Always positive

Definition at line 71 of file HcalCellType.h.

References theEtaMin.

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

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

Definition at line 81 of file HcalCellType.h.

References theHalfSize.

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

81 {return theHalfSize;}
double theHalfSize
Definition: HcalCellType.h:113
std::vector<int> HcalCellType::missingPhiMinus ( ) const
inline

Definition at line 88 of file HcalCellType.h.

References theMissingPhiMinus.

Referenced by operator<<().

88 {return theMissingPhiMinus;}
std::vector< int > theMissingPhiMinus
Definition: HcalCellType.h:117
std::vector<int> HcalCellType::missingPhiPlus ( ) const
inline

missing phi rings

Definition at line 87 of file HcalCellType.h.

References theMissingPhiPlus.

Referenced by operator<<().

87 {return theMissingPhiPlus;}
std::vector< int > theMissingPhiPlus
Definition: HcalCellType.h:116
int HcalCellType::nHalves ( ) const
inline

Number of halves (forward/backward)

Definition at line 63 of file HcalCellType.h.

References theNumberOfZ.

Referenced by operator<<().

63 {return theNumberOfZ;}
int HcalCellType::nPhiBins ( ) const
inline

the number of these cells in a ring

Definition at line 51 of file HcalCellType.h.

References theNumberOfPhiBins.

Referenced by operator<<().

51 {return theNumberOfPhiBins;}
int theNumberOfPhiBins
Definition: HcalCellType.h:100
int HcalCellType::nPhiMissingBins ( ) const

Definition at line 86 of file HcalCellType.cc.

References theMissingPhiMinus, theMissingPhiPlus, theNumberOfZ, and tmp.

86  {
87  int tmp = (int)(theMissingPhiPlus.size());
88  if (theNumberOfZ > 1) tmp += (int)(theMissingPhiMinus.size());
89  return tmp;
90 }
std::vector< int > theMissingPhiPlus
Definition: HcalCellType.h:116
std::vector< int > theMissingPhiMinus
Definition: HcalCellType.h:117
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int HcalCellType::nPhiModule ( ) const
inline

Definition at line 52 of file HcalCellType.h.

References thePhiBinWidth.

Referenced by operator<<().

52 {return static_cast<int>(20./thePhiBinWidth);}
double thePhiBinWidth
Definition: HcalCellType.h:110
const HcalCellType & HcalCellType::operator= ( const HcalCellType right)

Definition at line 55 of file HcalCellType.cc.

References theActualReadoutDirection, theDepthMax, theDepthMin, theDepthSegment, theDetType, theEtaBin, theEtaMax, theEtaMin, theHalfSize, theMissingPhiMinus, theMissingPhiPlus, theNumberOfPhiBins, theNumberOfZ, thePhiBinWidth, thePhiOffset, theRzFlag, theSamplingFactor, and theUnitPhi.

55  {
56 
57  theDetType = right.theDetType;
58  theEtaBin = right.theEtaBin;
61  theNumberOfZ = right.theNumberOfZ;
63  theUnitPhi = right.theUnitPhi;
64  theRzFlag = right.theRzFlag;
65  theEtaMin = right.theEtaMin;
66  theEtaMax = right.theEtaMax;
67  thePhiOffset = right.thePhiOffset;
69  theDepthMin = right.theDepthMin;
70  theDepthMax = right.theDepthMax;
71  theHalfSize = right.theHalfSize;
75 
76  return *this;
77 }
int theNumberOfPhiBins
Definition: HcalCellType.h:100
std::vector< int > theMissingPhiPlus
Definition: HcalCellType.h:116
std::vector< int > theMissingPhiMinus
Definition: HcalCellType.h:117
int theDepthSegment
Definition: HcalCellType.h:99
int theActualReadoutDirection
Definition: HcalCellType.h:102
double theHalfSize
Definition: HcalCellType.h:113
HcalSubdetector theDetType
Definition: HcalCellType.h:97
double theEtaMin
Definition: HcalCellType.h:107
double theSamplingFactor
Definition: HcalCellType.h:114
double theEtaMax
Definition: HcalCellType.h:108
double theDepthMin
Definition: HcalCellType.h:111
double thePhiOffset
Definition: HcalCellType.h:109
double thePhiBinWidth
Definition: HcalCellType.h:110
double theDepthMax
Definition: HcalCellType.h:112
double HcalCellType::phiBinWidth ( ) const
inline

phi bin width, in degrees

Definition at line 55 of file HcalCellType.h.

References thePhiBinWidth.

Referenced by operator<<().

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

phi offset in degrees

Definition at line 58 of file HcalCellType.h.

References thePhiOffset.

Referenced by operator<<().

58 {return thePhiOffset;}
double thePhiOffset
Definition: HcalCellType.h:109
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 theSamplingFactor.

Referenced by operator<<().

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

Definition at line 98 of file HcalCellType.cc.

References newFWLiteAna::bin, theDepthMax, theDepthMin, and theDepthSegment.

98  {
100  theDepthMin = dmin;
101  theDepthMax = dmax;
102 }
int theDepthSegment
Definition: HcalCellType.h:99
double theDepthMin
Definition: HcalCellType.h:111
double theDepthMax
Definition: HcalCellType.h:112
void HcalCellType::setEta ( int  bin,
double  etamin,
double  etamax 
)

Definition at line 92 of file HcalCellType.cc.

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

92  {
93  theEtaBin = bin;
94  theEtaMin = etamin;
95  theEtaMax = etamax;
96 }
double theEtaMin
Definition: HcalCellType.h:107
double theEtaMax
Definition: HcalCellType.h:108
void HcalCellType::setMissingPhi ( std::vector< int > &  v1,
std::vector< int > &  v2 
)

Definition at line 81 of file HcalCellType.cc.

References theMissingPhiMinus, and theMissingPhiPlus.

Referenced by HcalDDDSimConstants::HcalCellTypes().

81  {
82  theMissingPhiPlus = v1;
83  theMissingPhiMinus = v2;
84 }
std::vector< int > theMissingPhiPlus
Definition: HcalCellType.h:116
std::vector< int > theMissingPhiMinus
Definition: HcalCellType.h:117
void HcalCellType::setPhi ( int  bins,
int  unit,
double  dphi,
double  phioff 
)

Definition at line 104 of file HcalCellType.cc.

References theNumberOfPhiBins, thePhiBinWidth, thePhiOffset, theUnitPhi, and csvLumiCalc::unit.

104  {
105  theNumberOfPhiBins = bins;
106  theUnitPhi = unit;
107  thePhiBinWidth = dphi;
108  thePhiOffset = phioff;
109 }
int theNumberOfPhiBins
Definition: HcalCellType.h:100
string unit
Definition: csvLumiCalc.py:46
double thePhiOffset
Definition: HcalCellType.h:109
double thePhiBinWidth
Definition: HcalCellType.h:110
int HcalCellType::unitPhi ( ) const
inline

Definition at line 59 of file HcalCellType.h.

References theUnitPhi.

Referenced by operator<<().

59 {return theUnitPhi;}

Member Data Documentation

int HcalCellType::theActualReadoutDirection
private

Definition at line 102 of file HcalCellType.h.

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

double HcalCellType::theDepthMax
private

Definition at line 112 of file HcalCellType.h.

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

double HcalCellType::theDepthMin
private

Definition at line 111 of file HcalCellType.h.

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

int HcalCellType::theDepthSegment
private

Definition at line 99 of file HcalCellType.h.

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

HcalSubdetector HcalCellType::theDetType
private

Definition at line 97 of file HcalCellType.h.

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

int HcalCellType::theEtaBin
private

Definition at line 98 of file HcalCellType.h.

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

double HcalCellType::theEtaMax
private

Definition at line 108 of file HcalCellType.h.

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

double HcalCellType::theEtaMin
private

Definition at line 107 of file HcalCellType.h.

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

double HcalCellType::theHalfSize
private

Definition at line 113 of file HcalCellType.h.

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

std::vector<int> HcalCellType::theMissingPhiMinus
private
std::vector<int> HcalCellType::theMissingPhiPlus
private
int HcalCellType::theNumberOfPhiBins
private

Definition at line 100 of file HcalCellType.h.

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

int HcalCellType::theNumberOfZ
private

Definition at line 101 of file HcalCellType.h.

Referenced by HcalCellType(), nHalves(), nPhiMissingBins(), and operator=().

double HcalCellType::thePhiBinWidth
private

Definition at line 110 of file HcalCellType.h.

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

double HcalCellType::thePhiOffset
private

Definition at line 109 of file HcalCellType.h.

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

bool HcalCellType::theRzFlag
private

Definition at line 105 of file HcalCellType.h.

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

double HcalCellType::theSamplingFactor
private

Definition at line 114 of file HcalCellType.h.

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

int HcalCellType::theUnitPhi
private

Definition at line 103 of file HcalCellType.h.

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