CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 12 of file EcalEndcapHardcodedTopology.h.

12 {};
EcalEndcapHardcodedTopology::~EcalEndcapHardcodedTopology ( )
inlineoverride

Definition at line 14 of file EcalEndcapHardcodedTopology.h.

14 {};

Member Function Documentation

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

move the nagivator to smaller ix

Definition at line 10 of file EcalEndcapHardcodedTopology.cc.

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

Referenced by goWest().

10  {
11  if (!(EEDetId::validDetId(id.ix() - 1, id.iy(), id.zside())))
12  return EEDetId(0); // null det id
13  else
14  return EEDetId(id.ix() - 1, id.iy(), id.zside());
15 }
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 24 of file EcalEndcapHardcodedTopology.cc.

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

Referenced by goSouth().

24  {
25  if (!(EEDetId::validDetId(id.ix(), id.iy() - 1, id.zside())))
26  return EEDetId(0); // null det id
27  else
28  return EEDetId(id.ix(), id.iy() - 1, id.zside());
29 }
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 62 of file EcalEndcapHardcodedTopology.h.

References gather_cfg::cout.

62  {
63  std::cout << "EcalEndcapHardcodedTopology::down() not yet implemented" << std::endl;
64  std::vector<DetId> vNeighborsDetId;
65  return vNeighborsDetId;
66  }
tuple cout
Definition: gather_cfg.py:144
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 38 of file EcalEndcapHardcodedTopology.h.

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

38  {
39  EEDetId nextId = goEast(id);
40  std::vector<DetId> vNeighborsDetId;
41  if (!(nextId == EEDetId(0)))
42  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
43  return vNeighborsDetId;
44  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DetId goEast(const DetId &id) const override
move the Topology east (positive ix)
Definition: DetId.h:17
DetId EcalEndcapHardcodedTopology::goEast ( const DetId id) const
inlineoverridevirtual

move the Topology east (positive ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 37 of file EcalEndcapHardcodedTopology.h.

References incrementIx().

Referenced by east().

37 { return incrementIx(EEDetId(id)); }
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 17 of file EcalEndcapHardcodedTopology.h.

References incrementIy().

Referenced by north().

17 { return incrementIy(EEDetId(id)); }
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 27 of file EcalEndcapHardcodedTopology.h.

References decrementIy().

Referenced by south().

27 { return decrementIy(EEDetId(id)); }
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 47 of file EcalEndcapHardcodedTopology.h.

References decrementIx().

Referenced by west().

47 { return decrementIx(EEDetId(id)); }
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())))
5  return EEDetId(0); // null det id
6  else
7  return EEDetId(id.ix() + 1, id.iy(), id.zside());
8 }
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 17 of file EcalEndcapHardcodedTopology.cc.

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

Referenced by goNorth().

17  {
18  if (!(EEDetId::validDetId(id.ix(), id.iy() + 1, id.zside())))
19  return EEDetId(0); // null det id
20  else
21  return EEDetId(id.ix(), id.iy() + 1, id.zside());
22 }
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 18 of file EcalEndcapHardcodedTopology.h.

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

18  {
19  EEDetId nextId = goNorth(id);
20  std::vector<DetId> vNeighborsDetId;
21  if (!(nextId == EEDetId(0)))
22  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
23  return vNeighborsDetId;
24  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DetId goNorth(const DetId &id) const override
move the Topology north (increment iy)
Definition: DetId.h:17
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 28 of file EcalEndcapHardcodedTopology.h.

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

28  {
29  EEDetId nextId = goSouth(id);
30  std::vector<DetId> vNeighborsDetId;
31  if (!(nextId == EEDetId(0)))
32  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
33  return vNeighborsDetId;
34  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DetId goSouth(const DetId &id) const override
move the Topology south (decrement iy)
Definition: DetId.h:17
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 56 of file EcalEndcapHardcodedTopology.h.

References gather_cfg::cout.

56  {
57  std::cout << "EcalEndcapHardcodedTopology::up() not yet implemented" << std::endl;
58  std::vector<DetId> vNeighborsDetId;
59  return vNeighborsDetId;
60  }
tuple cout
Definition: gather_cfg.py:144
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 48 of file EcalEndcapHardcodedTopology.h.

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

48  {
49  EEDetId nextId = goWest(id);
50  std::vector<DetId> vNeighborsDetId;
51  if (!(nextId == EEDetId(0)))
52  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
53  return vNeighborsDetId;
54  }
DetId goWest(const DetId &id) const override
move the Topology west (negative ix)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Definition: DetId.h:17