00001 #ifndef RecoMuon_GlobalTrackingTools_GlobalMuonTrackMatcher_H
00002 #define RecoMuon_GlobalTrackingTools_GlobalMuonTrackMatcher_H
00003
00026 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00027
00028 class TrajectoryStateOnSurface;
00029 class MuonServiceProxy;
00030 class Trajectory;
00031
00032 namespace edm {class ParameterSet;}
00033
00034
00035
00036
00037
00038 class GlobalMuonTrackMatcher {
00039
00040 public:
00041
00042 typedef std::pair<const Trajectory*,reco::TrackRef> TrackCand;
00043
00045 GlobalMuonTrackMatcher(const edm::ParameterSet&,
00046 const MuonServiceProxy*);
00047
00049 virtual ~GlobalMuonTrackMatcher();
00050
00052 bool match(const TrackCand& sta,
00053 const TrackCand& track) const;
00054
00058 double match(const TrackCand& sta,
00059 const TrackCand& track,
00060 int matchOption = 0,
00061 int surfaceOption = 1) const;
00062
00064 std::vector<TrackCand> match(const TrackCand& sta,
00065 const std::vector<TrackCand>& tracks) const;
00066
00068 std::vector<TrackCand>::const_iterator matchOne(const TrackCand& sta,
00069 const std::vector<TrackCand>& tracks) const;
00070
00071 private:
00072
00073 double match_R_IP(const TrackCand&, const TrackCand&) const;
00074 double match_D(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
00075 double match_d(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
00076 double match_Rmom(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
00077 double match_Rpos(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
00078 double match_Chi2(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
00079 double match_dist(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
00080
00081 std::pair<TrajectoryStateOnSurface,TrajectoryStateOnSurface> convertToTSOSTk(const TrackCand&, const TrackCand&) const;
00082 std::pair<TrajectoryStateOnSurface,TrajectoryStateOnSurface> convertToTSOSMuHit(const TrackCand&, const TrackCand&) const;
00083 std::pair<TrajectoryStateOnSurface,TrajectoryStateOnSurface> convertToTSOSTkHit(const TrackCand&, const TrackCand&) const;
00084 bool samePlane(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
00085
00086 private:
00087
00088 double theMinP;
00089 double theMinPt;
00090 double theMaxChi2;
00091 double theDeltaD;
00092 double theDeltaR;
00093
00094 const MuonServiceProxy* theService;
00095 std::string theOutPropagatorName;
00096
00097 };
00098
00099 #endif