Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:55

0001 #ifndef GlobalParametersWithPath_H
0002 #define GlobalParametersWithPath_H
0003 
0004 #include "FWCore/Utilities/interface/Visibility.h"
0005 #include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h"
0006 
0007 class dso_internal GlobalParametersWithPath {
0008 public:
0009   GlobalParametersWithPath() : gtp_(), s_(0), valid_(false) {}
0010   GlobalParametersWithPath(const GlobalTrajectoryParameters& gtp, double s) : gtp_(gtp), s_(s), valid_(true) {}
0011   GlobalParametersWithPath(const GlobalTrajectoryParameters& gtp, double s, bool valid)
0012       : gtp_(gtp), s_(s), valid_(valid) {}
0013 
0014   const GlobalTrajectoryParameters& parameters() const { return gtp_; }
0015 
0016   double pathLength() const { return s_; }
0017   double s() const { return pathLength(); }
0018 
0019   bool isValid() const { return valid_; }
0020   operator bool() const { return valid_; }
0021 
0022 private:
0023   GlobalTrajectoryParameters gtp_;
0024   double s_;
0025   bool valid_;
0026 };
0027 
0028 #endif