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 &id) const
 
virtual std::vector< DetIdeast (const DetId &id) const
 move the Topology east (positive ix) More...
 
 EcalEndcapHardcodedTopology ()
 create a new Topology More...
 
virtual std::vector< DetIdnorth (const DetId &id) const
 move the Topology north (increment iy) More...
 
virtual std::vector< DetIdsouth (const DetId &id) const
 move the Topology south (decrement iy) More...
 
virtual std::vector< DetIdup (const DetId &id) const
 
virtual std::vector< DetIdwest (const DetId &id) const
 move the Topology west (negative ix) More...
 
virtual ~EcalEndcapHardcodedTopology ()
 
- Public Member Functions inherited from CaloSubdetectorTopology
 CaloSubdetectorTopology ()
 standard constructor 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 bool valid (const DetId &id) 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().

Referenced by west().

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 }
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
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().

Referenced by south().

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 }
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
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 65 of file EcalEndcapHardcodedTopology.h.

References gather_cfg::cout.

66  {
67  std::cout << "EcalEndcapHardcodedTopology::down() not yet implemented" << std::endl;
68  std::vector<DetId> vNeighborsDetId;
69  return vNeighborsDetId;
70  }
tuple cout
Definition: gather_cfg.py:41
virtual std::vector<DetId> EcalEndcapHardcodedTopology::east ( const DetId id) const
inlinevirtual

move the Topology east (positive ix)

Implements CaloSubdetectorTopology.

Definition at line 39 of file EcalEndcapHardcodedTopology.h.

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

40  {
41  EEDetId nextId=incrementIx(EEDetId(id));
42  std::vector<DetId> vNeighborsDetId;
43  if (! (nextId==EEDetId(0)))
44  vNeighborsDetId.push_back(DetId(nextId.rawId()));
45  return vNeighborsDetId;
46  }
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
EEDetId incrementIx(const EEDetId &) const
move the nagivator to larger ix
Definition: DetId.h:20
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().

Referenced by east().

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 }
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
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().

Referenced by north().

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 }
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
virtual std::vector<DetId> EcalEndcapHardcodedTopology::north ( const DetId id) const
inlinevirtual

move the Topology north (increment iy)

Implements CaloSubdetectorTopology.

Definition at line 19 of file EcalEndcapHardcodedTopology.h.

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

20  {
21  EEDetId nextId=incrementIy(EEDetId(id));
22  std::vector<DetId> vNeighborsDetId;
23  if (! (nextId==EEDetId(0)))
24  vNeighborsDetId.push_back(DetId(nextId.rawId()));
25  return vNeighborsDetId;
26  }
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
Definition: DetId.h:20
EEDetId incrementIy(const EEDetId &) const
move the nagivator to larger iy
virtual std::vector<DetId> EcalEndcapHardcodedTopology::south ( const DetId id) const
inlinevirtual

move the Topology south (decrement iy)

Implements CaloSubdetectorTopology.

Definition at line 29 of file EcalEndcapHardcodedTopology.h.

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

30  {
31  EEDetId nextId=decrementIy(EEDetId(id));
32  std::vector<DetId> vNeighborsDetId;
33  if (! (nextId==EEDetId(0)))
34  vNeighborsDetId.push_back(DetId(nextId.rawId()));
35  return vNeighborsDetId;
36  }
EEDetId decrementIy(const EEDetId &) const
move the nagivator to smaller iy
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
Definition: DetId.h:20
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 58 of file EcalEndcapHardcodedTopology.h.

References gather_cfg::cout.

59  {
60  std::cout << "EcalEndcapHardcodedTopology::up() not yet implemented" << std::endl;
61  std::vector<DetId> vNeighborsDetId;
62  return vNeighborsDetId;
63  }
tuple cout
Definition: gather_cfg.py:41
virtual std::vector<DetId> EcalEndcapHardcodedTopology::west ( const DetId id) const
inlinevirtual

move the Topology west (negative ix)

Implements CaloSubdetectorTopology.

Definition at line 49 of file EcalEndcapHardcodedTopology.h.

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

50  {
51  EEDetId nextId=decrementIx(EEDetId(id));
52  std::vector<DetId> vNeighborsDetId;
53  if (! (nextId==EEDetId(0)))
54  vNeighborsDetId.push_back(DetId(nextId.rawId()));
55  return vNeighborsDetId;
56  }
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
Definition: DetId.h:20
EEDetId decrementIx(const EEDetId &) const
move the nagivator to smaller ix