Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:26

0001 #ifndef JetMETCorrections_Type1MET_MultShiftMETcorrInputProducer_h
0002 #define JetMETCorrections_Type1MET_MultShiftMETcorrInputProducer_h
0003 
0004 /** \class MultShiftMETcorrInputProducer
0005  *
0006  * Compute MET correction to compensate systematic shift of MET in x/y-direction
0007  * (cf. https://indico.cern.ch/getFile.py/access?contribId=1&resId=0&materialId=slides&confId=174318 )
0008  *
0009  * \authors Robert Schoefbeck, Vienna
0010  *
0011  *
0012  *
0013  */
0014 
0015 #include "FWCore/Framework/interface/stream/EDProducer.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/Utilities/interface/InputTag.h"
0020 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0021 #include "DataFormats/Common/interface/ValueMap.h"
0022 
0023 #include "DataFormats/METReco/interface/MET.h"
0024 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0025 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
0026 
0027 #include <TF1.h>
0028 
0029 #include <string>
0030 #include <vector>
0031 
0032 class MultShiftMETcorrInputProducer : public edm::stream::EDProducer<> {
0033 public:
0034   explicit MultShiftMETcorrInputProducer(const edm::ParameterSet&);
0035   ~MultShiftMETcorrInputProducer() override;
0036 
0037 private:
0038   void produce(edm::Event&, const edm::EventSetup&) override;
0039   static int translateTypeToAbsPdgId(reco::PFCandidate::ParticleType type);
0040 
0041   edm::EDGetTokenT<edm::View<reco::Candidate>> pflow_;
0042   edm::EDGetTokenT<edm::View<reco::Vertex>> vertices_;
0043   std::string moduleLabel_;
0044   edm::EDGetTokenT<edm::ValueMap<float>> weightsToken_;
0045 
0046   std::vector<edm::ParameterSet> cfgCorrParameters_;
0047 
0048   std::vector<double> etaMin_, etaMax_;
0049   std::vector<int> type_, counts_, varType_;
0050   std::vector<double> sumPt_;
0051   std::vector<std::unique_ptr<TF1>> formula_x_;
0052   std::vector<std::unique_ptr<TF1>> formula_y_;
0053 };
0054 
0055 #endif