CMS 3D CMS Logo

CastorTopology.h

Go to the documentation of this file.
00001 #ifndef GEOMETRY_CALOTOPOLOGY_CASTORTOPOLOGY_H
00002 #define GEOMETRY_CALOTOPOLOGY_CASTORTOPOLOGY_H 1
00003 
00004 #include <vector>
00005 #include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
00006 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00007 
00013 class CastorTopology : public CaloSubdetectorTopology {
00014 public:
00015 
00016   CastorTopology();
00018   void exclude(const HcalCastorDetId& id);
00020   void exclude(int zside); 
00022   void exclude(int zside, HcalCastorDetId::Section section);
00024   int exclude(int zside, HcalCastorDetId::Section section1, int isec1, int imod1, HcalCastorDetId::Section section2, int isec2, int imod2);
00025 
00027   virtual bool valid(const HcalCastorDetId& id) const;
00028 
00030   virtual std::vector<DetId> incSector(const DetId& id) const;
00031   
00033   virtual std::vector<DetId> incModule(const DetId& id) const;
00034 
00035   //** I have to put this here since they inherit from CaloSubdetectorTopology
00036   virtual std::vector<DetId> east(const DetId& id) const;
00037   virtual std::vector<DetId> west(const DetId& id) const; 
00038   virtual std::vector<DetId> north(const DetId& id) const;
00039   virtual std::vector<DetId> south(const DetId& id) const;
00040   virtual std::vector<DetId> up(const DetId& id) const;
00041   virtual std::vector<DetId> down(const DetId& id) const;
00042   
00043   // how many channels (deph) for a given section
00044   int ncells(HcalCastorDetId::Section section) const;
00045 
00046   //return first and last cell of each section
00047   int firstCell(HcalCastorDetId::Section section)const;  
00048   int lastCell(HcalCastorDetId::Section section)const;
00049  
00050  private:
00051   
00052   bool validRaw(const HcalCastorDetId& id) const;
00053   
00054   std::vector<HcalCastorDetId> exclusionList_;
00055   
00056   bool excludeEM_, excludeHAD_, excludeZP_, excludeZN_;
00057   
00058   int firstEMModule_, lastEMModule_, firstHADModule_, lastHADModule_;
00059    
00060   bool isExcluded(const HcalCastorDetId& id) const;
00061   
00062   int firstEMModule() const {return firstEMModule_;}
00063   int firstHADModule() const {return firstHADModule_;}  
00064   int lastEMModule()  const {return lastEMModule_;}
00065   int lastHADModule() const {return lastHADModule_;}  
00066 
00067 };
00068 
00069 
00070 #endif
00071 

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