#include <CaloTowerDetId.h>
Public Types | |
enum | { kMaxIEta = 41, kMaxIPhi = 72, kBarNPhi = kMaxIPhi, kEndNPhi = kMaxIPhi/2, kForNPhi = kMaxIPhi/4, kBarIEta = 20, kEndIEta = 39, kForIEta = kMaxIEta, kBarNEta = kBarIEta, kEndNEta = kEndIEta - kBarNEta, kForNEta = kForIEta - kEndIEta, kBarNTot = kBarNPhi*kBarNEta, kEndNTot = kEndNPhi*kEndNEta, kForNTot = kForNPhi*kForNEta, kAllNTot = kBarNTot + kEndNTot + kForNTot, kNIndex = 2*kAllNTot } |
enum | { kSizeForDenseIndexing = kNIndex } |
Public Member Functions | |
CaloTowerDetId () | |
CaloTowerDetId (uint32_t rawid) | |
CaloTowerDetId (const DetId &id) | |
CaloTowerDetId (int tower_ieta, int tower_iphi) | |
uint32_t | denseIndex () const |
int | ieta () const |
get the tower ieta | |
int | ietaAbs () const |
get the absolute value of the tower ieta | |
int | iphi () const |
get the tower iphi | |
CaloTowerDetId & | operator= (const DetId &id) |
int | zside () const |
get the z-side of the tower (1/-1) | |
Static Public Member Functions | |
static CaloTowerDetId | detIdFromDenseIndex (uint32_t din) |
static bool | validDenseIndex (uint32_t din) |
static bool | validDetId (int ie, int ip) |
Static Public Attributes | |
static const int | SubdetId = 1 |
CaloTowerDetId uses DetId::Det of Calo and subdetId() of 1.
Definition at line 14 of file CaloTowerDetId.h.
anonymous enum |
kMaxIEta | |
kMaxIPhi | |
kBarNPhi | |
kEndNPhi | |
kForNPhi | |
kBarIEta | |
kEndIEta | |
kForIEta | |
kBarNEta | |
kEndNEta | |
kForNEta | |
kBarNTot | |
kEndNTot | |
kForNTot | |
kAllNTot | |
kNIndex |
Definition at line 46 of file CaloTowerDetId.h.
{ kMaxIEta = 41 , kMaxIPhi = 72 , kBarNPhi = kMaxIPhi , kEndNPhi = kMaxIPhi/2 , kForNPhi = kMaxIPhi/4 , kBarIEta = 20 , kEndIEta = 39 , kForIEta = kMaxIEta , kBarNEta = kBarIEta , kEndNEta = kEndIEta - kBarNEta , kForNEta = kForIEta - kEndIEta , kBarNTot = kBarNPhi*kBarNEta , kEndNTot = kEndNPhi*kEndNEta , kForNTot = kForNPhi*kForNEta , kAllNTot = kBarNTot + kEndNTot + kForNTot , kNIndex = 2*kAllNTot } ;
anonymous enum |
Definition at line 63 of file CaloTowerDetId.h.
{ kSizeForDenseIndexing = kNIndex } ;
CaloTowerDetId::CaloTowerDetId | ( | ) |
Create a null cellid
Definition at line 5 of file CaloTowerDetId.cc.
Referenced by detIdFromDenseIndex().
: DetId() { }
CaloTowerDetId::CaloTowerDetId | ( | uint32_t | rawid | ) | [explicit] |
Create cellid from raw id (0=invalid tower id)
Definition at line 8 of file CaloTowerDetId.cc.
: DetId(rawid&0xFFF0FFFFu) { }
CaloTowerDetId::CaloTowerDetId | ( | int | tower_ieta, |
int | tower_iphi | ||
) |
CaloTowerDetId::CaloTowerDetId | ( | const DetId & | id | ) |
Constructor from a generic cell id
Definition at line 18 of file CaloTowerDetId.cc.
References DetId::Calo, DetId::det(), Exception, DetId::id_, DetId::null(), DetId::rawId(), SubdetId, and DetId::subdetId().
uint32_t CaloTowerDetId::denseIndex | ( | ) | const |
Definition at line 57 of file CaloTowerDetId.cc.
References ietaAbs(), iphi(), kAllNTot, kBarIEta, kBarNPhi, kBarNTot, kEndIEta, kEndNPhi, kEndNTot, kForNPhi, and zside().
{ const uint32_t ie ( ietaAbs() ) ; const uint32_t ip ( iphi() - 1 ) ; return ( ( 0 > zside() ? 0 : kAllNTot ) + ( ( kBarIEta >= ie ? ( ie - 1 )*kBarNPhi + ip : ( kEndIEta >= ie ? kBarNTot + ( ie - 1 - kBarIEta )*kEndNPhi + ip/2 : kBarNTot + kEndNTot + ( ie - 1 - kEndIEta )*kForNPhi + ip/4 ) ) ) ) ; }
CaloTowerDetId CaloTowerDetId::detIdFromDenseIndex | ( | uint32_t | din | ) | [static] |
Definition at line 69 of file CaloTowerDetId.cc.
References CaloTowerDetId(), kAllNTot, kBarIEta, kBarNPhi, kBarNTot, kEndIEta, kEndNPhi, kEndNTot, kForNPhi, and validDenseIndex().
Referenced by CaloGenericDetId::CaloGenericDetId().
{ const int iz ( din < kAllNTot ? -1 : 1 ) ; din %= kAllNTot ; const uint32_t ie ( ( kBarNTot + kEndNTot ) - 1 < din ? kEndIEta + ( din - kBarNTot - kEndNTot )/kForNPhi + 1 : ( kBarNTot - 1 < din ? kBarIEta + ( din - kBarNTot )/kEndNPhi + 1 : din/kBarNPhi + 1 ) ) ; const uint32_t ip ( ( kBarNTot + kEndNTot ) - 1 < din ? ( ( din - kBarNTot - kEndNTot )%kForNPhi )*4 + 3 : ( kBarNTot - 1 < din ? ( ( din - kBarNTot )%kEndNPhi )*2 + 1 : din%kBarNPhi + 1 ) ) ; return ( validDenseIndex( din ) ? CaloTowerDetId( iz*ie, ip ) : CaloTowerDetId() ) ; }
int CaloTowerDetId::ieta | ( | ) | const [inline] |
get the tower ieta
Definition at line 32 of file CaloTowerDetId.h.
References ietaAbs(), and zside().
Referenced by CaloTowersValidation::analyze(), CaloTowerAnalyzer::analyze(), CaloTowersCreationAlgo::assignHit(), CaloTowerTopology::east(), FastL1Region::FillEMCrystals(), TrackDetMatchInfo::findMaxDeposition(), FastL1RegionMap::getRegionEtaPhiIndex(), FastL1RegionMap::getRegionIndex(), FastL1RegionMap::getRegionTowerIndex(), CaloTowersCreationAlgo::hadShwrPos(), CaloTower::ieta(), PileUpSubtractor::ieta(), fireworks::info(), DetIdInfo::info(), FastL1GlobalAlgo::isEMCand(), CaloTowersCreationAlgo::makeHcalDropChMap(), JetMaker::makeSpecific(), CaloTowerTopology::north(), TrackDetMatchInfo::nXnEnergy(), CaloTowerTopology::south(), CaloTowerTopology::valid(), CaloGenericDetId::validDetId(), and CaloTowerTopology::west().
int CaloTowerDetId::ietaAbs | ( | ) | const [inline] |
get the absolute value of the tower ieta
Definition at line 30 of file CaloTowerDetId.h.
References DetId::id_.
Referenced by denseIndex(), CaloTower::energyInHB(), CaloTower::energyInHE(), CaloTower::energyInHF(), CaloTower::energyInHO(), PhysicsTowerOrganizer::findNeighbors(), CaloTower::hadEnergyHeInnerLayer(), CaloTower::hadEnergyHeOuterLayer(), CaloTowersCreationAlgo::hadShwrPos(), ieta(), CaloTower::ietaAbs(), CaloTowerTopology::north(), CaloTower::numCrystals(), CaloTower::outerEnergy(), CaloTower::outerEt(), CaloTowersCreationAlgo::rescaleTowers(), and CaloTowerTopology::south().
{ return (id_>>7)&0x3f; }
int CaloTowerDetId::iphi | ( | ) | const |
get the tower iphi
Definition at line 33 of file CaloTowerDetId.cc.
References DetId::id_.
Referenced by CaloTowerAnalyzer::analyze(), CaloTowersCreationAlgo::assignHit(), denseIndex(), CaloTowerTopology::east(), FastL1Region::FillEMCrystals(), TrackDetMatchInfo::findMaxDeposition(), PhysicsTowerOrganizer::findNeighbors(), FastL1RegionMap::getRegionEtaPhiIndex(), FastL1RegionMap::getRegionIndex(), FastL1RegionMap::getRegionTowerIndex(), CaloTowersCreationAlgo::hadShwrPos(), fireworks::info(), DetIdInfo::info(), CaloTower::iphi(), PileUpSubtractor::iphi(), FastL1GlobalAlgo::isEMCand(), CaloTowersCreationAlgo::makeHcalDropChMap(), CaloTowerTopology::north(), TrackDetMatchInfo::nXnEnergy(), CaloTowerTopology::south(), CaloTowerTopology::valid(), CaloGenericDetId::validDetId(), and CaloTowerTopology::west().
{ int retval=id_&0x7F; return retval; }
CaloTowerDetId & CaloTowerDetId::operator= | ( | const DetId & | id | ) |
Assignment from a generic cell id
Definition at line 25 of file CaloTowerDetId.cc.
References DetId::Calo, DetId::det(), Exception, DetId::id_, DetId::null(), DetId::rawId(), SubdetId, and DetId::subdetId().
static bool CaloTowerDetId::validDenseIndex | ( | uint32_t | din | ) | [inline, static] |
Definition at line 44 of file CaloTowerDetId.h.
References kSizeForDenseIndexing.
Referenced by detIdFromDenseIndex().
{ return ( din < kSizeForDenseIndexing ) ; }
bool CaloTowerDetId::validDetId | ( | int | ie, |
int | ip | ||
) | [static] |
Definition at line 39 of file CaloTowerDetId.cc.
References abs, kBarIEta, kBarNPhi, kEndIEta, kForIEta, kMaxIEta, and kMaxIPhi.
{ const int ia ( abs( ie ) ) ; return ( ( ia >= 1 ) && ( ip >= 1 ) && ( ia <= kMaxIEta ) && ( ip <= kMaxIPhi ) && ( ( ( ia <= kBarIEta ) && ( ip <= kBarNPhi ) ) || ( ( ia > kBarIEta ) && ( ia <= kEndIEta ) && ( (ip-1)%2 == 0 ) ) || ( ( ia > kEndIEta ) && ( ia <= kForIEta ) && ( (ip-3)%4 == 0 ) ) ) ) ; }
int CaloTowerDetId::zside | ( | ) | const [inline] |
get the z-side of the tower (1/-1)
Definition at line 28 of file CaloTowerDetId.h.
References DetId::id_.
Referenced by CaloTowersCreationAlgo::assignHit(), denseIndex(), PhysicsTowerOrganizer::findNeighbors(), ieta(), CaloTowersCreationAlgo::makeHcalDropChMap(), and CaloTower::zside().
{ return (id_&0x2000)?(1):(-1); }
const int CaloTowerDetId::SubdetId = 1 [static] |
Definition at line 36 of file CaloTowerDetId.h.
Referenced by CaloRecoTauAlgorithm::buildCaloTau(), CaloTowerDetId(), CaloGenericDetId::isCaloTower(), operator=(), CaloTowersCreationAlgo::setGeometry(), and reco::writeSpecific().