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 
38 class LayerMeasurements;
40 class Propagator;
41 class MeasurementTracker;
45 class SimTrack;
46 class TrackerGeometry;
47 class TrackerTopology;
48 
49 
51  public:
54 
56 
58  virtual ~FastTSGFromPropagation();
59 
61  void trackerSeeds(const TrackCand&, const TrackingRegion&,
62  const TrackerTopology *tTopo, std::vector<TrajectorySeed>&);
63 
65  void init(const MuonServiceProxy*);
66 
68  void setEvent(const edm::Event&);
69 
70 private:
72  void stateOnDet(const TrajectoryStateOnSurface& ts,
73  unsigned int detid,
74  PTrajectoryStateOnDet& pts) const;
75 
77 
79 
81 
82  const TrajectoryStateUpdator* updator() const {return theUpdator.get();}
83 
84  const Chi2MeasurementEstimator* estimator() const { return theEstimator.get(); }
85 
87 
90 
92  TrajectorySeed createSeed(const TrajectoryStateOnSurface& tsos, const edm::OwnVector<TrackingRecHit>& container, const DetId& id) const;
93 
95  void validMeasurements(std::vector<TrajectoryMeasurement>&) const;
96 
98  std::vector<TrajectoryMeasurement> findMeasurements_new(const DetLayer*, const TrajectoryStateOnSurface&) const;
99 
101  std::vector<TrajectoryMeasurement> findMeasurements(const DetLayer*, const TrajectoryStateOnSurface&) const;
102 
104  bool passSelection(const TrajectoryStateOnSurface&) const;
105 
106  void getRescalingFactor(const TrackCand& staMuon);
107 
109  void adjust(FreeTrajectoryState &) const;
110 
112  void adjust(TrajectoryStateOnSurface &) const;
113 
114  double dxyDis(const TrajectoryStateOnSurface& tsos) const;
115 
116  double zDis(const TrajectoryStateOnSurface& tsos) const;
117 
120  const TrajectoryMeasurement& rhs) const{
121  return lhs.estimate() < rhs.estimate();
122  }
123  };
124 
125  struct isInvalid {
126  bool operator()(const TrajectoryMeasurement& measurement) {
127  return ( ((measurement).recHit() == 0) || !((measurement).recHit()->isValid()) || !((measurement).updatedState().isValid()) );
128  }
129  };
130 
131  unsigned long long theCacheId_MT;
132  unsigned long long theCacheId_TG;
133 
135 
137 
139 
141 
142  std::unique_ptr<const DirectTrackerNavigation> theNavigation;
143 
145 
147 
148  std::unique_ptr<const TrajectoryStateUpdator> theUpdator;
149 
150  std::unique_ptr<const Chi2MeasurementEstimator> theEstimator;
151 
152  double theMaxChi2;
153 
155 
157 
159 
161 
163 
165 
167 
168  std::unique_ptr<MuonErrorMatrix> theErrorMatrixAdjuster;
169 
171 
172  double theSigmaZ;
173 
179 
185 
186 };
187 
188 #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
std::pair< const Trajectory *, reco::TrackRef > TrackCand
const LayerMeasurements * tkLayerMeasurements() const
edm::EDGetTokenT< edm::SimTrackContainer > theSimTrackCollectionToken_
edm::Handle< edm::SimTrackContainer > theSimTracks
virtual ~FastTSGFromPropagation()
destructor
edm::ESHandle< GeometricSearchTracker > theTracker
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
const MuonServiceProxy * theService
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_
const edm::ParameterSet theConfig
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
std::vector< TrajectoryMeasurement > findMeasurements_new(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer (faster way)
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
TrajectoryStateOnSurface innerState(const TrackCand &) const
LayerMeasurements theTkLayerMeasurements
Definition: DetId.h:18
const TrackerGeometry * theGeometry
void init(const MuonServiceProxy *)
initialize
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
edm::EDGetTokenT< reco::BeamSpot > beamSpot_
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
double dxyDis(const TrajectoryStateOnSurface &tsos) const
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken_
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *tTopo, std::vector< TrajectorySeed > &)
generate seed(s) for a track
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
void setEvent(const edm::Event &)
set an event
unsigned long long theCacheId_TG
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster