29 DetId wrappedId(originalId);
30 EcalTowerMap::const_iterator
i=
m_items.find(wrappedId);
33 int etaTower=i->tower.ietaAbs();
34 int phiTower=i->tower.iphi();
68 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
97 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
108 int dQuadrant = toQuadrant-myId.
iquadrant();
127 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
133 int newPhiTower = phiTower;
134 int dQuadrant = toQuadrant-fromQuadrant;
138 newPhiTower = phiTower;
150 newPhiTower = EcalTrigTowerDetId::kEETowersInPhiPerQuadrant * 4 - phiTower + 1;
154 edm::LogError(
"EcalTrigTowerConstituentsMapError") <<
"This should never be reached. Profound error!";
161 throw cms::Exception(
"EcalTrigTowers") <<
"Cell with id " << std::hex << cell.
rawId() <<
std::dec <<
" is already mapped to a EcalTrigTower " <<
m_items.find(cell)->tower << std::endl;
168 std::vector<DetId>
items;
176 int etaxtalMin=(
id.ietaAbs()-1)*5+1;
177 int phixtalMin=((
id.iphi()-1)*5+11)%360;
178 if(phixtalMin<=0)phixtalMin+=360;
179 int etaxtalMax=
id.ietaAbs()*5;
180 int phixtalMax=((
id.iphi())*5+10)%360;
181 if(phixtalMax<=0) phixtalMax+=360;
182 for(
int e=etaxtalMin;
e<=etaxtalMax;
e++)
183 for(
int p=phixtalMin;
p<=phixtalMax;
p++)
192 EcalTowerMap_by_towerDetId::const_iterator lb,ub;
194 boost::tuples::tie(lb,ub)=boost::get<1>(
m_items).equal_range(
id);
199 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
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()
uint32_t rawId() const
get the raw id
static const int kEETowersInPhiPerQuadrant
int ietaAbs() const
get the absolute value of the tower ieta
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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) ...
Detector det() const
get the detector field from this detid