16 SimpleForwardNavigableLayer::
22 bool checkCrossingSide) :
24 theDetLayer(detLayer),
25 theOuterBarrelLayers(outerBL),
26 theInnerBarrelLayers(0),
27 theOuterForwardLayers(outerFL),
28 theInnerForwardLayers(0),
34 theOuterLayers.reserve(outerBL.size() + outerFL.size());
35 for ( ConstBDLI bl = outerBL.begin(); bl != outerBL.end(); bl++ )
36 theOuterLayers.push_back(*bl);
37 for ( ConstFDLI fl = outerFL.begin(); fl != outerFL.end(); fl++ )
38 theOuterLayers.push_back(*fl);
42 sort(theOuterForwardLayers.begin(), theOuterForwardLayers.end(),
TkLayerLess());
43 sort(theOuterBarrelLayers.begin(), theOuterBarrelLayers.end(),
TkLayerLess());
50 vector<const DetLayer*>
53 vector<const DetLayer*>
result;
59 return theOuterLayers;
62 return theInnerLayers;
68 vector<const DetLayer*>
76 vector<const DetLayer*>
result;
82 auto const momentum = fts.
momentum();
88 bool isInOutTrackFWD = momentum.z()*zpos>0;
90 bool isInOutTrackBarrel = (transversePosition.dot(momentum)>0);
98 if likely( dirOppositeXORisInOutTrackFWD && dirOppositeXORisInOutTrackBarrel ) {
99 wellInside(ftsWithoutErrors, dir, theOuterLayers, result);
101 else if (!dirOppositeXORisInOutTrackFWD && !dirOppositeXORisInOutTrackBarrel){
102 wellInside(ftsWithoutErrors, dir, theInnerLayers, result);
103 }
else if (!dirOppositeXORisInOutTrackFWD && dirOppositeXORisInOutTrackBarrel ) {
104 wellInside(ftsWithoutErrors, dir, theInnerForwardLayers.begin(), theInnerForwardLayers.end(),
result);
105 wellInside(ftsWithoutErrors, dir, theOuterBarrelLayers.begin(), theOuterBarrelLayers.end(),
result);
107 wellInside(ftsWithoutErrors, dir, theInnerBarrelLayers.begin(), theInnerBarrelLayers.end(),
result);
108 wellInside(ftsWithoutErrors, dir, theOuterForwardLayers.begin(), theOuterForwardLayers.end(),
result);
115 vector<const DetLayer*>
117 edm::LogError(
"TkNavigation") <<
"ERROR: compatibleLayers() method used without all reachableLayers are set" ;
118 throw DetLayerException(
"compatibleLayers() method used without all reachableLayers are set");
119 return vector<const DetLayer*>();
124 void SimpleForwardNavigableLayer::setDetLayer(
DetLayer* dl) {
125 cerr <<
"Warning: SimpleForwardNavigableLayer::setDetLayer called."
126 << endl <<
"This should never happen!" << endl;
129 void SimpleForwardNavigableLayer::setInwardLinks(
const BDLC& innerBL,
133 theInnerBarrelLayers = innerBL;
134 theInnerForwardLayers = innerFL;
136 theInnerLayers.clear();
137 theInnerLayers.reserve(innerBL.size() + innerFL.size());
138 for ( ConstBDLI bl = innerBL.begin(); bl != innerBL.end(); bl++ )
139 theInnerLayers.push_back(*bl);
140 for ( ConstFDLI fl = innerFL.begin(); fl != innerFL.end(); fl++ )
141 theInnerLayers.push_back(*fl);
144 sort(theInnerLayers.begin(), theInnerLayers.end(),
sorter);
145 sort(theInnerForwardLayers.begin(), theInnerForwardLayers.end(),
sorter);
146 sort(theInnerBarrelLayers.begin(), theInnerBarrelLayers.end(),
sorter);
155 theOuterBarrelLayers.push_back(badditional);
156 theOuterLayers.push_back(badditional);
159 theInnerBarrelLayers.push_back(badditional);
160 theInnerLayers.push_back(badditional);
162 }
else if (fadditional){
164 theOuterForwardLayers.push_back(fadditional);
165 theOuterLayers.push_back(badditional);
168 theInnerForwardLayers.push_back(fadditional);
169 theInnerLayers.push_back(badditional);
172 edm::LogError(
"TkNavigation") <<
"trying to add neither a ForwardDetLayer nor a BarrelDetLayer";
const GlobalTrajectoryParameters & parameters() const
static int position[TOTALCHAMBERS][3]
GlobalVector momentum() const
GlobalPoint position() const