#include <RecoTracker/TkNavigation/interface/SimpleForwardNavigableLayer.h>
Definition at line 9 of file SimpleForwardNavigableLayer.h.
SimpleForwardNavigableLayer::SimpleForwardNavigableLayer | ( | ForwardDetLayer * | detLayer, | |
const BDLC & | outerBL, | |||
const FDLC & | outerFL, | |||
const MagneticField * | field, | |||
float | epsilon, | |||
bool | checkCrossingSide = true | |||
) |
Definition at line 17 of file SimpleForwardNavigableLayer.cc.
References python::multivaluedict::sort(), theOuterBarrelLayers, theOuterForwardLayers, and theOuterLayers.
00022 : 00023 SimpleNavigableLayer(field,epsilon,checkCrossingSide), 00024 areAllReachableLayersSet(false), 00025 theDetLayer(detLayer), 00026 theOuterBarrelLayers(outerBL), 00027 theInnerBarrelLayers(0), 00028 theOuterForwardLayers(outerFL), 00029 theInnerForwardLayers(0), 00030 theOuterLayers(0), 00031 theInnerLayers(0) 00032 { 00033 00034 // put barrel and forward layers together 00035 theOuterLayers.reserve(outerBL.size() + outerFL.size()); 00036 for ( ConstBDLI bl = outerBL.begin(); bl != outerBL.end(); bl++ ) 00037 theOuterLayers.push_back(*bl); 00038 for ( ConstFDLI fl = outerFL.begin(); fl != outerFL.end(); fl++ ) 00039 theOuterLayers.push_back(*fl); 00040 00041 // sort the outer layers 00042 sort(theOuterLayers.begin(), theOuterLayers.end(), TkLayerLess()); 00043 sort(theOuterForwardLayers.begin(), theOuterForwardLayers.end(), TkLayerLess()); 00044 sort(theOuterBarrelLayers.begin(), theOuterBarrelLayers.end(), TkLayerLess()); 00045 00046 }
SimpleForwardNavigableLayer::SimpleForwardNavigableLayer | ( | ForwardDetLayer * | detLayer, | |
const BDLC & | outerBL, | |||
const BDLC & | allOuterBL, | |||
const BDLC & | innerBL, | |||
const BDLC & | allInnerBL, | |||
const FDLC & | outerFL, | |||
const FDLC & | allOuterFL, | |||
const FDLC & | innerFL, | |||
const FDLC & | allInnerFL, | |||
const MagneticField * | field, | |||
float | epsilon, | |||
bool | checkCrossingSide = true | |||
) |
Definition at line 49 of file SimpleForwardNavigableLayer.cc.
References outsideIn, python::multivaluedict::sort(), theAllInnerLayers, theAllOuterLayers, theInnerBarrelLayers, theInnerForwardLayers, theInnerLayers, theOuterBarrelLayers, theOuterForwardLayers, and theOuterLayers.
00060 : 00061 SimpleNavigableLayer(field,epsilon,checkCrossingSide), 00062 areAllReachableLayersSet(true), 00063 theDetLayer(detLayer), 00064 theOuterBarrelLayers(outerBL), 00065 theAllOuterBarrelLayers(allOuterBL), 00066 theInnerBarrelLayers(innerBL), 00067 theAllInnerBarrelLayers(allInnerBL), 00068 theOuterForwardLayers(outerFL), 00069 theAllOuterForwardLayers(allOuterFL), 00070 theInnerForwardLayers(innerFL), 00071 theAllInnerForwardLayers(allInnerFL), 00072 theOuterLayers(0), 00073 theInnerLayers(0), 00074 theAllOuterLayers(0), 00075 theAllInnerLayers(0) 00076 { 00077 00078 // put barrel and forward layers together 00079 theOuterLayers.reserve(outerBL.size() + outerFL.size()); 00080 for ( ConstBDLI bl = outerBL.begin(); bl != outerBL.end(); bl++ ) 00081 theOuterLayers.push_back(*bl); 00082 for ( ConstFDLI fl = outerFL.begin(); fl != outerFL.end(); fl++ ) 00083 theOuterLayers.push_back(*fl); 00084 00085 theAllOuterLayers.reserve(allOuterBL.size() + allOuterFL.size()); 00086 for ( ConstBDLI bl = allOuterBL.begin(); bl != allOuterBL.end(); bl++ ) 00087 theAllOuterLayers.push_back(*bl); 00088 for ( ConstFDLI fl = allOuterFL.begin(); fl != allOuterFL.end(); fl++ ) 00089 theAllOuterLayers.push_back(*fl); 00090 00091 theInnerLayers.reserve(innerBL.size() + innerFL.size()); 00092 for ( ConstBDLI bl = innerBL.begin(); bl != innerBL.end(); bl++ ) 00093 theInnerLayers.push_back(*bl); 00094 for ( ConstFDLI fl = innerFL.begin(); fl != innerFL.end(); fl++ ) 00095 theInnerLayers.push_back(*fl); 00096 00097 theAllInnerLayers.reserve(allInnerBL.size() + allInnerFL.size()); 00098 for ( ConstBDLI bl = allInnerBL.begin(); bl != allInnerBL.end(); bl++ ) 00099 theAllInnerLayers.push_back(*bl); 00100 for ( ConstFDLI fl = allInnerFL.begin(); fl != allInnerFL.end(); fl++ ) 00101 theAllInnerLayers.push_back(*fl); 00102 00103 00104 // sort the outer layers 00105 sort(theOuterLayers.begin(), theOuterLayers.end(), TkLayerLess()); 00106 sort(theInnerLayers.begin(), theInnerLayers.end(),TkLayerLess(outsideIn)); 00107 sort(theOuterBarrelLayers.begin(), theOuterBarrelLayers.end(), TkLayerLess()); 00108 sort(theInnerBarrelLayers.begin(), theInnerBarrelLayers.end(),TkLayerLess(outsideIn)); 00109 sort(theOuterForwardLayers.begin(), theOuterForwardLayers.end(), TkLayerLess()); 00110 sort(theInnerForwardLayers.begin(), theInnerForwardLayers.end(),TkLayerLess(outsideIn)); 00111 00112 sort(theAllOuterLayers.begin(), theAllOuterLayers.end(), TkLayerLess()); 00113 sort(theAllInnerLayers.begin(), theAllInnerLayers.end(),TkLayerLess(outsideIn)); 00114 00115 }
vector< const DetLayer * > SimpleForwardNavigableLayer::compatibleLayers | ( | const FreeTrajectoryState & | fts, | |
PropagationDirection | timeDirection | |||
) | const [virtual] |
Implements NavigableLayer.
Definition at line 222 of file SimpleForwardNavigableLayer.cc.
References areAllReachableLayersSet, FreeTrajectoryState::hasError(), FreeTrajectoryState::momentum(), oppositeToMomentum, FreeTrajectoryState::parameters(), FreeTrajectoryState::position(), HLT_VtxMuL3::result, theAllInnerBarrelLayers, theAllInnerForwardLayers, theAllInnerLayers, theAllOuterBarrelLayers, theAllOuterForwardLayers, theAllOuterLayers, SimpleNavigableLayer::wellInside(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
00224 { 00225 if( !areAllReachableLayersSet ){ 00226 edm::LogError("TkNavigation") << "ERROR: compatibleLayers() method used without all reachableLayers are set" ; 00227 throw DetLayerException("compatibleLayers() method used without all reachableLayers are set"); 00228 } 00229 00230 vector<const DetLayer*> result; 00231 FreeTrajectoryState ftsWithoutErrors = (fts.hasError()) ? 00232 FreeTrajectoryState(fts.parameters()) : fts; 00233 00234 //establish whether the tracks is crossing the tracker from outer layers to inner ones 00235 //or from inner to outer. 00236 //bool isInOutTrack = (fts.position().basicVector().dot(fts.momentum().basicVector())>0) ? 1 : 0; 00237 /* float zpos = fts.position().z(); 00238 bool isInOutTrack = fts.momentum().z()*zpos>0; 00239 00240 //establish whether inner or outer layers are crossed after propagation, according 00241 //to BOTH propagationDirection AND track momentum 00242 bool dirOppositeXORisInOutTrack = ( !(dir == oppositeToMomentum) && isInOutTrack) || ((dir == oppositeToMomentum) && !isInOutTrack); 00243 00244 if ( dirOppositeXORisInOutTrack ) { 00245 wellInside(ftsWithoutErrors, dir, theAllOuterLayers, result); 00246 } 00247 else { // !dirOppositeXORisInOutTrack 00248 wellInside(ftsWithoutErrors, dir, theAllInnerLayers, result); 00249 } 00250 */ 00251 00252 float zpos = fts.position().z(); 00253 bool isInOutTrackFWD = fts.momentum().z()*zpos>0; 00254 GlobalVector transversePosition(fts.position().x(), fts.position().y(), 0); 00255 bool isInOutTrackBarrel = (transversePosition.dot(fts.momentum())>0) ? 1 : 0; 00256 00257 //establish whether inner or outer layers are crossed after propagation, according 00258 //to BOTH propagationDirection AND track momentum 00259 bool dirOppositeXORisInOutTrackBarrel = ( !(dir == oppositeToMomentum) && isInOutTrackBarrel) || ( (dir == oppositeToMomentum) && !isInOutTrackBarrel); 00260 bool dirOppositeXORisInOutTrackFWD = ( !(dir == oppositeToMomentum) && isInOutTrackFWD) || ( (dir == oppositeToMomentum) && !isInOutTrackFWD); 00261 //bool dirOppositeXORisInOutTrack = ( !(dir == oppositeToMomentum) && isInOutTrack) || ( (dir == oppositeToMomentum) && !isInOutTrack); 00262 00263 if ( dirOppositeXORisInOutTrackFWD && dirOppositeXORisInOutTrackBarrel ) { //standard tracks 00264 00265 //wellInside(ftsWithoutErrors, dir, theOuterForwardLayers.begin(), theOuterForwardLayers.end(), result); 00266 wellInside(ftsWithoutErrors, dir, theAllOuterLayers, result); 00267 00268 } 00269 else if (!dirOppositeXORisInOutTrackFWD && !dirOppositeXORisInOutTrackBarrel){ // !dirOppositeXORisInOutTrack 00270 00271 //wellInside(ftsWithoutErrors, dir, theInnerForwardLayers.begin(), theInnerForwardLayers.end(), result); 00272 wellInside(ftsWithoutErrors, dir, theAllInnerLayers, result); 00273 00274 } else if (!dirOppositeXORisInOutTrackFWD && dirOppositeXORisInOutTrackBarrel ) { 00275 00276 wellInside(ftsWithoutErrors, dir, theAllInnerForwardLayers.begin(), theAllInnerForwardLayers.end(), result); 00277 wellInside(ftsWithoutErrors, dir, theAllOuterBarrelLayers.begin(), theAllOuterBarrelLayers.end(), result); 00278 00279 } else { 00280 00281 wellInside(ftsWithoutErrors, dir, theAllInnerBarrelLayers.begin(), theAllInnerBarrelLayers.end(), result); 00282 wellInside(ftsWithoutErrors, dir, theAllOuterForwardLayers.begin(), theAllOuterForwardLayers.end(), result); 00283 00284 } 00285 return result; 00286 }
vector< const DetLayer * > SimpleForwardNavigableLayer::compatibleLayers | ( | NavigationDirection | direction | ) | const [virtual] |
Implements NavigableLayer.
Definition at line 202 of file SimpleForwardNavigableLayer.cc.
References areAllReachableLayersSet, insideOut, HLT_VtxMuL3::result, theAllInnerLayers, and theAllOuterLayers.
00203 { 00204 if( !areAllReachableLayersSet ){ 00205 edm::LogError("TkNavigation") << "ERROR: compatibleLayers() method used without all reachableLayers are set" ; 00206 throw DetLayerException("compatibleLayers() method used without all reachableLayers are set"); 00207 } 00208 00209 vector<const DetLayer*> result; 00210 00211 if ( dir == insideOut ) { 00212 return theAllOuterLayers; 00213 } 00214 else { 00215 return theAllInnerLayers; 00216 } 00217 return result; 00218 00219 }
DetLayer * SimpleForwardNavigableLayer::detLayer | ( | ) | const [virtual] |
Implements NavigableLayer.
Definition at line 289 of file SimpleForwardNavigableLayer.cc.
References theDetLayer.
00289 { return theDetLayer; }
vector< const DetLayer * > SimpleForwardNavigableLayer::nextLayers | ( | const FreeTrajectoryState & | fts, | |
PropagationDirection | timeDirection | |||
) | const [virtual] |
Implements NavigableLayer.
Definition at line 138 of file SimpleForwardNavigableLayer.cc.
References FreeTrajectoryState::hasError(), FreeTrajectoryState::momentum(), oppositeToMomentum, FreeTrajectoryState::parameters(), FreeTrajectoryState::position(), HLT_VtxMuL3::result, theInnerBarrelLayers, theInnerForwardLayers, theInnerLayers, theOuterBarrelLayers, theOuterForwardLayers, theOuterLayers, SimpleNavigableLayer::wellInside(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
00140 { 00141 // This method contains the sequence in which the layers are tested. 00142 // The iteration stops as soon as a layer contains the propagated state 00143 // within epsilon 00144 00145 vector<const DetLayer*> result; 00146 00147 FreeTrajectoryState ftsWithoutErrors = (fts.hasError()) ? 00148 FreeTrajectoryState(fts.parameters()) : fts; 00149 00150 //establish whether the tracks is crossing the tracker from outer layers to inner ones 00151 //or from inner to outer 00152 //bool isInOutTrack = (fts.position().basicVector().dot(fts.momentum().basicVector())>0) ? 1 : 0; 00153 float zpos = fts.position().z(); 00154 bool isInOutTrackFWD = fts.momentum().z()*zpos>0; 00155 GlobalVector transversePosition(fts.position().x(), fts.position().y(), 0); 00156 bool isInOutTrackBarrel = (transversePosition.dot(fts.momentum())>0) ? 1 : 0; 00157 00158 //establish whether inner or outer layers are crossed after propagation, according 00159 //to BOTH propagationDirection AND track momentum 00160 bool dirOppositeXORisInOutTrackBarrel = ( !(dir == oppositeToMomentum) && isInOutTrackBarrel) || ( (dir == oppositeToMomentum) && !isInOutTrackBarrel); 00161 bool dirOppositeXORisInOutTrackFWD = ( !(dir == oppositeToMomentum) && isInOutTrackFWD) || ( (dir == oppositeToMomentum) && !isInOutTrackFWD); 00162 //bool dirOppositeXORisInOutTrack = ( !(dir == oppositeToMomentum) && isInOutTrack) || ( (dir == oppositeToMomentum) && !isInOutTrack); 00163 00164 if ( dirOppositeXORisInOutTrackFWD && dirOppositeXORisInOutTrackBarrel ) { //standard tracks 00165 00166 //wellInside(ftsWithoutErrors, dir, theOuterForwardLayers.begin(), theOuterForwardLayers.end(), result); 00167 wellInside(ftsWithoutErrors, dir, theOuterLayers, result); 00168 00169 } 00170 else if (!dirOppositeXORisInOutTrackFWD && !dirOppositeXORisInOutTrackBarrel){ // !dirOppositeXORisInOutTrack 00171 00172 //wellInside(ftsWithoutErrors, dir, theInnerForwardLayers.begin(), theInnerForwardLayers.end(), result); 00173 wellInside(ftsWithoutErrors, dir, theInnerLayers, result); 00174 00175 } else if (!dirOppositeXORisInOutTrackFWD && dirOppositeXORisInOutTrackBarrel ) { 00176 wellInside(ftsWithoutErrors, dir, theInnerForwardLayers.begin(), theInnerForwardLayers.end(), result); 00177 wellInside(ftsWithoutErrors, dir, theOuterBarrelLayers.begin(), theOuterBarrelLayers.end(), result); 00178 00179 } else { 00180 wellInside(ftsWithoutErrors, dir, theInnerBarrelLayers.begin(), theInnerBarrelLayers.end(), result); 00181 wellInside(ftsWithoutErrors, dir, theOuterForwardLayers.begin(), theOuterForwardLayers.end(), result); 00182 00183 } 00184 /* 00185 if ( dirOppositeXORisInOutTrackBarrel ) { 00186 00187 wellInside(ftsWithoutErrors, dir, theOuterBarrelLayers.begin(), theOuterBarrelLayers.end(), result); 00188 00189 } 00190 else { // !dirOppositeXORisInOutTrack 00191 00192 wellInside(ftsWithoutErrors, dir, theInnerBarrelLayers.begin(),theInnerBarrelLayers.end(), result); 00193 00194 } 00195 */ 00196 00197 return result; 00198 }
vector< const DetLayer * > SimpleForwardNavigableLayer::nextLayers | ( | NavigationDirection | direction | ) | const [virtual] |
Implements NavigableLayer.
Definition at line 120 of file SimpleForwardNavigableLayer.cc.
References insideOut, HLT_VtxMuL3::result, theInnerLayers, and theOuterLayers.
00121 { 00122 vector<const DetLayer*> result; 00123 00124 // the order is the one in which layers 00125 // should be checked for a reasonable trajectory 00126 00127 if ( dir == insideOut ) { 00128 return theOuterLayers; 00129 } 00130 else { 00131 return theInnerLayers; 00132 } 00133 00134 return result; 00135 }
void SimpleForwardNavigableLayer::setAdditionalLink | ( | DetLayer * | additional, | |
NavigationDirection | direction = insideOut | |||
) | [virtual] |
Implements SimpleNavigableLayer.
Definition at line 317 of file SimpleForwardNavigableLayer.cc.
References insideOut, theAllInnerBarrelLayers, theAllInnerForwardLayers, theAllInnerLayers, theAllOuterBarrelLayers, theAllOuterForwardLayers, theAllOuterLayers, theInnerBarrelLayers, theInnerForwardLayers, theInnerLayers, theOuterBarrelLayers, theOuterForwardLayers, and theOuterLayers.
Referenced by CosmicNavigationSchool::buildAdditionalForwardLinks().
00317 { 00318 ForwardDetLayer* fadditional = dynamic_cast<ForwardDetLayer*>(additional); 00319 BarrelDetLayer* badditional = dynamic_cast<BarrelDetLayer*>(additional); 00320 if (badditional){ 00321 if (direction==insideOut){ 00322 theOuterBarrelLayers.push_back(badditional); 00323 theAllOuterBarrelLayers.push_back(badditional); 00324 theOuterLayers.push_back(badditional); 00325 theAllOuterLayers.push_back(badditional); 00326 return; 00327 } 00328 theInnerBarrelLayers.push_back(badditional); 00329 theAllInnerBarrelLayers.push_back(badditional); 00330 theInnerLayers.push_back(badditional); 00331 theAllInnerLayers.push_back(badditional); 00332 return; 00333 } else if (fadditional){ 00334 if (direction==insideOut){ 00335 theOuterForwardLayers.push_back(fadditional); 00336 theAllOuterForwardLayers.push_back(fadditional); 00337 theOuterLayers.push_back(badditional); 00338 theAllOuterLayers.push_back(badditional); 00339 return; 00340 } 00341 theInnerForwardLayers.push_back(fadditional); 00342 theAllInnerForwardLayers.push_back(fadditional); 00343 theInnerLayers.push_back(badditional); 00344 theAllInnerLayers.push_back(badditional); 00345 return; 00346 } 00347 edm::LogError("TkNavigation") << "trying to add neither a ForwardDetLayer nor a BarrelDetLayer"; 00348 return; 00349 }
Implements NavigableLayer.
Definition at line 291 of file SimpleForwardNavigableLayer.cc.
References TestMuL1L2Filter_cff::cerr, and lat::endl().
00291 { 00292 cerr << "Warning: SimpleForwardNavigableLayer::setDetLayer called." 00293 << endl << "This should never happen!" << endl; 00294 }
void SimpleForwardNavigableLayer::setInwardLinks | ( | const BDLC & | innerBL, | |
const FDLC & | innerFL, | |||
TkLayerLess | sorter = TkLayerLess(outsideIn) | |||
) | [virtual] |
Definition at line 296 of file SimpleForwardNavigableLayer.cc.
References python::multivaluedict::sort(), theInnerBarrelLayers, theInnerForwardLayers, and theInnerLayers.
00298 { 00299 00300 theInnerBarrelLayers = innerBL; 00301 theInnerForwardLayers = innerFL; 00302 00303 theInnerLayers.clear(); 00304 theInnerLayers.reserve(innerBL.size() + innerFL.size()); 00305 for ( ConstBDLI bl = innerBL.begin(); bl != innerBL.end(); bl++ ) 00306 theInnerLayers.push_back(*bl); 00307 for ( ConstFDLI fl = innerFL.begin(); fl != innerFL.end(); fl++ ) 00308 theInnerLayers.push_back(*fl); 00309 00310 // sort the inner layers 00311 sort(theInnerLayers.begin(), theInnerLayers.end(),sorter); 00312 sort(theInnerForwardLayers.begin(), theInnerForwardLayers.end(),sorter); 00313 sort(theInnerBarrelLayers.begin(), theInnerBarrelLayers.end(), sorter); 00314 00315 }
Definition at line 62 of file SimpleForwardNavigableLayer.h.
Referenced by compatibleLayers(), and setAdditionalLink().
Definition at line 66 of file SimpleForwardNavigableLayer.h.
Referenced by compatibleLayers(), and setAdditionalLink().
Definition at line 70 of file SimpleForwardNavigableLayer.h.
Referenced by compatibleLayers(), setAdditionalLink(), and SimpleForwardNavigableLayer().
Definition at line 60 of file SimpleForwardNavigableLayer.h.
Referenced by compatibleLayers(), and setAdditionalLink().
Definition at line 64 of file SimpleForwardNavigableLayer.h.
Referenced by compatibleLayers(), and setAdditionalLink().
Definition at line 69 of file SimpleForwardNavigableLayer.h.
Referenced by compatibleLayers(), setAdditionalLink(), and SimpleForwardNavigableLayer().
Definition at line 61 of file SimpleForwardNavigableLayer.h.
Referenced by nextLayers(), setAdditionalLink(), setInwardLinks(), and SimpleForwardNavigableLayer().
Definition at line 65 of file SimpleForwardNavigableLayer.h.
Referenced by nextLayers(), setAdditionalLink(), setInwardLinks(), and SimpleForwardNavigableLayer().
Definition at line 68 of file SimpleForwardNavigableLayer.h.
Referenced by nextLayers(), setAdditionalLink(), setInwardLinks(), and SimpleForwardNavigableLayer().
Definition at line 59 of file SimpleForwardNavigableLayer.h.
Referenced by nextLayers(), setAdditionalLink(), and SimpleForwardNavigableLayer().
Definition at line 63 of file SimpleForwardNavigableLayer.h.
Referenced by nextLayers(), setAdditionalLink(), and SimpleForwardNavigableLayer().
Definition at line 67 of file SimpleForwardNavigableLayer.h.
Referenced by nextLayers(), setAdditionalLink(), and SimpleForwardNavigableLayer().