CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/RecoPixelVertexing/PixelTrackFitting/interface/KFBasedPixelFitter.h

Go to the documentation of this file.
00001 #ifndef KFBasedPixelFitter_H
00002 #define KFBasedPixelFitter_H
00003 
00004 #include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h"
00005 #include "FWCore/Utilities/interface/InputTag.h"
00006 #include <vector>
00007 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00008 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00009 
00010 namespace edm {class ParameterSet; class Event; class EventSetup;}
00011 namespace reco { class Track; class BeamSpot; }
00012 
00013 class TransientTrackingRecHitBuilder;
00014 class TrackerGeometry;
00015 class MagneticField;
00016 class TrackingRegion;
00017 class TrackingRecHit;
00018 
00019 
00020 class KFBasedPixelFitter : public PixelFitter {
00021 public:
00022   KFBasedPixelFitter(  const edm::ParameterSet& cfg);
00023   virtual ~KFBasedPixelFitter() {}
00024     virtual reco::Track* run(
00025       const edm::Event& ev,
00026       const edm::EventSetup& es,
00027       const std::vector<const TrackingRecHit *>& hits,
00028       const TrackingRegion& region) const;
00029 private:
00030 
00031   //this two simple classes are copied from Alignment/ReferenceTrajectories in order to avoid dependencies 
00032   class MyBeamSpotGeomDet : public GeomDet {
00033     public:
00034     explicit MyBeamSpotGeomDet(const ReferenceCountingPointer<BoundPlane>& plane) :GeomDet(plane) { setDetId(0); }
00035     virtual ~MyBeamSpotGeomDet() { }
00036     virtual GeomDetEnumerators::SubDetector subDetector() const { return GeomDetEnumerators::invalidDet; }
00037     virtual std::vector< const GeomDet*> components() const { return std::vector< const GeomDet*>(); }
00038   };
00039   class MyBeamSpotHit:  public TransientTrackingRecHit {
00040     public:
00041     MyBeamSpotHit (const reco::BeamSpot &beamSpot, const GeomDet * geom);
00042     virtual ~MyBeamSpotHit(){}
00043     virtual LocalPoint localPosition() const { return localPosition_; }
00044     virtual LocalError localPositionError() const { return localError_; }
00045     virtual AlgebraicVector parameters() const;
00046     virtual AlgebraicSymMatrix parametersError() const;
00047     virtual int dimension() const { return 1; }
00048     virtual AlgebraicMatrix projectionMatrix() const;
00049     virtual std::vector<const TrackingRecHit*> recHits() const { return std::vector<const TrackingRecHit*>(); }
00050     virtual std::vector<TrackingRecHit*> recHits() { return std::vector<TrackingRecHit*>(); }
00051     virtual const TrackingRecHit * hit() const { return 0; }
00052     private:
00053     LocalPoint localPosition_;
00054     LocalError localError_;
00055     virtual MyBeamSpotHit * clone() const { return new MyBeamSpotHit(*this); }
00056   };
00057   
00058 
00059   std::string thePropagatorLabel;
00060   std::string thePropagatorOppositeLabel;
00061   bool theUseBeamSpot; 
00062   edm::InputTag theBeamSpot;
00063   std::string theTTRHBuilderName;
00064   
00065 
00066 };
00067 #endif