CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoMuon/TrackerSeedGenerator/plugins/TSGFromPropagation.h

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 
00030 class TSGFromPropagation : public TrackerSeedGenerator {
00031 
00032 public:
00034   TSGFromPropagation(const edm::ParameterSet &pset);
00035 
00036   TSGFromPropagation(const edm::ParameterSet& par, const MuonServiceProxy*);
00037 
00039   virtual ~TSGFromPropagation();
00040 
00042   void  trackerSeeds(const TrackCand&, const TrackingRegion&, std::vector<TrajectorySeed>&);
00043     
00045   void init(const MuonServiceProxy*);
00046 
00048   void setEvent(const edm::Event&);
00049 
00050 private:
00051 
00052   TrajectoryStateOnSurface innerState(const TrackCand&) const;
00053 
00054   TrajectoryStateOnSurface outerTkState(const TrackCand&) const;
00055 
00056   const LayerMeasurements* tkLayerMeasurements() const { return theTkLayerMeasurements; } 
00057 
00058   const TrajectoryStateUpdator* updator() const {return theUpdator;}
00059 
00060   const Chi2MeasurementEstimator* estimator() const { return theEstimator; }
00061 
00062   edm::ESHandle<Propagator> propagator() const {return theService->propagator(thePropagatorName); }
00063 
00065   TrajectorySeed createSeed(const TrajectoryStateOnSurface&, const DetId&) const;
00066 
00068   TrajectorySeed createSeed(const TrajectoryStateOnSurface& tsos, const edm::OwnVector<TrackingRecHit>& container, const DetId& id) const;
00069 
00071   void validMeasurements(std::vector<TrajectoryMeasurement>&) const;
00072 
00074   std::vector<TrajectoryMeasurement> findMeasurements_new(const DetLayer*, const TrajectoryStateOnSurface&) const;
00075 
00077   std::vector<TrajectoryMeasurement> findMeasurements(const DetLayer*, const TrajectoryStateOnSurface&) const;
00078 
00080   bool passSelection(const TrajectoryStateOnSurface&) const;
00081 
00082   void getRescalingFactor(const TrackCand& staMuon);
00083 
00085   void adjust(FreeTrajectoryState &) const;
00086 
00088   void adjust(TrajectoryStateOnSurface &) const;
00089 
00090   double dxyDis(const TrajectoryStateOnSurface& tsos) const;
00091 
00092   double zDis(const TrajectoryStateOnSurface& tsos) const;
00093 
00094   struct increasingEstimate{
00095     bool operator()(const TrajectoryMeasurement& lhs,
00096                     const TrajectoryMeasurement& rhs) const{ 
00097       return lhs.estimate() < rhs.estimate();
00098     }
00099   };
00100 
00101   struct isInvalid {
00102     bool operator()(const TrajectoryMeasurement& measurement) {
00103       return ( ((measurement).recHit() == 0) || !((measurement).recHit()->isValid()) || !((measurement).updatedState().isValid()) ); 
00104     }
00105   };
00106 
00107   unsigned long long theCacheId_MT;
00108   unsigned long long theCacheId_TG;
00109 
00110   std::string theCategory;
00111 
00112   const LayerMeasurements*  theTkLayerMeasurements;
00113 
00114   edm::ESHandle<GeometricSearchTracker> theTracker;
00115 
00116   std::string theMeasTrackerName;
00117   edm::ESHandle<MeasurementTracker> theMeasTracker;
00118 
00119   const DirectTrackerNavigation* theNavigation;
00120 
00121   const MuonServiceProxy* theService;
00122 
00123   const TrajectoryStateUpdator* theUpdator;
00124 
00125   const Chi2MeasurementEstimator* theEstimator;
00126 
00127   TrajectoryStateTransform* theTSTransformer;
00128 
00129   double theMaxChi2;
00130 
00131   double theFlexErrorRescaling;
00132 
00133   double theFixedErrorRescaling;
00134 
00135   bool theUseVertexStateFlag;
00136 
00137   bool theUpdateStateFlag;
00138 
00139   std::string theResetMethod; 
00140 
00141   bool theSelectStateFlag;
00142 
00143   std::string thePropagatorName;
00144 
00145   MuonErrorMatrix * theErrorMatrixAdjuster;
00146 
00147   bool theAdjustAtIp;
00148 
00149   double theSigmaZ; 
00150 
00151   edm::ParameterSet theConfig;
00152 
00153   edm::Handle<reco::BeamSpot> beamSpot;
00154   edm::InputTag theBeamSpotInputTag;
00155 
00156 };
00157 
00158 #endif