CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDDDRecConstants.h
Go to the documentation of this file.
1 #ifndef Geometry_HcalTowerAlgo_HcalDDDRecConstants_h
2 #define Geometry_HcalTowerAlgo_HcalDDDRecConstants_h
3 
13 #include<string>
14 #include<vector>
15 #include<iostream>
16 
21 
23 
24 public:
25 
28 
29  struct HcalID {
30  int subdet, eta, phi, depth;
31  HcalID(int sub=0, int et=0, int fi=0, int d=0) : subdet(sub), eta(et),
32  phi(fi), depth(d) {}
33  };
34  struct HcalEtaBin {
36  double etaMin, etaMax, phi0, dphi;
37  std::vector<std::pair<int, int> > layer;
38  HcalEtaBin(int eta=0, double et1=0, double et2=0, int nf=0, double fi0=0,
39  double df=0) : ieta(eta), nPhi(nf),depthStart(0), etaMin(et1),
40  etaMax(et2), phi0(fi0), dphi(df) {}
41  };
43  int ieta, depth;
44  double eta, thick;
45  HcalActiveLength(int ie=0, int d=0, double et=0,
46  double t=0) : ieta(ie), depth(d), eta(et), thick(t) {}
47  };
48 
49  std::vector<std::pair<double,double> > getConstHBHE(const int type) const {
50  if (type == 0) return gconsHB;
51  else if (type == 1) return gconsHE;
52  else {std::vector<std::pair<double,double> > gcons; return gcons;}
53  }
54  const std::vector<int> & getDepth(const unsigned int i) const;
55  std::vector<HcalEtaBin> getEtaBins(const int itype) const;
56  std::pair<double,double> getEtaPhi(int subdet, int ieta, int iphi) const;
57  std::pair<int,int> getEtaRange(const int i) const
58  {return std::pair<int,int>(iEtaMin[i],iEtaMax[i]);}
59  const std::vector<double> & getEtaTable() const {return etaTable;}
60  const std::vector<double> & getEtaTableHF() const {return hpar->etaTableHF;}
61  std::pair<double,double> getEtaLimit(const int i) const
62  {return std::pair<double,double>(etaTable[i],etaTable[i+1]);}
63  HcalID getHCID(int subdet, int ieta, int iphi, int lay,
64  int idepth) const;
65  int getMaxDepth(const int type) const {return maxDepth[type];}
66  int getNEta() const {return hpar->etagroup.size();}
67  double getPhiBin(const int i) const {return phibin[i];}
68  double getPhiOff(const int i) const {return hpar->phioff[i];}
69  const std::vector<double> & getPhiOffs() const {return hpar->phioff;}
70  const std::vector<double> & getPhiTable() const {return phibin;}
71  const std::vector<double> & getPhiTableHF() const {return hpar->phitable;}
72  double getRZ(int subdet, int ieta, int depth) const;
73  std::vector<HcalActiveLength> getThickActive(const int type) const;
74  int getTopoMode() const {return hpar->topologyMode;}
75  std::vector<HcalCellType> HcalCellTypes(HcalSubdetector) const;
76  unsigned int numberOfCells(HcalSubdetector) const;
77  unsigned int nCells(HcalSubdetector) const;
78  unsigned int nCells() const;
79 
80 private:
81  void initialize(void);
82  unsigned int layerGroupSize( unsigned int eta ) const;
83  unsigned int layerGroup( unsigned int eta, unsigned int i ) const;
84 
87  std::vector<std::pair<int,int> > etaSimValu; // eta ranges at Sim stage
88  std::vector<double> etaTable; // Eta table (HB+HE)
89  std::vector<int> ietaMap; // Map Sim level ieta to Rec level ieta
90  std::vector<int> iEtaMin, iEtaMax; // Minimum and maximum eta
91  std::vector<int> maxDepth; // Maximum depth in HB/HE/HF/HO
92  std::vector<double> phibin; // Phi step for all eta bins (HB, HE, HO)
93  std::vector<int> phiUnitS; // Phi unit at SIM stage
94  std::vector<std::pair<double,double> > gconsHB; // Geometry constatnts HB
95  std::vector<std::pair<double,double> > gconsHE; // Geometry constatnts HE
96  int nModule[2], nHalves[2]; // Modules, Halves for HB/HE
97 };
98 
99 #endif
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::vector< int > iEtaMin
std::vector< int > etagroup
double getRZ(int subdet, int ieta, int depth) const
std::vector< std::pair< int, int > > etaSimValu
const std::vector< double > & getEtaTableHF() const
double getPhiOff(const int i) const
std::vector< int > maxDepth
std::vector< double > etaTableHF
const std::vector< double > & getPhiOffs() const
std::vector< int > phiUnitS
const HcalParameters * hpar
int getMaxDepth(const int type) const
tuple d
Definition: ztail.py:151
std::vector< std::pair< double, double > > gconsHE
std::vector< std::pair< double, double > > getConstHBHE(const int type) const
std::vector< double > phibin
HcalEtaBin(int eta=0, double et1=0, double et2=0, int nf=0, double fi0=0, double df=0)
unsigned int numberOfCells(HcalSubdetector) const
unsigned int layerGroup(unsigned int eta, unsigned int i) const
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
HcalID getHCID(int subdet, int ieta, int iphi, int lay, int idepth) const
std::vector< int > iEtaMax
HcalSubdetector
Definition: HcalAssistant.h:31
std::vector< int > ietaMap
double getPhiBin(const int i) const
std::vector< std::pair< int, int > > layer
unsigned int layerGroupSize(unsigned int eta) const
std::vector< HcalCellType > HcalCellTypes(HcalSubdetector) const
std::vector< HcalActiveLength > getThickActive(const int type) const
HcalActiveLength(int ie=0, int d=0, double et=0, double t=0)
std::vector< double > phioff
const std::vector< double > & getPhiTable() const
std::vector< double > etaTable
HcalDDDRecConstants(const HcalParameters *hp, const HcalDDDSimConstants &hc)
HcalID(int sub=0, int et=0, int fi=0, int d=0)
const std::vector< double > & getEtaTable() const
std::pair< int, int > getEtaRange(const int i) const
const std::vector< int > & getDepth(const unsigned int i) const
std::vector< double > phitable
const std::vector< double > & getPhiTableHF() const
std::pair< double, double > getEtaLimit(const int i) const
const HcalDDDSimConstants & hcons
susybsm::HSCParticleCollection hc
Definition: classes.h:25
std::vector< std::pair< double, double > > gconsHB
std::pair< double, double > getEtaPhi(int subdet, int ieta, int iphi) const
unsigned int nCells() const
std::vector< HcalEtaBin > getEtaBins(const int itype) const