Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoMuon_MuonIsolation_MuPFIsoHelper_H
0002 #define RecoMuon_MuonIsolation_MuPFIsoHelper_H
0003 
0004 //MuPFIsoHelper
0005 //Class to embed PF2PAT style Isodeposits
0006 //To reco::Muon
0007 //
0008 //Author: Michalis Bachtis(U.Wisconsin)
0009 //bachtis@cern.ch
0010 
0011 // system include files
0012 #include <memory>
0013 
0014 // user include files
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "DataFormats/MuonReco/interface/Muon.h"
0019 #include "DataFormats/Common/interface/Handle.h"
0020 
0021 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0022 #include "DataFormats/Common/interface/ValueMap.h"
0023 #include "FWCore/Framework/interface/ConsumesCollector.h"
0024 
0025 class MuPFIsoHelper {
0026 public:
0027   typedef edm::ValueMap<double> CandDoubleMap;
0028 
0029   MuPFIsoHelper(const std::map<std::string, edm::ParameterSet>&, edm::ConsumesCollector&&);
0030 
0031   void beginEvent(const edm::Event& iEvent);
0032 
0033   int embedPFIsolation(reco::Muon&, reco::MuonRef&);
0034   reco::MuonPFIsolation makeIsoDeposit(reco::MuonRef&,
0035                                        const edm::Handle<CandDoubleMap>&,
0036                                        const edm::Handle<CandDoubleMap>&,
0037                                        const edm::Handle<CandDoubleMap>&,
0038                                        const edm::Handle<CandDoubleMap>&,
0039                                        const edm::Handle<CandDoubleMap>&,
0040                                        const edm::Handle<CandDoubleMap>&,
0041                                        const edm::Handle<CandDoubleMap>&);
0042 
0043   ~MuPFIsoHelper();
0044 
0045 private:
0046   std::map<std::string, edm::ParameterSet> labelMap_;
0047 
0048   std::vector<edm::Handle<CandDoubleMap> > chargedParticle_;
0049   std::vector<edm::Handle<CandDoubleMap> > chargedHadron_;
0050   std::vector<edm::Handle<CandDoubleMap> > neutralHadron_;
0051   std::vector<edm::Handle<CandDoubleMap> > neutralHadronHighThreshold_;
0052   std::vector<edm::Handle<CandDoubleMap> > photon_;
0053   std::vector<edm::Handle<CandDoubleMap> > photonHighThreshold_;
0054   std::vector<edm::Handle<CandDoubleMap> > pu_;
0055 
0056   std::vector<edm::EDGetTokenT<CandDoubleMap> > chargedParticleToken_;
0057   std::vector<edm::EDGetTokenT<CandDoubleMap> > chargedHadronToken_;
0058   std::vector<edm::EDGetTokenT<CandDoubleMap> > neutralHadronToken_;
0059   std::vector<edm::EDGetTokenT<CandDoubleMap> > neutralHadronHighThresholdToken_;
0060   std::vector<edm::EDGetTokenT<CandDoubleMap> > photonToken_;
0061   std::vector<edm::EDGetTokenT<CandDoubleMap> > photonHighThresholdToken_;
0062   std::vector<edm::EDGetTokenT<CandDoubleMap> > puToken_;
0063 };
0064 #endif