Go to the documentation of this file.00001 #ifndef RecoMuon_TrackerSeedGenerator_TSGFromPropagation_H
00002 #define RecoMuon_TrackerSeedGenerator_TSGFromPropagation_H
00003
00013 #include "RecoMuon/TrackerSeedGenerator/interface/TrackerSeedGenerator.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00016 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
00017 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00018 #include "TrackingTools/PatternTools/interface/TrajectoryStateUpdator.h"
00019 #include "RecoMuon/TrackingTools/interface/MuonErrorMatrix.h"
00020 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00021
00022 class LayerMeasurements;
00023 class Chi2MeasurementEstimator;
00024 class Propagator;
00025 class MeasurementTracker;
00026 class GeometricSearchTracker;
00027 class DirectTrackerNavigation;
00028 class TrajectoryStateTransform;
00029 class TrackerTopology;
00030
00031 class TSGFromPropagation : public TrackerSeedGenerator {
00032
00033 public:
00035 TSGFromPropagation(const edm::ParameterSet &pset);
00036
00037 TSGFromPropagation(const edm::ParameterSet& par, const MuonServiceProxy*);
00038
00040 virtual ~TSGFromPropagation();
00041
00043 void trackerSeeds(const TrackCand&, const TrackingRegion&, const TrackerTopology *, std::vector<TrajectorySeed>&);
00044
00046 void init(const MuonServiceProxy*);
00047
00049 void setEvent(const edm::Event&);
00050
00051 private:
00052
00053 TrajectoryStateOnSurface innerState(const TrackCand&) const;
00054
00055 TrajectoryStateOnSurface outerTkState(const TrackCand&) const;
00056
00057 const LayerMeasurements* tkLayerMeasurements() const { return theTkLayerMeasurements; }
00058
00059 const TrajectoryStateUpdator* updator() const {return theUpdator;}
00060
00061 const Chi2MeasurementEstimator* estimator() const { return theEstimator; }
00062
00063 edm::ESHandle<Propagator> propagator() const {return theService->propagator(thePropagatorName); }
00064
00066 TrajectorySeed createSeed(const TrajectoryStateOnSurface&, const DetId&) const;
00067
00069 TrajectorySeed createSeed(const TrajectoryStateOnSurface& tsos, const edm::OwnVector<TrackingRecHit>& container, const DetId& id) const;
00070
00072 void validMeasurements(std::vector<TrajectoryMeasurement>&) const;
00073
00075 std::vector<TrajectoryMeasurement> findMeasurements_new(const DetLayer*, const TrajectoryStateOnSurface&) const;
00076
00078 std::vector<TrajectoryMeasurement> findMeasurements(const DetLayer*, const TrajectoryStateOnSurface&) const;
00079
00081 bool passSelection(const TrajectoryStateOnSurface&) const;
00082
00083 void getRescalingFactor(const TrackCand& staMuon);
00084
00086 void adjust(FreeTrajectoryState &) const;
00087
00089 void adjust(TrajectoryStateOnSurface &) const;
00090
00091 double dxyDis(const TrajectoryStateOnSurface& tsos) const;
00092
00093 double zDis(const TrajectoryStateOnSurface& tsos) const;
00094
00095 struct increasingEstimate{
00096 bool operator()(const TrajectoryMeasurement& lhs,
00097 const TrajectoryMeasurement& rhs) const{
00098 return lhs.estimate() < rhs.estimate();
00099 }
00100 };
00101
00102 struct isInvalid {
00103 bool operator()(const TrajectoryMeasurement& measurement) {
00104 return ( ((measurement).recHit() == 0) || !((measurement).recHit()->isValid()) || !((measurement).updatedState().isValid()) );
00105 }
00106 };
00107
00108 unsigned long long theCacheId_MT;
00109 unsigned long long theCacheId_TG;
00110
00111 std::string theCategory;
00112
00113 const LayerMeasurements* theTkLayerMeasurements;
00114
00115 edm::ESHandle<GeometricSearchTracker> theTracker;
00116
00117 std::string theMeasTrackerName;
00118 edm::ESHandle<MeasurementTracker> theMeasTracker;
00119
00120 const DirectTrackerNavigation* theNavigation;
00121
00122 const MuonServiceProxy* theService;
00123
00124 const TrajectoryStateUpdator* theUpdator;
00125
00126 const Chi2MeasurementEstimator* theEstimator;
00127
00128 TrajectoryStateTransform* theTSTransformer;
00129
00130 double theMaxChi2;
00131
00132 double theFlexErrorRescaling;
00133
00134 double theFixedErrorRescaling;
00135
00136 bool theUseVertexStateFlag;
00137
00138 bool theUpdateStateFlag;
00139
00140 std::string theResetMethod;
00141
00142 bool theSelectStateFlag;
00143
00144 std::string thePropagatorName;
00145
00146 MuonErrorMatrix * theErrorMatrixAdjuster;
00147
00148 bool theAdjustAtIp;
00149
00150 double theSigmaZ;
00151
00152 edm::ParameterSet theConfig;
00153
00154 edm::Handle<reco::BeamSpot> beamSpot;
00155 edm::InputTag theBeamSpotInputTag;
00156
00157 };
00158
00159 #endif