Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:47

0001 #ifndef MuonReco_MuonCocktails_h
0002 #define MuonReco_MuonCocktails_h
0003 
0004 /** \class MuonCocktails
0005  *
0006  *  Set of functions that select among the different track refits
0007  *  based on the fit quality, in order to achieve optimal resolution.
0008  *
0009  *  \author Piotr Traczyk,
0010  *   modified by Raffaella Radogna
0011  */
0012 
0013 #include "DataFormats/MuonReco/interface/Muon.h"
0014 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0015 #include "DataFormats/TrackReco/interface/TrackToTrackMap.h"
0016 
0017 namespace muon {
0018 
0019   reco::Muon::MuonTrackTypePair tevOptimized(const reco::TrackRef& combinedTrack,
0020                                              const reco::TrackRef& trackerTrack,
0021                                              const reco::TrackRef& tpfmsTrack,
0022                                              const reco::TrackRef& pickyTrack,
0023                                              const reco::TrackRef& dytTrack,
0024                                              const double ptThreshold = 200.,
0025                                              const double tune1 = 17.,
0026                                              const double tune2 = 40.,
0027                                              const double dptcut = 0.25);
0028 
0029   // Version for convenience. (NB: can be used with pat::Muon, even
0030   // with embedded tracks, equally conveniently!)
0031   inline reco::Muon::MuonTrackTypePair tevOptimized(const reco::Muon& muon,
0032                                                     const double ptThreshold = 200.,
0033                                                     const double tune1 = 17.,
0034                                                     const double tune2 = 40.,
0035                                                     const double dptcut = 0.25) {
0036     return tevOptimized(muon.globalTrack(),
0037                         muon.innerTrack(),
0038                         muon.tpfmsTrack(),
0039                         muon.pickyTrack(),
0040                         muon.dytTrack(),
0041                         ptThreshold,
0042                         tune1,
0043                         tune2,
0044                         dptcut);
0045   }
0046 
0047   reco::TrackRef getTevRefitTrack(const reco::TrackRef& combinedTrack, const reco::TrackToTrackMap& map);
0048 
0049   // The cocktail used as the soon-to-be-old default momentum
0050   // assignment for the reco::Muon.
0051   reco::Muon::MuonTrackTypePair sigmaSwitch(const reco::TrackRef& combinedTrack,
0052                                             const reco::TrackRef& trackerTrack,
0053                                             const double nSigma = 2.,
0054                                             const double ptThreshold = 200.);
0055 
0056   // Convenience version of the above.
0057   inline reco::Muon::MuonTrackTypePair sigmaSwitch(const reco::Muon& muon,
0058                                                    const double nSigma = 2.,
0059                                                    const double ptThreshold = 200.) {
0060     return muon::sigmaSwitch(muon.globalTrack(), muon.innerTrack(), nSigma, ptThreshold);
0061   }
0062 
0063   // "Truncated muon reconstructor": the first cocktail, between just
0064   // tracker-only and TPFMS. Similar to tevOptimized.
0065   reco::Muon::MuonTrackTypePair TMR(const reco::TrackRef& trackerTrack,
0066                                     const reco::TrackRef& fmsTrack,
0067                                     const double tune = 4.);
0068 
0069   double trackProbability(const reco::TrackRef track);
0070 }  // namespace muon
0071 
0072 #endif