CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalNumberingFromDDD.h
Go to the documentation of this file.
1 // File: HcalNumberingFromDDD.h
3 // Description: Usage of DDD to get to numbering scheme for hadron calorimeter
5 #ifndef HcalNumberingFromDDD_h
6 #define HcalNumberingFromDDD_h
7 
11 
12 #include "CLHEP/Vector/ThreeVector.h"
13 
14 #include <vector>
15 #include <string>
16 
17 class DDCompactView;
18 class DDFilteredView;
19 
21 
22 public:
23 
24  HcalNumberingFromDDD(std::string & name, const DDCompactView & cpv);
26 
27  struct HcalID {
29  HcalID(int det=0, int zs=0, int d=0, int et=0, int fi=0, int phiskip=0, int ly=-1) :
30  subdet(det), zside(zs), depth(d), etaR(et), phi(fi), phis(phiskip), lay(ly) {}
31  };
32 
33  HcalID unitID(int det, CLHEP::Hep3Vector pos, int depth, int lay=-1) const;
34  HcalID unitID(double eta, double phi, int depth=1, int lay=-1) const;
35  HcalID unitID(int det, double etaR, double phi, int depth,
36  int lay=-1) const;
37  HcalID unitID(int det, int zside, int depth, int etaR, int phi,
38  int lay=-1) const;
39  HcalCellType::HcalCell cell(int det, int zside, int depth, int etaR,
40  int iphi, bool corr=true) const;
41  std::vector<double> getEtaTable() const;
42  unsigned int numberOfCells(HcalSubdetector) const;
43  std::vector<HcalCellType> HcalCellTypes() const;
44  std::vector<HcalCellType> HcalCellTypes(HcalSubdetector) const;
45  void printTile();
46 
47 private:
48 
49  double getEta(int det, int etaR, int zside, int depth=1) const;
50  double getEta(double r, double z) const;
51  double deltaEta(int det, int eta, int depth) const;
52  void initialize(std::string & name, const DDCompactView & cpv);
55  std::vector<double> getDDDArray(const std::string &, const DDsvalues_type &,
56  int&) const;
57  int getShift(HcalSubdetector subdet, int depth) const;
58  double getGain (HcalSubdetector subdet, int depth) const;
59  unsigned find (int element, std::vector<int> array) const;
60  int unitPhi (int det, int etaR) const;
61  void tileHB(int eta, int depth);
62  void tileHE(int eta, int depth);
63  double getEtaHO(double& etaR, double& x, double& y, double& z) const;
64 
65 private:
66 
67  std::vector<double> phioff; // Phi offset for barrel, endcap, forward
68  std::vector<double> etaTable; // Eta table
69  int nEta; // Number of bins in eta for HB and HE
70  std::vector<double> rTable; // R-table
71  int nR; // Number of bins in r
72  std::vector<int> etaMin; // Minimum eta bin number for HB/HE/HF
73  std::vector<int> etaMax; // Maximum eta bin number for HB/HE/HF
74  std::vector<double> phibin; // Phi step for all eta bins (HB, HE and HF)
75  int nPhi; // Number of bins in dphi
76  std::vector<int> depth1; // Maximum layer number for depth 1
77  std::vector<int> depth2; // Maximum layer number for depth 2
78  std::vector<int> depth3; // Maximum layer number for depth 3
79  int nDepth; // Number of bins in depth1/depth2/depth3
80  std::vector<double> gainHB; // Gain factor for HB
81  std::vector<int> shiftHB; // Readout shift .. ..
82  std::vector<double> gainHE; // Gain factor for HE
83  std::vector<int> shiftHE; // Readout shift .. ..
84  std::vector<double> gainHF; // Gain factor for HF
85  std::vector<int> shiftHF; // Readout shift .. ..
86  double zVcal; // Z-position of the front of HF
87  double dzVcal; // Half length of the HF
88  double dlShort; // Diference of length between long and short
89  std::vector<int> nOff; // Speical eta bin #'s in barrel and endcap
90  std::vector<double> rHB, drHB; // Radial positions of HB layers
91  std::vector<double> zHE, dzHE; // Z-positions of HE layers
92  std::vector<double> zho; // Z-positions of HO layers
93  int nzHB, nmodHB; // Number of halves and modules in HB
94  int nzHE, nmodHE; // Number of halves and modules in HE
95  double etaHO[4], rminHO; // eta in HO ring boundaries
96  std::vector<double> rhoxb, zxb, dyxb, dzxb; // Geometry parameters to
97  std::vector<int> layb, laye; // get tile size for HB & HE
98  std::vector<double> zxe, rhoxe, dyxe, dx1e, dx2e; // in different layers
99 };
100 
101 #endif
std::vector< int > shiftHE
std::vector< int > shiftHB
std::vector< double > dx2e
std::vector< int > depth2
HcalID(int det=0, int zs=0, int d=0, int et=0, int fi=0, int phiskip=0, int ly=-1)
std::vector< double > dyxe
void tileHB(int eta, int depth)
std::vector< double > zxe
std::vector< double > etaTable
std::vector< int > layb
int getShift(HcalSubdetector subdet, int depth) const
std::vector< double > zxb
int unitPhi(int det, int etaR) const
std::vector< double > rHB
std::vector< HcalCellType > HcalCellTypes() const
std::vector< double > drHB
T eta() const
double getGain(HcalSubdetector subdet, int depth) const
type of data representation of DDCompactView
Definition: DDCompactView.h:77
std::vector< double > phibin
double double double z
std::vector< double > rhoxe
unsigned int numberOfCells(HcalSubdetector) const
std::vector< double > zho
HcalNumberingFromDDD(std::string &name, const DDCompactView &cpv)
std::vector< double > dzxb
std::vector< double > gainHF
std::vector< int > shiftHF
std::vector< double > dyxb
double getEtaHO(double &etaR, double &x, double &y, double &z) const
std::vector< double > phioff
std::vector< double > dx1e
void initialize(std::string &name, const DDCompactView &cpv)
std::vector< int > laye
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:19
HcalSubdetector
Definition: HcalAssistant.h:32
std::vector< int > nOff
std::vector< int > depth3
JetCorrectorParameters corr
Definition: classes.h:9
std::vector< double > rhoxb
unsigned find(int element, std::vector< int > array) const
std::vector< int > etaMin
std::vector< int > etaMax
void loadGeometry(DDFilteredView)
double deltaEta(int det, int eta, int depth) const
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &, int &) const
double getEta(int det, int etaR, int zside, int depth=1) const
std::vector< double > gainHB
std::vector< double > gainHE
std::vector< int > depth1
std::vector< double > zHE
void tileHE(int eta, int depth)
std::vector< double > dzHE
void loadSpecPars(DDFilteredView)
std::vector< double > getEtaTable() const
HcalCellType::HcalCell cell(int det, int zside, int depth, int etaR, int iphi, bool corr=true) const
HcalID unitID(int det, CLHEP::Hep3Vector pos, int depth, int lay=-1) const
Definition: DDAxes.h:10
std::vector< double > rTable
Definition: DDAxes.h:10