Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-20 02:47:05

0001 #ifndef TrackFitter_H
0002 #define TrackFitter_H
0003 
0004 #include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h"
0005 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0006 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h"
0007 #include "DataFormats/TrackReco/interface/Track.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 
0010 #include <vector>
0011 
0012 class TransientTrackingRecHitBuilder;
0013 class TrackerGeometry;
0014 class MagneticField;
0015 
0016 class TrackFitter : public PixelFitterBase {
0017 public:
0018   TrackFitter(const TrackerGeometry* tracker,
0019               const MagneticField* field,
0020               const TransientTrackingRecHitBuilder* ttrhBuilder)
0021       : theTracker(tracker), theField(field), theTTRecHitBuilder(ttrhBuilder) {}
0022   ~TrackFitter() override {}
0023 
0024   std::unique_ptr<reco::Track> run(const std::vector<const TrackingRecHit*>& hits,
0025                                    const TrackingRegion& region) const override;
0026 
0027 private:
0028   float getCotThetaAndUpdateZip(
0029       const GlobalPoint& inner, const GlobalPoint& outer, float radius, float phi, float d0, float& zip) const;
0030   float getPhi(float xC, float yC, int charge) const;
0031   float getZip(float d0, float curv, const GlobalPoint& inner, const GlobalPoint& outer) const;
0032   void getErrTipAndErrZip(float pt, float eta, float& errZip, float& errTip) const;
0033 
0034   const TrackerGeometry* theTracker;
0035   const MagneticField* theField;
0036   const TransientTrackingRecHitBuilder* theTTRecHitBuilder;
0037 };
0038 #endif