26 theComponents(theRings.begin(), theRings.
end()),
27 theBinFinder(nullptr),
28 isOverlapping(
false) {
32 float theRmin =
rings.front()->basicComponents().front()->position().perp();
33 float theRmax = theRmin;
34 float theZmin =
rings.front()->position().z();
35 float theZmax = theZmin;
39 for (vector<const ForwardDetRing*>::const_iterator it =
rings.begin(); it !=
rings.end(); it++) {
40 vector<const GeomDet*> tmp2 = (*it)->basicComponents();
43 theRmin =
min(theRmin, (*it)->specificSurface().innerRadius());
44 theRmax =
max(theRmax, (*it)->specificSurface().outerRadius());
45 float halfThick = (*it)->surface().bounds().thickness() / 2.;
46 float zCenter = (*it)->surface().position().z();
47 theZmin =
min(theZmin, zCenter - halfThick);
48 theZmax =
max(theZmax, zCenter + halfThick);
57 float zPos = (theZmax + theZmin) / 2.;
65 <<
" Z: " << specificSurface().position().z() <<
" R1: " << specificSurface().innerRadius()
66 <<
" R2: " << specificSurface().outerRadius() <<
" Per.: " << bf.
isRPeriodic()
72 for (vector<const ForwardDetRing*>::iterator
i =
theRings.begin();
i <
theRings.end();
i++) {
80 vector<DetWithState>
result;
83 <<
" R1 " << specificSurface().innerRadius() <<
" R2: " << specificSurface().outerRadius()
86 pair<bool, TrajectoryStateOnSurface> compat = compatible(startingState, prop, est);
89 LogTrace(
metname) <<
" MuRingForwardLayer::compatibleDets: not compatible"
90 <<
" (should not have been selected!)";
101 LogTrace(
metname) <<
" MuRingForwardLayer::fastCompatibleDets, closestRing: " << closest <<
" R1 "
113 int nclosest =
result.size();
128 for (
unsigned int idet = closest + 1; idet <
theRings.size(); idet++) {
133 inside =
theRings[idet]->specificSurface().bounds().inside(nextPos);
136 LogTrace(
metname) <<
" MuRingForwardLayer::fastCompatibleDets:NextRing" << idet <<
" R1 "
137 <<
theRings[idet]->specificSurface().innerRadius()
138 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius() <<
" FTS R " << nextPos.
perp();
140 vector<DetWithState> nextRodDets =
theRings[idet]->compatibleDets(tsos, prop, est);
141 if (!nextRodDets.empty()) {
142 result.insert(
result.end(), nextRodDets.begin(), nextRodDets.end());
149 for (
int idet = closest - 1; idet >= 0; idet--) {
154 inside =
theRings[idet]->specificSurface().bounds().inside(nextPos);
157 LogTrace(
metname) <<
" MuRingForwardLayer::fastCompatibleDets:PreviousRing:" << idet <<
" R1 "
158 <<
theRings[idet]->specificSurface().innerRadius()
159 <<
" R2: " <<
theRings[idet]->specificSurface().outerRadius() <<
" FTS R " << nextPos.
perp();
161 vector<DetWithState> nextRodDets =
theRings[idet]->compatibleDets(tsos, prop, est);
162 if (!nextRodDets.empty()) {
163 result.insert(
result.end(), nextRodDets.begin(), nextRodDets.end());
171 <<
" on closest: " << nclosest <<
" # checked rings: " << 1 + nnextdet;
180 cout <<
"dummy implementation of MuRingForwardLayer::groupedCompatibleDets()" << endl;
181 return vector<DetGroup>();