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::EcalEndcapHardcodedTopology ( )
inline

create a new Topology

Definition at line 12 of file EcalEndcapHardcodedTopology.h.

12 {};

◆ ~EcalEndcapHardcodedTopology()

EcalEndcapHardcodedTopology::~EcalEndcapHardcodedTopology ( )
inlineoverride

Definition at line 14 of file EcalEndcapHardcodedTopology.h.

14 {};

Member Function Documentation

◆ decrementIx()

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

move the nagivator to smaller ix

Definition at line 10 of file EcalEndcapHardcodedTopology.cc.

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 }

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

Referenced by goWest().

◆ decrementIy()

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

move the nagivator to smaller iy

Definition at line 24 of file EcalEndcapHardcodedTopology.cc.

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 }

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

Referenced by goSouth().

◆ down()

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.

62  {
63  std::cout << "EcalEndcapHardcodedTopology::down() not yet implemented" << std::endl;
64  std::vector<DetId> vNeighborsDetId;
65  return vNeighborsDetId;
66  }

References gather_cfg::cout.

◆ east()

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.

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  }

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

◆ goEast()

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.

37 { return incrementIx(EEDetId(id)); }

References incrementIx().

Referenced by east().

◆ goNorth()

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.

17 { return incrementIy(EEDetId(id)); }

References incrementIy().

Referenced by north().

◆ goSouth()

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.

27 { return decrementIy(EEDetId(id)); }

References decrementIy().

Referenced by south().

◆ goWest()

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.

47 { return decrementIx(EEDetId(id)); }

References decrementIx().

Referenced by west().

◆ incrementIx()

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

move the nagivator to larger ix

Definition at line 3 of file EcalEndcapHardcodedTopology.cc.

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 }

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

Referenced by goEast().

◆ incrementIy()

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

move the nagivator to larger iy

Definition at line 17 of file EcalEndcapHardcodedTopology.cc.

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 }

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

Referenced by goNorth().

◆ north()

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.

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  }

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

◆ south()

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.

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  }

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

◆ up()

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.

56  {
57  std::cout << "EcalEndcapHardcodedTopology::up() not yet implemented" << std::endl;
58  std::vector<DetId> vNeighborsDetId;
59  return vNeighborsDetId;
60  }

References gather_cfg::cout.

◆ west()

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.

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  }

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

ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalEndcapHardcodedTopology::goNorth
DetId goNorth(const DetId &id) const override
move the Topology north (increment iy)
Definition: EcalEndcapHardcodedTopology.h:17
DetId
Definition: DetId.h:17
EcalEndcapHardcodedTopology::decrementIx
EEDetId decrementIx(const EEDetId &) const
move the nagivator to smaller ix
Definition: EcalEndcapHardcodedTopology.cc:10
EcalEndcapHardcodedTopology::decrementIy
EEDetId decrementIy(const EEDetId &) const
move the nagivator to smaller iy
Definition: EcalEndcapHardcodedTopology.cc:24
EcalEndcapHardcodedTopology::goSouth
DetId goSouth(const DetId &id) const override
move the Topology south (decrement iy)
Definition: EcalEndcapHardcodedTopology.h:27
EEDetId
Definition: EEDetId.h:14
EcalEndcapHardcodedTopology::goWest
DetId goWest(const DetId &id) const override
move the Topology west (negative ix)
Definition: EcalEndcapHardcodedTopology.h:47
EcalEndcapHardcodedTopology::incrementIy
EEDetId incrementIy(const EEDetId &) const
move the nagivator to larger iy
Definition: EcalEndcapHardcodedTopology.cc:17
EcalEndcapHardcodedTopology::goEast
DetId goEast(const DetId &id) const override
move the Topology east (positive ix)
Definition: EcalEndcapHardcodedTopology.h:37
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalEndcapHardcodedTopology::incrementIx
EEDetId incrementIx(const EEDetId &) const
move the nagivator to larger ix
Definition: EcalEndcapHardcodedTopology.cc:3