21 const FDLC& outerLeftFL,
22 const FDLC& outerRightFL,
25 bool checkCrossingSide)
27 theDetLayer(detLayer),
28 theOuterBarrelLayers(outerBLC),
29 theOuterLeftForwardLayers(outerLeftFL),
30 theOuterRightForwardLayers(outerRightFL)
37 for (
ConstBDLI bl = outerBLC.begin(); bl != outerBLC.end(); bl++)
41 for (
ConstFDLI fl = outerLeftFL.begin(); fl != outerLeftFL.end(); fl++)
43 for (
ConstFDLI fl = outerRightFL.begin(); fl != outerRightFL.end(); fl++)
55 vector<const DetLayer*>
result;
84 vector<const DetLayer*>
result;
89 auto const momentum = fts.
momentum();
94 bool isInOutTrackBarrel = (transversePosition.dot(momentum) > 0);
97 bool isInOutTrackFWD = momentum.z() * zpos > 0;
101 bool dirOppositeXORisInOutTrackBarrel =
103 bool dirOppositeXORisInOutTrackFWD =
107 <<
"isInOutTrackBarrel: " << isInOutTrackBarrel << endl
108 <<
"isInOutTrackFWD: " << isInOutTrackFWD << endl
109 <<
"dirOppositeXORisInOutTrackFWD: " << dirOppositeXORisInOutTrackFWD << endl
110 <<
"dirOppositeXORisInOutTrackBarrel: " << dirOppositeXORisInOutTrackBarrel
113 bool signZmomentumXORdir =
117 LIKELY(dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
118 if (signZmomentumXORdir) {
124 else if (!dirOppositeXORisInOutTrackBarrel && !dirOppositeXORisInOutTrackFWD) {
125 if (signZmomentumXORdir) {
130 }
else if (!dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
133 if (signZmomentumXORdir) {
141 if (signZmomentumXORdir) {
149 bool goingIntoTheBarrel =
152 LogDebug(
"SimpleBarrelNavigableLayer") <<
"goingIntoTheBarrel: " << goingIntoTheBarrel;
156 if (!goingIntoTheBarrel) {
157 LogDebug(
"SimpleBarrelNavigableLayer")
158 <<
" state is not going toward the center of the barrel. not adding self search.";
161 unsigned int before = result.size();
162 LogDebug(
"SimpleBarrelNavigableLayer") <<
" I am trying to added myself as a next layer.";
163 wellInside(ftsWithoutErrors, dir, bl, result);
164 unsigned int after = result.size();
166 LogDebug(
"SimpleBarrelNavigableLayer") <<
" I have added myself as a next layer.";
174 edm::LogError(
"TkNavigation") <<
"ERROR: compatibleLayers() method used without all reachableLayers are set";
175 throw DetLayerException(
"compatibleLayers() method used without all reachableLayers are set");
176 return vector<const DetLayer*>();
180 cerr <<
"Warniong: SimpleBarrelNavigableLayer::setDetLayer called." << endl <<
"This should never happen!" << endl;
189 theForwardv.begin(), theForwardv.end(), [](
const GeometricSearchDet*
a) {
return a->position().z() >= 0.0; });
194 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
195 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
205 for (
ConstFDLI fl = theInnerLeftForwardLayers.begin(); fl != theInnerLeftForwardLayers.end(); fl++)
207 for (
ConstFDLI fl = theInnerRightForwardLayers.begin(); fl != theInnerRightForwardLayers.end(); fl++)
214 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
215 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
232 }
else if (fadditional) {
233 double zpos = fadditional->
position().
z();
253 edm::LogError(
"TkNavigation") <<
"trying to add neither a ForwardDetLayer nor a BarrelDetLayer";
std::vector< const DetLayer * > nextLayers(NavigationDirection direction) const override
BDLC theInnerBarrelLayers
void setInwardLinks(const BDLC &theBarrelv, const FDLC &theForwardv, TkLayerLess sorter=TkLayerLess(outsideIn)) override
SimpleBarrelNavigableLayer(BarrelDetLayer const *detLayer, const BDLC &outerBLC, const FDLC &outerLeftFL, const FDLC &outerRightFL, const MagneticField *field, float epsilon, bool checkCrossingSide=true)
const GlobalTrajectoryParameters & parameters() const
std::vector< const DetLayer * > compatibleLayers(NavigationDirection direction) const override
FDLC theInnerRightForwardLayers
std::vector< const ForwardDetLayer * > FDLC
FDLC::const_iterator ConstFDLI
const DetLayer * detLayer() const override
GlobalVector momentum() const
GlobalPoint position() const
virtual const Surface::PositionType & position() const
Returns position of the surface.
FDLC theOuterLeftForwardLayers
BDLC theOuterBarrelLayers
bool wellInside(const FreeTrajectoryState &fts, PropagationDirection dir, const BarrelDetLayer *bl, DLC &result) const
static int position[264][3]
FDLC theInnerLeftForwardLayers
FDLC theOuterRightForwardLayers
void setAdditionalLink(const DetLayer *, NavigationDirection direction=insideOut) override
void setDetLayer(const DetLayer *dl) override
BDLC::const_iterator ConstBDLI
std::vector< const BarrelDetLayer * > BDLC