Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:26

0001 // -*- C++ -*-
0002 //
0003 // Package:    METAlgorithms
0004 // Class:      MuonMETAlgo
0005 //
0006 /**\class MuonMETAlgo
0007 
0008  Description: Correct MET for muons in the events.
0009 
0010 */
0011 //
0012 // Original Authors:  Michael Schmitt, Richard Cavanaugh The University of Florida
0013 //          Created:  August 30, 2007
0014 //
0015 //
0016 
0017 //____________________________________________________________________________||
0018 #ifndef RecoMET_MuonMETAlgo_h
0019 #define RecoMET_MuonMETAlgo_h
0020 
0021 //____________________________________________________________________________||
0022 #include "DataFormats/Math/interface/LorentzVector.h"
0023 
0024 #include "DataFormats/Common/interface/View.h"
0025 #include "DataFormats/METReco/interface/METFwd.h"
0026 #include "DataFormats/METReco/interface/MET.h"
0027 #include "DataFormats/METReco/interface/CaloMETCollection.h"
0028 #include "DataFormats/METReco/interface/CorrMETData.h"
0029 #include "DataFormats/MuonReco/interface/Muon.h"
0030 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0031 #include "TrackingTools/TrackAssociator/interface/TrackDetectorAssociator.h"
0032 #include "TrackingTools/TrackAssociator/interface/TrackAssociatorParameters.h"
0033 #include "DataFormats/Common/interface/ValueMap.h"
0034 #include "RecoMET/METAlgorithms/interface/MuonMETInfo.h"
0035 
0036 #include "DataFormats/MuonReco/interface/MuonMETCorrectionData.h"
0037 //____________________________________________________________________________||
0038 
0039 class MuonMETAlgo {
0040 public:
0041   MuonMETAlgo() {}
0042   virtual ~MuonMETAlgo() {}
0043 
0044   reco::CaloMET makeMET(const reco::CaloMET& fMet,
0045                         double fSumEt,
0046                         const std::vector<CorrMETData>& fCorrections,
0047                         const reco::MET::LorentzVector&);
0048   reco::MET makeMET(const reco::MET&,
0049                     double fSumEt,
0050                     const std::vector<CorrMETData>& fCorrections,
0051                     const reco::MET::LorentzVector& fP4);
0052 
0053   virtual void run(const edm::View<reco::Muon>& inputMuons,
0054                    const edm::ValueMap<reco::MuonMETCorrectionData>& vm_muCorrData,
0055                    const edm::View<reco::MET>& uncorMET,
0056                    reco::METCollection* corMET);
0057 
0058   virtual void run(const edm::View<reco::Muon>& inputMuons,
0059                    const edm::ValueMap<reco::MuonMETCorrectionData>& vm_muCorrData,
0060                    const edm::View<reco::CaloMET>& uncorMET,
0061                    reco::CaloMETCollection* corMET);
0062 
0063   void GetMuDepDeltas(const reco::Muon* inputMuon,
0064                       TrackDetMatchInfo& info,
0065                       bool useTrackAssociatorPositions,
0066                       bool useRecHits,
0067                       bool useHO,
0068                       double towerEtThreshold,
0069                       double& deltax,
0070                       double& deltay,
0071                       double Bfield);
0072 
0073   template <class T>
0074   void MuonMETAlgo_run(const edm::View<reco::Muon>& inputMuons,
0075                        const edm::ValueMap<reco::MuonMETCorrectionData>& vm_muCorrData,
0076                        const edm::View<T>& v_uncorMET,
0077                        std::vector<T>* v_corMET);
0078 
0079   static void correctMETforMuon(double& deltax,
0080                                 double& deltay,
0081                                 double bfield,
0082                                 int muonCharge,
0083                                 const math::XYZTLorentzVector& muonP4,
0084                                 const math::XYZPoint& muonVertex,
0085                                 MuonMETInfo&);
0086 };
0087 
0088 //____________________________________________________________________________||
0089 #endif  // RecoMET_MuonMETAlgo_h