Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // Package:    METProducers
0004 // Class:      MuonMETValueMapProducer
0005 //
0006 //
0007 
0008 /**\class MuonMETValueMapProducer
0009 
0010 */
0011 //
0012 // Original Author:  Puneeth Kalavase
0013 //         Created:  Sun Mar 15 11:33:20 CDT 2009
0014 //
0015 //
0016 
0017 //____________________________________________________________________________||
0018 #ifndef RecoMET_MuonMETValueMapProducer_h
0019 #define RecoMET_MuonMETValueMapProducer_h
0020 
0021 //____________________________________________________________________________||
0022 #include "FWCore/Framework/interface/Frameworkfwd.h"
0023 #include "FWCore/Framework/interface/stream/EDProducer.h"
0024 #include "FWCore/Framework/interface/Event.h"
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026 #include "FWCore/Utilities/interface/ESGetToken.h"
0027 #include "DataFormats/Common/interface/Handle.h"
0028 #include "TrackingTools/TrackAssociator/interface/TrackDetectorAssociator.h"
0029 #include "TrackingTools/TrackAssociator/interface/TrackAssociatorParameters.h"
0030 
0031 #include "DataFormats/MuonReco/interface/Muon.h"
0032 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0033 #include "DataFormats/MuonReco/interface/MuonMETCorrectionData.h"
0034 #include "MagneticField/Engine/interface/MagneticField.h"
0035 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0036 
0037 //____________________________________________________________________________||
0038 namespace cms {
0039 
0040   class MuonMETValueMapProducer : public edm::stream::EDProducer<> {
0041   public:
0042     explicit MuonMETValueMapProducer(const edm::ParameterSet&);
0043     ~MuonMETValueMapProducer() override {}
0044 
0045   private:
0046     void produce(edm::Event&, const edm::EventSetup&) override;
0047 
0048     void determine_deltax_deltay(double& deltax,
0049                                  double& deltay,
0050                                  const reco::Muon& muon,
0051                                  double bfield,
0052                                  const MagneticField& magneticField,
0053                                  edm::Event& iEvent,
0054                                  const edm::EventSetup& iSetup);
0055     reco::MuonMETCorrectionData::Type decide_correction_type(const reco::Muon& muon,
0056                                                              const math::XYZPoint& beamSpotPosition);
0057     bool should_type_MuonCandidateValuesUsed(const reco::Muon& muon, const math::XYZPoint& beamSpotPosition);
0058 
0059     double minPt_;
0060     double maxEta_;
0061     bool isAlsoTkMu_;
0062     double maxNormChi2_;
0063     double maxd0_;
0064     int minnHits_;
0065     int minnValidStaHits_;
0066 
0067     bool useTrackAssociatorPositions_;
0068     bool useHO_;
0069     double towerEtThreshold_;
0070     bool useRecHits_;
0071 
0072     edm::EDGetTokenT<edm::View<reco::Muon> > muonToken_;
0073     edm::EDGetTokenT<reco::BeamSpot> beamSpotToken_;
0074     edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> magFieldToken_;
0075 
0076     TrackAssociatorParameters trackAssociatorParameters_;
0077     TrackDetectorAssociator trackAssociator_;
0078   };
0079 
0080 }  // namespace cms
0081 
0082 //____________________________________________________________________________||
0083 #endif /* RecoMET_MuonMETValueMapProducer_h */