00001 #ifndef MuonIdentification_DTTimingExtractor_H 00002 #define MuonIdentification_DTTimingExtractor_H 00003 00009 // 00010 // Original Author: Traczyk Piotr 00011 // Created: Thu Oct 11 15:01:28 CEST 2007 00012 // $Id: DTTimingExtractor.h,v 1.8 2011/02/24 15:41:53 farrell3 Exp $ 00013 // 00014 // 00015 00016 // system include files 00017 #include <memory> 00018 00019 // user include files 00020 #include "FWCore/Framework/interface/Frameworkfwd.h" 00021 #include "FWCore/Framework/interface/EDProducer.h" 00022 00023 #include "FWCore/Framework/interface/Event.h" 00024 #include "FWCore/Framework/interface/MakerMacros.h" 00025 00026 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00027 00028 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h" 00029 00030 #include "DataFormats/Common/interface/Ref.h" 00031 00032 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h" 00033 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h" 00034 00035 #include "DataFormats/MuonReco/interface/Muon.h" 00036 #include "DataFormats/MuonReco/interface/MuonFwd.h" 00037 #include "RecoMuon/TrackingTools/interface/MuonSegmentMatcher.h" 00038 #include "RecoMuon/MuonIdentification/interface/TimeMeasurementSequence.h" 00039 00040 #include "DataFormats/TrackReco/interface/Track.h" 00041 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00042 #include "DataFormats/TrackReco/interface/TrackExtra.h" 00043 #include "DataFormats/TrackReco/interface/TrackExtraFwd.h" 00044 00045 #include <vector> 00046 00047 namespace edm { 00048 class ParameterSet; 00049 class EventSetup; 00050 class InputTag; 00051 } 00052 00053 class MuonServiceProxy; 00054 00055 class DTTimingExtractor { 00056 00057 public: 00058 00060 DTTimingExtractor(const edm::ParameterSet&); 00061 00063 ~DTTimingExtractor(); 00064 00065 class TimeMeasurement 00066 { 00067 public: 00068 bool isLeft; 00069 bool isPhi; 00070 float posInLayer; 00071 float distIP; 00072 float timeCorr; 00073 int station; 00074 DetId driftCell; 00075 }; 00076 00077 void fillTiming(TimeMeasurementSequence &tmSequence, reco::TrackRef muonTrack, const edm::Event& iEvent, const edm::EventSetup& iSetup); 00078 00079 private: 00080 double fitT0(double &a, double &b, std::vector<double> xl, std::vector<double> yl, std::vector<double> xr, std::vector<double> yr ); 00081 00082 edm::InputTag DTSegmentTags_; 00083 unsigned int theHitsMin_; 00084 double thePruneCut_; 00085 double theTimeOffset_; 00086 double theError_; 00087 bool useSegmentT0_; 00088 bool doWireCorr_; 00089 bool dropTheta_; 00090 bool requireBothProjections_; 00091 bool debug; 00092 00093 MuonServiceProxy* theService; 00094 00095 MuonSegmentMatcher *theMatcher; 00096 }; 00097 00098 #endif