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
EcalEndcapHardcodedTopology Class Reference

#include <EcalEndcapHardcodedTopology.h>

Inheritance diagram for EcalEndcapHardcodedTopology:
CaloSubdetectorTopology

Public Member Functions

virtual std::vector< DetIddown (const DetId &) const
 
virtual std::vector< DetIdeast (const DetId &id) const
 
 EcalEndcapHardcodedTopology ()
 create a new Topology More...
 
virtual DetId goEast (const DetId &id) const
 move the Topology east (positive ix) More...
 
virtual DetId goNorth (const DetId &id) const
 move the Topology north (increment iy) More...
 
virtual DetId goSouth (const DetId &id) const
 move the Topology south (decrement iy) More...
 
virtual DetId goWest (const DetId &id) const
 move the Topology west (negative ix) 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 ~EcalEndcapHardcodedTopology ()
 
- 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

EEDetId decrementIx (const EEDetId &) const
 move the nagivator to smaller ix More...
 
EEDetId decrementIy (const EEDetId &) const
 move the nagivator to smaller iy More...
 
EEDetId incrementIx (const EEDetId &) const
 move the nagivator to larger ix More...
 
EEDetId incrementIy (const EEDetId &) const
 move the nagivator to larger iy 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 EcalEndcapHardcodedTopology.h.

Constructor & Destructor Documentation

EcalEndcapHardcodedTopology::EcalEndcapHardcodedTopology ( )
inline

create a new Topology

Definition at line 14 of file EcalEndcapHardcodedTopology.h.

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

Definition at line 16 of file EcalEndcapHardcodedTopology.h.

16 {};

Member Function Documentation

EEDetId EcalEndcapHardcodedTopology::decrementIx ( const EEDetId id) const
private

move the nagivator to smaller ix

Definition at line 8 of file EcalEndcapHardcodedTopology.cc.

References EEDetId::validDetId(), and ecaldqm::zside().

Referenced by goWest().

8  {
9  if (! (EEDetId::validDetId(id.ix()-1,id.iy(),id.zside()) ) ) return EEDetId(0); // null det id
10  else return EEDetId(id.ix()-1,id.iy(),id.zside());
11 }
int zside(DetId const &)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EEDetId EcalEndcapHardcodedTopology::decrementIy ( const EEDetId id) const
private

move the nagivator to smaller iy

Definition at line 18 of file EcalEndcapHardcodedTopology.cc.

References EEDetId::validDetId(), and ecaldqm::zside().

Referenced by goSouth().

18  {
19  if (! (EEDetId::validDetId(id.ix(),id.iy()-1,id.zside()) ) ) return EEDetId(0); // null det id
20  else return EEDetId(id.ix(),id.iy()-1,id.zside());
21 }
int zside(DetId const &)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
virtual std::vector<DetId> EcalEndcapHardcodedTopology::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 EcalEndcapHardcodedTopology.h.

References gather_cfg::cout.

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

Get the neighbors of the given cell in east direction

Implements CaloSubdetectorTopology.

Definition at line 48 of file EcalEndcapHardcodedTopology.h.

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

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

move the Topology east (positive ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 45 of file EcalEndcapHardcodedTopology.h.

References incrementIx().

Referenced by east().

45  {
46  return incrementIx(EEDetId(id));
47  }
EEDetId incrementIx(const EEDetId &) const
move the nagivator to larger ix
virtual DetId EcalEndcapHardcodedTopology::goNorth ( const DetId id) const
inlinevirtual

move the Topology north (increment iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 19 of file EcalEndcapHardcodedTopology.h.

References incrementIy().

Referenced by north().

19  {
20  return incrementIy(EEDetId(id));
21  }
EEDetId incrementIy(const EEDetId &) const
move the nagivator to larger iy
virtual DetId EcalEndcapHardcodedTopology::goSouth ( const DetId id) const
inlinevirtual

move the Topology south (decrement iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 32 of file EcalEndcapHardcodedTopology.h.

References decrementIy().

Referenced by south().

32  {
33  return decrementIy(EEDetId(id));
34  }
EEDetId decrementIy(const EEDetId &) const
move the nagivator to smaller iy
virtual DetId EcalEndcapHardcodedTopology::goWest ( const DetId id) const
inlinevirtual

move the Topology west (negative ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 58 of file EcalEndcapHardcodedTopology.h.

References decrementIx().

Referenced by west().

58  {
59  return decrementIx(EEDetId(id));
60  }
EEDetId decrementIx(const EEDetId &) const
move the nagivator to smaller ix
EEDetId EcalEndcapHardcodedTopology::incrementIx ( const EEDetId id) const
private

move the nagivator to larger ix

Definition at line 3 of file EcalEndcapHardcodedTopology.cc.

References EEDetId::validDetId(), and ecaldqm::zside().

Referenced by goEast().

3  {
4  if (! (EEDetId::validDetId(id.ix()+1,id.iy(),id.zside()) ) ) return EEDetId(0); // null det id
5  else return EEDetId(id.ix()+1,id.iy(),id.zside());
6 }
int zside(DetId const &)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EEDetId EcalEndcapHardcodedTopology::incrementIy ( const EEDetId id) const
private

move the nagivator to larger iy

Definition at line 13 of file EcalEndcapHardcodedTopology.cc.

References EEDetId::validDetId(), and ecaldqm::zside().

Referenced by goNorth().

13  {
14  if (! (EEDetId::validDetId(id.ix(),id.iy()+1,id.zside()) ) ) return EEDetId(0); // null det id
15  else return EEDetId(id.ix(),id.iy()+1,id.zside());
16 }
int zside(DetId const &)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
virtual std::vector<DetId> EcalEndcapHardcodedTopology::north ( const DetId id) const
inlinevirtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 22 of file EcalEndcapHardcodedTopology.h.

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

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

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 35 of file EcalEndcapHardcodedTopology.h.

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

36  {
37  EEDetId nextId= goSouth(id);
38  std::vector<DetId> vNeighborsDetId;
39  if (! (nextId==EEDetId(0)))
40  vNeighborsDetId.push_back(DetId(nextId.rawId()));
41  return vNeighborsDetId;
42  }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
virtual DetId goSouth(const DetId &id) const
move the Topology south (decrement iy)
Definition: DetId.h:18
virtual std::vector<DetId> EcalEndcapHardcodedTopology::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 EcalEndcapHardcodedTopology.h.

References gather_cfg::cout.

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

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 61 of file EcalEndcapHardcodedTopology.h.

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

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