14 : doNose_(conf.getParameter<
bool>(
"doNose")),
15 minEta_(conf.getParameter<double>(
"minEta")),
16 maxEta_(conf.getParameter<double>(
"maxEta")),
17 minPhi_(conf.getParameter<double>(
"minPhi")),
18 maxPhi_(conf.getParameter<double>(
"maxPhi")),
19 nBinsEta_(conf.getParameter<
int>(
"nBinsEta")),
20 nBinsPhi_(conf.getParameter<
int>(
"nBinsPhi")),
21 binsEta_(conf.getParameter<
std::
vector<double> >(
"binsEta")),
22 binsPhi_(conf.getParameter<
std::
vector<double> >(
"binsPhi")) {
25 <<
"HGCalTriggerTowerGeometryHelper nBinsEta for the tower map not consistent with binsEta size" << std::endl;
30 <<
"HGCalTriggerTowerGeometryHelper nBinsPhi for the tower map not consistent with binsPhi size" << std::endl;
35 for (
unsigned int bin1 = 0; bin1 !=
nBinsEta_ + 1; bin1++) {
42 for (
unsigned int bin2 = 0; bin2 !=
nBinsPhi_ + 1; bin2++) {
48 for (
unsigned int bin1 = 0; bin1 !=
nBinsEta_; bin1++) {
49 for (
unsigned int bin2 = 0; bin2 !=
nBinsPhi_; bin2++) {
62 if (!l1tTriggerTowerMappingStream.is_open()) {
63 throw cms::Exception(
"MissingDataFile") <<
"Cannot open HGCalTriggerGeometry L1TTriggerTowerMapping file\n";
66 unsigned trigger_cell_id = 0;
67 unsigned short iEta = 0;
68 unsigned short iPhi = 0;
70 for (; l1tTriggerTowerMappingStream >> trigger_cell_id >>
iEta >> iPhi;) {
73 <<
"HGCalTriggerTowerGeometryHelper warning inconsistent mapping TC : " << trigger_cell_id
74 <<
" to TT iEta: " <<
iEta <<
" iPhi: " << iPhi <<
" when max #bins eta: " <<
nBinsEta_
80 l1tTriggerTowerMappingStream.close();
90 unsigned int bin_eta = 0;
99 <<
" did not manage to map eta " <<
eta <<
" to any Trigger Tower\n";
102 bin_eta = bin_eta_l -
binsEta_.begin() - 1;
106 unsigned int bin_phi = 0;
114 <<
" did not manage to map phi " <<
phi <<
" to any Trigger Tower\n";
117 bin_phi = bin_phi_l -
binsPhi_.begin() - 1;
124 unsigned int trigger_cell_id = thecell.
detId();
130 return tower_id_itr->second;