#include <CaloTowerTopology.h>
Public Member Functions | |
CaloTowerTopology () | |
standard constructor | |
virtual std::vector< DetId > | down (const DetId &id) const |
virtual std::vector< DetId > | east (const DetId &id) const |
virtual std::vector< DetId > | north (const DetId &id) const |
virtual std::vector< DetId > | south (const DetId &id) const |
virtual std::vector< DetId > | up (const DetId &id) const |
virtual bool | valid (const DetId &id) const |
is this detid present in the Topology? | |
virtual std::vector< DetId > | west (const DetId &id) const |
virtual | ~CaloTowerTopology () |
virtual destructor |
CaloTowerTopology::CaloTowerTopology | ( | ) | [inline] |
virtual CaloTowerTopology::~CaloTowerTopology | ( | ) | [inline, virtual] |
Get the neighbors of the given cell in down direction (inward)
Implements CaloSubdetectorTopology.
Definition at line 114 of file CaloTowerTopology.cc.
{
return std::vector<DetId>();
}
Get the neighbors of the given cell in east direction
Implements CaloSubdetectorTopology.
Definition at line 13 of file CaloTowerTopology.cc.
References createTree::dd, DoubleHE, CaloTowerDetId::ieta(), CaloTowerDetId::iphi(), and QuadHF.
Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds().
{ std::vector<DetId> dd; CaloTowerDetId tid(id); int ieta=tid.ieta(); int iphi=tid.iphi(); if (ieta==1) { ieta=-1; } else if (ieta==DoubleHE) { ieta--; dd.push_back(CaloTowerDetId(ieta,iphi+1)); } else if (ieta-1==-DoubleHE) { if ((iphi%2)==0) iphi--; ieta--; } else if (ieta==QuadHF) { ieta--; dd.push_back(CaloTowerDetId(ieta,((iphi+1)%72)+1)); } else if (ieta-1==-QuadHF) { if (((iphi-1)%4)==0) { if (iphi==1) iphi=71; else iphi-=2; } ieta--; } else { ieta--; } if (ieta>=-41) dd.push_back(CaloTowerDetId(ieta,iphi)); return dd; }
Get the neighbors of the given cell in north direction
Implements CaloSubdetectorTopology.
Definition at line 77 of file CaloTowerTopology.cc.
References createTree::dd, DoubleHE, CaloTowerDetId::ieta(), CaloTowerDetId::ietaAbs(), CaloTowerDetId::iphi(), and QuadHF.
Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds().
{ CaloTowerDetId tid(id); int iphi_n=tid.iphi()+1; if (iphi_n>72) iphi_n=1; if (tid.ietaAbs()>=QuadHF) { iphi_n+=3; if (iphi_n>72) iphi_n-=72; } else if (tid.ietaAbs()>=DoubleHE && (iphi_n%2)==0) { iphi_n++; if (iphi_n>72) iphi_n-=72; } std::vector<DetId> dd; dd.push_back(CaloTowerDetId(tid.ieta(),iphi_n)); return dd; }
Get the neighbors of the given cell in south direction
Implements CaloSubdetectorTopology.
Definition at line 94 of file CaloTowerTopology.cc.
References createTree::dd, DoubleHE, CaloTowerDetId::ieta(), CaloTowerDetId::ietaAbs(), CaloTowerDetId::iphi(), and QuadHF.
Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds().
{ CaloTowerDetId tid(id); int iphi_s=tid.iphi()-1; if (iphi_s==0) iphi_s=72; if (tid.ietaAbs()>=QuadHF) { iphi_s-=3; if (iphi_s<=0) iphi_s+=72; } else if (tid.ietaAbs()>=DoubleHE && (iphi_s%2)==0) { iphi_s--; } std::vector<DetId> dd; dd.push_back(CaloTowerDetId(tid.ieta(),iphi_s)); return dd; }
Get the neighbors of the given cell in up direction (outward)
Implements CaloSubdetectorTopology.
Definition at line 110 of file CaloTowerTopology.cc.
{
return std::vector<DetId>();
}
bool CaloTowerTopology::valid | ( | const DetId & | id | ) | const [virtual] |
is this detid present in the Topology?
Reimplemented from CaloSubdetectorTopology.
Definition at line 7 of file CaloTowerTopology.cc.
References cond::ecalcond::bad(), CaloTowerDetId::ieta(), and CaloTowerDetId::iphi().
{ CaloTowerDetId tid(id); bool bad=(tid.ieta()==0 || tid.iphi()<=0 || tid.iphi()>72 || tid.ieta()<-41 || tid.ieta()>41); return !bad; }
Get the neighbors of the given cell in west direction
Implements CaloSubdetectorTopology.
Definition at line 44 of file CaloTowerTopology.cc.
References createTree::dd, DoubleHE, CaloTowerDetId::ieta(), CaloTowerDetId::iphi(), and QuadHF.
Referenced by CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds().
{ std::vector<DetId> dd; CaloTowerDetId tid(id); int ieta=tid.ieta(); int iphi=tid.iphi(); if (ieta==-1) { ieta=1; } else if (ieta==-DoubleHE) { ieta++; dd.push_back(CaloTowerDetId(ieta,iphi+1)); } else if (ieta+1==DoubleHE) { if ((iphi%2)==0) iphi--; ieta++; } else if (ieta==-QuadHF) { ieta++; dd.push_back(CaloTowerDetId(ieta,((iphi+1)%72)+1)); } else if (ieta+1==QuadHF) { if (((iphi-1)%4)==0) { if (iphi==1) iphi=71; else iphi-=2; } ieta++; } else { ieta++; } if (ieta<=41) dd.push_back(CaloTowerDetId(ieta,iphi)); return dd; }