9 : theTopology( topology ) {
14 std::vector<HcalTrigTowerDetId>
17 std::vector<HcalTrigTowerDetId>
results;
30 ieta *= cellId.
zside();
36 int iphi = (((cellId.
iphi()+1)/4) * 4 + 1)%72;
41 if (hfRing==29) hfRing=30;
43 int ieta = hfRing*cellId.
zside();
44 int iphi = cellId.
iphi();
48 results.push_back(
id);
57 int iphi1 = cellId.
iphi();
58 int ieta = cellId.
ieta();
72 std::vector<HcalDetId>
77 int tower_ieta = hcalTrigTowerDetId.
ieta();
78 int tower_iphi = hcalTrigTowerDetId.
iphi();
80 int cell_ieta = tower_ieta;
81 int cell_iphi = tower_iphi;
83 int min_depth, n_depths;
89 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
97 for (
int ho_depth = min_depth; ho_depth <= min_depth + n_depths - 1; ho_depth++)
110 if (tower_iphi%2 == 0) cell_iphi = tower_iphi - 1;
112 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
116 if (
abs(tower_ieta) == 28){
118 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++){
119 if (tower_ieta < 0) results.push_back(
HcalDetId(
HcalEndcap, tower_ieta - 1, cell_iphi, cell_depth));
120 if (tower_ieta > 0) results.push_back(
HcalDetId(
HcalEndcap, tower_ieta + 1, cell_iphi, cell_depth));
130 if (hcalTrigTowerDetId.
version()==0) {
132 int HfTowerPhiSize = 72 /
nPhiBins(tower_ieta,0);
137 for (
int iHFTowerPhiSegment = 0; iHFTowerPhiSegment < HfTowerPhiSize; iHFTowerPhiSegment++){
139 cell_iphi = (tower_iphi / HfTowerPhiSize) * HfTowerPhiSize;
141 cell_iphi += iHFTowerPhiSegment;
143 cell_iphi = cell_iphi % 72;
146 if (cell_iphi%2 == 0)
continue;
148 for (
int iHFTowerEtaSegment = 0; iHFTowerEtaSegment < HfTowerEtaSize; iHFTowerEtaSegment++){
150 cell_ieta = FirstHFRingInTower + iHFTowerEtaSegment;
152 if (cell_ieta >= 40 && cell_iphi%4 == 1)
continue;
158 if (tower_ieta < 0) zside = -1;
162 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
165 if ( zside * cell_ieta == 30 ) {
167 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
172 }
else if (hcalTrigTowerDetId.
version()==1) {
174 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
176 if (
abs(tower_ieta)==30) {
178 if (tower_ieta < 0) i29 = -29;
180 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
192 int ietaAbs =
abs(ieta);
195 return (ietaAbs ==
nTowers(0)) ? 4 : 3;
202 int inputTower =
abs(ietaTower);
204 for(
int iTower =
firstHFTower(0); iTower != inputTower; ++iTower) {
209 if(ietaTower < 0) result *= -1;
215 int ietaAbs =
abs(ieta);
216 std::pair<double,double>
etas =
HcalSubdetector subdet() const
get the subdetector
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
CaloTopology const * topology(0)
const HcalTopology * theTopology
int zside() const
get the z-side of the cell (1/-1)
void towerEtaBounds(int ieta, int version, double &eta1, double &eta2) const
where this tower begins and ends in eta
int ieta() const
get the tower ieta
int hfTowerEtaSize(int ieta) const
int nPhiBins(int ieta, int version) const
the number of phi bins in this eta ring
int ieta() const
get the cell ieta
Abs< T >::type abs(const T &t)
void depthBinInformation(HcalSubdetector subdet, int etaRing, int &nDepthBins, int &startingBin) const
finds the number of depth bins and which is the number to start with
int firstHEDoublePhiRing() const
int nTowers(int version) const
number of towers (version dependent)
int ietaAbs() const
get the absolute value of the cell ieta
int iphi() const
get the cell iphi
int firstHFRingInTower(int ietaTower) const
since the towers are irregular in eta in HF
int version() const
get the version code for the trigger tower
std::vector< std::vector< double > > tmp
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
HcalTrigTowerGeometry(const HcalTopology *topology)
int iphi() const
get the tower iphi
std::vector< HcalDetId > detIds(const HcalTrigTowerDetId &) const
int firstHFTower(int version) const