24 DetId wrappedId(originalId);
25 EcalTowerMap::const_iterator
i =
m_items.find(wrappedId);
27 int etaTower = i->tower.ietaAbs();
28 int phiTower = i->tower.iphi();
60 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
89 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
95 const int& toQuadrant,
96 const int& tozside)
const {
101 int dQuadrant = toQuadrant - myId.
iquadrant();
102 switch (dQuadrant % 4) {
120 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
126 int newPhiTower = phiTower;
127 int dQuadrant = toQuadrant - fromQuadrant;
129 switch (dQuadrant % 4) {
131 newPhiTower = phiTower;
143 newPhiTower = EcalTrigTowerDetId::kEETowersInPhiPerQuadrant * 4 - phiTower + 1;
147 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
155 <<
"Cell with id " << std::hex << cell.
rawId() <<
std::dec <<
" is already mapped to a EcalTrigTower "
156 <<
m_items.find(cell)->tower << std::endl;
163 std::vector<DetId>
items;
170 int etaxtalMin = (
id.ietaAbs() - 1) * 5 + 1;
171 int phixtalMin = ((
id.iphi() - 1) * 5 + 11) % 360;
174 int etaxtalMax =
id.ietaAbs() * 5;
175 int phixtalMax = ((
id.iphi()) * 5 + 10) % 360;
178 for (
int e = etaxtalMin;
e <= etaxtalMax;
e++)
179 for (
int p = phixtalMin;
p <= phixtalMax;
p++)
186 EcalTowerMap_by_towerDetId::const_iterator lb, ub;
188 boost::tuples::tie(lb, ub) = boost::get<1>(
m_items).equal_range(
id);
192 items.emplace_back((*lb).cell);
int changeTowerQuadrant(int phiTower, int fromQuadrant, int toQuadrant) const
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
constexpr uint32_t rawId() const
get the raw id
Log< level::Error, false > LogError
DetId wrapEcalTrigTowerDetId(const DetId &id) const
Wrap a generic EcalTrigTowerDetId to the equivalent one in z+ Quadrant 1 (from 0 < phi < pi/2) ...
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
EcalTrigTowerConstituentsMap()
static const int kEETowersInPhiPerQuadrant
int ietaAbs() const
get the absolute value of the tower ieta
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
static const int ETAPHIMODE
int iphi() const
get the tower iphi
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
DetId wrapEEDetId(const DetId &id) const
Wrap a generic EEDetId to the equivalent one in z+ Quadrant 1 (from 0 < phi < pi/2) ...
constexpr Detector det() const
get the detector field from this detid