106 for(
int hash = 0; hash<(int)
m_pixelId->wafer_hash_max(); hash++) {
110 if(offlineId==0)
continue;
112 short barrel_ec =
m_pixelId->barrel_ec(offlineId);
113 if(std::abs(barrel_ec)>2)
continue;
114 short layer_disk =
m_pixelId->layer_disk(offlineId);
115 short phi_index =
m_pixelId->phi_module(offlineId);
116 short eta_index =
m_pixelId->eta_module(offlineId);
119 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, layer_disk);
121 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >
::iterator it = hashMap.find(t);
122 if(it==hashMap.end())
123 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash) )));
124 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
127 for(
int hash = 0; hash<(int)
m_sctId->wafer_hash_max(); hash++) {
131 if(offlineId==0)
continue;
133 short barrel_ec =
m_sctId->barrel_ec(offlineId);
134 short layer_disk =
m_sctId->layer_disk(offlineId);
135 short phi_index =
m_sctId->phi_module(offlineId);
136 short eta_index =
m_sctId->eta_module(offlineId);
140 auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, layer_disk);
142 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >
::iterator it = hashMap.find(t);
143 if(it==hashMap.end())
144 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash))));
145 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
157 for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >
::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
159 short subdetId = std::get<1>((*it).first);
160 short barrel_ec = std::get<0>((*it).first);
161 if(barrel_ec==-100) barrel_ec = 0;
170 float minBound = 100000.0;
171 float maxBound =-100000.0;
174 for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
188 ATH_MSG_ERROR(
"nullptr SiDetectorElement with idHash " << (*hIt).m_hash);
193 rc += sqrt(
C(0)*
C(0)+
C(1)*
C(1));
194 if(p->zMin() < minBound) minBound = p->zMin();
195 if(p->zMax() > maxBound) maxBound = p->zMax();
199 if(p->rMin() < minBound) minBound = p->rMin();
200 if(p->rMax() > maxBound) maxBound = p->rMax();
212 for(
int l=0;l<layerId;l++) {
218 oldL = oldL < M ? oldL : oldL - M;