Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:48

0001 #ifndef TkDetLayers_SubLayerCrossings_h
0002 #define TkDetLayers_SubLayerCrossings_h
0003 
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 
0006 #pragma GCC visibility push(hidden)
0007 class SubLayerCrossing {
0008 public:
0009   SubLayerCrossing() : isValid_(false) {}
0010   SubLayerCrossing(int sli, int cdi, const GlobalPoint& pos)
0011       : pos_(pos), subLayerIndex_(sli), closestDetIndex_(cdi), isValid_(true) {}
0012 
0013   bool isValid() { return isValid_; }
0014   int subLayerIndex() const { return subLayerIndex_; }
0015   int closestDetIndex() const { return closestDetIndex_; }
0016   const GlobalPoint& position() const { return pos_; }
0017 
0018 private:
0019   GlobalPoint pos_;
0020   int subLayerIndex_;
0021   int closestDetIndex_;
0022   bool isValid_;
0023 };
0024 
0025 class SubLayerCrossings {
0026 public:
0027   SubLayerCrossings() : isValid_(false) {}
0028   SubLayerCrossings(const SubLayerCrossing& c, const SubLayerCrossing& o, int ci)
0029       : closest_(c), other_(o), closestIndex_(ci), isValid_(true) {}
0030 
0031   bool isValid() { return isValid_; }
0032   const SubLayerCrossing& closest() const { return closest_; }
0033   const SubLayerCrossing& other() const { return other_; }
0034   int closestIndex() const { return closestIndex_; }
0035 
0036 private:
0037   SubLayerCrossing closest_;
0038   SubLayerCrossing other_;
0039   int closestIndex_;
0040   bool isValid_;
0041 };
0042 
0043 #pragma GCC visibility pop
0044 #endif