22 const FDLC& outerLeftFL,
23 const FDLC& outerRightFL,
26 bool checkCrossingSide)
28 theDetLayer(detLayer),
29 theOuterBarrelLayers(outerBLC),
30 theOuterLeftForwardLayers(outerLeftFL),
31 theOuterRightForwardLayers(outerRightFL)
38 for (
ConstBDLI bl = outerBLC.begin(); bl != outerBLC.end(); bl++)
42 for (
ConstFDLI fl = outerLeftFL.begin(); fl != outerLeftFL.end(); fl++)
44 for (
ConstFDLI fl = outerRightFL.begin(); fl != outerRightFL.end(); fl++)
56 vector<const DetLayer*>
result;
85 vector<const DetLayer*>
result;
90 auto const momentum = fts.
momentum();
95 bool isInOutTrackBarrel = (transversePosition.dot(momentum) > 0);
98 bool isInOutTrackFWD = momentum.z() * zpos > 0;
102 bool dirOppositeXORisInOutTrackBarrel =
104 bool dirOppositeXORisInOutTrackFWD =
108 <<
"isInOutTrackBarrel: " << isInOutTrackBarrel << endl
109 <<
"isInOutTrackFWD: " << isInOutTrackFWD << endl
110 <<
"dirOppositeXORisInOutTrackFWD: " << dirOppositeXORisInOutTrackFWD << endl
111 <<
"dirOppositeXORisInOutTrackBarrel: " << dirOppositeXORisInOutTrackBarrel
114 bool signZmomentumXORdir =
117 if LIKELY (dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
118 if (signZmomentumXORdir) {
123 }
else if (!dirOppositeXORisInOutTrackBarrel && !dirOppositeXORisInOutTrackFWD) {
124 if (signZmomentumXORdir) {
129 }
else if (!dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
132 if (signZmomentumXORdir) {
140 if (signZmomentumXORdir) {
148 bool goingIntoTheBarrel =
151 LogDebug(
"SimpleBarrelNavigableLayer") <<
"goingIntoTheBarrel: " << goingIntoTheBarrel;
154 if (!goingIntoTheBarrel) {
155 LogDebug(
"SimpleBarrelNavigableLayer")
156 <<
" state is not going toward the center of the barrel. not adding self search.";
159 unsigned int before = result.size();
160 LogDebug(
"SimpleBarrelNavigableLayer") <<
" I am trying to added myself as a next layer.";
161 wellInside(ftsWithoutErrors, dir, bl, result);
162 unsigned int after = result.size();
164 LogDebug(
"SimpleBarrelNavigableLayer") <<
" I have added myself as a next layer.";
172 edm::LogError(
"TkNavigation") <<
"ERROR: compatibleLayers() method used without all reachableLayers are set";
173 throw DetLayerException(
"compatibleLayers() method used without all reachableLayers are set");
174 return vector<const DetLayer*>();
178 cerr <<
"Warniong: SimpleBarrelNavigableLayer::setDetLayer called." << endl <<
"This should never happen!" << endl;
187 theForwardv.begin(), theForwardv.end(), [](
const GeometricSearchDet*
a) {
return a->position().z() >= 0.0; });
192 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
193 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
203 for (
ConstFDLI fl = theInnerLeftForwardLayers.begin(); fl != theInnerLeftForwardLayers.end(); fl++)
205 for (
ConstFDLI fl = theInnerRightForwardLayers.begin(); fl != theInnerRightForwardLayers.end(); fl++)
212 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
213 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
230 }
else if (fadditional) {
231 double zpos = fadditional->
position().
z();
251 edm::LogError(
"TkNavigation") <<
"trying to add neither a ForwardDetLayer nor a BarrelDetLayer";
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)
std::vector< const DetLayer * > compatibleLayers(NavigationDirection direction) const override
const GlobalTrajectoryParameters & parameters() const
Log< level::Error, false > LogError
FDLC theInnerRightForwardLayers
std::vector< const DetLayer * > nextLayers(NavigationDirection direction) const override
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