00001 #include "TrackingTools/DetLayers/interface/DetLayer.h" 00002 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00003 #include <algorithm> 00004 00005 using namespace std; 00006 00007 DetLayer::~DetLayer() { delete theNavigableLayer;} 00008 00009 00010 void DetLayer::setNavigableLayer( NavigableLayer* nlp) { 00012 theNavigableLayer = nlp; 00013 00014 //nlp=0 amount to cleaning the link. do nothing further 00015 if (nlp){ 00016 if (nlp->detLayer() != this) { 00017 if (nlp->detLayer() != 0) { 00018 edm::LogWarning("DetLayers") << "DetLayer Warning: my navigable layer does not point to me. " 00019 << " Correcting..." ; 00020 } 00021 theNavigableLayer->setDetLayer( this); 00022 } 00023 }//nlp!=0 00024 } 00025 00026 vector<const DetLayer*> 00027 DetLayer::nextLayers( const FreeTrajectoryState& fts, 00028 PropagationDirection timeDirection) const { 00029 return theNavigableLayer 00030 ? theNavigableLayer->nextLayers( fts, timeDirection) 00031 : vector<const DetLayer*>(); 00032 } 00033 00034 vector<const DetLayer*> 00035 DetLayer::nextLayers( NavigationDirection direction) const { 00036 return theNavigableLayer 00037 ? theNavigableLayer->nextLayers( direction) 00038 : vector<const DetLayer*>(); 00039 } 00040 00041 vector<const DetLayer*> 00042 DetLayer::compatibleLayers( const FreeTrajectoryState& fts, 00043 PropagationDirection timeDirection) const { 00044 return theNavigableLayer 00045 ? theNavigableLayer->compatibleLayers( fts, timeDirection) 00046 : vector<const DetLayer*>(); 00047 } 00048 00049 vector<const DetLayer*> 00050 DetLayer::compatibleLayers( NavigationDirection direction) const { 00051 return theNavigableLayer 00052 ? theNavigableLayer->compatibleLayers( direction) 00053 : vector<const DetLayer*>(); 00054 } 00055 00056