14 if(towerIndex<towers.size()){
15 if(towers[towerIndex].hwEta()!=iEta || towers[towerIndex].hwPhi()!=iPhi){
17 for(
size_t towerNr=0;towerNr<towers.size();towerNr++){
18 if(towers[towerNr].hwEta()==iEta && towers[towerNr].hwPhi()==iPhi)
return towers[towerNr];
20 }
else return towers[towerIndex];
24 for(
size_t towerNr=0;towerNr<towers.size();towerNr++){
25 if(towers[towerNr].hwEta()==iEta && towers[towerNr].hwPhi()==iPhi)
return towers[towerNr];
34 for(
size_t clusterNr=0;clusterNr<clusters.size();clusterNr++){
35 if(clusters[clusterNr].hwEta()==iEta && clusters[clusterNr].hwPhi()==iPhi)
return clusters[clusterNr];
48 if(!isValidIEtaIPhi(iEta,iPhi))
return caloTowerHashMax();
50 const int absIEta =
abs(iEta);
51 if(absIEta>kHFEnd)
return kNrTowers;
52 else if(absIEta<=kHBHEEnd){
54 if(iEta>0) iEtaNoZero--;
55 return (iEtaNoZero+kHBHEEnd)*kHBHENrPhi+iPhi-1;
57 int iEtaIndex = iEta+kHFEnd;
58 if(iEta>0) iEtaIndex= iEta-kHBHEEnd+(kHFEnd-kHBHEEnd)-1;
59 return iEtaIndex*kHFNrPhi+iPhi/kHFPhiSeg + kNrHBHETowers;
73 size_t absIEta =
abs(iEta);
74 if(iPhi<=0 || iPhi>kHBHENrPhi)
return false;
75 if(absIEta==0 || absIEta>kHFEnd)
return false;
76 if(absIEta>kHBHEEnd && iPhi%kHFPhiSeg!=1)
return false;
82 int localEtaMin,
int localEtaMax,
int localPhiMin,
int localPhiMax,
86 return calHwEtSum(iEta,iPhi,towers,localEtaMin,localEtaMax,localPhiMin,localPhiMax,kHFEnd,etMode);
90 int localEtaMin,
int localEtaMax,
int localPhiMin,
int localPhiMax,
91 int iEtaAbsMax,
SubDet etMode)
94 for(
int etaNr=localEtaMin;etaNr<=localEtaMax;etaNr++){
95 for(
int phiNr=localPhiMin;phiNr<=localPhiMax;phiNr++){
99 if(
abs(towerIEta)<=iEtaAbsMax){
100 const l1t::CaloTower& tower = getTower(towers,towerIEta,towerIPhi);
121 if(etMode&CALO) towerHwEt+=tower.
hwPt();
122 if(towerHwEt>=minHwEt && towerHwEt<=maxHwEt) nrTowers++;
132 if(ieta==0) ieta = 1;
133 if(ieta>32) ieta = 32;
134 if(ieta<-32) ieta = -32;
135 const float towerEtas[33] = {0,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.870,0.957,1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.740,1.830,1.930,2.043,2.172,2.322,2.5,2.650,3.000,3.5,4.0,4.5,5.0};
136 return std::make_pair( towerEtas[
abs(ieta)-1],towerEtas[
abs(ieta)] );
141 std::pair<float,float> bounds = towerEtaBounds(ieta);
142 float eta = (bounds.second+bounds.first)/2.;
143 float sign = ieta>0 ? 1. : -1.;
149 return (
float(iphi)-0.5)*towerPhiSize(ieta);
154 std::pair<float,float> bounds = towerEtaBounds(ieta);
155 float size = (bounds.second-bounds.first);
161 if(
abs(ieta)<=28)
return 2.*
M_PI/72.;
162 else return 2.*
M_PI/18.;
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()
tuple size
Write out results.