Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:16

0001 #ifndef GsfTrackReco_GsfTangent_h
0002 #define GsfTrackReco_GsfTangent_h
0003 
0004 /** Class holding information on the tangent to the electron track
0005  *    on one surface
0006  */
0007 
0008 #include "DataFormats/Math/interface/Vector3D.h"
0009 #include "DataFormats/Math/interface/Point3D.h"
0010 #include "DataFormats/Math/interface/Vector.h"
0011 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h"
0012 
0013 namespace reco {
0014 
0015   class GsfTangent {
0016   public:
0017     /// default constructor
0018     GsfTangent() : position_(0., 0., 0.), momentum_(0., 0., 0.), deltaP_(0.), sigDeltaP_(0.) {}
0019     /// constructor from position, momentum and estimated deltaP
0020     GsfTangent(const math::XYZPoint& position, const math::XYZVector& momentum, const Measurement1D& deltaP)
0021         : position_(position), momentum_(momentum) {
0022       deltaP_ = deltaP.value();
0023       sigDeltaP_ = deltaP.error();
0024     }
0025     const math::XYZPoint& position() const { return position_; }
0026     const math::XYZVector& momentum() const { return momentum_; }
0027     /// estimated deltaP (p_out-p_in)
0028     Measurement1D deltaP() const { return Measurement1D(deltaP_, sigDeltaP_); }
0029 
0030   private:
0031     math::XYZPoint position_;
0032     math::XYZVector momentum_;
0033     double deltaP_;
0034     double sigDeltaP_;
0035   };
0036 }  // namespace reco
0037 #endif