CMS 3D CMS Logo

EcalEndcapTopology Class Reference

#include <Geometry/CaloTopology/interface/EcalEndcapTopology.h>

Inheritance diagram for EcalEndcapTopology:

CaloSubdetectorTopology

List of all members.

Public Member Functions

virtual std::vector< DetIddown (const DetId &id) const
 Get the neighbors of the given cell in down direction (inward).
virtual std::vector< DetIdeast (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< DetIdnorth (const DetId &id) const
 move the Topology north (increment iy)
virtual std::vector< DetIdsouth (const DetId &id) const
 move the Topology south (decrement iy)
virtual std::vector< DetIdup (const DetId &id) const
 Get the neighbors of the given cell in up direction (outward).
virtual std::vector< DetIdwest (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< CaloGeometrytheGeom_


Detailed Description

Definition at line 11 of file EcalEndcapTopology.h.


Constructor & Destructor Documentation

EcalEndcapTopology::EcalEndcapTopology (  )  [inline]

create a new Topology

Definition at line 15 of file EcalEndcapTopology.h.

00015 : theGeom_(0) {};

virtual EcalEndcapTopology::~EcalEndcapTopology (  )  [inline, virtual]

virtual destructor

Definition at line 18 of file EcalEndcapTopology.h.

00018 { }  

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     }


Member Function Documentation

EEDetId EcalEndcapTopology::decrementIx ( const EEDetId id  )  const [private]

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 } 

EEDetId EcalEndcapTopology::decrementIy ( const EEDetId id  )  const [private]

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 } 

virtual std::vector<DetId> EcalEndcapTopology::down ( const DetId id  )  const [inline, virtual]

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     }

virtual std::vector<DetId> EcalEndcapTopology::east ( const DetId id  )  const [inline, virtual]

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     }

EEDetId EcalEndcapTopology::incrementIx ( const EEDetId id  )  const [private]

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 } 

EEDetId EcalEndcapTopology::incrementIy ( const EEDetId id  )  const [private]

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 } 

virtual std::vector<DetId> EcalEndcapTopology::north ( const DetId id  )  const [inline, virtual]

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     }

virtual std::vector<DetId> EcalEndcapTopology::south ( const DetId id  )  const [inline, virtual]

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     }

virtual std::vector<DetId> EcalEndcapTopology::up ( const DetId id  )  const [inline, virtual]

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     }

virtual std::vector<DetId> EcalEndcapTopology::west ( const DetId id  )  const [inline, virtual]

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     }


Member Data Documentation

edm::ESHandle<CaloGeometry> EcalEndcapTopology::theGeom_ [private]

Definition at line 93 of file EcalEndcapTopology.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:32 2009 for CMSSW by  doxygen 1.5.4