Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:50

0001 #ifndef GEOMETRY_HCALTOWERALGO_HCALHARDCODEGEOMETRYLOADER_H
0002 #define GEOMETRY_HCALTOWERALGO_HCALHARDCODEGEOMETRYLOADER_H 1
0003 
0004 /** \class HcalHardcodeGeometryLoader
0005  *
0006  * \author F.Ratnikov, UMd
0007 */
0008 
0009 #include "Geometry/CaloGeometry/interface/CaloVGeometryLoader.h"
0010 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include <vector>
0013 
0014 class HcalTopology;
0015 class HcalGeometry;
0016 
0017 class HcalHardcodeGeometryLoader {
0018 public:
0019   HcalHardcodeGeometryLoader();
0020 
0021   CaloSubdetectorGeometry* load(const HcalTopology& fTopology);
0022 
0023 private:
0024   struct HBHOCellParameters {
0025     HBHOCellParameters(int f_eta,
0026                        int f_depth,
0027                        int f_phiFirst,
0028                        int f_phiStep,
0029                        int f_dPhi,
0030                        float f_rMin,
0031                        float f_rMax,
0032                        float f_etaMin,
0033                        float f_etaMax)
0034         : eta(f_eta),
0035           depth(f_depth),
0036           phiFirst(f_phiFirst),
0037           phiStep(f_phiStep),
0038           dphi(f_dPhi),
0039           rMin(f_rMin),
0040           rMax(f_rMax),
0041           etaMin(f_etaMin),
0042           etaMax(f_etaMax) {}
0043 
0044     int eta;
0045     int depth;
0046     int phiFirst;
0047     int phiStep;
0048     int dphi;
0049     float rMin;
0050     float rMax;
0051     float etaMin;
0052     float etaMax;
0053   };
0054 
0055   struct HECellParameters {
0056     HECellParameters(int f_eta,
0057                      int f_depth,
0058                      int f_phiFirst,
0059                      int f_phiStep,
0060                      int f_dPhi,
0061                      float f_zMin,
0062                      float f_zMax,
0063                      float f_etaMin,
0064                      float f_etaMax)
0065         : eta(f_eta),
0066           depth(f_depth),
0067           phiFirst(f_phiFirst),
0068           phiStep(f_phiStep),
0069           dphi(f_dPhi),
0070           zMin(f_zMin),
0071           zMax(f_zMax),
0072           etaMin(f_etaMin),
0073           etaMax(f_etaMax) {}
0074 
0075     int eta;
0076     int depth;
0077     int phiFirst;
0078     int phiStep;
0079     int dphi;
0080     float zMin;
0081     float zMax;
0082     float etaMin;
0083     float etaMax;
0084   };
0085 
0086   struct HFCellParameters {
0087     HFCellParameters(int f_eta,
0088                      int f_depth,
0089                      int f_phiFirst,
0090                      int f_phiStep,
0091                      int f_dPhi,
0092                      float f_zMin,
0093                      float f_zMax,
0094                      float f_rMin,
0095                      float f_rMax)
0096         : eta(f_eta),
0097           depth(f_depth),
0098           phiFirst(f_phiFirst),
0099           phiStep(f_phiStep),
0100           dphi(f_dPhi),
0101           zMin(f_zMin),
0102           zMax(f_zMax),
0103           rMin(f_rMin),
0104           rMax(f_rMax) {}
0105 
0106     int eta;
0107     int depth;
0108     int phiFirst;
0109     int phiStep;
0110     int dphi;
0111     float zMin;
0112     float zMax;
0113     float rMin;
0114     float rMax;
0115   };
0116 
0117   std::vector<HBHOCellParameters> makeHBCells(const HcalTopology& topology);
0118   std::vector<HBHOCellParameters> makeHOCells();
0119   std::vector<HECellParameters> makeHECells(const HcalTopology& topology);
0120   std::vector<HECellParameters> makeHECells_H2();
0121   std::vector<HFCellParameters> makeHFCells();
0122 
0123   void fillHBHO(HcalGeometry* fGeometry, const std::vector<HBHOCellParameters>& fCells, bool fHB);
0124   void fillHE(HcalGeometry* fGeometry, const std::vector<HECellParameters>& fCells);
0125   void fillHF(HcalGeometry* fGeometry, const std::vector<HFCellParameters>& fCells);
0126 
0127   int MAX_HCAL_PHI;
0128   double DEGREE2RAD;
0129 
0130   std::vector<std::vector<int> > m_segmentation;
0131 };
0132 
0133 #endif