![]() |
![]() |
#include <Geometry/CaloTopology/interface/EcalPreshowerTopology.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) | |
EcalPreshowerTopology (edm::ESHandle< CaloGeometry > theGeom) | |
create a new Topology from geometry | |
EcalPreshowerTopology () | |
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 | ~EcalPreshowerTopology () |
virtual destructor | |
Private Member Functions | |
ESDetId | decrementIx (const ESDetId &id) const |
move the nagivator to smaller ix | |
ESDetId | decrementIy (const ESDetId &id) const |
move the nagivator to smaller iy | |
ESDetId | decrementIz (const ESDetId &id) const |
move the nagivator to smaller iz | |
ESDetId | incrementIx (const ESDetId &id) const |
move the nagivator to larger ix | |
ESDetId | incrementIy (const ESDetId &id) const |
move the nagivator to larger iy | |
ESDetId | incrementIz (const ESDetId &id) const |
move the nagivator to larger iz | |
Private Attributes | |
edm::ESHandle< CaloGeometry > | theGeom_ |
Definition at line 11 of file EcalPreshowerTopology.h.
EcalPreshowerTopology::EcalPreshowerTopology | ( | ) | [inline] |
create a new Topology
Definition at line 15 of file EcalPreshowerTopology.h.
00015 : theGeom_(0) {};
virtual EcalPreshowerTopology::~EcalPreshowerTopology | ( | ) | [inline, virtual] |
EcalPreshowerTopology::EcalPreshowerTopology | ( | edm::ESHandle< CaloGeometry > | theGeom | ) | [inline] |
create a new Topology from geometry
Definition at line 21 of file EcalPreshowerTopology.h.
00021 : theGeom_(theGeom) 00022 { 00023 }
move the nagivator to smaller ix
Definition at line 143 of file EcalPreshowerTopology.cc.
References DetId::Ecal, EcalPreshower, strip(), and ESDetId::validDetId().
Referenced by west().
00143 { 00144 00145 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) 00146 { 00147 return ESDetId(0); 00148 } 00149 ESDetId nextPoint; 00150 //Strips orientend along x direction for plane 2 00151 if (id.plane() == 2) 00152 { 00153 //Changing wafer 00154 if (ESDetId::validDetId(id.strip(),id.six()-1,id.siy(),id.plane(),id.zside())) 00155 nextPoint=ESDetId(id.strip(),id.six()-1,id.siy(),id.plane(),id.zside()); 00156 else 00157 return ESDetId(0); 00158 } 00159 //Strips orientend along y direction for plane 1 00160 else if (id.plane() == 1) 00161 { 00162 if (id.strip() > 1 ) 00163 { 00164 //Decrementing just strip number 00165 if (ESDetId::validDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside())) 00166 nextPoint=ESDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside()); 00167 else 00168 return ESDetId(0); 00169 } 00170 else 00171 { 00172 //Changing wafer 00173 if (ESDetId::validDetId(32,id.six()-1,id.siy(),id.plane(),id.zside())) 00174 nextPoint=ESDetId(32,id.six()-1,id.siy(),id.plane(),id.zside()); 00175 else 00176 return ESDetId(0); 00177 } 00178 } 00179 else 00180 return ESDetId(0); 00181 00182 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) 00183 return nextPoint; 00184 else 00185 return ESDetId(0); 00186 }
move the nagivator to smaller iy
Definition at line 51 of file EcalPreshowerTopology.cc.
References DetId::Ecal, EcalPreshower, strip(), and ESDetId::validDetId().
Referenced by south().
00051 { 00052 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) 00053 { 00054 return ESDetId(0); 00055 } 00056 ESDetId nextPoint; 00057 //Strips orientend along x direction for plane 2 00058 if (id.plane() == 2) 00059 { 00060 if (id.strip() >1 ) 00061 { 00062 //Decrementing just strip number 00063 if (ESDetId::validDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside())) 00064 nextPoint=ESDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside()); 00065 else 00066 return ESDetId(0); 00067 } 00068 else 00069 { 00070 //Changing wafer 00071 if (ESDetId::validDetId(32,id.six(),id.siy()-1,id.plane(),id.zside())) 00072 nextPoint=ESDetId(32,id.six(),id.siy()-1,id.plane(),id.zside()); 00073 else 00074 return ESDetId(0); 00075 } 00076 } 00077 //Strips orientend along y direction for plane 1 00078 else if (id.plane() == 1) 00079 { 00080 //Changing wafer 00081 if (ESDetId::validDetId(id.strip(),id.six(),id.siy()-1,id.plane(),id.zside())) 00082 nextPoint=ESDetId(id.strip(),id.six(),id.siy()-1,id.plane(),id.zside()); 00083 else 00084 return ESDetId(0); 00085 } 00086 else 00087 return ESDetId(0); 00088 00089 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) 00090 return nextPoint; 00091 else 00092 return ESDetId(0); 00093 }
move the nagivator to smaller iz
Definition at line 209 of file EcalPreshowerTopology.cc.
References DetId::Ecal, EcalPreshower, strip(), and ESDetId::validDetId().
Referenced by down().
00209 { 00210 00211 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) 00212 { 00213 return ESDetId(0); 00214 } 00215 ESDetId nextPoint; 00216 if (ESDetId::validDetId(id.strip(),id.six(),id.siy(),id.plane()-1,id.zside())) 00217 nextPoint=ESDetId(id.strip(),id.six(),id.siy(),id.plane()-1,id.zside()); 00218 else 00219 return ESDetId(0); 00220 00221 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) 00222 return nextPoint; 00223 else 00224 return ESDetId(0); 00225 }
Get the neighbors of the given cell in down direction (inward).
Implements CaloSubdetectorTopology.
Definition at line 74 of file EcalPreshowerTopology.h.
References decrementIz(), and DetId::rawId().
00075 { 00076 ESDetId nextId=decrementIz(ESDetId(id)); 00077 std::vector<DetId> vNeighborsDetId; 00078 if (! (nextId==ESDetId(0))) 00079 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00080 return vNeighborsDetId; 00081 }
move the Topology east (positive ix)
Implements CaloSubdetectorTopology.
Definition at line 46 of file EcalPreshowerTopology.h.
References incrementIx(), and DetId::rawId().
00047 { 00048 ESDetId nextId=incrementIx(ESDetId(id)); 00049 std::vector<DetId> vNeighborsDetId; 00050 if (! (nextId==ESDetId(0))) 00051 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00052 return vNeighborsDetId; 00053 }
move the nagivator to larger ix
Definition at line 96 of file EcalPreshowerTopology.cc.
References DetId::Ecal, EcalPreshower, strip(), and ESDetId::validDetId().
Referenced by east().
00096 { 00097 00098 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) 00099 { 00100 return ESDetId(0); 00101 } 00102 ESDetId nextPoint; 00103 00104 //Strips orientend along x direction for plane 2 00105 if (id.plane() == 2) 00106 { 00107 //Changing wafer 00108 if (ESDetId::validDetId(id.strip(),id.six()+1,id.siy(),id.plane(),id.zside())) 00109 nextPoint=ESDetId(id.strip(),id.six()+1,id.siy(),id.plane(),id.zside()); 00110 else 00111 return ESDetId(0); 00112 } 00113 //Strips orientend along y direction for plane 1 00114 else if (id.plane() == 1) 00115 { 00116 if (id.strip() < 32 ) 00117 { 00118 //Incrementing just strip number 00119 if (ESDetId::validDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside())) 00120 nextPoint=ESDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside()); 00121 else 00122 return ESDetId(0); 00123 } 00124 else 00125 { 00126 //Changing wafer 00127 if (ESDetId::validDetId(1,id.six()+1,id.siy(),id.plane(),id.zside())) 00128 nextPoint=ESDetId(1,id.six()+1,id.siy(),id.plane(),id.zside()); 00129 else 00130 return ESDetId(0); 00131 } 00132 } 00133 else 00134 return ESDetId(0); 00135 00136 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) 00137 return nextPoint; 00138 else 00139 return ESDetId(0); 00140 }
move the nagivator to larger iy
Definition at line 5 of file EcalPreshowerTopology.cc.
References DetId::Ecal, EcalPreshower, strip(), and ESDetId::validDetId().
Referenced by north().
00005 { 00006 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) 00007 { 00008 return ESDetId(0); 00009 } 00010 00011 ESDetId nextPoint; 00012 //Strips orientend along x direction for plane 2 00013 if (id.plane() == 2) 00014 { 00015 if (id.strip() < 32 ) 00016 { 00017 //Incrementing just strip number 00018 if (ESDetId::validDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside())) 00019 nextPoint=ESDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside()); 00020 else 00021 return ESDetId(0); 00022 } 00023 else 00024 { 00025 //Changing wafer 00026 if (ESDetId::validDetId(1,id.six(),id.siy()+1,id.plane(),id.zside())) 00027 nextPoint=ESDetId(1,id.six(),id.siy()+1,id.plane(),id.zside()); 00028 else 00029 return ESDetId(0); 00030 } 00031 } 00032 //Strips orientend along y direction for plane 1 00033 else if (id.plane() == 1) 00034 { 00035 //Changing wafer 00036 if (ESDetId::validDetId(id.strip(),id.six(),id.siy()+1,id.plane(),id.zside())) 00037 nextPoint=ESDetId(id.strip(),id.six(),id.siy()+1,id.plane(),id.zside()); 00038 else 00039 return ESDetId(0); 00040 } 00041 else 00042 return ESDetId(0); 00043 00044 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) 00045 return nextPoint; 00046 else 00047 return ESDetId(0); 00048 }
move the nagivator to larger iz
Definition at line 189 of file EcalPreshowerTopology.cc.
References DetId::Ecal, EcalPreshower, strip(), and ESDetId::validDetId().
Referenced by up().
00189 { 00190 00191 if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) 00192 { 00193 return ESDetId(0); 00194 } 00195 ESDetId nextPoint; 00196 if (ESDetId::validDetId(id.strip(),id.six(),id.siy(),id.plane()+1,id.zside())) 00197 nextPoint=ESDetId(id.strip(),id.six(),id.siy(),id.plane()+1,id.zside()); 00198 else 00199 return ESDetId(0); 00200 00201 if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) 00202 return nextPoint; 00203 else 00204 return ESDetId(0); 00205 }
virtual std::vector<DetId> EcalPreshowerTopology::north | ( | const DetId & | id | ) | const [inline, virtual] |
move the Topology north (increment iy)
Implements CaloSubdetectorTopology.
Definition at line 26 of file EcalPreshowerTopology.h.
References incrementIy(), and DetId::rawId().
00027 { 00028 ESDetId nextId=incrementIy(ESDetId(id)); 00029 std::vector<DetId> vNeighborsDetId; 00030 if (! (nextId==ESDetId(0))) 00031 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00032 return vNeighborsDetId; 00033 }
virtual std::vector<DetId> EcalPreshowerTopology::south | ( | const DetId & | id | ) | const [inline, virtual] |
move the Topology south (decrement iy)
Implements CaloSubdetectorTopology.
Definition at line 36 of file EcalPreshowerTopology.h.
References decrementIy(), and DetId::rawId().
00037 { 00038 ESDetId nextId=decrementIy(ESDetId(id)); 00039 std::vector<DetId> vNeighborsDetId; 00040 if (! (nextId==ESDetId(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 EcalPreshowerTopology.h.
References incrementIz(), and DetId::rawId().
00066 { 00067 ESDetId nextId=incrementIz(ESDetId(id)); 00068 std::vector<DetId> vNeighborsDetId; 00069 if (! (nextId==ESDetId(0))) 00070 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00071 return vNeighborsDetId; 00072 }
move the Topology west (negative ix)
Implements CaloSubdetectorTopology.
Definition at line 56 of file EcalPreshowerTopology.h.
References decrementIx(), and DetId::rawId().
00057 { 00058 ESDetId nextId=decrementIx(ESDetId(id)); 00059 std::vector<DetId> vNeighborsDetId; 00060 if (! (nextId==ESDetId(0))) 00061 vNeighborsDetId.push_back(DetId(nextId.rawId())); 00062 return vNeighborsDetId; 00063 }
Definition at line 103 of file EcalPreshowerTopology.h.