#include <EcalPreshowerTopology.h>
Public Member Functions | |
virtual std::vector< DetId > | down (const DetId &id) const |
virtual std::vector< DetId > | east (const DetId &id) const |
move the Topology east (positive ix) | |
EcalPreshowerTopology () | |
create a new Topology | |
EcalPreshowerTopology (edm::ESHandle< CaloGeometry > theGeom) | |
create a new Topology from geometry | |
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 |
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] |
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.
: theGeom_(theGeom) { }
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().
{ if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) { return ESDetId(0); } ESDetId nextPoint; //Strips orientend along x direction for plane 2 if (id.plane() == 2) { //Changing wafer if (ESDetId::validDetId(id.strip(),id.six()-1,id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(id.strip(),id.six()-1,id.siy(),id.plane(),id.zside()); else return ESDetId(0); } //Strips orientend along y direction for plane 1 else if (id.plane() == 1) { if (id.strip() > 1 ) { //Decrementing just strip number if (ESDetId::validDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside()); else return ESDetId(0); } else { //Changing wafer if (ESDetId::validDetId(32,id.six()-1,id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(32,id.six()-1,id.siy(),id.plane(),id.zside()); else return ESDetId(0); } } else return ESDetId(0); if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) return nextPoint; else return ESDetId(0); }
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().
{ if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) { return ESDetId(0); } ESDetId nextPoint; //Strips orientend along x direction for plane 2 if (id.plane() == 2) { if (id.strip() >1 ) { //Decrementing just strip number if (ESDetId::validDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(id.strip()-1,id.six(),id.siy(),id.plane(),id.zside()); else return ESDetId(0); } else { //Changing wafer if (ESDetId::validDetId(32,id.six(),id.siy()-1,id.plane(),id.zside())) nextPoint=ESDetId(32,id.six(),id.siy()-1,id.plane(),id.zside()); else return ESDetId(0); } } //Strips orientend along y direction for plane 1 else if (id.plane() == 1) { //Changing wafer if (ESDetId::validDetId(id.strip(),id.six(),id.siy()-1,id.plane(),id.zside())) nextPoint=ESDetId(id.strip(),id.six(),id.siy()-1,id.plane(),id.zside()); else return ESDetId(0); } else return ESDetId(0); if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) return nextPoint; else return ESDetId(0); }
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().
{ if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) { return ESDetId(0); } ESDetId nextPoint; if (ESDetId::validDetId(id.strip(),id.six(),id.siy(),id.plane()-1,id.zside())) nextPoint=ESDetId(id.strip(),id.six(),id.siy(),id.plane()-1,id.zside()); else return ESDetId(0); if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) return nextPoint; else return ESDetId(0); }
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().
move the Topology east (positive ix)
Implements CaloSubdetectorTopology.
Definition at line 46 of file EcalPreshowerTopology.h.
References incrementIx(), and DetId::rawId().
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().
{ if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) { return ESDetId(0); } ESDetId nextPoint; //Strips orientend along x direction for plane 2 if (id.plane() == 2) { //Changing wafer if (ESDetId::validDetId(id.strip(),id.six()+1,id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(id.strip(),id.six()+1,id.siy(),id.plane(),id.zside()); else return ESDetId(0); } //Strips orientend along y direction for plane 1 else if (id.plane() == 1) { if (id.strip() < 32 ) { //Incrementing just strip number if (ESDetId::validDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside()); else return ESDetId(0); } else { //Changing wafer if (ESDetId::validDetId(1,id.six()+1,id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(1,id.six()+1,id.siy(),id.plane(),id.zside()); else return ESDetId(0); } } else return ESDetId(0); if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) return nextPoint; else return ESDetId(0); }
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().
{ if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) { return ESDetId(0); } ESDetId nextPoint; //Strips orientend along x direction for plane 2 if (id.plane() == 2) { if (id.strip() < 32 ) { //Incrementing just strip number if (ESDetId::validDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside())) nextPoint=ESDetId(id.strip()+1,id.six(),id.siy(),id.plane(),id.zside()); else return ESDetId(0); } else { //Changing wafer if (ESDetId::validDetId(1,id.six(),id.siy()+1,id.plane(),id.zside())) nextPoint=ESDetId(1,id.six(),id.siy()+1,id.plane(),id.zside()); else return ESDetId(0); } } //Strips orientend along y direction for plane 1 else if (id.plane() == 1) { //Changing wafer if (ESDetId::validDetId(id.strip(),id.six(),id.siy()+1,id.plane(),id.zside())) nextPoint=ESDetId(id.strip(),id.six(),id.siy()+1,id.plane(),id.zside()); else return ESDetId(0); } else return ESDetId(0); if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) return nextPoint; else return ESDetId(0); }
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().
{ if (!(*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(id)) { return ESDetId(0); } ESDetId nextPoint; if (ESDetId::validDetId(id.strip(),id.six(),id.siy(),id.plane()+1,id.zside())) nextPoint=ESDetId(id.strip(),id.six(),id.siy(),id.plane()+1,id.zside()); else return ESDetId(0); if ((*theGeom_).getSubdetectorGeometry(DetId::Ecal,EcalPreshower)->present(nextPoint)) return nextPoint; else return ESDetId(0); }
move the Topology north (increment iy)
Implements CaloSubdetectorTopology.
Definition at line 26 of file EcalPreshowerTopology.h.
References incrementIy(), and DetId::rawId().
move the Topology south (decrement iy)
Implements CaloSubdetectorTopology.
Definition at line 36 of file EcalPreshowerTopology.h.
References decrementIy(), and DetId::rawId().
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().
move the Topology west (negative ix)
Implements CaloSubdetectorTopology.
Definition at line 56 of file EcalPreshowerTopology.h.
References decrementIx(), and DetId::rawId().
Definition at line 103 of file EcalPreshowerTopology.h.