CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/TrackingTools/DetLayers/src/DetLayer.cc

Go to the documentation of this file.
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 
00050 vector<const DetLayer*> 
00051 DetLayer::compatibleLayers( const FreeTrajectoryState& fts, 
00052                             PropagationDirection timeDirection,
00053                             int& counter) const {
00054   return theNavigableLayer
00055     ? theNavigableLayer->compatibleLayers( fts, timeDirection,counter)
00056     : vector<const DetLayer*>();
00057 }
00058 
00059 vector<const DetLayer*> 
00060 DetLayer::compatibleLayers( NavigationDirection direction) const {
00061   return theNavigableLayer
00062     ? theNavigableLayer->compatibleLayers( direction)
00063     : vector<const DetLayer*>();
00064 }
00065 
00066