CMS 3D CMS Logo

EcalBarrelHardcodedTopology Class Reference

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

Inheritance diagram for EcalBarrelHardcodedTopology:

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 (negative ieta)
 EcalBarrelHardcodedTopology ()
 create a new Topology
virtual std::vector< DetIdnorth (const DetId &id) const
 move the Topology north (increment iphi)
virtual std::vector< DetIdsouth (const DetId &id) const
 move the Topology south (decrement iphi)
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 (positive ieta)
virtual ~EcalBarrelHardcodedTopology ()

Private Member Functions

EBDetId decrementIeta (const EBDetId &) const
 move the nagivator to smaller ieta (more negative z) (stops at end of barrel and returns null)
EBDetId decrementIphi (const EBDetId &) const
 move the nagivator to smaller iphi (wraps around the barrel)
EBDetId incrementIeta (const EBDetId &) const
 move the nagivator to larger ieta (more positive z) (stops at end of barrel and returns null)
EBDetId incrementIphi (const EBDetId &) const
 move the nagivator to larger iphi (wraps around the barrel)


Detailed Description

Definition at line 9 of file EcalBarrelHardcodedTopology.h.


Constructor & Destructor Documentation

EcalBarrelHardcodedTopology::EcalBarrelHardcodedTopology (  )  [inline]

create a new Topology

Definition at line 14 of file EcalBarrelHardcodedTopology.h.

00014 {};

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

Definition at line 16 of file EcalBarrelHardcodedTopology.h.

00016 {};


Member Function Documentation

EBDetId EcalBarrelHardcodedTopology::decrementIeta ( const EBDetId id  )  const [private]

move the nagivator to smaller ieta (more negative z) (stops at end of barrel and returns null)

Definition at line 9 of file EcalBarrelHardcodedTopology.cc.

References EBDetId::MAX_IETA.

Referenced by east().

00009                                                                           {
00010   if (id.ieta()==-EBDetId::MAX_IETA) return EBDetId(0); // null det id
00011   else if (id.ieta()==1) return EBDetId(-1,id.iphi());
00012   else return EBDetId(id.ieta()-1,id.iphi());
00013 }

EBDetId EcalBarrelHardcodedTopology::decrementIphi ( const EBDetId id  )  const [private]

move the nagivator to smaller iphi (wraps around the barrel)

Definition at line 20 of file EcalBarrelHardcodedTopology.cc.

References EBDetId::MAX_IPHI, and EBDetId::MIN_IPHI.

Referenced by south().

00020                                                                           {
00021   if (id.iphi()==EBDetId::MIN_IPHI) return EBDetId(id.ieta(),EBDetId::MAX_IPHI);
00022   else return EBDetId(id.ieta(),id.iphi()-1);
00023 }

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

Get the neighbors of the given cell in down direction (inward).

Implements CaloSubdetectorTopology.

Definition at line 65 of file EcalBarrelHardcodedTopology.h.

References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().

00066     {
00067       std::cout << "EcalBarrelHardcodedTopology::down() not yet implemented" << std::endl; 
00068       std::vector<DetId> vNeighborsDetId;
00069       return  vNeighborsDetId;
00070     }

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

move the Topology east (negative ieta)

Implements CaloSubdetectorTopology.

Definition at line 39 of file EcalBarrelHardcodedTopology.h.

References decrementIeta(), and DetId::rawId().

00040     { 
00041       EBDetId nextId=decrementIeta(EBDetId(id));
00042       std::vector<DetId> vNeighborsDetId;
00043       if (! (nextId==EBDetId(0)))
00044         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00045       return vNeighborsDetId;
00046     }

EBDetId EcalBarrelHardcodedTopology::incrementIeta ( const EBDetId id  )  const [private]

move the nagivator to larger ieta (more positive z) (stops at end of barrel and returns null)

Definition at line 3 of file EcalBarrelHardcodedTopology.cc.

References EBDetId::MAX_IETA.

Referenced by west().

00003                                                                           {
00004   if (id.ieta()==EBDetId::MAX_IETA) return EBDetId(0); // null det id
00005   else if (id.ieta()==-1) return EBDetId(1,id.iphi());
00006   else return EBDetId(id.ieta()+1,id.iphi());
00007 }

EBDetId EcalBarrelHardcodedTopology::incrementIphi ( const EBDetId id  )  const [private]

move the nagivator to larger iphi (wraps around the barrel)

Definition at line 15 of file EcalBarrelHardcodedTopology.cc.

References EBDetId::MAX_IPHI, and EBDetId::MIN_IPHI.

Referenced by north().

00015                                                                           {
00016   if (id.iphi()==EBDetId::MAX_IPHI) return EBDetId(id.ieta(),EBDetId::MIN_IPHI);
00017   else return EBDetId(id.ieta(),id.iphi()+1);
00018 }

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

move the Topology north (increment iphi)

Implements CaloSubdetectorTopology.

Definition at line 19 of file EcalBarrelHardcodedTopology.h.

References incrementIphi(), and DetId::rawId().

00020     { 
00021       EBDetId nextId=incrementIphi(EBDetId(id));
00022       std::vector<DetId> vNeighborsDetId;
00023       if (! (nextId==EBDetId(0)))
00024         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00025       return vNeighborsDetId;
00026     }

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

move the Topology south (decrement iphi)

Implements CaloSubdetectorTopology.

Definition at line 29 of file EcalBarrelHardcodedTopology.h.

References decrementIphi(), and DetId::rawId().

00030     { 
00031       EBDetId nextId=decrementIphi(EBDetId(id));
00032       std::vector<DetId> vNeighborsDetId;
00033       if (! (nextId==EBDetId(0)))
00034         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00035       return vNeighborsDetId;
00036     }

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

Get the neighbors of the given cell in up direction (outward).

Implements CaloSubdetectorTopology.

Definition at line 58 of file EcalBarrelHardcodedTopology.h.

References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().

00059     {
00060       std::cout << "EcalBarrelHardcodedTopology::up() not yet implemented" << std::endl; 
00061       std::vector<DetId> vNeighborsDetId;
00062       return  vNeighborsDetId;
00063     }

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

move the Topology west (positive ieta)

Implements CaloSubdetectorTopology.

Definition at line 49 of file EcalBarrelHardcodedTopology.h.

References incrementIeta(), and DetId::rawId().

00050     { 
00051       EBDetId nextId=incrementIeta(EBDetId(id));
00052       std::vector<DetId> vNeighborsDetId;
00053       if (! (nextId==EBDetId(0)))
00054         vNeighborsDetId.push_back(DetId(nextId.rawId()));
00055       return vNeighborsDetId;
00056     }


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