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  };
50  double rMin, rMax;
51  HFCellParameters(int ie=0, int d=1, int ffi=1, int sfi=2, int nfi=36,
52  double r1=0, double r2=0) : ieta(ie), depth(d),
53  firstPhi(ffi), stepPhi(sfi),
54  nPhi(nfi), rMin(r1), rMax(r2) {}
55  };
56 
57  std::vector<std::pair<double,double> > getConstHBHE(const int type) const {
58  if (type == 0) return gconsHB;
59  else if (type == 1) return gconsHE;
60  else {std::vector<std::pair<double,double> > gcons; return gcons;}
61  }
62  const std::vector<int> & getDepth(const unsigned int i) const;
63  int getDepthEta16(int i) const {return hcons.getDepthEta16(i);}
64  std::vector<HcalEtaBin> getEtaBins(const int itype) const;
65  std::pair<double,double> getEtaPhi(int subdet, int ieta, int iphi) const;
66  std::pair<int,int> getEtaRange(const int i) const
67  {return std::pair<int,int>(iEtaMin[i],iEtaMax[i]);}
68  const std::vector<double> & getEtaTable() const {return etaTable;}
69  const std::vector<double> & getEtaTableHF() const {return hpar->etaTableHF;}
70  std::pair<double,double> getEtaLimit(const int i) const
71  {return std::pair<double,double>(etaTable[i],etaTable[i+1]);}
72  HcalID getHCID(int subdet, int ieta, int iphi, int lay,
73  int idepth) const;
74  std::vector<HFCellParameters> getHFCellParameters() const;
75  int getMaxDepth(const int type) const {return maxDepth[type];}
76  int getMaxDepth(const int itype, const int ieta) const;
77  int getNEta() const {return hpar->etagroup.size();}
78  int getNoff(const int i) const {return hpar->noff[i];}
79  double getPhiBin(const int i) const {return phibin[i];}
80  double getPhiOff(const int i) const {return hpar->phioff[i];}
81  const std::vector<double> & getPhiOffs() const {return hpar->phioff;}
82  const std::vector<double> & getPhiTable() const {return phibin;}
83  const std::vector<double> & getPhiTableHF() const {return hpar->phitable;}
84  double getRZ(int subdet, int ieta, int depth) const;
85  std::vector<HcalActiveLength> getThickActive(const int type) const;
86  int getTopoMode() const {return ((hpar->topologyMode)&0xFF);}
87  int getTriggerMode() const {return (((hpar->topologyMode)>>8)&0xFF);}
88  std::vector<HcalCellType> HcalCellTypes(HcalSubdetector) const;
89  int maxHFDepth(int ieta, int iphi) const {return hcons.maxHFDepth(ieta,iphi);}
90  unsigned int numberOfCells(HcalSubdetector) const;
91  unsigned int nCells(HcalSubdetector) const;
92  unsigned int nCells() const;
93 
94 private:
95  void initialize(void);
96  unsigned int layerGroupSize( unsigned int eta ) const;
97  unsigned int layerGroup( unsigned int eta, unsigned int i ) const;
98 
101  std::vector<std::pair<int,int> > etaSimValu; // eta ranges at Sim stage
102  std::vector<double> etaTable; // Eta table (HB+HE)
103  std::vector<int> ietaMap; // Map Sim level ieta to Rec level ieta
104  std::vector<int> iEtaMin, iEtaMax; // Minimum and maximum eta
105  std::vector<int> maxDepth; // Maximum depth in HB/HE/HF/HO
106  std::vector<double> phibin; // Phi step for all eta bins (HB, HE, HO)
107  std::vector<int> phiUnitS; // Phi unit at SIM stage
108  std::vector<std::pair<double,double> > gconsHB; // Geometry constatnts HB
109  std::vector<std::pair<double,double> > gconsHE; // Geometry constatnts HE
110  int nModule[2], nHalves[2]; // Modules, Halves for HB/HE
111 };
112 
113 #endif
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::vector< int > iEtaMin
std::vector< int > etagroup
int getDepthEta16(int i) const
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
int getDepthEta16(int i) const
int getNoff(const int i) 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
HFCellParameters(int ie=0, int d=1, int ffi=1, int sfi=2, int nfi=36, double r1=0, double r2=0)
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< HFCellParameters > getHFCellParameters() 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< int > noff
std::vector< std::pair< double, double > > gconsHB
int maxHFDepth(int ieta, int iphi) const
std::pair< double, double > getEtaPhi(int subdet, int ieta, int iphi) const
unsigned int nCells() const
int maxHFDepth(int ieta, int iphi) const
std::vector< HcalEtaBin > getEtaBins(const int itype) const