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();
70 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
99 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
105 const int& toQuadrant,
106 const int& tozside)
const {
111 int dQuadrant = toQuadrant - myId.
iquadrant();
112 switch (dQuadrant % 4) {
130 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
136 int newPhiTower = phiTower;
137 int dQuadrant = toQuadrant - fromQuadrant;
139 switch (dQuadrant % 4) {
141 newPhiTower = phiTower;
157 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
165 <<
"Cell with id " << std::hex << cell.
rawId() <<
std::dec <<
" is already mapped to a EcalTrigTower " 166 <<
m_items.find(cell)->tower << std::endl;
173 std::vector<DetId>
items;
180 int etaxtalMin = (
id.ietaAbs() - 1) * 5 + 1;
181 int phixtalMin = ((
id.iphi() - 1) * 5 + 11) % 360;
184 int etaxtalMax =
id.ietaAbs() * 5;
185 int phixtalMax = ((
id.iphi()) * 5 + 10) % 360;
188 for (
int e = etaxtalMin;
e <= etaxtalMax;
e++)
189 for (
int p = phixtalMin;
p <= phixtalMax;
p++)
196 EcalTowerMap_by_towerDetId::const_iterator lb, ub;
198 boost::tuples::tie(lb, ub) = boost::get<1>(
m_items).equal_range(
id);
202 items.emplace_back((*lb).cell);
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)