CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FastTSGFromPropagation.h
Go to the documentation of this file.
1 #ifndef FastSimulation_Muons_FastTSGFromPropagation_H
2 #define FastSimulation_Muons_FastTSGFromPropagation_H
3 
23 
29 
33 #include <memory>
34 
35 
36 class LayerMeasurements;
38 class Propagator;
39 class MeasurementTracker;
43 class SimTrack;
44 class TrackerGeometry;
45 class TrackerTopology;
46 
48 
49 public:
52 
54 
56  virtual ~FastTSGFromPropagation();
57 
59  void trackerSeeds(const TrackCand&, const TrackingRegion&,
60  const TrackerTopology *tTopo, std::vector<TrajectorySeed>&);
61 
63  void init(const MuonServiceProxy*);
64 
66  void setEvent(const edm::Event&);
67 
68 private:
70  void stateOnDet(const TrajectoryStateOnSurface& ts,
71  unsigned int detid,
72  PTrajectoryStateOnDet& pts) const;
73 
75 
77 
79 
80  const TrajectoryStateUpdator* updator() const {return theUpdator.get();}
81 
82  const Chi2MeasurementEstimator* estimator() const { return theEstimator.get(); }
83 
85 
88 
90  TrajectorySeed createSeed(const TrajectoryStateOnSurface& tsos, const edm::OwnVector<TrackingRecHit>& container, const DetId& id) const;
91 
93  void validMeasurements(std::vector<TrajectoryMeasurement>&) const;
94 
96  std::vector<TrajectoryMeasurement> findMeasurements_new(const DetLayer*, const TrajectoryStateOnSurface&) 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 
118  const TrajectoryMeasurement& rhs) const{
119  return lhs.estimate() < rhs.estimate();
120  }
121  };
122 
123  struct isInvalid {
124  bool operator()(const TrajectoryMeasurement& measurement) {
125  return ( ((measurement).recHit() == 0) || !((measurement).recHit()->isValid()) || !((measurement).updatedState().isValid()) );
126  }
127  };
128 
129  unsigned long long theCacheId_MT;
130  unsigned long long theCacheId_TG;
131 
133 
135 
137 
139 
140  std::unique_ptr<const DirectTrackerNavigation> theNavigation;
141 
143 
145 
146  std::unique_ptr<const TrajectoryStateUpdator> theUpdator;
147 
148  std::unique_ptr<const Chi2MeasurementEstimator> theEstimator;
149 
150  double theMaxChi2;
151 
153 
155 
157 
159 
161 
163 
165 
166  std::unique_ptr<MuonErrorMatrix> theErrorMatrixAdjuster;
167 
169 
170  double theSigmaZ;
171 
177 
183 
184 };
185 
186 #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
edm::EDGetTokenT< SiTrackerGSMatchedRecHit2DCollection > theHitProducer
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
edm::Handle< SiTrackerGSMatchedRecHit2DCollection > theGSRecHits
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::EDGetTokenT< reco::BeamSpot > beamSpot_
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
double dxyDis(const TrajectoryStateOnSurface &tsos) const
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