20 #include "Identifier/Identifier.h" 
   33   SmartIF<StoreGateSvc> 
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
 
   35     throw std::runtime_error(
"DiscOverlapDescriptor can not locate DetectorStore");
 
   44   const PixelID* pixIdHelper = 
nullptr;
 
   45   if (
detStore->retrieve(pixIdHelper, 
"PixelID").isFailure()) {
 
   46     throw std::runtime_error(
"DiscOverlapDescriptor can not locate PixelID");
 
   54   const SCT_ID* sctIdHelper = 
nullptr;
 
   55   if (
detStore->retrieve(sctIdHelper, 
"SCT_ID").isFailure()) {
 
   56     throw std::runtime_error(
"DiscOverlapDescriptor can not locate SCT_ID");
 
   64                                                     const std::vector<Trk::BinUtility>& singleBinUtils,
 
   66   m_bin_array(bin_array),
 
   67   m_singleBinUtils(singleBinUtils),
 
   93     size_t newCapacity = surfaces.size() + 19;
 
   94     if (pElement->
otherSide()) newCapacity += 19;
 
   95     surfaces.reserve(newCapacity);
 
  130                 (*(surf[
offset])).associatedDetectorElementIdentifier())
 
  132                 (*(surf[
offset])).associatedDetectorElementIdentifier());
 
  135             etamod > (etaModule + 1)) {
 
  140         double PrevDeltaPhi = 9999.;
 
  141         double NextDeltaPhi = -9999.;
 
  143           if (
etamod == (etaModule-1) ) {
 
  144             if( tsf.
center().phi() == (*(surf[
ss])).center().phi() )
 
  145               samePhi_PrevEta = surf[
ss];
 
  146             double DeltaPhi = tsf.
center().phi() - (*(surf[
ss])).center().phi();
 
  147             if( DeltaPhi < PrevDeltaPhi && DeltaPhi > 0) {
 
  148               previousPhi_PrevEta = surf[
ss];
 
  149               PrevDeltaPhi = DeltaPhi;
 
  151             if( DeltaPhi > NextDeltaPhi && DeltaPhi < 0) {
 
  152               nextPhi_PrevEta = surf[
ss];
 
  153               NextDeltaPhi = DeltaPhi;
 
  155           } 
else if (
etamod == (etaModule+1) ) {
 
  156             if( tsf.
center().phi() == (*(surf[
ss])).center().phi() )
 
  157               samePhi_NextEta = surf[
ss];
 
  158             double DeltaPhi = tsf.
center().phi() - (*(surf[
ss])).center().phi();
 
  159             if( DeltaPhi < PrevDeltaPhi && DeltaPhi > 0) {
 
  160               previousPhi_NextEta = surf[
ss];
 
  161               PrevDeltaPhi = DeltaPhi;
 
  164             if( DeltaPhi > NextDeltaPhi && DeltaPhi < 0) {
 
  165               nextPhi_NextEta = surf[
ss];
 
  166               NextDeltaPhi = DeltaPhi;
 
  173       if (samePhi_PrevEta) {
 
  175         if (PhiEta_Element) {
 
  181       if (previousPhi_PrevEta) {
 
  183         if (PhiEta_Element) {
 
  192       if (nextPhi_PrevEta) {
 
  194         if (PhiEta_Element) {
 
  203       if (samePhi_NextEta) {
 
  205         if (PhiEta_Element) {
 
  211       if (previousPhi_NextEta) {
 
  213         if (PhiEta_Element) {
 
  222       if (nextPhi_NextEta) {
 
  224         if (PhiEta_Element) {
 
  240   std::cout << 
"Dumping Surfaces for " << (
m_pixelCase ? 
"Pixel " : 
"SCT ")
 
  241             << 
"with size = " << surfaces.size() << std::endl;
 
  246   for (
auto & surface : surfaces) {
 
  247     Identifier hitId = (surface.object)->associatedDetectorElementIdentifier();
 
  249       std::cout <<  
"barrel_ec " << pixIdHelper->
barrel_ec(hitId)
 
  250                 << 
", layer_disk " << pixIdHelper->
layer_disk(hitId)
 
  251                 << 
", phi_module " << pixIdHelper->
phi_module(hitId)
 
  252                 << 
", eta_module " << pixIdHelper->
eta_module(hitId) << std::endl;
 
  254       std::cout <<  
"barrel_ec " << sctIdHelper->
barrel_ec(hitId)
 
  255                 << 
", layer_disk " << sctIdHelper->
layer_disk(hitId)
 
  256                 << 
", phi_module " << sctIdHelper->
phi_module(hitId)
 
  257                 << 
", eta_module " << sctIdHelper->
eta_module(hitId)
 
  258                 << 
", side " << sctIdHelper->
side(hitId) << std::endl;