CMS 3D CMS Logo

TrackTransformer.h
Go to the documentation of this file.
1 #ifndef TrackingTools_TrackRefitter_TrackTransformer_H
2 #define TrackingTools_TrackRefitter_TrackTransformer_H
3 
17 
19 
23 
28 
30 
31 namespace reco {
32  class TransientTrack;
33 }
34 
35 class TrajectoryFitter;
36 class TrajectorySmoother;
37 class Propagator;
39 class Trajectory;
45 
46 class TrackTransformer final : public TrackTransformerBase {
47 public:
52 
54  ~TrackTransformer() override;
55 
57  static void fillPSetDescription(edm::ParameterSetDescription& descriptions,
58  bool doPredictionsOnly = false,
59  const std::string& fitter = "KFFitterForRefitInsideOut",
60  const std::string& smoother = "KFSmootherForRefitInsideOut",
61  const std::string& propagator = "SmartPropagatorAnyRK",
62  const std::string& refitDirection = "alongMomentum",
63  bool refitRPCHits = true,
64  const std::string& trackerRecHitBuilder = "WithTrackAngle",
65  const std::string& muonRecHitBuilder = "MuonRecHitBuilder",
66  const std::string& mtdRecHitBuilder = "MTDRecHitBuilder");
67 
68  // Operations
69 
71  std::vector<Trajectory> transform(const reco::Track&) const override;
72 
74  std::vector<Trajectory> transform(const reco::TrackRef&) const;
75 
78 
80  const MagneticField* magneticField() const { return &*theMGField; }
81 
84 
86  void setServices(const edm::EventSetup&) override;
87 
89  std::unique_ptr<TrajectoryFitter> const& refitter() const { return theFitter; }
90 
92  std::unique_ptr<TrajectorySmoother> const& smoother() const { return theSmoother; }
93 
95 
96 private:
98 
99  unsigned long long theCacheId_TRH = 0;
100 
101  const bool theRPCInTheFit;
102 
105 
110 
113  std::unique_ptr<TrajectoryFitter> theFitter;
114 
117  std::unique_ptr<TrajectorySmoother> theSmoother;
118 
123 
128 
132 
137 };
138 #endif
TransientTrackingRecHit::ConstRecHitContainer getTransientRecHits(const reco::TransientTrack &track) const
const std::string theTrackerRecHitBuilderName
const TransientTrackingRecHitBuilder * theTrackerRecHitBuilder
void setServices(const edm::EventSetup &) override
set the services needed by the TrackTransformer
RefitDirection::GeometricalDirection checkRecHitsOrdering(TransientTrackingRecHit::ConstRecHitContainer const &) const
const RefitDirection theRefitDirection
const bool theRPCInTheFit
const MagneticField * magneticField() const
the magnetic field
std::unique_ptr< TrajectorySmoother > const & smoother() const
the smoother used to smooth the trajectory which came from the refitting step
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
unsigned long long theCacheId_TRH
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
edm::ESHandle< TransientTrackingRecHitBuilder > theMTDRecHitBuilder
edm::ESHandle< Propagator > thePropagator
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
std::unique_ptr< TrajectoryFitter > theFitter
const std::string thePropagatorName
const std::string theFitterName
edm::ESHandle< MagneticField > theMGField
edm::ESGetToken< TrajectoryFitter, TrajectoryFitterRecord > theFitterToken
const std::string theMuonRecHitBuilderName
std::vector< ConstRecHitPointer > ConstRecHitContainer
TkClonerImpl hitCloner
edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorToken
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
the tracking geometry
const std::string theSmootherName
TrackTransformer(const edm::ParameterSet &, edm::ConsumesCollector &)
Constructor (for modules migrated to ES-consumes)
edm::ESGetToken< TrajectorySmoother, TrajectoryFitterRecord > theSmootherToken
static void fillPSetDescription(edm::ParameterSetDescription &descriptions, bool doPredictionsOnly=false, const std::string &fitter="KFFitterForRefitInsideOut", const std::string &smoother="KFSmootherForRefitInsideOut", const std::string &propagator="SmartPropagatorAnyRK", const std::string &refitDirection="alongMomentum", bool refitRPCHits=true, const std::string &trackerRecHitBuilder="WithTrackAngle", const std::string &muonRecHitBuilder="MuonRecHitBuilder", const std::string &mtdRecHitBuilder="MTDRecHitBuilder")
fillDescriptions
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMTDRecHitBuilderToken
const std::string theMTDRecHitBuilderName
const bool theDoPredictionsOnly
fixed size matrix
std::unique_ptr< TrajectoryFitter > const & refitter() const
the refitter used to refit the reco::Track
edm::ESHandle< Propagator > const & propagator() const
TrackTransformer(const edm::ParameterSet &parameterSet, edm::ConsumesCollector &&iC)
~TrackTransformer() override
Destructor.
std::vector< Trajectory > transform(const reco::Track &) const override
Convert a reco::Track into Trajectory.
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMGFieldToken
std::unique_ptr< TrajectorySmoother > theSmoother
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > theTrackingGeometryToken