#include <Geometry/CaloTopology/interface/EcalEndcapTopology.h>
Public Member Functions | |
virtual std::vector< DetId > | down (const DetId &id) const |
Get the neighbors of the given cell in down direction (inward). | |
virtual std::vector< DetId > | east (const DetId &id) const |
move the Topology east (positive ix) | |
EcalEndcapTopology (edm::ESHandle< CaloGeometry > theGeom) | |
create a new Topology from geometry | |
EcalEndcapTopology () | |
create a new Topology | |
virtual std::vector< DetId > | north (const DetId &id) const |
move the Topology north (increment iy) | |
virtual std::vector< DetId > | south (const DetId &id) const |
move the Topology south (decrement iy) | |
virtual std::vector< DetId > | up (const DetId &id) const |
Get the neighbors of the given cell in up direction (outward). | |
virtual std::vector< DetId > | west (const DetId &id) const |
move the Topology west (negative ix) | |
virtual | ~EcalEndcapTopology () |
virtual destructor | |
Private Member Functions | |
EEDetId | decrementIx (const EEDetId &id) const |
move the nagivator to smaller ix | |
EEDetId | decrementIy (const EEDetId &id) const |
move the nagivator to smaller iy | |
EEDetId | incrementIx (const EEDetId &id) const |
move the nagivator to larger ix | |
EEDetId | incrementIy (const EEDetId &id) const |
move the nagivator to larger iy | |
Private Attributes | |
edm::ESHandle< CaloGeometry > | theGeom_ |
Definition at line 11 of file EcalEndcapTopology.h.
EcalEndcapTopology::EcalEndcapTopology | ( | ) | [inline] |
virtual EcalEndcapTopology::~EcalEndcapTopology | ( | ) | [inline, virtual] |
EcalEndcapTopology::EcalEndcapTopology | ( | edm::ESHandle< CaloGeometry > | theGeom | ) | [inline] |
create a new Topology from geometry
Definition at line 21 of file EcalEndcapTopology.h.
00021 : theGeom_(theGeom) 00022 { 00023 }
move the nagivator to smaller ix
Definition at line 62 of file EcalEndcapTopology.cc.
References DetId::Ecal, EcalEndcap, and EEDetId::validDetId().
Referenced by west().
00062 { 00063 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(id)) 00064 { 00065 return EEDetId(0); 00066 } 00067 00068 EEDetId nextPoint; 00069 00070 if (EEDetId::validDetId(id.ix()-1,id.iy(),id.zside())) 00071 nextPoint=EEDetId(id.ix()-1,id.iy(),id.zside()); 00072 else 00073 return EEDetId(0); 00074 00075 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(nextPoint)) 00076 return nextPoint; 00077 else 00078 return EEDetId(0); 00079 }
move the nagivator to smaller iy
Definition at line 23 of file EcalEndcapTopology.cc.
References DetId::Ecal, EcalEndcap, and EEDetId::validDetId().
Referenced by south().
00023 { 00024 00025 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(id)) 00026 { 00027 return EEDetId(0); 00028 } 00029 EEDetId nextPoint; 00030 if (EEDetId::validDetId(id.ix(),id.iy()-1,id.zside())) 00031 nextPoint=EEDetId(id.ix(),id.iy()-1,id.zside()); 00032 else 00033 return EEDetId(0); 00034 00035 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(nextPoint)) 00036 return nextPoint; 00037 else 00038 return EEDetId(0); 00039 }
Get the neighbors of the given cell in down direction (inward).
Implements CaloSubdetectorTopology.
Definition at line 72 of file EcalEndcapTopology.h.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
00073 { 00074 std::cout << "EcalBarrelTopology::down() not yet implemented" << std::endl; 00075 std::vector<DetId> vNeighborsDetId; 00076 return vNeighborsDetId; 00077 }
move the Topology east (positive ix)
Implements CaloSubdetectorTopology.
Definition at line 46 of file EcalEndcapTopology.h.
References incrementIx(), and DetId::rawId().
00047 { 00048 EEDetId nextId=incrementIx(EEDetId(id)); 00049 std::vector<DetId> vNeighborsDetId; 00050 if (! (nextId==EEDetId(0))) 00051 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00052 return vNeighborsDetId; 00053 }
move the nagivator to larger ix
Definition at line 42 of file EcalEndcapTopology.cc.
References DetId::Ecal, EcalEndcap, and EEDetId::validDetId().
Referenced by east().
00042 { 00043 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(id)) 00044 { 00045 return EEDetId(0); 00046 } 00047 00048 00049 EEDetId nextPoint; 00050 if (EEDetId::validDetId(id.ix()+1,id.iy(),id.zside())) 00051 nextPoint=EEDetId(id.ix()+1,id.iy(),id.zside()); 00052 else 00053 return EEDetId(0); 00054 00055 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(nextPoint)) 00056 return nextPoint; 00057 else 00058 return EEDetId(0); 00059 }
move the nagivator to larger iy
Definition at line 5 of file EcalEndcapTopology.cc.
References DetId::Ecal, EcalEndcap, and EEDetId::validDetId().
Referenced by north().
00005 { 00006 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(id)) 00007 { 00008 return EEDetId(0); 00009 } 00010 EEDetId nextPoint; 00011 if (EEDetId::validDetId(id.ix(),id.iy()+1,id.zside())) 00012 nextPoint=EEDetId(id.ix(),id.iy()+1,id.zside()); 00013 else 00014 return EEDetId(0); 00015 00016 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalEndcap)->present(nextPoint)) 00017 return nextPoint; 00018 else 00019 return EEDetId(0); 00020 }
move the Topology north (increment iy)
Implements CaloSubdetectorTopology.
Definition at line 26 of file EcalEndcapTopology.h.
References incrementIy(), and DetId::rawId().
00027 { 00028 EEDetId nextId=incrementIy(EEDetId(id)); 00029 std::vector<DetId> vNeighborsDetId; 00030 if (! (nextId==EEDetId(0))) 00031 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00032 return vNeighborsDetId; 00033 }
move the Topology south (decrement iy)
Implements CaloSubdetectorTopology.
Definition at line 36 of file EcalEndcapTopology.h.
References decrementIy(), and DetId::rawId().
00037 { 00038 EEDetId nextId=decrementIy(EEDetId(id)); 00039 std::vector<DetId> vNeighborsDetId; 00040 if (! (nextId==EEDetId(0))) 00041 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00042 return vNeighborsDetId; 00043 }
Get the neighbors of the given cell in up direction (outward).
Implements CaloSubdetectorTopology.
Definition at line 65 of file EcalEndcapTopology.h.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
00066 { 00067 std::cout << "EcalBarrelTopology::up() not yet implemented" << std::endl; 00068 std::vector<DetId> vNeighborsDetId; 00069 return vNeighborsDetId; 00070 }
move the Topology west (negative ix)
Implements CaloSubdetectorTopology.
Definition at line 56 of file EcalEndcapTopology.h.
References decrementIx(), and DetId::rawId().
00057 { 00058 EEDetId nextId=decrementIx(EEDetId(id)); 00059 std::vector<DetId> vNeighborsDetId; 00060 if (! (nextId==EEDetId(0))) 00061 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00062 return vNeighborsDetId; 00063 }
Definition at line 93 of file EcalEndcapTopology.h.