00001 #ifndef TkDetLayers_SubLayerCrossings_h 00002 #define TkDetLayers_SubLayerCrossings_h 00003 00004 #include "DataFormats/GeometryVector/interface/LocalPoint.h" 00005 00006 class SubLayerCrossing { 00007 public: 00008 SubLayerCrossing(){} 00009 SubLayerCrossing( int sli, int cdi, const GlobalPoint& pos) : 00010 subLayerIndex_(sli), closestDetIndex_(cdi), pos_(pos) {} 00011 00012 int subLayerIndex() const {return subLayerIndex_;} 00013 int closestDetIndex() const {return closestDetIndex_;} 00014 const GlobalPoint& position() const { return pos_;} 00015 00016 private: 00017 int subLayerIndex_; 00018 int closestDetIndex_; 00019 GlobalPoint pos_; 00020 }; 00021 00022 class SubLayerCrossings { 00023 public: 00024 SubLayerCrossings(): isValid_(false){} 00025 SubLayerCrossings( const SubLayerCrossing& c, const SubLayerCrossing& o, int ci) : 00026 isValid_(true),closest_(c), other_(o), closestIndex_(ci) {} 00027 00028 bool isValid() {return isValid_ ;} 00029 const SubLayerCrossing& closest() const {return closest_;} 00030 const SubLayerCrossing& other() const {return other_;} 00031 int closestIndex() const {return closestIndex_;} 00032 00033 private: 00034 bool isValid_; 00035 SubLayerCrossing closest_; 00036 SubLayerCrossing other_; 00037 int closestIndex_; 00038 00039 }; 00040 00041 #endif