9 : theTopology( topology ) {
20 std::vector<HcalTrigTowerDetId>
23 std::vector<HcalTrigTowerDetId>
results;
25 int HfTowerPhiSize,
shift;
49 ieta *= cellId.
zside();
55 int iphi = (((cellId.
iphi()+
shift)/HfTowerPhiSize) * HfTowerPhiSize +
shift)%72;
66 int iphi1 = cellId.
iphi();
67 int ieta = cellId.
ieta();
81 std::vector<HcalDetId>
86 int tower_ieta = hcalTrigTowerDetId.
ieta();
87 int tower_iphi = hcalTrigTowerDetId.
iphi();
89 int cell_ieta = tower_ieta;
90 int cell_iphi = tower_iphi;
92 int min_depth, n_depths;
98 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
106 for (
int ho_depth = min_depth; ho_depth <= min_depth + n_depths - 1; ho_depth++)
119 if (tower_iphi%2 == 0) cell_iphi = tower_iphi - 1;
121 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
125 if (
abs(tower_ieta) == 28){
127 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++){
128 if (tower_ieta < 0) results.push_back(
HcalDetId(
HcalEndcap, tower_ieta - 1, cell_iphi, cell_depth));
129 if (tower_ieta > 0) results.push_back(
HcalDetId(
HcalEndcap, tower_ieta + 1, cell_iphi, cell_depth));
141 else HfTowerPhiSize = 72 /
nPhiBins(tower_ieta);
146 for (
int iHFTowerPhiSegment = 0; iHFTowerPhiSegment < HfTowerPhiSize; iHFTowerPhiSegment++){
148 cell_iphi = (tower_iphi / HfTowerPhiSize) * HfTowerPhiSize;
150 cell_iphi += iHFTowerPhiSegment;
152 cell_iphi = cell_iphi % 72;
155 if (cell_iphi%2 == 0)
continue;
157 for (
int iHFTowerEtaSegment = 0; iHFTowerEtaSegment < HfTowerEtaSize; iHFTowerEtaSegment++){
159 cell_ieta = FirstHFRingInTower + iHFTowerEtaSegment;
161 if (cell_ieta >= 40 && cell_iphi%4 == 1)
continue;
167 if (tower_ieta < 0) zside = -1;
171 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
174 if ( zside * cell_ieta == 30 ) {
176 for (
int cell_depth = min_depth; cell_depth <= min_depth + n_depths - 1; cell_depth++)
192 int ietaAbs =
abs(ieta);
195 return (ietaAbs ==
nTowers()) ? 4 : 3;
202 int inputTower =
abs(ietaTower);
204 for(
int iTower =
firstHFTower(); 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)
int ieta() const
get the tower ieta
int hfTowerEtaSize(int ieta) const
int nPhiBins(int ieta) const
an interface for CaloSubdetectorGeometry
int depth() const
get the tower depth
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 ietaAbs() const
get the absolute value of the cell ieta
int iphi() const
get the cell iphi
void towerEtaBounds(int ieta, double &eta1, double &eta2) const
where this tower begins and ends in eta
int firstHFRingInTower(int ietaTower) const
since the towers are irregular in eta in HF
int firstHFQuadPhiRing() const
std::vector< std::vector< double > > tmp
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
static unsigned int const shift
HcalTrigTowerGeometry(const HcalTopology *topology)
int iphi() const
get the tower iphi
void setupHF(bool useShortFibers, bool useQuadRings)
bool useUpgradeConfigurationHFTowers_
std::vector< HcalDetId > detIds(const HcalTrigTowerDetId &) const