34 DetId wrappedId(originalId);
35 EcalTowerMap::const_iterator
i =
m_items.find(wrappedId);
37 int etaTower =
i->tower.ietaAbs();
38 int phiTower =
i->tower.iphi();
44 <<
"EcalTrigTowerConstituentsMap " << originalId.
zside() <<
" " << etaTower <<
" " << phiTower;
71 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
100 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
106 const int& toQuadrant,
107 const int& tozside)
const {
112 int dQuadrant = toQuadrant - myId.
iquadrant();
113 switch (dQuadrant % 4) {
131 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
137 int newPhiTower = phiTower;
138 int dQuadrant = toQuadrant - fromQuadrant;
140 switch (dQuadrant % 4) {
142 newPhiTower = phiTower;
158 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
166 <<
"Cell with id " << std::hex << cell.
rawId() <<
std::dec <<
" is already mapped to a EcalTrigTower " 167 <<
m_items.find(cell)->tower << std::endl;
174 std::vector<DetId>
items;
181 int etaxtalMin = (
id.ietaAbs() - 1) * 5 + 1;
182 int phixtalMin = ((
id.iphi() - 1) * 5 + 11) % 360;
185 int etaxtalMax =
id.ietaAbs() * 5;
186 int phixtalMax = ((
id.iphi()) * 5 + 10) % 360;
189 for (
int e = etaxtalMin;
e <= etaxtalMax;
e++)
190 for (
int p = phixtalMin;
p <= phixtalMax;
p++)
197 EcalTowerMap_by_towerDetId::const_iterator lb, ub;
199 boost::tuples::tie(lb, ub) = boost::get<1>(
m_items).equal_range(
id);
203 items.emplace_back((*lb).cell);
Log< level::Info, true > LogVerbatim
void assign(const DetId &cell, const EcalTrigTowerDetId &tower)
set the association between a DetId and a tower
DetId changeEEDetIdQuadrantAndZ(const DetId &fromid, const int &toQuadrant, const int &tozside) const
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
int changeTowerQuadrant(int phiTower, int fromQuadrant, int toQuadrant) const
Log< level::Error, false > LogError
constexpr Detector det() const
get the detector field from this detid
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
EcalTrigTowerConstituentsMap()
DetId wrapEcalTrigTowerDetId(const DetId &id) const
Wrap a generic EcalTrigTowerDetId to the equivalent one in z+ Quadrant 1 (from 0 < phi < pi/2) ...
static const int kEETowersInPhiPerQuadrant
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static const int ETAPHIMODE
int ietaAbs() const
get the absolute value of the tower ieta
constexpr uint32_t rawId() const
get the raw id
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
DetId wrapEEDetId(const DetId &id) const
Wrap a generic EEDetId to the equivalent one in z+ Quadrant 1 (from 0 < phi < pi/2) ...
int iphi() const
get the tower iphi
static EcalTrigTowerDetId barrelTowerOf(const DetId &id)