531 {
532
533 const PixelID* pixelId = nullptr;
534 const SCT_ID* sctId = nullptr;
535
536 if (
m_detStore->retrieve(pixelId,
"PixelID").isFailure()) {
538 return false;
539 }
540
541 if (
m_detStore->retrieve(sctId,
"SCT_ID").isFailure()) {
543 return false;
544 }
545
546 short subdetid = 1;
547
549
550 Identifier offlineId = pixelId->
wafer_id(hash);
551
552 if(offlineId==0) continue;
553
554 short barrel_ec = pixelId->
barrel_ec(offlineId);
555 if(abs(barrel_ec)>2) continue;
556 short layer_disk = pixelId->
layer_disk(offlineId);
559 auto t = std::make_tuple(subdetid, barrel_ec, layer_disk);
560 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator
it = hashMap.find(t);
561 if(it==hashMap.end())
562 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash) )));
563 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
564 }
565 subdetid = 2;
567
568 Identifier offlineId = sctId->
wafer_id(hash);
569
570 if(offlineId==0) continue;
571
572 short barrel_ec = sctId->
barrel_ec(offlineId);
573 short layer_disk = sctId->
layer_disk(offlineId);
576
577 auto t = std::make_tuple(subdetid, barrel_ec, layer_disk);
578 std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator
it = hashMap.find(t);
579 if(it==hashMap.end())
580 hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1,
PhiEtaHash(phi_index, eta_index, hash))));
581 else (*it).second.push_back(
PhiEtaHash(phi_index, eta_index, hash));
582 }
583
586
587 int layerId=0;
588
589 for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
590
591 short subdetId = std::get<0>((*it).first);
592 short barrel_ec = std::get<1>((*it).first);
593
595
596 if(subdetId == 1) {
597 for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
599 }
600 }
601 if(subdetId == 2) {
602 for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
604 }
605 }
606 }
607
608
609 for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it) {
610
611
612
614
615 }
616 return true;
617}
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.