14 if(towerIndex<towers.size()){
15 if(towers[towerIndex].hwEta()!=iEta || towers[towerIndex].hwPhi()!=iPhi){
16 for(
size_t towerNr=0;towerNr<towers.size();towerNr++){
17 if(towers[towerNr].hwEta()==iEta && towers[towerNr].hwPhi()==iPhi)
return towers[towerNr];
19 }
else return towers[towerIndex];
26 for(
size_t clusterNr=0;clusterNr<clusters.size();clusterNr++){
27 if(clusters[clusterNr].hwEta()==iEta && clusters[clusterNr].hwPhi()==iPhi)
return clusters[clusterNr];
40 if(!isValidIEtaIPhi(iEta,iPhi))
return caloTowerHashMax();
42 const int absIEta =
abs(iEta);
43 if(absIEta>kHFEnd)
return kNrTowers;
44 else if(absIEta<=kHBHEEnd){
46 if(iEta>0) iEtaNoZero--;
47 return (iEtaNoZero+kHBHEEnd)*kHBHENrPhi+iPhi-1;
49 int iEtaIndex = iEta+kHFEnd;
50 if(iEta>0) iEtaIndex= iEta-kHBHEEnd+(kHFEnd-kHBHEEnd)-1;
51 return iEtaIndex*kHFNrPhi+iPhi/kHFPhiSeg + kNrHBHETowers;
65 size_t absIEta =
abs(iEta);
66 if(iPhi<=0 || iPhi>kHBHENrPhi)
return false;
67 if(absIEta==0 || absIEta>kHFEnd)
return false;
68 if(absIEta>kHBHEEnd && iPhi%kHFPhiSeg!=1)
return false;
74 int localEtaMin,
int localEtaMax,
int localPhiMin,
int localPhiMax,
78 return calHwEtSum(iEta,iPhi,towers,localEtaMin,localEtaMax,localPhiMin,localPhiMax,kHFEnd,etMode);
82 int localEtaMin,
int localEtaMax,
int localPhiMin,
int localPhiMax,
83 int iEtaAbsMax,
SubDet etMode)
86 for(
int etaNr=localEtaMin;etaNr<=localEtaMax;etaNr++){
87 for(
int phiNr=localPhiMin;phiNr<=localPhiMax;phiNr++){
91 if(
abs(towerIEta)<=iEtaAbsMax){
92 const l1t::CaloTower& tower = getTower(towers,towerIEta,towerIPhi);
113 if(etMode&CALO) towerHwEt+=tower.
hwPt();
114 if(towerHwEt>=minHwEt && towerHwEt<=maxHwEt) nrTowers++;
std::pair< int, int > north()
static int offsetIEta(int iEta, int offset)
static int offsetIPhi(int iPhi, int offset)
Abs< T >::type abs(const T &t)
std::pair< int, int > east()