CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
EcalEndcapHardcodedTopology Class Referencefinal

#include <EcalEndcapHardcodedTopology.h>

Inheritance diagram for EcalEndcapHardcodedTopology:
CaloSubdetectorTopology

Public Member Functions

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

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 down(), and 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 down(), and 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
std::vector<DetId> EcalEndcapHardcodedTopology::down ( const DetId id) const
inlineoverridevirtual

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, decrementIx(), decrementIy(), incrementIx(), and incrementIy().

78  {
79  std::cout << "EcalEndcapHardcodedTopology::down() not yet implemented" << std::endl;
80  std::vector<DetId> vNeighborsDetId;
81  return vNeighborsDetId;
82  }
std::vector<DetId> EcalEndcapHardcodedTopology::east ( const DetId id) const
inlineoverridevirtual

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.emplace_back(DetId(nextId.rawId()));
54  return vNeighborsDetId;
55  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
Definition: DetId.h:18
DetId goEast(const DetId &id) const override
move the Topology east (positive ix)
DetId EcalEndcapHardcodedTopology::goEast ( const DetId id) const
inlineoverridevirtual

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
DetId EcalEndcapHardcodedTopology::goNorth ( const DetId id) const
inlineoverridevirtual

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
DetId EcalEndcapHardcodedTopology::goSouth ( const DetId id) const
inlineoverridevirtual

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
DetId EcalEndcapHardcodedTopology::goWest ( const DetId id) const
inlineoverridevirtual

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 down(), and 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 down(), and 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
std::vector<DetId> EcalEndcapHardcodedTopology::north ( const DetId id) const
inlineoverridevirtual

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.emplace_back(DetId(nextId.rawId()));
28  return vNeighborsDetId;
29  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
DetId goNorth(const DetId &id) const override
move the Topology north (increment iy)
Definition: DetId.h:18
std::vector<DetId> EcalEndcapHardcodedTopology::south ( const DetId id) const
inlineoverridevirtual

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.emplace_back(DetId(nextId.rawId()));
41  return vNeighborsDetId;
42  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
DetId goSouth(const DetId &id) const override
move the Topology south (decrement iy)
Definition: DetId.h:18
std::vector<DetId> EcalEndcapHardcodedTopology::up ( const DetId id) const
inlineoverridevirtual

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  }
std::vector<DetId> EcalEndcapHardcodedTopology::west ( const DetId id) const
inlineoverridevirtual

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.emplace_back(DetId(nextId.rawId()));
67  return vNeighborsDetId;
68  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
Definition: DetId.h:18
DetId goWest(const DetId &id) const override
move the Topology west (negative ix)