108 for(
int hash = 0; hash<static_cast<int>(
m_pixelId->wafer_hash_max()); hash++) {
112 if(offlineId==0)
continue;
114 short barrel_ec =
m_pixelId->barrel_ec(offlineId);
115 if(std::abs(barrel_ec)>2) {std::cout <<
"barrel " <<
" " << hash << std::endl;
continue;}
117 short phi_index =
m_pixelId->phi_module(offlineId);
118 short eta_index =
m_pixelId->eta_module(offlineId);
119 int lay_id =
m_pixelId->layer_disk(offlineId);
120 int eta_mod =
m_pixelId->eta_module(offlineId);
123 if(barrel_ec== 0) vol_id = 8;
124 if(barrel_ec==-2) vol_id = 7;
125 if(barrel_ec== 2) vol_id = 9;
127 int new_vol=0, new_lay=0;
129 if(vol_id == 7 || vol_id == 9) {
130 new_vol = 10*vol_id + lay_id;
133 else if(vol_id == 8) {
135 new_vol = 10*vol_id + lay_id;
138 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, new_vol, new_lay);
140 std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >
::iterator it = hashMap.find(t);
141 if(it==hashMap.end())
142 hashMap.insert(std::pair<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >(t,std::vector<GBTSPhiEtaHash>(1,
GBTSPhiEtaHash(phi_index, eta_index, hash) )));
143 else (*it).second.push_back(
GBTSPhiEtaHash(phi_index, eta_index, hash));
149 for(
int hash = 0; hash<static_cast<int>(
m_sctId->wafer_hash_max()); hash++) {
153 if(offlineId==0)
continue;
155 short barrel_ec =
m_sctId->barrel_ec(offlineId);
156 short phi_index =
m_sctId->phi_module(offlineId);
157 short eta_index =
m_sctId->eta_module(offlineId);
161 if(barrel_ec) vol_id = 12;
162 if(barrel_ec>0) vol_id = 14;
164 int lay_id =
m_sctId->layer_disk(offlineId);
166 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, vol_id, lay_id);
168 std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >
::iterator it = hashMap.find(t);
169 if(it==hashMap.end())
170 hashMap.insert(std::pair<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >(t,std::vector<GBTSPhiEtaHash>(1,
GBTSPhiEtaHash(phi_index, eta_index, hash))));
171 else (*it).second.push_back(
GBTSPhiEtaHash(phi_index, eta_index, hash));
185 for(std::map<std::tuple<int,int,short,short>,std::vector<GBTSPhiEtaHash> >
::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
187 short vol_id = std::get<2>((*it).first);
188 short lay_id = std::get<3>((*it).first);
190 int combinedId =
static_cast<int>(vol_id)*1000 + lay_id;
192 short subdetId = std::get<1>((*it).first);
193 short barrel_ec = std::get<0>((*it).first);
195 if(barrel_ec==-100) barrel_ec = 0;
204 float minBound = 100000.0;
205 float maxBound =-100000.0;
208 for(std::vector<GBTSPhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
222 ATH_MSG_ERROR(
"nullptr SiDetectorElement with idHash " << (*hIt).m_hash);
227 rc += sqrt(
C(0)*
C(0)+
C(1)*
C(1));
228 if(p->zMin() < minBound) minBound = p->zMin();
229 if(p->zMax() > maxBound) maxBound = p->zMax();
233 if(p->rMin() < minBound) minBound = p->rMin();
234 if(p->rMax() > maxBound) maxBound = p->rMax();
239 throw std::runtime_error(
"GBTSTrigL2LayerNumberTool::createModuleHashMap: nModules is zero.");
249 for(
int l=0;l<layerId;l++) {
255 oldL = oldL < M ? oldL : oldL - M;