107 for(
int hash = 0; hash<static_cast<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) {std::cout <<
"barrel " <<
" " << hash << std::endl;
continue;}
116 short phi_index =
m_pixelId->phi_module(offlineId);
117 short eta_index =
m_pixelId->eta_module(offlineId);
118 int lay_id =
m_pixelId->layer_disk(offlineId);
119 int eta_mod =
m_pixelId->eta_module(offlineId);
122 if(barrel_ec== 0) vol_id = 8;
123 if(barrel_ec==-2) vol_id = 7;
124 if(barrel_ec== 2) vol_id = 9;
126 int new_vol=0, new_lay=0;
128 if(vol_id == 7 || vol_id == 9) {
129 new_vol = 10*vol_id + lay_id;
132 else if(vol_id == 8) {
134 new_vol = 10*vol_id + lay_id;
137 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, new_vol, new_lay);
139 std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >
::iterator it = hashMap.find(t);
140 if(it==hashMap.end())
141 hashMap.insert(std::pair<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >(t,std::vector<GBTSPhiEtaHash>(1,
GBTSPhiEtaHash(phi_index, eta_index, hash) )));
142 else (*it).second.push_back(
GBTSPhiEtaHash(phi_index, eta_index, hash));
148 for(
int hash = 0; hash<static_cast<int>(
m_sctId->wafer_hash_max()); hash++) {
152 if(offlineId==0)
continue;
154 short barrel_ec =
m_sctId->barrel_ec(offlineId);
155 short phi_index =
m_sctId->phi_module(offlineId);
156 short eta_index =
m_sctId->eta_module(offlineId);
160 if(barrel_ec) vol_id = 12;
161 if(barrel_ec>0) vol_id = 14;
163 int lay_id =
m_sctId->layer_disk(offlineId);
165 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, vol_id, lay_id);
167 std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >
::iterator it = hashMap.find(t);
168 if(it==hashMap.end())
169 hashMap.insert(std::pair<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >(t,std::vector<GBTSPhiEtaHash>(1,
GBTSPhiEtaHash(phi_index, eta_index, hash))));
170 else (*it).second.push_back(
GBTSPhiEtaHash(phi_index, eta_index, hash));
184 for(std::map<std::tuple<int,int,short,short>,std::vector<GBTSPhiEtaHash> >
::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
186 short vol_id = std::get<2>((*it).first);
187 short lay_id = std::get<3>((*it).first);
189 int combinedId =
static_cast<int>(vol_id)*1000 + lay_id;
191 short subdetId = std::get<1>((*it).first);
192 short barrel_ec = std::get<0>((*it).first);
194 if(barrel_ec==-100) barrel_ec = 0;
203 float minBound = 100000.0;
204 float maxBound =-100000.0;
207 for(std::vector<GBTSPhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
221 ATH_MSG_ERROR(
"nullptr SiDetectorElement with idHash " << (*hIt).m_hash);
226 rc += sqrt(
C(0)*
C(0)+
C(1)*
C(1));
227 if(p->zMin() < minBound) minBound = p->zMin();
228 if(p->zMax() > maxBound) maxBound = p->zMax();
232 if(p->rMin() < minBound) minBound = p->rMin();
233 if(p->rMax() > maxBound) maxBound = p->rMax();
245 for(
int l=0;l<layerId;l++) {
251 oldL = oldL < M ? oldL : oldL - M;