CMS 3D CMS Logo

HcalDDDSimConstants.h
Go to the documentation of this file.
1 #ifndef Geometry_HcalTowerAlgo_HcalDDDSimConstants_h
2 #define Geometry_HcalTowerAlgo_HcalDDDSimConstants_h
3 
13 #include <string>
14 #include <vector>
15 #include <iostream>
16 #include <iomanip>
17 
23 
25 public:
28 
30  const int& det, const int& zside, const int& depth, const int& etaR, const int& iphi) const;
31  int findDepth(const int& det, const int& eta, const int& phi, const int& zside, const int& lay) const;
32  unsigned int findLayer(const int& layer, const std::vector<HcalParameters::LayerItem>& layerGroup) const;
33  std::vector<std::pair<double, double> > getConstHBHE(const int& type) const;
34  int getDepthEta16(const int& det, const int& phi, const int& zside) const;
35  int getDepthEta16M(const int& det) const;
36  int getDepthEta29(const int& phi, const int& zside, const int& i) const;
37  int getDepthEta29M(const int& i, const bool& planOne) const;
38  std::pair<int, double> getDetEta(const double& eta, const int& depth) const;
39  int getEta(const int& det, const int& lay, const double& hetaR) const;
40  std::pair<int, int> getEtaDepth(
41  const int& det, int etaR, const int& phi, const int& zside, int depth, const int& lay) const;
42  double getEtaHO(const double& etaR, const double& x, const double& y, const double& z) const;
43  std::pair<int, int> getiEtaRange(const int& i) const { return std::pair<int, int>(hpar->etaMin[i], hpar->etaMax[i]); }
44  const std::vector<double>& getEtaTableHF() const { return hpar->etaTableHF; }
45  const std::vector<double>& getGparHF() const { return hpar->gparHF; }
46  const std::vector<HcalDetId>& getIdHF2QIE() const { return idHF2QIE; }
47  double getLayer0Wt(const int& det, const int& phi, const int& zside) const;
48  int getFrontLayer(const int& det, const int& eta) const;
49  int getLastLayer(const int& det, const int& eta) const;
50  int getLayerFront(const int& det, const int& eta, const int& phi, const int& zside, const int& depth) const;
51  int getLayerBack(const int& det, const int& eta, const int& phi, const int& zside, const int& depth) const;
52  int getLayerMax(const int& eta, const int& depth) const;
53  int getMaxDepth(const int& type) const { return maxDepth[type]; }
54  int getMaxDepth(const int& det, const int& eta, const int& phi, const int& zside, const bool& partialOnly) const;
55  std::pair<int, int> getMaxDepthDet(const int& i) const { return ((i == 1) ? depthMaxDf_ : depthMaxSp_); }
56  int getMinDepth(const int& det, const int& eta, const int& phi, const int& zside, const bool& partialOnly) const;
57  std::pair<int, int> getModHalfHBHE(const int& type) const;
58  std::pair<double, double> getPhiCons(const int& det, const int& ieta) const;
59  std::vector<std::pair<int, double> > getPhis(const int& subdet, const int& ieta) const;
60  const std::vector<double>& getPhiTableHF() const { return hpar->phitable; }
61  const std::vector<double>& getRTableHF() const { return hpar->rTable; }
62  std::vector<HcalCellType> HcalCellTypes() const;
63  std::vector<HcalCellType> HcalCellTypes(const HcalSubdetector&, int ieta = -1, int depth = -1) const;
64  bool isBH() const { return isBH_; }
65  bool isHE() const { return (hpar->etaMax[1] > hpar->etaMin[1]); }
66  const HcalLayerDepthMap* ldMap() const { return &ldmap_; }
67  int maxHFDepth(const int& ieta, const int& iphi) const;
68  unsigned int numberOfCells(const HcalSubdetector&) const;
69  const HcalParameters* parameter() const { return hpar; }
70  int phiNumber(const int& phi, const int& unit) const;
71  void printTiles() const;
72  int unitPhi(const int& det, const int& etaR) const;
73  int unitPhi(const double& dphi) const;
74 
75 private:
76  static const int nDepthMax = 9;
77  static const int maxLayer_ = 18;
78  static const int maxLayerHB_ = 16;
79 
80  void initialize();
81  double deltaEta(const int& det, const int& eta, const int& depth) const;
82  double getEta(const int& det, const int& etaR, const int& zside, int depth = 1) const;
83  double getEta(const double& r, const double& z) const;
84  int getShift(const HcalSubdetector& subdet, const int& depth) const;
85  double getGain(const HcalSubdetector& subdet, const int& depth) const;
86  void printTileHB(const int& eta, const int& phi, const int& zside, const int& depth) const;
87  void printTileHE(const int& eta, const int& phi, const int& zside, const int& depth) const;
88  unsigned int layerGroupSize(int eta) const;
89  unsigned int layerGroup(int eta, int i) const;
90  unsigned int layerGroup(int det, int eta, int phi, int zside, int i) const;
91 
94 
95  std::vector<int> maxDepth; // Maximum depths in HB/HE/HF/HO
96  int nEta; // Number of bins in eta for HB and HE
97  int nR; // Number of bins in r
98  int nPhiF; // Number of bins in phitable
99  std::vector<int> depths[nDepthMax]; // Maximum layer number for a depth
100  int nDepth; // Number of bins in depth0
101  int nzHB, nmodHB; // Number of halves and modules in HB
102  int nzHE, nmodHE; // Number of halves and modules in HE
103  double etaHO[4], rminHO; // eta in HO ring boundaries
104  double zVcal; // Z-position of the front of HF
105  double dzVcal; // Half length of the HF
106  double dlShort; // Diference of length between long and short
107  int depthEta16[2]; // depth index of ieta=16 for HBmax, HEMin
108  int depthEta29[2]; // maximum depth index for ieta=29
109  int layFHB[2]; // first layers in HB (normal, special 16)
110  int layFHE[3]; // first layers in HE (normal, special 16, 18)
111  int layBHB[3]; // last layers in HB (normal, special 15, 16)
112  int layBHE[4]; // last layers in HE (normal, special 16, 17, 18)
113  bool isBH_; // if HE is BH
114  std::vector<HcalDetId> idHF2QIE; // DetId's of HF modules with 2 QIE's
115  std::pair<int, int> depthMaxDf_, depthMaxSp_; // (subdet,maximum depth) default,special
116 };
117 
118 #endif
HcalCellType::HcalCell cell(const int &det, const int &zside, const int &depth, const int &etaR, const int &iphi) const
const HcalParameters * parameter() const
int getEta(const int &det, const int &lay, const double &hetaR) const
int getFrontLayer(const int &det, const int &eta) const
double getEtaHO(const double &etaR, const double &x, const double &y, const double &z) const
unsigned int findLayer(const int &layer, const std::vector< HcalParameters::LayerItem > &layerGroup) const
std::vector< int > maxDepth
int getDepthEta29M(const int &i, const bool &planOne) const
int maxHFDepth(const int &ieta, const int &iphi) const
static const int maxLayer_
std::pair< int, int > depthMaxDf_
int getDepthEta29(const int &phi, const int &zside, const int &i) const
double deltaEta(const int &det, const int &eta, const int &depth) const
double getLayer0Wt(const int &det, const int &phi, const int &zside) const
int zside(DetId const &)
std::pair< double, double > getPhiCons(const int &det, const int &ieta) const
HcalDDDSimConstants(const HcalParameters *hp)
std::vector< double > etaTableHF
const std::vector< double > & getGparHF() const
double getGain(const HcalSubdetector &subdet, const int &depth) const
std::pair< int, double > getDetEta(const double &eta, const int &depth) const
int getDepthEta16M(const int &det) const
unsigned int numberOfCells(const HcalSubdetector &) const
std::vector< int > etaMax
std::vector< int > depths[nDepthMax]
constexpr std::array< uint8_t, layerIndexSize > layer
int phiNumber(const int &phi, const int &unit) const
const std::vector< double > & getRTableHF() const
std::pair< int, int > getMaxDepthDet(const int &i) const
unsigned int layerGroupSize(int eta) const
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
std::vector< std::pair< double, double > > getConstHBHE(const int &type) const
std::pair< int, int > depthMaxSp_
std::pair< int, int > getiEtaRange(const int &i) const
HcalSubdetector
Definition: HcalAssistant.h:31
std::vector< HcalCellType > HcalCellTypes() const
const std::vector< double > & getPhiTableHF() const
const HcalLayerDepthMap * ldMap() const
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) const
std::vector< HcalDetId > idHF2QIE
int findDepth(const int &det, const int &eta, const int &phi, const int &zside, const int &lay) const
Basic3DVector unit() const
int unitPhi(const int &det, const int &etaR) const
int getLayerBack(const int &det, const int &eta, const int &phi, const int &zside, const int &depth) const
int getLayerFront(const int &det, const int &eta, const int &phi, const int &zside, const int &depth) const
const std::vector< HcalDetId > & getIdHF2QIE() const
std::vector< double > gparHF
void printTileHE(const int &eta, const int &phi, const int &zside, const int &depth) const
int getMinDepth(const int &det, const int &eta, const int &phi, const int &zside, const bool &partialOnly) const
void printTileHB(const int &eta, const int &phi, const int &zside, const int &depth) const
std::vector< double > rTable
std::vector< double > phitable
std::pair< int, int > getModHalfHBHE(const int &type) const
unsigned int layerGroup(int eta, int i) const
const std::vector< double > & getEtaTableHF() const
const HcalParameters * hpar
int getMaxDepth(const int &type) const
int getLastLayer(const int &det, const int &eta) const
int getLayerMax(const int &eta, const int &depth) const
static const int nDepthMax
static const int maxLayerHB_
int getDepthEta16(const int &det, const int &phi, const int &zside) const
std::vector< int > etaMin
int getShift(const HcalSubdetector &subdet, const int &depth) const
HcalLayerDepthMap ldmap_