22 m_addMoreSurfaces(addMoreSurfaces),
23 m_etaSlices(eta_slices),
24 m_phiSlices(phi_slices) {}
29 std::vector<Trk::SurfaceIntersection>& cSurfaces,
45 size_t newCapacity = cSurfaces.size();
57 cSurfaces.reserve(newCapacity);
62 double positionPhi =
pos.phi() +
M_PI;
84 unsigned int next = 1;
88 currentElement = currentElement->
nextInEta();
96 unsigned int prev = 1;
98 while (currentElement and prev<(
unsigned int)
m_etaSlices) {
100 currentElement = currentElement->
prevInEta();
101 if (currentElement) {
108 unsigned int next_phi = 0;
116 unsigned int next_eta = 0;
119 while (currentElement_nextPhi and currentElement_prevPhi and next_eta<(
unsigned int)
m_etaSlices) {
121 currentElement_nextPhi = currentElement_nextPhi->
nextInEta();
123 currentElement_prevPhi = currentElement_prevPhi->
nextInEta();
127 unsigned int prev_eta = 0;
128 currentElement_nextPhi = currentElementNextPhi;
129 currentElement_prevPhi = currentElementPrevPhi;
130 while (currentElement_nextPhi and currentElement_prevPhi and prev_eta<(
unsigned int)
m_etaSlices) {
132 currentElement_nextPhi = currentElement_nextPhi->
prevInEta();
134 currentElement_prevPhi = currentElement_prevPhi->
prevInEta();
138 currentElementNextPhi = currentElementNextPhi->
nextInPhi();
139 currentElementPrevPhi = currentElementPrevPhi->
prevInPhi();
146 if (surfacePhi < positionPhi) {
155 double positionEta =
pos.eta();
156 double surfaceEta = tsf.
center().eta();
158 if (surfaceEta < positionEta) {
177 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
182 const PixelID* pixIdHelper =
nullptr;
183 if (
detStore->retrieve(pixIdHelper,
"PixelID").isFailure()) {
189 std::cout <<
"Dumping Surfaces for Pixel with size = " << surfaces.size() << std::endl;
190 for (
auto & surface : surfaces) {
191 Identifier hitId = (surface.object)->associatedDetectorElementIdentifier();
192 std::cout <<
"barrel_ec " <<
m_pixIdHelper.load()->barrel_ec(hitId) <<
", layer_disk " <<
m_pixIdHelper.load()->layer_disk(hitId) <<
", phi_module " <<
m_pixIdHelper.load()->phi_module(hitId) <<
", eta_module " <<
m_pixIdHelper.load()->eta_module(hitId) << std::endl;