77 static const StoreGateSvc*
const detStore = getDetStore();
78 static const PixelID*
const pixIdHelper = getPixelID(detStore);
79 static const SCT_ID*
const sctIdHelper = getSCT_ID(detStore);
93 size_t newCapacity = surfaces.size() + 19;
94 if (pElement->
otherSide()) newCapacity += 19;
95 surfaces.reserve(newCapacity);
124 std::span<Trk::Surface const * const> surf =
m_bin_array->arrayObjects();
130 (*(surf[offset])).associatedDetectorElementIdentifier())
132 (*(surf[offset])).associatedDetectorElementIdentifier());
134 if (etamod == etaModule || etamod < (etaModule - 1) ||
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;
242 static const StoreGateSvc*
const detStore = getDetStore();
243 static const PixelID*
const pixIdHelper = getPixelID(detStore);
244 static const SCT_ID*
const sctIdHelper = getSCT_ID(detStore);
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;
bool reachableSurfaces(std::vector< Trk::SurfaceIntersection > &surfaces, const Trk::Surface &sf, const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override
get the compatible surfaces