23 const FDLC& outerLeftFL,
24 const FDLC& outerRightFL,
27 bool checkCrossingSide) :
29 theDetLayer( detLayer),
30 theOuterBarrelLayers( outerBLC),
31 theOuterLeftForwardLayers( outerLeftFL),
32 theOuterRightForwardLayers( outerRightFL)
39 for (
ConstBDLI bl=outerBLC.begin(); bl!=outerBLC.end(); bl++)
43 for (
ConstFDLI fl=outerLeftFL.begin(); fl!=outerLeftFL.end(); fl++)
45 for (
ConstFDLI fl=outerRightFL.begin(); fl!=outerRightFL.end(); fl++)
58 vector<const DetLayer*>
61 vector<const DetLayer*>
result;
85 vector<const DetLayer*>
93 vector<const DetLayer*>
result;
100 auto const momentum = fts.
momentum();
105 bool isInOutTrackBarrel = (transversePosition.dot(momentum)>0);
108 bool isInOutTrackFWD = momentum.z()*zpos>0;
117 <<
"isInOutTrackBarrel: " << isInOutTrackBarrel << endl
118 <<
"isInOutTrackFWD: " << isInOutTrackFWD << endl
119 <<
"dirOppositeXORisInOutTrackFWD: " << dirOppositeXORisInOutTrackFWD << endl
120 <<
"dirOppositeXORisInOutTrackBarrel: "<< dirOppositeXORisInOutTrackBarrel << endl;
122 bool signZmomentumXORdir = (( (momentum.z() > 0) && !(dir ==
alongMomentum) ) ||
126 if LIKELY( dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
127 if ( signZmomentumXORdir ) {
133 }
else if (!dirOppositeXORisInOutTrackBarrel && !dirOppositeXORisInOutTrackFWD){
134 if ( signZmomentumXORdir ) {
140 }
else if (!dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD){
143 if (signZmomentumXORdir){
151 if (signZmomentumXORdir){
161 LogDebug(
"SimpleBarrelNavigableLayer") <<
"goingIntoTheBarrel: " << goingIntoTheBarrel;
165 if (!goingIntoTheBarrel){
166 LogDebug(
"SimpleBarrelNavigableLayer")<<
" state is not going toward the center of the barrel. not adding self search.";}
169 LogDebug(
"SimpleBarrelNavigableLayer")<<
" I am trying to added myself as a next layer.";
170 wellInside(ftsWithoutErrors, dir, bl, result);
171 unsigned int after=result.size();
173 LogDebug(
"SimpleBarrelNavigableLayer")<<
" I have added myself as a next layer.";
181 vector<const DetLayer*>
183 edm::LogError(
"TkNavigation") <<
"ERROR: compatibleLayers() method used without all reachableLayers are set" ;
184 throw DetLayerException(
"compatibleLayers() method used without all reachableLayers are set");
185 return vector<const DetLayer*>();
191 cerr <<
"Warniong: SimpleBarrelNavigableLayer::setDetLayer called." 192 << endl <<
"This should never happen!" << endl;
196 const FDLC& theForwardv,
204 ConstFDLI middle = find_if( theForwardv.begin(),theForwardv.end(),
210 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
211 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
223 for (
ConstFDLI fl=theInnerLeftForwardLayers.begin(); fl!=theInnerLeftForwardLayers.end(); fl++)
225 for (
ConstFDLI fl=theInnerRightForwardLayers.begin(); fl!=theInnerRightForwardLayers.end(); fl++)
232 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
233 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
251 }
else if (fadditional){
252 double zpos = fadditional->
position().
z();
272 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