25 const FDLC& outerLeftFL,
26 const FDLC& outerRightFL,
29 bool checkCrossingSide) :
31 areAllReachableLayersSet(
false),
32 theDetLayer( detLayer),
33 theOuterBarrelLayers( outerBLC),
34 theOuterLeftForwardLayers( outerLeftFL),
35 theOuterRightForwardLayers( outerRightFL)
42 for (
ConstBDLI bl=outerBLC.begin(); bl!=outerBLC.end(); bl++)
46 for (
ConstFDLI fl=outerLeftFL.begin(); fl!=outerLeftFL.end(); fl++)
48 for (
ConstFDLI fl=outerRightFL.begin(); fl!=outerRightFL.end(); fl++)
64 const BDLC& allOuterBLC,
65 const BDLC& allInnerBLC,
66 const FDLC& outerLeftFL,
67 const FDLC& outerRightFL,
68 const FDLC& allOuterLeftFL,
69 const FDLC& allOuterRightFL,
70 const FDLC& innerLeftFL,
71 const FDLC& innerRightFL,
72 const FDLC& allInnerLeftFL,
73 const FDLC& allInnerRightFL,
76 bool checkCrossingSide) :
78 areAllReachableLayersSet(
true),
79 theDetLayer( detLayer),
80 theOuterBarrelLayers( outerBLC),
81 theInnerBarrelLayers( innerBLC),
82 theAllOuterBarrelLayers( allOuterBLC),
83 theAllInnerBarrelLayers( allInnerBLC),
84 theOuterLeftForwardLayers( outerLeftFL),
85 theOuterRightForwardLayers( outerRightFL),
86 theAllOuterLeftForwardLayers( allOuterLeftFL),
87 theAllOuterRightForwardLayers( allOuterRightFL),
88 theInnerLeftForwardLayers( innerLeftFL),
89 theInnerRightForwardLayers( innerRightFL),
90 theAllInnerLeftForwardLayers( allInnerLeftFL),
91 theAllInnerRightForwardLayers( allInnerRightFL)
100 for (
ConstBDLI bl=outerBLC.begin(); bl!=outerBLC.end(); bl++)
104 for (
ConstFDLI fl=outerLeftFL.begin(); fl!=outerLeftFL.end(); fl++)
106 for (
ConstFDLI fl=outerRightFL.begin(); fl!=outerRightFL.end(); fl++)
109 for (
ConstBDLI bl=innerBLC.begin(); bl!=innerBLC.end(); bl++)
113 for (
ConstFDLI fl=innerLeftFL.begin(); fl!=innerLeftFL.end(); fl++)
115 for (
ConstFDLI fl=innerRightFL.begin(); fl!=innerRightFL.end(); fl++)
133 vector<const DetLayer*>
136 vector<const DetLayer*>
result;
160 vector<const DetLayer*>
168 vector<const DetLayer*>
result;
179 bool isInOutTrackBarrel = (transversePosition.dot(fts.
momentum())>0) ? 1 : 0;
183 bool isInOutTrackFWD = fts.
momentum().
z()*zpos>0;
192 <<
"isInOutTrackBarrel: " << isInOutTrackBarrel << endl
193 <<
"isInOutTrackFWD: " << isInOutTrackFWD << endl
194 <<
"dirOppositeXORisInOutTrackFWD: " << dirOppositeXORisInOutTrackFWD << endl
195 <<
"dirOppositeXORisInOutTrackBarrel: "<< dirOppositeXORisInOutTrackBarrel << endl;
201 if ( dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
203 if ( signZmomentumXORdir ) {
209 }
else if (!dirOppositeXORisInOutTrackBarrel && !dirOppositeXORisInOutTrackFWD){
210 if ( signZmomentumXORdir ) {
216 }
else if (!dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD){
219 if (signZmomentumXORdir){
227 if (signZmomentumXORdir){
237 LogDebug(
"SimpleBarrelNavigableLayer") <<
"goingIntoTheBarrel: " << goingIntoTheBarrel;
241 if (!goingIntoTheBarrel){
LogDebug(
"SimpleBarrelNavigableLayer")<<
" state is not going toward the center of the barrel. not adding self search.";}
244 LogDebug(
"SimpleBarrelNavigableLayer")<<
" I am trying to added myself as a next layer.";
245 wellInside(ftsWithoutErrors, dir, bl, result);
246 unsigned int after=result.size();
248 LogDebug(
"SimpleBarrelNavigableLayer")<<
" I have added myself as a next layer.";
256 vector<const DetLayer*>
260 edm::LogError(
"TkNavigation") <<
"ERROR: compatibleLayers() method used without all reachableLayers are set" ;
261 throw DetLayerException(
"compatibleLayers() method used without all reachableLayers are set");
264 vector<const DetLayer*>
result;
268 result.push_back(*
i);
274 result.push_back(*
i);
279 result.push_back(*
i);
285 result.push_back(*
i);
290 result.push_back(*
i);
295 result.push_back(*
i);
303 vector<const DetLayer*>
314 vector<const DetLayer*>
result;
323 bool isInOutTrack = (transversePosition.dot(fts.
momentum())>0) ? 1 : 0;
329 wellInside( ftsWithoutErrors, dir, temp, result);
339 cerr <<
"Warniong: SimpleBarrelNavigableLayer::setDetLayer called."
340 << endl <<
"This should never happen!" << endl;
344 const FDLC& theForwardv,
352 ConstFDLI middle = find_if( theForwardv.begin(),theForwardv.end(),
358 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
359 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
371 for (
ConstFDLI fl=theInnerLeftForwardLayers.begin(); fl!=theInnerLeftForwardLayers.end(); fl++)
373 for (
ConstFDLI fl=theInnerRightForwardLayers.begin(); fl!=theInnerRightForwardLayers.end(); fl++)
380 sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),
sorter);
381 sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),
sorter);
401 }
else if (fadditional){
402 double zpos = fadditional->
position().
z();
426 edm::LogError(
"TkNavigation") <<
"trying to add neither a ForwardDetLayer nor a BarrelDetLayer";
BDLC theInnerBarrelLayers
const GlobalTrajectoryParameters & parameters() const
BDLC theAllInnerBarrelLayers
std::vector< BarrelDetLayer * > BDLC
BarrelDetLayer * theDetLayer
bool areAllReachableLayersSet
FDLC theInnerRightForwardLayers
FDLC theAllOuterRightForwardLayers
SimpleBarrelNavigableLayer(BarrelDetLayer *detLayer, const BDLC &outerBLC, const FDLC &outerLeftFL, const FDLC &outerRightFL, const MagneticField *field, float epsilon, bool checkCrossingSide=true)
virtual std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection, int &counter) const
FDLC::const_iterator ConstFDLI
GlobalVector momentum() const
GlobalPoint position() const
FDLC theAllInnerRightForwardLayers
virtual void setAdditionalLink(DetLayer *, NavigationDirection direction=insideOut)
virtual const Surface::PositionType & position() const
Returns position of the surface.
virtual std::vector< const DetLayer * > compatibleLayers(NavigationDirection direction) const
FDLC theOuterLeftForwardLayers
BDLC theOuterBarrelLayers
bool wellInside(const FreeTrajectoryState &fts, PropagationDirection dir, const BarrelDetLayer *bl, DLC &result) const
std::vector< ForwardDetLayer * > FDLC
FDLC theAllInnerLeftForwardLayers
FDLC theInnerLeftForwardLayers
FDLC theAllOuterLeftForwardLayers
FDLC theOuterRightForwardLayers
virtual std::vector< const DetLayer * > nextLayers(NavigationDirection direction) const
virtual DetLayer * detLayer() const
virtual void setInwardLinks(const BDLC &theBarrelv, const FDLC &theForwardv, TkLayerLess sorter=TkLayerLess(outsideIn))
virtual void setDetLayer(DetLayer *dl)
BDLC::const_iterator ConstBDLI
BDLC theAllOuterBarrelLayers