25 const FDLC& outerLeftFL,
26 const FDLC& outerRightFL,
29 bool checkCrossingSide) :
31 theDetLayer( detLayer),
32 theOuterBarrelLayers( outerBLC),
33 theOuterLeftForwardLayers( outerLeftFL),
34 theOuterRightForwardLayers( outerRightFL)
41 for (
ConstBDLI bl=outerBLC.begin(); bl!=outerBLC.end(); bl++)
45 for (
ConstFDLI fl=outerLeftFL.begin(); fl!=outerLeftFL.end(); fl++)
47 for (
ConstFDLI fl=outerRightFL.begin(); fl!=outerRightFL.end(); fl++)
60 vector<const DetLayer*>
63 vector<const DetLayer*>
result;
87 vector<const DetLayer*>
95 vector<const DetLayer*>
result;
102 auto const momentum = fts.
momentum();
107 bool isInOutTrackBarrel = (transversePosition.dot(momentum)>0);
110 bool isInOutTrackFWD = momentum.z()*zpos>0;
119 <<
"isInOutTrackBarrel: " << isInOutTrackBarrel << endl
120 <<
"isInOutTrackFWD: " << isInOutTrackFWD << endl
121 <<
"dirOppositeXORisInOutTrackFWD: " << dirOppositeXORisInOutTrackFWD << endl
122 <<
"dirOppositeXORisInOutTrackBarrel: "<< dirOppositeXORisInOutTrackBarrel << endl;
124 bool signZmomentumXORdir = (( (momentum.z() > 0) && !(dir ==
alongMomentum) ) ||
128 if likely( dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
129 if ( signZmomentumXORdir ) {
135 }
else if (!dirOppositeXORisInOutTrackBarrel && !dirOppositeXORisInOutTrackFWD){
136 if ( signZmomentumXORdir ) {
142 }
else if (!dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD){
145 if (signZmomentumXORdir){
153 if (signZmomentumXORdir){
163 LogDebug(
"SimpleBarrelNavigableLayer") <<
"goingIntoTheBarrel: " << goingIntoTheBarrel;
167 if (!goingIntoTheBarrel){
168 LogDebug(
"SimpleBarrelNavigableLayer")<<
" state is not going toward the center of the barrel. not adding self search.";}
171 LogDebug(
"SimpleBarrelNavigableLayer")<<
" I am trying to added myself as a next layer.";
172 wellInside(ftsWithoutErrors, dir, bl, result);
173 unsigned int after=result.size();
175 LogDebug(
"SimpleBarrelNavigableLayer")<<
" I have added myself as a next layer.";
183 vector<const DetLayer*>
185 edm::LogError(
"TkNavigation") <<
"ERROR: compatibleLayers() method used without all reachableLayers are set" ;
186 throw DetLayerException(
"compatibleLayers() method used without all reachableLayers are set");
187 return vector<const DetLayer*>();
193 cerr <<
"Warniong: SimpleBarrelNavigableLayer::setDetLayer called." 194 << endl <<
"This should never happen!" << endl;
198 const FDLC& theForwardv,
206 ConstFDLI middle = find_if( theForwardv.begin(),theForwardv.end(),
212 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
213 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
225 for (
ConstFDLI fl=theInnerLeftForwardLayers.begin(); fl!=theInnerLeftForwardLayers.end(); fl++)
227 for (
ConstFDLI fl=theInnerRightForwardLayers.begin(); fl!=theInnerRightForwardLayers.end(); fl++)
234 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
235 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
253 }
else if (fadditional){
254 double zpos = fadditional->
position().
z();
274 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