CMS 3D CMS Logo

Public Member Functions | Private Member Functions

EcalEndcapHardcodedTopology Class Reference

#include <EcalEndcapHardcodedTopology.h>

Inheritance diagram for EcalEndcapHardcodedTopology:
CaloSubdetectorTopology

List of all members.

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)
 EcalEndcapHardcodedTopology ()
 create a new Topology
virtual std::vector< DetIdnorth (const DetId &id) const
 move the Topology north (increment iy)
virtual std::vector< DetIdsouth (const DetId &id) const
 move the Topology south (decrement iy)
virtual std::vector< DetIdup (const DetId &id) const
virtual std::vector< DetIdwest (const DetId &id) const
 move the Topology west (negative ix)
virtual ~EcalEndcapHardcodedTopology ()

Private Member Functions

EEDetId decrementIx (const EEDetId &) const
 move the nagivator to smaller ix
EEDetId decrementIy (const EEDetId &) const
 move the nagivator to smaller iy
EEDetId incrementIx (const EEDetId &) const
 move the nagivator to larger ix
EEDetId incrementIy (const EEDetId &) const
 move the nagivator to larger iy

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.

{};
virtual EcalEndcapHardcodedTopology::~EcalEndcapHardcodedTopology ( ) [inline, virtual]

Definition at line 16 of file EcalEndcapHardcodedTopology.h.

{};

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().

                                                                        {
  if (! (EEDetId::validDetId(id.ix()-1,id.iy(),id.zside()) ) ) return EEDetId(0); // null det id
  else return EEDetId(id.ix()-1,id.iy(),id.zside());     
}
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().

                                                                        {
  if (! (EEDetId::validDetId(id.ix(),id.iy()-1,id.zside()) ) ) return EEDetId(0); // null det id
  else return EEDetId(id.ix(),id.iy()-1,id.zside());     
}
virtual std::vector<DetId> EcalEndcapHardcodedTopology::down ( const DetId id) const [inline, virtual]

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.

    {
      std::cout << "EcalEndcapHardcodedTopology::down() not yet implemented" << std::endl; 
      std::vector<DetId> vNeighborsDetId;
      return  vNeighborsDetId;
    }
virtual std::vector<DetId> EcalEndcapHardcodedTopology::east ( const DetId id) const [inline, virtual]

move the Topology east (positive ix)

Implements CaloSubdetectorTopology.

Definition at line 39 of file EcalEndcapHardcodedTopology.h.

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

    { 
      EEDetId nextId=incrementIx(EEDetId(id));
      std::vector<DetId> vNeighborsDetId;
      if (! (nextId==EEDetId(0)))
        vNeighborsDetId.push_back(DetId(nextId.rawId()));
      return vNeighborsDetId;
    }
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().

                                                                        {
  if (! (EEDetId::validDetId(id.ix()+1,id.iy(),id.zside()) ) ) return EEDetId(0); // null det id
  else return EEDetId(id.ix()+1,id.iy(),id.zside());     
}
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().

                                                                        {
  if (! (EEDetId::validDetId(id.ix(),id.iy()+1,id.zside()) ) ) return EEDetId(0); // null det id
  else return EEDetId(id.ix(),id.iy()+1,id.zside());     
}
virtual std::vector<DetId> EcalEndcapHardcodedTopology::north ( const DetId id) const [inline, virtual]

move the Topology north (increment iy)

Implements CaloSubdetectorTopology.

Definition at line 19 of file EcalEndcapHardcodedTopology.h.

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

    { 
      EEDetId nextId=incrementIy(EEDetId(id));
      std::vector<DetId> vNeighborsDetId;
      if (! (nextId==EEDetId(0)))
        vNeighborsDetId.push_back(DetId(nextId.rawId()));
      return vNeighborsDetId;
    }
virtual std::vector<DetId> EcalEndcapHardcodedTopology::south ( const DetId id) const [inline, virtual]

move the Topology south (decrement iy)

Implements CaloSubdetectorTopology.

Definition at line 29 of file EcalEndcapHardcodedTopology.h.

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

    { 
      EEDetId nextId=decrementIy(EEDetId(id));
      std::vector<DetId> vNeighborsDetId;
      if (! (nextId==EEDetId(0)))
        vNeighborsDetId.push_back(DetId(nextId.rawId()));
      return vNeighborsDetId;
    }
virtual std::vector<DetId> EcalEndcapHardcodedTopology::up ( const DetId id) const [inline, virtual]

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.

    {
      std::cout << "EcalEndcapHardcodedTopology::up() not yet implemented" << std::endl; 
      std::vector<DetId> vNeighborsDetId;
      return  vNeighborsDetId;
    }
virtual std::vector<DetId> EcalEndcapHardcodedTopology::west ( const DetId id) const [inline, virtual]

move the Topology west (negative ix)

Implements CaloSubdetectorTopology.

Definition at line 49 of file EcalEndcapHardcodedTopology.h.

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

    { 
      EEDetId nextId=decrementIx(EEDetId(id));
      std::vector<DetId> vNeighborsDetId;
      if (! (nextId==EEDetId(0)))
        vNeighborsDetId.push_back(DetId(nextId.rawId()));
      return vNeighborsDetId;
    }