CMS 3D CMS Logo

KFBasedPixelFitter.h
Go to the documentation of this file.
1 #ifndef KFBasedPixelFitter_H
2 #define KFBasedPixelFitter_H
3 
6 #include <vector>
9 
10 
11 namespace edm {class EventSetup;}
12 namespace reco { class Track; class BeamSpot; }
13 
15 class TrackerGeometry;
16 class MagneticField;
17 class TrackingRegion;
18 class TrackingRecHit;
19 class Propagator;
20 
21 
23 public:
24  KFBasedPixelFitter(const Propagator *propagator, const Propagator *opropagator,
25  const TransientTrackingRecHitBuilder *ttrhBuilder,
26  const TrackerGeometry *tracker, const MagneticField *field,
27  const reco::BeamSpot *beamSpot);
28  ~KFBasedPixelFitter() override {}
29 
30  std::unique_ptr<reco::Track> run(const std::vector<const TrackingRecHit *>& hits, const TrackingRegion& region, const edm::EventSetup& setup) const override;
31 
32 private:
33 
34  //this two simple classes are copied from Alignment/ReferenceTrajectories in order to avoid dependencies
35  class MyBeamSpotGeomDet final : public GeomDet {
36  public:
37  explicit MyBeamSpotGeomDet(const ReferenceCountingPointer<BoundPlane>& plane) :GeomDet(plane) { setDetId(0); }
38  ~MyBeamSpotGeomDet() override { }
40  std::vector< const GeomDet*> components() const override { return std::vector< const GeomDet*>(); }
41  };
42  class MyBeamSpotHit final : public TValidTrackingRecHit {
43  public:
44  MyBeamSpotHit (const reco::BeamSpot &beamSpot, const GeomDet * geom);
45  ~MyBeamSpotHit() override{}
46  LocalPoint localPosition() const override { return localPosition_; }
47  LocalError localPositionError() const override { return localError_; }
48  AlgebraicVector parameters() const override;
49  AlgebraicSymMatrix parametersError() const override;
50  int dimension() const override { return 1; }
51  AlgebraicMatrix projectionMatrix() const override;
52  std::vector<const TrackingRecHit*> recHits() const override { return std::vector<const TrackingRecHit*>(); }
53  std::vector<TrackingRecHit*> recHits() override { return std::vector<TrackingRecHit*>(); }
54  const TrackingRecHit * hit() const override { return nullptr; }
55  private:
58  MyBeamSpotHit * clone() const override { return new MyBeamSpotHit(*this); }
59  };
60 
67 };
68 #endif
const Propagator * theOPropagator
MyBeamSpotGeomDet(const ReferenceCountingPointer< BoundPlane > &plane)
const Propagator * thePropagator
const TrackerGeometry * theTracker
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
const TrackingRecHit * hit() const override
const MagneticField * theField
CLHEP::HepMatrix AlgebraicMatrix
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
~KFBasedPixelFitter() override
std::vector< const GeomDet * > components() const override
Returns direct components, if any.
const reco::BeamSpot * theBeamSpot
GeomDetEnumerators::SubDetector subDetector() const override
Which subdetector.
const TransientTrackingRecHitBuilder * theTTRHBuilder
CLHEP::HepVector AlgebraicVector
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
fixed size matrix
HLT enums.
CLHEP::HepSymMatrix AlgebraicSymMatrix
LocalError localPositionError() const override
MyBeamSpotHit * clone() const override
LocalPoint localPosition() const override