27 const float toCloseToEachOther2 = 1
e-4 * 1
e-4;
29 UNLIKELY((middlePoint - initialPoint).
mag2() < toCloseToEachOther2) {
31 <<
"initial state and PCA are identical. Things are bound to fail. Do not add the link.";
42 LogDebug(
"SimpleNavigableLayer") <<
"self propagating(" <<
dir <<
") from:\n"
45 <<
" and the direction is: " <<
dir;
55 LogDebug(
"SimpleNavigableLayer") <<
"second propagation(" <<
dir <<
") to: \n" << dest2;
56 double finalDot = (middlePoint - initialPoint).basicVector().dot((finalPoint - middlePoint).basicVector());
59 LogDebug(
"SimpleNavigableLayer") <<
"switch side back: ABORT.";
75 if (theCheckCrossingSide) {
76 bool backTobackTransverse =
80 if (backTobackTransverse || backToback) {
81 LogTrace(
"TkNavigation") <<
"Crossing over prevented!\nStaring from (x,y,z,r) (" << fts.
position().
x() <<
","
105 float length = bounds.
length() * 0.5f;
112 const float nSigma = theEpsilon;
120 if (
std::abs(zpos) < length + deltaZ)
123 return std::abs(zpos) < length - deltaZ;
134 if (fl == detLayer()) {
135 LogDebug(
"SimpleNavigableLayer") <<
"self propagating from:\n" << fts <<
"\n to \n" << *propState.
freeState();
139 if (theCheckCrossingSide) {
140 bool backTobackTransverse =
144 if (backTobackTransverse || backToback) {
145 LogTrace(
"TkNavigation") <<
"Crossing over prevented!\nStaring from (x,y,z,r) (" << fts.
position().
x() <<
","
147 <<
") going to TSOS (x,y,z,r)" << propState.
globalPosition().
x() <<
","
166 const float nSigma = theEpsilon;
177 return (innerR +
deltaR < rpos && rpos < outerR -
deltaR);
219 typedef std::vector<const DetLayer*> Lvect;
220 typedef std::set<const DetLayer*> Lset;
223 const Lvect& someLayers = nextLayers(fts, timeDirection);
224 if (someLayers.empty()) {
225 LogDebug(
"SimpleNavigableLayer") <<
"Number of compatible layers: " << 0;
230 Lset layerToTry, nextLayerToTry;
231 layerToTry.insert(someLayers.begin(), someLayers.end());
233 while (!layerToTry.empty() && (
counter++) <= 150) {
234 LogDebug(
"SimpleNavigableLayer") <<
counter <<
"] going to check on : " << layerToTry.size() <<
" next layers.";
236 nextLayerToTry.clear();
237 for (
auto toTry : layerToTry) {
239 LogDebug(
"SimpleNavigableLayer") <<
counter <<
"] adding layer with pointer: " << (toTry)
240 <<
" first detid: " << (toTry)->basicComponents().front()->geographicalId();
241 if (!collect.insert(toTry).second)
245 Lvect&& nextLayers = school->nextLayers(*toTry, fts, timeDirection);
246 LogDebug(
"SimpleNavigableLayer") <<
counter <<
"] this layer has : " << nextLayers.size() <<
" next layers.";
247 nextLayerToTry.insert(nextLayers.begin(), nextLayers.end());
250 layerToTry.swap(nextLayerToTry);
253 edm::LogWarning(
"SimpleNavigableLayer") <<
"WARNING: compatibleLayers() more than 150 iterations!!! Bailing out..";
258 LogDebug(
"SimpleNavigableLayer") <<
"Number of compatible layers: " << collect.size();
260 return Lvect(collect.begin(), collect.end());