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 10 of file EcalEndcapHardcodedTopology.h.

Constructor & Destructor Documentation

◆ EcalEndcapHardcodedTopology()

EcalEndcapHardcodedTopology::EcalEndcapHardcodedTopology ( )
inline

create a new Topology

Definition at line 13 of file EcalEndcapHardcodedTopology.h.

13 {}

◆ ~EcalEndcapHardcodedTopology()

EcalEndcapHardcodedTopology::~EcalEndcapHardcodedTopology ( )
inlineoverride

Definition at line 15 of file EcalEndcapHardcodedTopology.h.

15 {}

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.

References ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), 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 &)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ decrementIy()

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

move the nagivator to smaller iy

Definition at line 24 of file EcalEndcapHardcodedTopology.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), 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 &)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ 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 63 of file EcalEndcapHardcodedTopology.h.

63  {
64  edm::LogVerbatim("CaloTopology") << "EcalEndcapHardcodedTopology::down() not yet implemented";
65  std::vector<DetId> vNeighborsDetId;
66  return vNeighborsDetId;
67  }
Log< level::Info, true > LogVerbatim

◆ 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 39 of file EcalEndcapHardcodedTopology.h.

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

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

◆ goEast()

DetId EcalEndcapHardcodedTopology::goEast ( const DetId id) const
inlineoverridevirtual

move the Topology east (positive ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 38 of file EcalEndcapHardcodedTopology.h.

References incrementIx().

Referenced by east().

38 { return incrementIx(EEDetId(id)); }
EEDetId incrementIx(const EEDetId &) const
move the nagivator to larger ix

◆ goNorth()

DetId EcalEndcapHardcodedTopology::goNorth ( const DetId id) const
inlineoverridevirtual

move the Topology north (increment iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 18 of file EcalEndcapHardcodedTopology.h.

References incrementIy().

Referenced by north().

18 { return incrementIy(EEDetId(id)); }
EEDetId incrementIy(const EEDetId &) const
move the nagivator to larger iy

◆ goSouth()

DetId EcalEndcapHardcodedTopology::goSouth ( const DetId id) const
inlineoverridevirtual

move the Topology south (decrement iy)

Reimplemented from CaloSubdetectorTopology.

Definition at line 28 of file EcalEndcapHardcodedTopology.h.

References decrementIy().

Referenced by south().

28 { return decrementIy(EEDetId(id)); }
EEDetId decrementIy(const EEDetId &) const
move the nagivator to smaller iy

◆ goWest()

DetId EcalEndcapHardcodedTopology::goWest ( const DetId id) const
inlineoverridevirtual

move the Topology west (negative ix)

Reimplemented from CaloSubdetectorTopology.

Definition at line 48 of file EcalEndcapHardcodedTopology.h.

References decrementIx().

Referenced by west().

48 { return decrementIx(EEDetId(id)); }
EEDetId decrementIx(const EEDetId &) const
move the nagivator to smaller ix

◆ incrementIx()

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

move the nagivator to larger ix

Definition at line 3 of file EcalEndcapHardcodedTopology.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), 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 &)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ incrementIy()

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

move the nagivator to larger iy

Definition at line 17 of file EcalEndcapHardcodedTopology.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), 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 &)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ 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 19 of file EcalEndcapHardcodedTopology.h.

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

19  {
20  EEDetId nextId = goNorth(id);
21  std::vector<DetId> vNeighborsDetId;
22  if (!(nextId == EEDetId(0)))
23  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
24  return vNeighborsDetId;
25  }
DetId goNorth(const DetId &id) const override
move the Topology north (increment iy)
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ 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 29 of file EcalEndcapHardcodedTopology.h.

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

29  {
30  EEDetId nextId = goSouth(id);
31  std::vector<DetId> vNeighborsDetId;
32  if (!(nextId == EEDetId(0)))
33  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
34  return vNeighborsDetId;
35  }
DetId goSouth(const DetId &id) const override
move the Topology south (decrement iy)
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ 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 57 of file EcalEndcapHardcodedTopology.h.

57  {
58  edm::LogVerbatim("CaloTopology") << "EcalEndcapHardcodedTopology::up() not yet implemented";
59  std::vector<DetId> vNeighborsDetId;
60  return vNeighborsDetId;
61  }
Log< level::Info, true > LogVerbatim

◆ 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 49 of file EcalEndcapHardcodedTopology.h.

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

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