CMS 3D CMS Logo

HcalTopology.h

Go to the documentation of this file.
00001 #ifndef GEOMETRY_CALOTOPOLOGY_HCALTOPOLOGY_H
00002 #define GEOMETRY_CALOTOPOLOGY_HCALTOPOLOGY_H 1
00003 
00004 #include <vector>
00005 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00006 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00007 
00024 class HcalTopology : public CaloSubdetectorTopology {
00025 public:
00026   HcalTopology(bool h2_mode=false);
00027 
00029   void exclude(const HcalDetId& id);
00031   void excludeSubdetector(HcalSubdetector subdet);
00033   int exclude(HcalSubdetector subdet, int ieta1, int ieta2, int iphi1, int iphi2, int depth1=1, int depth2=4);
00034 
00036   virtual bool valid(const HcalDetId& id) const;
00038   virtual std::vector<DetId> east(const DetId& id) const;
00040   virtual std::vector<DetId> west(const DetId& id) const;
00042   virtual std::vector<DetId> north(const DetId& id) const;
00044   virtual std::vector<DetId> south(const DetId& id) const;
00046   virtual std::vector<DetId> up(const DetId& id) const;
00048   virtual std::vector<DetId> down(const DetId& id) const;
00049 
00051   int incIEta(const HcalDetId& id, HcalDetId neighbors[2]) const;
00053   int decIEta(const HcalDetId& id, HcalDetId neighbors[2]) const;
00055   bool incIPhi(const HcalDetId& id, HcalDetId &neighbor) const;
00057   bool decIPhi(const HcalDetId& id, HcalDetId &neighbor) const;
00059   bool incrementDepth(HcalDetId& id) const;
00060 
00061   int firstHBRing() const {return firstHBRing_;}
00062   int lastHBRing()  const {return lastHBRing_;}
00063   int firstHERing() const {return firstHERing_;}
00064   int lastHERing()  const {return lastHERing_;}
00065   int firstHFRing() const {return firstHFRing_;}
00066   int lastHFRing()  const {return lastHFRing_;}
00067   int firstHORing() const {return firstHORing_;}
00068   int lastHORing()  const {return lastHORing_;}
00069 
00070   int firstHEDoublePhiRing() const {return firstHEDoublePhiRing_;} 
00071   int firstHFQuadPhiRing() const { return firstHFQuadPhiRing_; }
00072   int firstHETripleDepthRing() const {return firstHETripleDepthRing_;}
00073   int singlePhiBins() const {return singlePhiBins_;}
00074   int doublePhiBins() const {return doublePhiBins_;}
00075 
00077   void depthBinInformation(HcalSubdetector subdet, int etaRing,
00078                            int & nDepthBins, int & startingBin) const;
00079 
00081   int nPhiBins(int etaRing) const;
00082 
00083 private:
00085   int incAIEta(const HcalDetId& id, HcalDetId neighbors[2]) const;
00087   int decAIEta(const HcalDetId& id, HcalDetId neighbors[2]) const;
00088 
00090   bool validRaw(const HcalDetId& id) const;
00091 
00092   std::vector<HcalDetId> exclusionList_;
00093   bool excludeHB_, excludeHE_, excludeHO_, excludeHF_;
00094 
00095   bool h2mode_;
00096   bool isExcluded(const HcalDetId& id) const;
00097 
00098   const int firstHBRing_;
00099   const int lastHBRing_;
00100   const int firstHERing_;
00101   const int lastHERing_;
00102   const int firstHFRing_;
00103   const int lastHFRing_;
00104   const int firstHORing_;
00105   const int lastHORing_;
00106 
00107   const int firstHEDoublePhiRing_;
00108   const int firstHFQuadPhiRing_;
00109   const int firstHETripleDepthRing_;
00110   const int singlePhiBins_;
00111   const int doublePhiBins_;
00112 };
00113 
00114 
00115 #endif

Generated on Tue Jun 9 17:37:17 2009 for CMSSW by  doxygen 1.5.4