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:
49  explicit TrackTransformer(const edm::ParameterSet&);
50 
55 
57  ~TrackTransformer() override;
58 
60  static void fillPSetDescription(edm::ParameterSetDescription& descriptions,
61  bool DoPredictionsOnly = false,
62  const std::string& Fitter = "KFFitterForRefitInsideOut",
63  const std::string& Smoother = "KFSmootherForRefitInsideOut",
64  const std::string& Propagator = "SmartPropagatorAnyRK",
65  const std::string& RefitDirection = "alongMomentum",
66  bool RefitRPCHits = true,
67  const std::string& TrackerRecHitBuilder = "WithTrackAngle",
68  const std::string& MuonRecHitBuilder = "MuonRecHitBuilder",
69  const std::string& MTDRecHitBuilder = "MTDRecHitBuilder");
70 
71  // Operations
72 
74  std::vector<Trajectory> transform(const reco::Track&) const override;
75 
77  std::vector<Trajectory> transform(const reco::TrackRef&) const;
78 
81 
83  const MagneticField* magneticField() const { return &*theMGField; }
84 
87 
89  void setServices(const edm::EventSetup&) override;
90 
92  std::unique_ptr<TrajectoryFitter> const& refitter() const { return theFitter; }
93 
95  std::unique_ptr<TrajectorySmoother> const& smoother() const { return theSmoother; }
96 
98 
99 private:
101 
102  unsigned long long theCacheId_TRH = 0;
103 
104  const bool theRPCInTheFit;
105 
108 
113 
116  std::unique_ptr<TrajectoryFitter> theFitter;
117 
120  std::unique_ptr<TrajectorySmoother> theSmoother;
121 
126 
131 
135 
140 };
141 #endif
TrackTransformer::theTrackerRecHitBuilderName
const std::string theTrackerRecHitBuilderName
Definition: TrackTransformer.h:127
TrackTransformer::theTrackingGeometryToken
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > theTrackingGeometryToken
Definition: TrackTransformer.h:109
RefitDirection.h
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
TrackTransformer::theSmoother
std::unique_ptr< TrajectorySmoother > theSmoother
Definition: TrackTransformer.h:120
TrackTransformer::theRPCInTheFit
const bool theRPCInTheFit
Definition: TrackTransformer.h:104
ESHandle.h
TrackTransformer::theSmootherToken
edm::ESGetToken< TrajectorySmoother, TrajectoryFitterRecord > theSmootherToken
Definition: TrackTransformer.h:119
TrackTransformer::setServices
void setServices(const edm::EventSetup &) override
set the services needed by the TrackTransformer
Definition: TrackTransformer.cc:79
TrackTransformer::getTransientRecHits
TransientTrackingRecHit::ConstRecHitContainer getTransientRecHits(const reco::TransientTrack &track) const
Definition: TrackTransformer.cc:135
trackingRecoMaterialAnalyzer_cfi.MTDRecHitBuilder
MTDRecHitBuilder
Definition: trackingRecoMaterialAnalyzer_cfi.py:14
HLTSiStripMonitoring_cff.Fitter
Fitter
Definition: HLTSiStripMonitoring_cff.py:207
RefitDirection::GeometricalDirection
GeometricalDirection
Definition: RefitDirection.h:15
TrackTransformer::magneticField
const MagneticField * magneticField() const
the magnetic field
Definition: TrackTransformer.h:83
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
TrackTransformer::transform
std::vector< Trajectory > transform(const reco::Track &) const override
Convert a reco::Track into Trajectory.
Definition: TrackTransformer.cc:182
TrackTransformer::theMGFieldToken
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMGFieldToken
Definition: TrackTransformer.h:110
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
TransientTrackingRecHit.h
TrackTransformer::theTrackerRecHitBuilderToken
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
Definition: TrackTransformer.h:128
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
TrackTransformer::theMGField
edm::ESHandle< MagneticField > theMGField
Definition: TrackTransformer.h:112
TrackTransformer::smoother
std::unique_ptr< TrajectorySmoother > const & smoother() const
the smoother used to smooth the trajectory which came from the refitting step
Definition: TrackTransformer.h:95
TrackTransformer::theMtdAvailable
bool theMtdAvailable
Definition: TrackTransformer.h:138
ESGetToken.h
TrackTransformer::~TrackTransformer
~TrackTransformer() override
Destructor.
Definition: TrackTransformer.cc:56
TkTransientTrackingRecHitBuilder.h
edm::Ref< TrackCollection >
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
TrajectorySmoother
Definition: TrajectorySmoother.h:11
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
Propagator
Definition: Propagator.h:44
TrackTransformer::theTrackingGeometry
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
Definition: TrackTransformer.h:111
TrackTransformer::theMTDRecHitBuilder
edm::ESHandle< TransientTrackingRecHitBuilder > theMTDRecHitBuilder
Definition: TrackTransformer.h:139
TrackTransformer::thePropagator
edm::ESHandle< Propagator > thePropagator
Definition: TrackTransformer.h:125
TrackTransformer::thePropagatorName
const std::string thePropagatorName
Definition: TrackTransformer.h:122
TrackFwd.h
TrackTransformer::checkRecHitsOrdering
RefitDirection::GeometricalDirection checkRecHitsOrdering(TransientTrackingRecHit::ConstRecHitContainer const &) const
Definition: TrackTransformer.cc:163
TrackTransformer::theFitterName
const std::string theFitterName
Definition: TrackTransformer.h:114
TrackTransformer::theMuonRecHitBuilder
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
Definition: TrackTransformer.h:134
TrackTransformer::theTrackerRecHitBuilder
const TransientTrackingRecHitBuilder * theTrackerRecHitBuilder
Definition: TrackTransformer.h:129
reco::Track
Definition: Track.h:27
edm::ESHandle< GlobalTrackingGeometry >
TrajectoryFitterRecord
Definition: TrajectoryFitterRecord.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackTransformer::theDoPredictionsOnly
const bool theDoPredictionsOnly
Definition: TrackTransformer.h:106
edm::ParameterSet
Definition: ParameterSet.h:47
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
TrackTransformer::TrackTransformer
TrackTransformer(const edm::ParameterSet &parameterSet, edm::ConsumesCollector &&iC)
Definition: TrackTransformer.h:53
TrackTransformer::trackingGeometry
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
the tracking geometry
Definition: TrackTransformer.h:86
TrackTransformer::theCacheId_TRH
unsigned long long theCacheId_TRH
Definition: TrackTransformer.h:102
MuonAlignmentFromReference_cff.RefitRPCHits
RefitRPCHits
Definition: MuonAlignmentFromReference_cff.py:16
RefitDirection
Definition: RefitDirection.h:13
TrackTransformer::theFitterToken
edm::ESGetToken< TrajectoryFitter, TrajectoryFitterRecord > theFitterToken
Definition: TrackTransformer.h:115
TrackTransformerBase.h
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
TrackTransformerBase
Definition: TrackTransformerBase.h:17
TrackTransformer::hitCloner
TkClonerImpl hitCloner
Definition: TrackTransformer.h:130
trackingRecoMaterialAnalyzer_cfi.TrackerRecHitBuilder
TrackerRecHitBuilder
Definition: trackingRecoMaterialAnalyzer_cfi.py:11
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord >
TrackTransformer::fillPSetDescription
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
Definition: TrackTransformer.cc:58
trackingRecoMaterialAnalyzer_cfi.MuonRecHitBuilder
MuonRecHitBuilder
Definition: trackingRecoMaterialAnalyzer_cfi.py:13
TrackTransformer::theSmootherName
const std::string theSmootherName
Definition: TrackTransformer.h:118
TrajectoryFitter
Definition: TrajectoryFitter.h:19
TkClonerImpl
Definition: TkClonerImpl.h:12
reco::TransientTrack
Definition: TransientTrack.h:19
Trajectory
Definition: Trajectory.h:38
Frameworkfwd.h
TrackTransformer::theFitter
std::unique_ptr< TrajectoryFitter > theFitter
Definition: TrackTransformer.h:116
TrackTransformer::thePropagatorToken
edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorToken
Definition: TrackTransformer.h:123
trackingRecoMaterialAnalyzer_cfi.DoPredictionsOnly
DoPredictionsOnly
Definition: trackingRecoMaterialAnalyzer_cfi.py:9
HLTSiStripMonitoring_cff.Smoother
Smoother
Definition: HLTSiStripMonitoring_cff.py:209
TrackTransformer::refitter
std::unique_ptr< TrajectoryFitter > const & refitter() const
the refitter used to refit the reco::Track
Definition: TrackTransformer.h:92
TrackTransformer::theMuonRecHitBuilderToken
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
Definition: TrackTransformer.h:133
TrackTransformer::theMTDRecHitBuilderToken
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMTDRecHitBuilderToken
Definition: TrackTransformer.h:137
TrackTransformer::theMTDRecHitBuilderName
const std::string theMTDRecHitBuilderName
Definition: TrackTransformer.h:136
TrackTransformer::theRefitDirection
const RefitDirection theRefitDirection
Definition: TrackTransformer.h:107
GlobalTrackingGeometry.h
TrackTransformer::propagator
edm::ESHandle< Propagator > const & propagator() const
Definition: TrackTransformer.h:124
MagneticField
Definition: MagneticField.h:19
TransientTrackingRecHitBuilder
Definition: TransientTrackingRecHitBuilder.h:6
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
TrackTransformer::theMuonRecHitBuilderName
const std::string theMuonRecHitBuilderName
Definition: TrackTransformer.h:132
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12
TrackTransformer
Definition: TrackTransformer.h:46
TrackTransformer::TrackTransformer
TrackTransformer(const edm::ParameterSet &)
Constructor (for modules not yet migrated to ES-consumes)
Definition: TrackTransformer.cc:32