107 for(
int hash = 0; hash<(int)
m_pixelId->wafer_hash_max(); hash++) {
111 if(offlineId==0)
continue;
113 short barrel_ec =
m_pixelId->barrel_ec(offlineId);
114 if(std::abs(barrel_ec)>2)
continue;
115 short layer_disk =
m_pixelId->layer_disk(offlineId);
116 short phi_index =
m_pixelId->phi_module(offlineId);
117 short eta_index =
m_pixelId->eta_module(offlineId);
120 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, layer_disk);
122 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >
::iterator it = hashMap.find(t);
123 if(it==hashMap.end())
124 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash) )));
125 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
128 for(
int hash = 0; hash<(int)
m_sctId->wafer_hash_max(); hash++) {
132 if(offlineId==0)
continue;
134 short barrel_ec =
m_sctId->barrel_ec(offlineId);
135 short layer_disk =
m_sctId->layer_disk(offlineId);
136 short phi_index =
m_sctId->phi_module(offlineId);
137 short eta_index =
m_sctId->eta_module(offlineId);
141 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, layer_disk);
143 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >
::iterator it = hashMap.find(t);
144 if(it==hashMap.end())
145 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash))));
146 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
158 for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >
::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
160 short subdetId = std::get<1>((*it).first);
161 short barrel_ec = std::get<0>((*it).first);
162 if(barrel_ec==-100) barrel_ec = 0;
171 float minBound = 100000.0;
172 float maxBound =-100000.0;
175 for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
189 ATH_MSG_ERROR(
"nullptr SiDetectorElement with idHash " << (*hIt).m_hash);
194 rc += sqrt(
C(0)*
C(0)+
C(1)*
C(1));
195 if(p->zMin() < minBound) minBound = p->zMin();
196 if(p->zMax() > maxBound) maxBound = p->zMax();
200 if(p->rMin() < minBound) minBound = p->rMin();
201 if(p->rMax() > maxBound) maxBound = p->rMax();
206 throw std::runtime_error(
"TrigL2LayerNumberTool::createModuleHashMap: nModules is zero.");
216 for(
int l=0;l<layerId;l++) {
222 oldL = oldL < M ? oldL : oldL - M;