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;
50 
52 public:
55 
57 
59  ~FastTSGFromPropagation() override;
60 
62  void trackerSeeds(const TrackCand&,
63  const TrackingRegion&,
64  const TrackerTopology* tTopo,
65  std::vector<TrajectorySeed>&) override;
66 
68  void init(const MuonServiceProxy*) override;
69 
71  void setEvent(const edm::Event&) override;
72 
73 private:
75  void stateOnDet(const TrajectoryStateOnSurface& ts, unsigned int detid, PTrajectoryStateOnDet& pts) const;
76 
78 
80 
81  const TrajectoryStateUpdator* updator() const { return theUpdator.get(); }
82 
83  const Chi2MeasurementEstimator* estimator() const { return theEstimator.get(); }
84 
86 
89 
92  const edm::OwnVector<TrackingRecHit>& container,
93  const DetId& id) const;
94 
96  void validMeasurements(std::vector<TrajectoryMeasurement>&) const;
97 
99  std::vector<TrajectoryMeasurement> findMeasurements(const DetLayer*, const TrajectoryStateOnSurface&) const;
100 
102  bool passSelection(const TrajectoryStateOnSurface&) const;
103 
104  void getRescalingFactor(const TrackCand& staMuon);
105 
107  void adjust(FreeTrajectoryState&) const;
108 
110  void adjust(TrajectoryStateOnSurface&) const;
111 
112  double dxyDis(const TrajectoryStateOnSurface& tsos) const;
113 
114  double zDis(const TrajectoryStateOnSurface& tsos) const;
115 
117  bool operator()(const TrajectoryMeasurement& lhs, const TrajectoryMeasurement& rhs) const {
118  return lhs.estimate() < rhs.estimate();
119  }
120  };
121 
122  struct isInvalid {
123  bool operator()(const TrajectoryMeasurement& measurement) {
124  return (((measurement).recHit() == nullptr) || !((measurement).recHit()->isValid()) ||
125  !((measurement).updatedState().isValid()));
126  }
127  };
128 
129  unsigned long long theCacheId_TG;
130 
132 
133  std::unique_ptr<const DirectTrackerNavigation> theNavigation;
134 
136 
138 
139  std::unique_ptr<const TrajectoryStateUpdator> theUpdator;
140 
141  std::unique_ptr<const Chi2MeasurementEstimator> theEstimator;
142 
143  double theMaxChi2;
144 
146 
148 
150 
152 
154 
156 
158 
159  std::unique_ptr<MuonErrorMatrix> theErrorMatrixAdjuster;
160 
162 
163  double theSigmaZ;
164 
170 
176 
177  //from init
180 
181  //from setEvent
183 };
184 
185 #endif
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
std::unique_ptr< const TrajectoryStateUpdator > theUpdator
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theGeometryToken
FastTSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
edm::Handle< reco::BeamSpot > theBeamSpot
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
edm::EDGetTokenT< edm::SimTrackContainer > theSimTrackCollectionToken_
edm::Handle< edm::SimTrackContainer > theSimTracks
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTTRHBuilderToken
void stateOnDet(const TrajectoryStateOnSurface &ts, unsigned int detid, PTrajectoryStateOnDet &pts) const
A mere copy (without memory leak) of an existing tracking method.
double zDis(const TrajectoryStateOnSurface &tsos) const
const MuonServiceProxy * theService
std::pair< const Trajectory *, reco::TrackRef > TrackCand
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
bool operator()(const TrajectoryMeasurement &measurement)
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 operator()(const TrajectoryMeasurement &lhs, const TrajectoryMeasurement &rhs) const
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
const TrajectoryStateUpdator * updator() 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 dxyDis(const TrajectoryStateOnSurface &tsos) const
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
const Chi2MeasurementEstimator * estimator() const
std::unique_ptr< const DirectTrackerNavigation > theNavigation
edm::Handle< FastTrackerRecHitCombinationCollection > recHitCombinations
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > theTrackerToken
void setEvent(const edm::Event &) override
set an event
edm::EDGetTokenT< reco::BeamSpot > beamSpot_
TrajectoryStateOnSurface innerState(const TrackCand &) const
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken_
edm::ESHandle< Propagator > propagator() const
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
unsigned long long theCacheId_TG
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster