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());
CartesianTrajectoryError cartesianError() const
const LocalTrajectoryError & localError() const
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
LocalError positionError() const
GlobalPoint position() const
virtual float thickness() const =0
GlobalPoint globalPosition() const
const GlobalError position() const
Position error submatrix.
LocalVector localDirection() const
FDLC::const_iterator ConstFDLI
std::vector< const DetLayer * > DLC
Abs< T >::type abs(const T &t)
const BasicVectorType & basicVector() const
TSOS crossingState(const FreeTrajectoryState &fts, PropagationDirection dir) const
bool wellInside(const FreeTrajectoryState &fts, PropagationDirection dir, const BarrelDetLayer *bl, DLC &result) const
std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection, int &counter) const final
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
GlobalVector globalDirection() const
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
FreeTrajectoryState const * freeState(bool withErrors=true) const
virtual const BoundDisk & specificSurface() const final
Log< level::Warning, false > LogWarning
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.
BDLC::const_iterator ConstBDLI
const Bounds & bounds() const