File indexing completed on 2024-04-06 12:14:45
0001 #ifndef Geometry_HcalTowerAlgo_HcalLayerDepthMap_h
0002 #define Geometry_HcalTowerAlgo_HcalLayerDepthMap_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <iostream>
0013 #include <iomanip>
0014 #include <map>
0015 #include <string>
0016 #include <vector>
0017
0018 class HcalLayerDepthMap {
0019 public:
0020 HcalLayerDepthMap();
0021 ~HcalLayerDepthMap();
0022 void initialize(const int subdet,
0023 const int ietaMax,
0024 const int dep16C,
0025 const int dep29C,
0026 const double wtl0C,
0027 std::vector<int> const& iphi,
0028 std::vector<int> const& ieta,
0029 std::vector<int> const& layer,
0030 std::vector<int> const& depth);
0031 int getSubdet() const { return subdet_; }
0032 int getDepth(const int subdet, const int ieta, const int iphi, const int zside, const int layer) const;
0033 int getDepth16(const int subdet, const int iphi, const int zside) const;
0034 int getDepthMin(const int subdet, const int iphi, const int zside) const;
0035 int getDepthMax(const int subdet, const int iphi, const int zside) const;
0036 int getDepthMax(const int subdet, const int ieta, const int iphi, const int zside) const;
0037 std::pair<int, int> getDepths(const int eta) const;
0038 int getLayerFront(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const;
0039 int getLayerBack(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const;
0040 void getLayerDepth(
0041 const int subdet, const int ieta, const int iphi, const int zside, std::map<int, int>& layers) const;
0042 void getLayerDepth(const int ieta, std::map<int, int>& layers) const;
0043 double getLayer0Wt(const int subdet, const int iphi, const int zside) const;
0044 int getMaxDepthLastHE(const int subdet, const int iphi, const int zside) const;
0045 const std::vector<int>& getPhis() const { return iphi_; }
0046 bool isValid(const int det, const int phi, const int zside) const;
0047 int validDet(std::vector<int>& phis) const;
0048 std::pair<int, int> validEta() const { return std::pair<int, int>(ietaMin_, ietaMax_); }
0049
0050 private:
0051 static const int maxLayers_ = 18;
0052 int subdet_;
0053 int ietaMin_;
0054 int ietaMax_;
0055 int depthMin_;
0056 int depthMax_;
0057 int dep16C_;
0058 int dep29C_;
0059 double wtl0C_;
0060 std::vector<int> iphi_;
0061 std::map<std::pair<int, int>, int> layer2Depth_;
0062 std::map<std::pair<int, int>, int> depth2LayerF_;
0063 std::map<std::pair<int, int>, int> depth2LayerB_;
0064 std::map<int, std::pair<int, int>> depthsEta_;
0065 };
0066
0067 #endif