Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:56

0001 #ifndef IDEALHELIXPARAMETERS_H
0002 #define IDEALHELIXPARAMETERS_H
0003 
0004 #include "DataFormats/TrackReco/interface/Track.h"
0005 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0006 #include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 
0009 /* 
0010 Given a track, evaluates the status of the track finding in the XY plane 
0011 the point of tangent of the circle to the reference point(in general the PrimaryVertex or the BeamSpot)
0012 
0013 The approach is the following.
0014 Given a track, 
0015 -extract the innermomentum at the innerpoint
0016 -evalaute the radius of curvature and the center of the circle
0017 -solving geometrical equation, evaluate the point of tangence to the circle, starting from the PV
0018 -evaluate the status at this point of tangence T
0019 
0020  */
0021 class IdealHelixParameters {
0022 public:
0023   IdealHelixParameters()
0024       : _magnField(nullptr),
0025         _track(nullptr),
0026         _refPoint(math::XYZVector(0, 0, 0)),
0027         _tangentPoint(math::XYZVector(0, 0, 0)),
0028         _MomentumAtTangentPoint(math::XYZVector(0, 0, 0)) {}
0029   ~IdealHelixParameters() {}
0030 
0031   inline void setMagnField(const MagneticField* magnField) { _magnField = magnField; }
0032   inline void setData(const reco::Track* track, const math::XYZVector& refPoint = math::XYZVector(0, 0, 0));
0033   inline void setData(const reco::Track* track, const math::XYZPoint& ref);
0034 
0035   inline bool isTangentPointDistanceLessThan(float rmax, const reco::Track* track, const math::XYZVector& refPoint);
0036 
0037   math::XYZVector GetCircleCenter() const { return _circleCenter; }
0038   math::XYZVector GetTangentPoint() const { return _tangentPoint; }
0039   math::XYZVector GetMomentumAtTangentPoint() const { return _MomentumAtTangentPoint; }
0040   float GetTransverseIPAtTangent() const { return _transverseIP; }
0041   float GetRotationAngle() const { return _rotationAngle; }
0042 
0043 private:
0044   inline void calculate();
0045   inline void evalCircleCenter();
0046   inline void evalTangentPoint();
0047   inline void evalMomentumatTangentPoint();
0048 
0049   const MagneticField* _magnField;
0050   const reco::Track* _track;
0051   float _radius;
0052   math::XYZVector _circleCenter;
0053   math::XYZVector _refPoint;
0054   math::XYZVector _tangentPoint;
0055   math::XYZVector _MomentumAtTangentPoint;
0056   float _transverseIP;
0057   float _rotationAngle;
0058 
0059   //  std::stringstream ss;
0060 };
0061 #include "IdealHelixParameters.icc"
0062 
0063 #endif