Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:09

0001 #ifndef SingleTrackVertexConstraint_H
0002 #define SingleTrackVertexConstraint_H
0003 
0004 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h"
0005 #include "RecoVertex/VertexPrimitives/interface/VertexSmoother.h"
0006 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackUpdator.h"
0007 
0008 #include "RecoVertex/VertexTools/interface/LinearizedTrackStateFactory.h"
0009 #include "RecoVertex/VertexTools/interface/VertexTrackFactory.h"
0010 #include "TrackingTools/TransientTrack/interface/TransientTrackFromFTSFactory.h"
0011 
0012 #include <tuple>
0013 /**
0014  * Class to re-estimate the parameters of the track at the vertex,
0015  *  with the vertex constraint or a BeamSpot, using the Kalman filter algorithms.
0016  * This will only change the parameters of the track at the vertex, but NOT
0017  * at other points along the track.
0018  */
0019 
0020 class SingleTrackVertexConstraint {
0021 public:
0022   typedef std::pair<reco::TransientTrack, float> TrackFloatPair;
0023   typedef std::tuple<bool, reco::TransientTrack, float> BTFtuple;
0024 
0025   SingleTrackVertexConstraint(bool doTrackerBoundCheck = true) : doTrackerBoundCheck_(doTrackerBoundCheck) {}
0026 
0027   /**
0028    *  Constaint of a TransientTrack with a position and error.
0029    *  The track must NOT have been used in the vertex fit.
0030    */
0031   BTFtuple constrain(const reco::TransientTrack& track,
0032                      const GlobalPoint& priorPos,
0033                      const GlobalError& priorError) const;
0034 
0035   /**
0036    *  Constaint of a FreeTrajectoryState with a position and error.
0037    *  The track must NOT have been used in the vertex fit.
0038    */
0039   BTFtuple constrain(const FreeTrajectoryState& fts, const GlobalPoint& priorPos, const GlobalError& priorError) const;
0040 
0041   /**
0042    *  The method which does the constaint.
0043    *  The track must NOT have been used in the vertex fit.
0044    */
0045   BTFtuple constrain(const reco::TransientTrack& track, const VertexState priorVertex) const;
0046 
0047   /**
0048    *  Constaint of a TransientTrack with a BeamSpot.
0049    */
0050   BTFtuple constrain(const reco::TransientTrack& track, const reco::BeamSpot& spot) const;
0051 
0052   /**
0053    *  Constaint of a FreeTrajectoryState with a BeamSpot.
0054    */
0055   BTFtuple constrain(const FreeTrajectoryState& fts, const reco::BeamSpot& spot) const;
0056 
0057 private:
0058   KalmanVertexUpdator<5> vertexUpdator;
0059   KalmanVertexTrackUpdator<5> theVertexTrackUpdator;
0060 
0061   LinearizedTrackStateFactory theLTrackFactory;
0062   VertexTrackFactory<5> theVTrackFactory;
0063   TransientTrackFromFTSFactory ttFactory;
0064   bool doTrackerBoundCheck_;
0065 };
0066 
0067 #endif