537 {
538
539 const PixelID* pixelId = nullptr;
540 const SCT_ID* sctId = nullptr;
541
542 if (
m_detStore->retrieve(pixelId,
"PixelID").isFailure()) {
544 return false;
545 }
546
547 if (
m_detStore->retrieve(sctId,
"SCT_ID").isFailure()) {
549 return false;
550 }
551
552 short subdetid = 1;
553
555
556 Identifier offlineId = pixelId->
wafer_id(hash);
557
558 if(offlineId==0) continue;
559
560 short barrel_ec = pixelId->
barrel_ec(offlineId);
561 if(abs(barrel_ec)>2) continue;
562 short layer_disk = pixelId->
layer_disk(offlineId);
565 auto t = std::make_tuple(subdetid, barrel_ec, layer_disk);
566 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator
it = hashMap.find(t);
567 if(it==hashMap.end())
568 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash) )));
569 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
570 }
571 subdetid = 2;
573
574 Identifier offlineId = sctId->
wafer_id(hash);
575
576 if(offlineId==0) continue;
577
578 short barrel_ec = sctId->
barrel_ec(offlineId);
579 short layer_disk = sctId->
layer_disk(offlineId);
582
583 auto t = std::make_tuple(subdetid, barrel_ec, layer_disk);
584 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator
it = hashMap.find(t);
585 if(it==hashMap.end())
586 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash))));
587 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
588 }
589
592
593 int layerId=0;
594
595 for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
596
597 short subdetId = std::get<0>((*it).first);
598 short barrel_ec = std::get<1>((*it).first);
599
601
602 if(subdetId == 1) {
603 for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
605 }
606 }
607 if(subdetId == 2) {
608 for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
610 }
611 }
612 }
613
614
615 for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it) {
616
617
618
620
621 }
622 return true;
623}
int layer_disk(const Identifier &id) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0).
size_type wafer_hash_max() const
int eta_module(const Identifier &id) const
int phi_module(const Identifier &id) const
size_type wafer_hash_max() const
int layer_disk(const Identifier &id) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
int phi_module(const Identifier &id) const
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0).
int eta_module(const Identifier &id) const
std::vector< short > m_layerInfo[3]
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.