Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:13

0001 #ifndef GEOMETRY_HCALTOWERALGO_HCALFLEXIHARDCODEGEOMETRYLOADER_H
0002 #define GEOMETRY_HCALTOWERALGO_HCALFLEXIHARDCODEGEOMETRYLOADER_H 1
0003 
0004 /** \class HcalFlexiHardcodeGeometryLoader
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 HcalDDDRecConstants;
0016 class HcalGeometry;
0017 
0018 class HcalFlexiHardcodeGeometryLoader {
0019 public:
0020   HcalFlexiHardcodeGeometryLoader();
0021 
0022   CaloSubdetectorGeometry* load(const HcalTopology& fTopology, const HcalDDDRecConstants& hcons);
0023 
0024 private:
0025   struct HBHOCellParameters {
0026     HBHOCellParameters(int f_eta,
0027                        int f_depth,
0028                        int f_phi,
0029                        double f_phi0,
0030                        double f_dPhi,
0031                        double f_rMin,
0032                        double f_rMax,
0033                        double f_etaMin,
0034                        double f_etaMax)
0035         : ieta(f_eta),
0036           depth(f_depth),
0037           iphi(f_phi),
0038           phi(f_phi0),
0039           dphi(f_dPhi),
0040           rMin(f_rMin),
0041           rMax(f_rMax),
0042           etaMin(f_etaMin),
0043           etaMax(f_etaMax) {}
0044 
0045     int ieta;
0046     int depth;
0047     int iphi;
0048     double phi;
0049     double dphi;
0050     double rMin;
0051     double rMax;
0052     double etaMin;
0053     float etaMax;
0054   };
0055 
0056   struct HECellParameters {
0057     HECellParameters(int f_eta,
0058                      int f_depth,
0059                      int f_phi,
0060                      double f_phi0,
0061                      double f_dPhi,
0062                      double f_zMin,
0063                      double f_zMax,
0064                      double f_etaMin,
0065                      double f_etaMax)
0066         : ieta(f_eta),
0067           depth(f_depth),
0068           iphi(f_phi),
0069           phi(f_phi0),
0070           dphi(f_dPhi),
0071           zMin(f_zMin),
0072           zMax(f_zMax),
0073           etaMin(f_etaMin),
0074           etaMax(f_etaMax) {}
0075 
0076     int ieta;
0077     int depth;
0078     int iphi;
0079     double phi;
0080     double dphi;
0081     double zMin;
0082     double zMax;
0083     double etaMin;
0084     double etaMax;
0085   };
0086 
0087   struct HFCellParameters {
0088     HFCellParameters(int f_eta,
0089                      int f_depth,
0090                      int f_phiFirst,
0091                      int f_phiStep,
0092                      int f_nPhi,
0093                      int f_dPhi,
0094                      float f_zMin,
0095                      float f_zMax,
0096                      float f_rMin,
0097                      float f_rMax)
0098         : eta(f_eta),
0099           depth(f_depth),
0100           phiFirst(f_phiFirst),
0101           phiStep(f_phiStep),
0102           nPhi(f_nPhi),
0103           dphi(f_dPhi),
0104           zMin(f_zMin),
0105           zMax(f_zMax),
0106           rMin(f_rMin),
0107           rMax(f_rMax) {}
0108 
0109     int eta;
0110     int depth;
0111     int phiFirst;
0112     int phiStep;
0113     int nPhi;
0114     int dphi;
0115     float zMin;
0116     float zMax;
0117     float rMin;
0118     float rMax;
0119   };
0120 
0121   std::vector<HBHOCellParameters> makeHBCells(const HcalDDDRecConstants& hcons);
0122   std::vector<HBHOCellParameters> makeHOCells();
0123   std::vector<HECellParameters> makeHECells(const HcalDDDRecConstants& hcons);
0124   std::vector<HECellParameters> makeHECells_H2();
0125   std::vector<HFCellParameters> makeHFCells(const HcalDDDRecConstants& hcons);
0126 
0127   void fillHBHO(HcalGeometry* fGeometry, const std::vector<HBHOCellParameters>& fCells, bool fHB);
0128   void fillHE(HcalGeometry* fGeometry, const std::vector<HECellParameters>& fCells);
0129   void fillHF(HcalGeometry* fGeometry, const std::vector<HFCellParameters>& fCells);
0130 
0131   int MAX_HCAL_PHI;
0132   double DEGREE2RAD;
0133   bool isBH_;
0134 };
0135 
0136 #endif