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  const HcalLayerDepthMap* ldMap() const { return &ldmap_; }
66  int maxHFDepth(const int& ieta, const int& iphi) const;
67  unsigned int numberOfCells(const HcalSubdetector&) const;
68  const HcalParameters* parameter() const { return hpar; }
69  int phiNumber(const int& phi, const int& unit) const;
70  void printTiles() const;
71  int unitPhi(const int& det, const int& etaR) const;
72  int unitPhi(const double& dphi) const;
73 
74 private:
75  static const int nDepthMax = 9;
76  static const int maxLayer_ = 18;
77  static const int maxLayerHB_ = 16;
78 
79  void initialize();
80  double deltaEta(const int& det, const int& eta, const int& depth) const;
81  double getEta(const int& det, const int& etaR, const int& zside, int depth = 1) const;
82  double getEta(const double& r, const double& z) const;
83  int getShift(const HcalSubdetector& subdet, const int& depth) const;
84  double getGain(const HcalSubdetector& subdet, const int& depth) const;
85  void printTileHB(const int& eta, const int& phi, const int& zside, const int& depth) const;
86  void printTileHE(const int& eta, const int& phi, const int& zside, const int& depth) const;
87  unsigned int layerGroupSize(int eta) const;
88  unsigned int layerGroup(int eta, int i) const;
89  unsigned int layerGroup(int det, int eta, int phi, int zside, int i) const;
90 
93 
94  std::vector<int> maxDepth; // Maximum depths in HB/HE/HF/HO
95  int nEta; // Number of bins in eta for HB and HE
96  int nR; // Number of bins in r
97  int nPhiF; // Number of bins in phitable
98  std::vector<int> depths[nDepthMax]; // Maximum layer number for a depth
99  int nDepth; // Number of bins in depth0
100  int nzHB, nmodHB; // Number of halves and modules in HB
101  int nzHE, nmodHE; // Number of halves and modules in HE
102  double etaHO[4], rminHO; // eta in HO ring boundaries
103  double zVcal; // Z-position of the front of HF
104  double dzVcal; // Half length of the HF
105  double dlShort; // Diference of length between long and short
106  int depthEta16[2]; // depth index of ieta=16 for HBmax, HEMin
107  int depthEta29[2]; // maximum depth index for ieta=29
108  int layFHB[2]; // first layers in HB (normal, special 16)
109  int layFHE[3]; // first layers in HE (normal, special 16, 18)
110  int layBHB[3]; // last layers in HB (normal, special 15, 16)
111  int layBHE[4]; // last layers in HE (normal, special 16, 17, 18)
112  bool isBH_; // if HE is BH
113  std::vector<HcalDetId> idHF2QIE; // DetId's of HF modules with 2 QIE's
114  std::pair<int, int> depthMaxDf_, depthMaxSp_; // (subdet,maximum depth) default,special
115 };
116 
117 #endif
HcalDDDSimConstants::nmodHB
int nmodHB
Definition: HcalDDDSimConstants.h:100
HcalDDDSimConstants::nDepthMax
static const int nDepthMax
Definition: HcalDDDSimConstants.h:75
HcalDDDSimConstants::idHF2QIE
std::vector< HcalDetId > idHF2QIE
Definition: HcalDDDSimConstants.h:113
DDAxes::y
HcalDDDSimConstants::layBHB
int layBHB[3]
Definition: HcalDDDSimConstants.h:110
HcalDDDSimConstants::numberOfCells
unsigned int numberOfCells(const HcalSubdetector &) const
Definition: HcalDDDSimConstants.cc:671
mps_fire.i
i
Definition: mps_fire.py:355
HcalDDDSimConstants::getDepthEta16
int getDepthEta16(const int &det, const int &phi, const int &zside) const
Definition: HcalDDDSimConstants.cc:152
HcalDDDSimConstants::getRTableHF
const std::vector< double > & getRTableHF() const
Definition: HcalDDDSimConstants.h:61
HcalDDDSimConstants::getEta
int getEta(const int &det, const int &lay, const double &hetaR) const
Definition: HcalDDDSimConstants.cc:225
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HcalDDDSimConstants::nEta
int nEta
Definition: HcalDDDSimConstants.h:95
HcalDDDSimConstants::getGparHF
const std::vector< double > & getGparHF() const
Definition: HcalDDDSimConstants.h:45
HcalParameters.h
HcalDDDSimConstants::~HcalDDDSimConstants
~HcalDDDSimConstants()
Definition: HcalDDDSimConstants.cc:22
HcalDDDSimConstants::getConstHBHE
std::vector< std::pair< double, double > > getConstHBHE(const int &type) const
Definition: HcalDDDSimConstants.cc:138
HcalParameters::etaTableHF
std::vector< double > etaTableHF
Definition: HcalParameters.h:45
HcalDDDSimConstants::maxDepth
std::vector< int > maxDepth
Definition: HcalDDDSimConstants.h:94
HcalDDDSimConstants::rminHO
double rminHO
Definition: HcalDDDSimConstants.h:102
HcalDDDSimConstants::getDetEta
std::pair< int, double > getDetEta(const double &eta, const int &depth) const
Definition: HcalDDDSimConstants.cc:201
DDAxes::x
HcalLayerDepthMap
Definition: HcalLayerDepthMap.h:18
HcalDDDSimConstants::HcalCellTypes
std::vector< HcalCellType > HcalCellTypes() const
Definition: HcalDDDSimConstants.cc:505
HcalDDDSimConstants::ldmap_
HcalLayerDepthMap ldmap_
Definition: HcalDDDSimConstants.h:92
HcalDDDSimConstants::cell
HcalCellType::HcalCell cell(const int &det, const int &zside, const int &depth, const int &etaR, const int &iphi) const
Definition: HcalDDDSimConstants.cc:28
HcalDDDSimConstants::findDepth
int findDepth(const int &det, const int &eta, const int &phi, const int &zside, const int &lay) const
Definition: HcalDDDSimConstants.cc:120
HcalParameters::etaMax
std::vector< int > etaMax
Definition: HcalParameters.h:55
HcalDDDSimConstants::depthEta29
int depthEta29[2]
Definition: HcalDDDSimConstants.h:107
HcalDDDSimConstants::nzHB
int nzHB
Definition: HcalDDDSimConstants.h:100
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
HcalDDDSimConstants::findLayer
unsigned int findLayer(const int &layer, const std::vector< HcalParameters::LayerItem > &layerGroup) const
Definition: HcalDDDSimConstants.cc:126
HcalDDDSimConstants::getEtaHO
double getEtaHO(const double &etaR, const double &x, const double &y, const double &z) const
Definition: HcalDDDSimConstants.cc:295
HcalDDDSimConstants::layFHE
int layFHE[3]
Definition: HcalDDDSimConstants.h:109
trackingPlots.hp
hp
Definition: trackingPlots.py:1246
HcalDDDSimConstants::dlShort
double dlShort
Definition: HcalDDDSimConstants.h:105
HcalDDDSimConstants::getiEtaRange
std::pair< int, int > getiEtaRange(const int &i) const
Definition: HcalDDDSimConstants.h:43
HcalDDDSimConstants::getGain
double getGain(const HcalSubdetector &subdet, const int &depth) const
Definition: HcalDDDSimConstants.cc:1085
HcalDDDSimConstants::HcalDDDSimConstants
HcalDDDSimConstants(const HcalParameters *hp)
Definition: HcalDDDSimConstants.cc:10
HcalDDDSimConstants::printTiles
void printTiles() const
Definition: HcalDDDSimConstants.cc:695
PVValHelper::eta
Definition: PVValidationHelpers.h:69
DDAxes::z
HcalDDDSimConstants::maxLayerHB_
static const int maxLayerHB_
Definition: HcalDDDSimConstants.h:77
HcalParameters::phitable
std::vector< double > phitable
Definition: HcalParameters.h:38
HcalLayerDepthMap.h
HcalDDDSimConstants::maxHFDepth
int maxHFDepth(const int &ieta, const int &iphi) const
Definition: HcalDDDSimConstants.cc:655
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalDDDSimConstants::unitPhi
int unitPhi(const int &det, const int &etaR) const
Definition: HcalDDDSimConstants.cc:729
HcalDDDSimConstants::layerGroupSize
unsigned int layerGroupSize(int eta) const
Definition: HcalDDDSimConstants.cc:1203
HcalDDDSimConstants::getEtaDepth
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
Definition: HcalDDDSimConstants.cc:252
HcalParameters::rTable
std::vector< double > rTable
Definition: HcalParameters.h:36
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalDDDSimConstants::getLayer0Wt
double getLayer0Wt(const int &det, const int &phi, const int &zside) const
Definition: HcalDDDSimConstants.cc:361
HcalDDDSimConstants::layerGroup
unsigned int layerGroup(int eta, int i) const
Definition: HcalDDDSimConstants.cc:1216
HcalDDDSimConstants::layFHB
int layFHB[2]
Definition: HcalDDDSimConstants.h:108
HcalDDDSimConstants::depthMaxSp_
std::pair< int, int > depthMaxSp_
Definition: HcalDDDSimConstants.h:114
HcalDDDSimConstants::getEtaTableHF
const std::vector< double > & getEtaTableHF() const
Definition: HcalDDDSimConstants.h:44
HcalDetId.h
HcalDDDSimConstants::dzVcal
double dzVcal
Definition: HcalDDDSimConstants.h:104
HcalDDDSimConstants::depths
std::vector< int > depths[nDepthMax]
Definition: HcalDDDSimConstants.h:98
HcalDDDSimConstants::hpar
const HcalParameters * hpar
Definition: HcalDDDSimConstants.h:91
HcalDDDSimConstants::getPhiTableHF
const std::vector< double > & getPhiTableHF() const
Definition: HcalDDDSimConstants.h:60
HcalDDDSimConstants::getMinDepth
int getMinDepth(const int &det, const int &eta, const int &phi, const int &zside, const bool &partialOnly) const
Definition: HcalDDDSimConstants.cc:431
HcalDDDSimConstants::layBHE
int layBHE[4]
Definition: HcalDDDSimConstants.h:111
HcalDDDSimConstants::phiNumber
int phiNumber(const int &phi, const int &unit) const
Definition: HcalDDDSimConstants.cc:684
HcalDDDSimConstants::ldMap
const HcalLayerDepthMap * ldMap() const
Definition: HcalDDDSimConstants.h:65
HcalDDDSimConstants::getLastLayer
int getLastLayer(const int &det, const int &eta) const
Definition: HcalDDDSimConstants.cc:339
HcalDDDSimConstants::nDepth
int nDepth
Definition: HcalDDDSimConstants.h:99
HcalSubdetector.h
HcalCellType::HcalCell
Definition: HcalCellType.h:15
HcalDDDSimConstants::etaHO
double etaHO[4]
Definition: HcalDDDSimConstants.h:102
HcalCellType.h
HcalDDDSimConstants::getDepthEta29
int getDepthEta29(const int &phi, const int &zside, const int &i) const
Definition: HcalDDDSimConstants.cc:178
unit
Basic3DVector unit() const
Definition: Basic3DVectorLD.h:162
HcalDDDSimConstants::getLayerBack
int getLayerBack(const int &det, const int &eta, const int &phi, const int &zside, const int &depth) const
Definition: HcalDDDSimConstants.cc:387
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
DDAxes::phi
HcalDDDSimConstants::depthMaxDf_
std::pair< int, int > depthMaxDf_
Definition: HcalDDDSimConstants.h:114
HcalDDDSimConstants::getLayerFront
int getLayerFront(const int &det, const int &eta, const int &phi, const int &zside, const int &depth) const
Definition: HcalDDDSimConstants.cc:368
HcalDDDSimConstants::zVcal
double zVcal
Definition: HcalDDDSimConstants.h:103
type
type
Definition: HCALResponse.h:21
HcalDDDSimConstants::printTileHE
void printTileHE(const int &eta, const int &phi, const int &zside, const int &depth) const
Definition: HcalDDDSimConstants.cc:1140
HcalDDDSimConstants::getFrontLayer
int getFrontLayer(const int &det, const int &eta) const
Definition: HcalDDDSimConstants.cc:321
HcalDDDSimConstants::depthEta16
int depthEta16[2]
Definition: HcalDDDSimConstants.h:106
HcalDDDSimConstants::getPhiCons
std::pair< double, double > getPhiCons(const int &det, const int &ieta) const
Definition: HcalDDDSimConstants.cc:465
HcalDDDSimConstants::getIdHF2QIE
const std::vector< HcalDetId > & getIdHF2QIE() const
Definition: HcalDDDSimConstants.h:46
HcalParameters
Definition: HcalParameters.h:6
HcalDDDSimConstants::printTileHB
void printTileHB(const int &eta, const int &phi, const int &zside, const int &depth) const
Definition: HcalDDDSimConstants.cc:1104
HcalDDDSimConstants::getPhis
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) const
Definition: HcalDDDSimConstants.cc:484
HcalDDDSimConstants::getDepthEta16M
int getDepthEta16M(const int &det) const
Definition: HcalDDDSimConstants.cc:162
HcalDDDSimConstants::getLayerMax
int getLayerMax(const int &eta, const int &depth) const
Definition: HcalDDDSimConstants.cc:400
HcalDDDSimConstants::getModHalfHBHE
std::pair< int, int > getModHalfHBHE(const int &type) const
Definition: HcalDDDSimConstants.cc:457
HcalDDDSimConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDSimConstants.h:53
HcalDDDSimConstants::getShift
int getShift(const HcalSubdetector &subdet, const int &depth) const
Definition: HcalDDDSimConstants.cc:1066
HcalDDDSimConstants::nPhiF
int nPhiF
Definition: HcalDDDSimConstants.h:97
HcalDDDSimConstants::nzHE
int nzHE
Definition: HcalDDDSimConstants.h:101
HcalDDDSimConstants::getDepthEta29M
int getDepthEta29M(const int &i, const bool &planOne) const
Definition: HcalDDDSimConstants.cc:185
HcalParameters::etaMin
std::vector< int > etaMin
Definition: HcalParameters.h:54
HcalParameters::gparHF
std::vector< double > gparHF
Definition: HcalParameters.h:40
HcalDDDSimConstants::getMaxDepthDet
std::pair< int, int > getMaxDepthDet(const int &i) const
Definition: HcalDDDSimConstants.h:55
HcalDDDSimConstants::isBH_
bool isBH_
Definition: HcalDDDSimConstants.h:112
HcalDDDSimConstants::maxLayer_
static const int maxLayer_
Definition: HcalDDDSimConstants.h:76
HcalDDDSimConstants::isBH
bool isBH() const
Definition: HcalDDDSimConstants.h:64
HcalDDDSimConstants::initialize
void initialize()
Definition: HcalDDDSimConstants.cc:743
HcalDDDSimConstants::deltaEta
double deltaEta(const int &det, const int &eta, const int &depth) const
Definition: HcalDDDSimConstants.cc:979
HcalDDDSimConstants::nR
int nR
Definition: HcalDDDSimConstants.h:96
HcalDDDSimConstants::parameter
const HcalParameters * parameter() const
Definition: HcalDDDSimConstants.h:68
HcalDDDSimConstants::nmodHE
int nmodHE
Definition: HcalDDDSimConstants.h:101