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 bool validRaw(const HcalCastorDetId& id) const;
00031
00033 virtual std::vector<DetId> incSector(const DetId& id) const;
00034
00036 virtual std::vector<DetId> incModule(const DetId& id) const;
00037
00038
00039 virtual std::vector<DetId> east(const DetId& id) const;
00040 virtual std::vector<DetId> west(const DetId& id) const;
00041 virtual std::vector<DetId> north(const DetId& id) const;
00042 virtual std::vector<DetId> south(const DetId& id) const;
00043 virtual std::vector<DetId> up(const DetId& id) const;
00044 virtual std::vector<DetId> down(const DetId& id) const;
00045
00046
00047 int ncells(HcalCastorDetId::Section section) const;
00048
00049
00050 int firstCell(HcalCastorDetId::Section section)const;
00051 int lastCell(HcalCastorDetId::Section section)const;
00052
00053 private:
00054
00055 std::vector<HcalCastorDetId> exclusionList_;
00056
00057 bool excludeEM_, excludeHAD_, excludeZP_, excludeZN_;
00058
00059 int firstEMModule_, lastEMModule_, firstHADModule_, lastHADModule_;
00060
00061 bool isExcluded(const HcalCastorDetId& id) const;
00062
00063 int firstEMModule() const {return firstEMModule_;}
00064 int firstHADModule() const {return firstHADModule_;}
00065 int lastEMModule() const {return lastEMModule_;}
00066 int lastHADModule() const {return lastHADModule_;}
00067
00068 };
00069
00070
00071 #endif
00072