27 const float toCloseToEachOther2 = 1
e-4 * 1
e-4;
28 if UNLIKELY ((middlePoint - initialPoint).
mag2() < toCloseToEachOther2) {
30 <<
"initial state and PCA are identical. Things are bound to fail. Do not add the link.";
41 LogDebug(
"SimpleNavigableLayer") <<
"self propagating(" <<
dir <<
") from:\n"
44 <<
" and the direction is: " <<
dir;
54 LogDebug(
"SimpleNavigableLayer") <<
"second propagation(" <<
dir <<
") to: \n" << dest2;
55 double finalDot = (middlePoint - initialPoint).basicVector().dot((finalPoint - middlePoint).basicVector());
57 LogDebug(
"SimpleNavigableLayer") <<
"switch side back: ABORT.";
73 if (theCheckCrossingSide) {
74 bool backTobackTransverse =
78 if (backTobackTransverse || backToback) {
79 LogTrace(
"TkNavigation") <<
"Crossing over prevented!\nStaring from (x,y,z,r) (" << fts.
position().
x() <<
","
103 float length = bounds.
length() * 0.5f;
110 const float nSigma = theEpsilon;
132 if (fl == detLayer()) {
133 LogDebug(
"SimpleNavigableLayer") <<
"self propagating from:\n" << fts <<
"\n to \n" << *propState.
freeState();
137 if (theCheckCrossingSide) {
138 bool backTobackTransverse =
142 if (backTobackTransverse || backToback) {
143 LogTrace(
"TkNavigation") <<
"Crossing over prevented!\nStaring from (x,y,z,r) (" << fts.
position().
x() <<
","
145 <<
") going to TSOS (x,y,z,r)" << propState.
globalPosition().
x() <<
","
164 const float nSigma = theEpsilon;
175 return (innerR +
deltaR < rpos && rpos < outerR -
deltaR);
217 typedef std::vector<const DetLayer*> Lvect;
218 typedef std::set<const DetLayer*> Lset;
221 const Lvect& someLayers = nextLayers(fts, timeDirection);
222 if (someLayers.empty()) {
223 LogDebug(
"SimpleNavigableLayer") <<
"Number of compatible layers: " << 0;
228 Lset layerToTry, nextLayerToTry;
229 layerToTry.insert(someLayers.begin(), someLayers.end());
231 while (!layerToTry.empty() && (
counter++) <= 150) {
232 LogDebug(
"SimpleNavigableLayer") <<
counter <<
"] going to check on : " << layerToTry.size() <<
" next layers.";
234 nextLayerToTry.clear();
235 for (
auto toTry : layerToTry) {
237 LogDebug(
"SimpleNavigableLayer") <<
counter <<
"] adding layer with pointer: " << (toTry)
238 <<
" first detid: " << (toTry)->basicComponents().front()->geographicalId();
239 if (!collect.insert(toTry).second)
243 Lvect&& nextLayers = school->nextLayers(*toTry, fts, timeDirection);
244 LogDebug(
"SimpleNavigableLayer") <<
counter <<
"] this layer has : " << nextLayers.size() <<
" next layers.";
245 nextLayerToTry.insert(nextLayers.begin(), nextLayers.end());
248 layerToTry.swap(nextLayerToTry);
251 edm::LogWarning(
"SimpleNavigableLayer") <<
"WARNING: compatibleLayers() more than 150 iterations!!! Bailing out..";
256 LogDebug(
"SimpleNavigableLayer") <<
"Number of compatible layers: " << collect.size();
258 return Lvect(collect.begin(), collect.end());