CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Geometry/CaloTopology/interface/EcalEndcapHardcodedTopology.h

Go to the documentation of this file.
00001 #ifndef GEOMETRY_CALOTOPOLOGY_ECALENDCAPHARDCODEDTOPOLOGY_H
00002 #define GEOMETRY_CALOTOPOLOGY_ECALENDCAPHARDCODEDTOPOLOGY_H 1
00003 
00004 #include <vector>
00005 #include <iostream>
00006 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00007 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00008 
00009 class EcalEndcapHardcodedTopology : public CaloSubdetectorTopology
00010 {
00011 
00012  public:
00014   EcalEndcapHardcodedTopology() {};
00015 
00016   virtual ~EcalEndcapHardcodedTopology() {};
00017   
00019   virtual std::vector<DetId> north(const DetId& id) const
00020     { 
00021       EEDetId nextId=incrementIy(EEDetId(id));
00022       std::vector<DetId> vNeighborsDetId;
00023       if (! (nextId==EEDetId(0)))
00024         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00025       return vNeighborsDetId;
00026     }
00027 
00029   virtual std::vector<DetId> south(const DetId& id) const
00030     { 
00031       EEDetId nextId=decrementIy(EEDetId(id));
00032       std::vector<DetId> vNeighborsDetId;
00033       if (! (nextId==EEDetId(0)))
00034         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00035       return vNeighborsDetId;
00036     }
00037 
00039   virtual std::vector<DetId> east(const DetId& id) const
00040     { 
00041       EEDetId nextId=incrementIx(EEDetId(id));
00042       std::vector<DetId> vNeighborsDetId;
00043       if (! (nextId==EEDetId(0)))
00044         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00045       return vNeighborsDetId;
00046     }
00047 
00049   virtual std::vector<DetId> west(const DetId& id) const
00050     { 
00051       EEDetId nextId=decrementIx(EEDetId(id));
00052       std::vector<DetId> vNeighborsDetId;
00053       if (! (nextId==EEDetId(0)))
00054         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00055       return vNeighborsDetId;
00056     }
00057   
00058   virtual std::vector<DetId> up(const DetId& id) const
00059     {
00060       std::cout << "EcalEndcapHardcodedTopology::up() not yet implemented" << std::endl; 
00061       std::vector<DetId> vNeighborsDetId;
00062       return  vNeighborsDetId;
00063     }
00064   
00065   virtual std::vector<DetId> down(const DetId& id) const
00066     {
00067       std::cout << "EcalEndcapHardcodedTopology::down() not yet implemented" << std::endl; 
00068       std::vector<DetId> vNeighborsDetId;
00069       return  vNeighborsDetId;
00070     }
00071 
00072  private:
00073 
00075   EEDetId incrementIx(const EEDetId&) const ;
00076 
00078   EEDetId decrementIx(const EEDetId&) const ;
00079 
00081   EEDetId incrementIy(const EEDetId&) const ;
00082 
00084   EEDetId decrementIy(const EEDetId&) const;
00085 
00086 };
00087 
00088 #endif