CMS 3D CMS Logo

FastTSGFromPropagation.h
Go to the documentation of this file.
1 #ifndef FastSimulation_Muons_FastTSGFromPropagation_H
2 #define FastSimulation_Muons_FastTSGFromPropagation_H
3 
23 
27 
31 
34 
35 #include <memory>
36 
37 class LayerMeasurements;
39 class Propagator;
40 class MeasurementTracker;
44 class SimTrack;
45 class TrackerGeometry;
46 class TrackerTopology;
47 
49 public:
52 
54 
56  ~FastTSGFromPropagation() override;
57 
59  void trackerSeeds(const TrackCand&,
60  const TrackingRegion&,
61  const TrackerTopology* tTopo,
62  std::vector<TrajectorySeed>&) override;
63 
65  void init(const MuonServiceProxy*) override;
66 
68  void setEvent(const edm::Event&) override;
69 
70 private:
72  void stateOnDet(const TrajectoryStateOnSurface& ts, unsigned int detid, PTrajectoryStateOnDet& pts) const;
73 
75 
77 
78  const TrajectoryStateUpdator* updator() const { return theUpdator.get(); }
79 
80  const Chi2MeasurementEstimator* estimator() const { return theEstimator.get(); }
81 
83 
86 
89  const edm::OwnVector<TrackingRecHit>& container,
90  const DetId& id) const;
91 
93  void validMeasurements(std::vector<TrajectoryMeasurement>&) const;
94 
96  std::vector<TrajectoryMeasurement> findMeasurements(const DetLayer*, const TrajectoryStateOnSurface&) const;
97 
99  bool passSelection(const TrajectoryStateOnSurface&) const;
100 
101  void getRescalingFactor(const TrackCand& staMuon);
102 
104  void adjust(FreeTrajectoryState&) const;
105 
107  void adjust(TrajectoryStateOnSurface&) const;
108 
109  double dxyDis(const TrajectoryStateOnSurface& tsos) const;
110 
111  double zDis(const TrajectoryStateOnSurface& tsos) const;
112 
114  bool operator()(const TrajectoryMeasurement& lhs, const TrajectoryMeasurement& rhs) const {
115  return lhs.estimate() < rhs.estimate();
116  }
117  };
118 
119  struct isInvalid {
120  bool operator()(const TrajectoryMeasurement& measurement) {
121  return (((measurement).recHit() == nullptr) || !((measurement).recHit()->isValid()) ||
122  !((measurement).updatedState().isValid()));
123  }
124  };
125 
126  unsigned long long theCacheId_MT;
127  unsigned long long theCacheId_TG;
128 
130 
132 
134 
135  std::unique_ptr<const DirectTrackerNavigation> theNavigation;
136 
138 
140 
141  std::unique_ptr<const TrajectoryStateUpdator> theUpdator;
142 
143  std::unique_ptr<const Chi2MeasurementEstimator> theEstimator;
144 
145  double theMaxChi2;
146 
148 
150 
152 
154 
156 
158 
160 
161  std::unique_ptr<MuonErrorMatrix> theErrorMatrixAdjuster;
162 
164 
165  double theSigmaZ;
166 
172 
178 };
179 
180 #endif
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
edm::ESHandle< MeasurementTracker > theMeasTracker
std::unique_ptr< const TrajectoryStateUpdator > theUpdator
FastTSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
edm::Handle< reco::BeamSpot > theBeamSpot
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
unsigned long long theCacheId_MT
bool operator()(const TrajectoryMeasurement &lhs, const TrajectoryMeasurement &rhs) const
edm::EDGetTokenT< edm::SimTrackContainer > theSimTrackCollectionToken_
edm::Handle< edm::SimTrackContainer > theSimTracks
edm::ESHandle< GeometricSearchTracker > theTracker
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
const MuonServiceProxy * theService
std::pair< const Trajectory *, reco::TrackRef > TrackCand
bool operator()(const TrajectoryMeasurement &measurement)
const Chi2MeasurementEstimator * estimator() const
void getRescalingFactor(const TrackCand &staMuon)
static const double pts[33]
Definition: Constants.h:30
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken_
~FastTSGFromPropagation() override
destructor
const edm::ParameterSet theConfig
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
TrajectoryStateOnSurface innerState(const TrackCand &) const
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *tTopo, std::vector< TrajectorySeed > &) override
generate seed(s) for a track
Definition: DetId.h:17
void init(const MuonServiceProxy *) override
initialize
const TrackerGeometry * theGeometry
double zDis(const TrajectoryStateOnSurface &tsos) const
const TrajectoryStateUpdator * updator() const
std::unique_ptr< const DirectTrackerNavigation > theNavigation
edm::ESHandle< Propagator > propagator() const
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
void stateOnDet(const TrajectoryStateOnSurface &ts, unsigned int detid, PTrajectoryStateOnDet &pts) const
A mere copy (without memory leak) of an existing tracking method.
edm::Handle< FastTrackerRecHitCombinationCollection > recHitCombinations
void setEvent(const edm::Event &) override
set an event
edm::EDGetTokenT< reco::BeamSpot > beamSpot_
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
double dxyDis(const TrajectoryStateOnSurface &tsos) const
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken_
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
unsigned long long theCacheId_TG
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster