test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
EcalBarrelHardcodedTopology Class Referencefinal

#include <EcalBarrelHardcodedTopology.h>

Inheritance diagram for EcalBarrelHardcodedTopology:
CaloSubdetectorTopology

Public Member Functions

virtual std::vector< DetIddown (const DetId &) const
 
virtual std::vector< DetIdeast (const DetId &id) const
 
 EcalBarrelHardcodedTopology ()
 create a new Topology More...
 
virtual DetId goEast (const DetId &id) const
 move the Topology east (negative ieta) More...
 
virtual DetId goNorth (const DetId &id) const
 move the Topology north (increment iphi) More...
 
virtual DetId goSouth (const DetId &id) const
 move the Topology south (decrement iphi) More...
 
virtual DetId goWest (const DetId &id) const
 move the Topology west (positive ieta) More...
 
virtual std::vector< DetIdnorth (const DetId &id) const
 
virtual std::vector< DetIdsouth (const DetId &id) const
 
virtual std::vector< DetIdup (const DetId &) const
 
virtual std::vector< DetIdwest (const DetId &id) const
 
virtual ~EcalBarrelHardcodedTopology ()
 
- Public Member Functions inherited from CaloSubdetectorTopology
 CaloSubdetectorTopology ()
 standard constructor More...
 
virtual DetId denseId2detId (unsigned int) const
 return a linear packed id More...
 
virtual bool denseIdConsistent (int topoVer) const
 return whether this topology is consistent with the numbering in the given topology More...
 
virtual unsigned int detId2denseId (const DetId &) const
 return a linear packed id More...
 
virtual std::vector< DetIdgetAllNeighbours (const DetId &id) const
 
virtual std::vector< DetIdgetNeighbours (const DetId &id, const CaloDirection &dir) const
 
virtual std::vector< DetIdgetWindow (const DetId &id, const int &northSouthSize, const int &eastWestSize) const
 
virtual DetId goDown (const DetId &id) const
 
virtual DetId goUp (const DetId &id) const
 
virtual unsigned int ncells () const
 return a count of valid cells (for dense indexing use) More...
 
virtual int topoVersion () const
 return a version which identifies the given topology More...
 
virtual bool valid (const DetId &) const
 is this detid present in the Topology? More...
 
virtual ~CaloSubdetectorTopology ()
 virtual destructor More...
 

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) More...
 
EBDetId decrementIphi (const EBDetId &) const
 move the nagivator to smaller iphi (wraps around the barrel) More...
 
EBDetId incrementIeta (const EBDetId &) const
 move the nagivator to larger ieta (more positive z) (stops at end of barrel and returns null) More...
 
EBDetId incrementIphi (const EBDetId &) const
 move the nagivator to larger iphi (wraps around the barrel) More...
 

Additional Inherited Members

- Protected Types inherited from CaloSubdetectorTopology
typedef std::pair< int, int > Coordinate
 
- Protected Member Functions inherited from CaloSubdetectorTopology
Coordinate getNeighbourIndex (const Coordinate &coord, const CaloDirection &dir) const
 

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.

14 {};
virtual EcalBarrelHardcodedTopology::~EcalBarrelHardcodedTopology ( )
inlinevirtual

Definition at line 16 of file EcalBarrelHardcodedTopology.h.

16 {};

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 goEast().

9  {
10  if (id.ieta()==-EBDetId::MAX_IETA) return EBDetId(0); // null det id
11  else if (id.ieta()==1) return EBDetId(-1,id.iphi());
12  else return EBDetId(id.ieta()-1,id.iphi());
13 }
static const int MAX_IETA
Definition: EBDetId.h:143
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 goSouth().

20  {
21  if (id.iphi()==EBDetId::MIN_IPHI) return EBDetId(id.ieta(),EBDetId::MAX_IPHI);
22  else return EBDetId(id.ieta(),id.iphi()-1);
23 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int MAX_IPHI
Definition: EBDetId.h:144
virtual std::vector<DetId> EcalBarrelHardcodedTopology::down ( const DetId id) const
inlinevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 77 of file EcalBarrelHardcodedTopology.h.

References gather_cfg::cout.

78  {
79  std::cout << "EcalBarrelHardcodedTopology::down() not yet implemented" << std::endl;
80  std::vector<DetId> vNeighborsDetId;
81  return vNeighborsDetId;
82  }
tuple cout
Definition: gather_cfg.py:145
virtual std::vector<DetId> EcalBarrelHardcodedTopology::east ( const DetId id) const
inlinevirtual

Get the neighbors of the given cell in east direction

Implements CaloSubdetectorTopology.

Definition at line 48 of file EcalBarrelHardcodedTopology.h.

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

49  {
50  EBDetId nextId=goEast(id);
51  std::vector<DetId> vNeighborsDetId;
52  if (! (nextId==EBDetId(0)))
53  vNeighborsDetId.push_back(DetId(nextId.rawId()));
54  return vNeighborsDetId;
55  }
virtual DetId goEast(const DetId &id) const
move the Topology east (negative ieta)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
Definition: DetId.h:18
virtual DetId EcalBarrelHardcodedTopology::goEast ( const DetId id) const
inlinevirtual

move the Topology east (negative ieta)

Reimplemented from CaloSubdetectorTopology.

Definition at line 45 of file EcalBarrelHardcodedTopology.h.

References decrementIeta().

Referenced by east().

45  {
46  return decrementIeta(EBDetId(id));
47  }
EBDetId decrementIeta(const EBDetId &) const
move the nagivator to smaller ieta (more negative z) (stops at end of barrel and returns null) ...
virtual DetId EcalBarrelHardcodedTopology::goNorth ( const DetId id) const
inlinevirtual

move the Topology north (increment iphi)

Reimplemented from CaloSubdetectorTopology.

Definition at line 19 of file EcalBarrelHardcodedTopology.h.

References incrementIphi().

Referenced by north().

19  {
20  return incrementIphi(EBDetId(id));
21  }
EBDetId incrementIphi(const EBDetId &) const
move the nagivator to larger iphi (wraps around the barrel)
virtual DetId EcalBarrelHardcodedTopology::goSouth ( const DetId id) const
inlinevirtual

move the Topology south (decrement iphi)

Reimplemented from CaloSubdetectorTopology.

Definition at line 32 of file EcalBarrelHardcodedTopology.h.

References decrementIphi().

Referenced by south().

32  {
33  return decrementIphi(EBDetId(id));
34  }
EBDetId decrementIphi(const EBDetId &) const
move the nagivator to smaller iphi (wraps around the barrel)
virtual DetId EcalBarrelHardcodedTopology::goWest ( const DetId id) const
inlinevirtual

move the Topology west (positive ieta)

Reimplemented from CaloSubdetectorTopology.

Definition at line 58 of file EcalBarrelHardcodedTopology.h.

References incrementIeta().

Referenced by west().

58  {
59  return incrementIeta(EBDetId(id));
60  }
EBDetId incrementIeta(const EBDetId &) const
move the nagivator to larger ieta (more positive z) (stops at end of barrel and returns null) ...
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 goWest().

3  {
4  if (id.ieta()==EBDetId::MAX_IETA) return EBDetId(0); // null det id
5  else if (id.ieta()==-1) return EBDetId(1,id.iphi());
6  else return EBDetId(id.ieta()+1,id.iphi());
7 }
static const int MAX_IETA
Definition: EBDetId.h:143
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 goNorth().

15  {
16  if (id.iphi()==EBDetId::MAX_IPHI) return EBDetId(id.ieta(),EBDetId::MIN_IPHI);
17  else return EBDetId(id.ieta(),id.iphi()+1);
18 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int MAX_IPHI
Definition: EBDetId.h:144
virtual std::vector<DetId> EcalBarrelHardcodedTopology::north ( const DetId id) const
inlinevirtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 22 of file EcalBarrelHardcodedTopology.h.

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

23  {
24  EBDetId nextId=goNorth(id);
25  std::vector<DetId> vNeighborsDetId;
26  if (! (nextId==EBDetId(0)))
27  vNeighborsDetId.push_back(DetId(nextId.rawId()));
28  return vNeighborsDetId;
29  }
virtual DetId goNorth(const DetId &id) const
move the Topology north (increment iphi)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
Definition: DetId.h:18
virtual std::vector<DetId> EcalBarrelHardcodedTopology::south ( const DetId id) const
inlinevirtual

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 35 of file EcalBarrelHardcodedTopology.h.

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

36  {
37  EBDetId nextId=goSouth(id);
38  std::vector<DetId> vNeighborsDetId;
39  if (! (nextId==EBDetId(0)))
40  vNeighborsDetId.push_back(DetId(nextId.rawId()));
41  return vNeighborsDetId;
42  }
virtual DetId goSouth(const DetId &id) const
move the Topology south (decrement iphi)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
Definition: DetId.h:18
virtual std::vector<DetId> EcalBarrelHardcodedTopology::up ( const DetId id) const
inlinevirtual

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

Implements CaloSubdetectorTopology.

Definition at line 70 of file EcalBarrelHardcodedTopology.h.

References gather_cfg::cout.

71  {
72  std::cout << "EcalBarrelHardcodedTopology::up() not yet implemented" << std::endl;
73  std::vector<DetId> vNeighborsDetId;
74  return vNeighborsDetId;
75  }
tuple cout
Definition: gather_cfg.py:145
virtual std::vector<DetId> EcalBarrelHardcodedTopology::west ( const DetId id) const
inlinevirtual

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 61 of file EcalBarrelHardcodedTopology.h.

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

62  {
63  EBDetId nextId=goWest(id);
64  std::vector<DetId> vNeighborsDetId;
65  if (! (nextId==EBDetId(0)))
66  vNeighborsDetId.push_back(DetId(nextId.rawId()));
67  return vNeighborsDetId;
68  }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
Definition: DetId.h:18
virtual DetId goWest(const DetId &id) const
move the Topology west (positive ieta)