CMS 3D CMS Logo

PileupJetIdProducer.h
Go to the documentation of this file.
1 #ifndef RecoJets_JetProducers_plugins_PileupJetIDProducer_h
2 #define RecoJets_JetProducers_plugins_PileupJetIDProducer_h
3 
4 // -*- C++ -*-
5 //
6 // Package: PileupJetIdProducer
7 // Class: PileupJetIdProducer
8 //
16 //
17 // Original Author: Pasquale Musella,40 2-A12,+41227671706,
18 // Created: Wed Apr 18 15:48:47 CEST 2012
19 //
20 //
21 
22 // system include files
23 #include <memory>
24 
25 // user include files
33 
35 
40 
44 
46 
47 // ------------------------------------------------------------------------------------------
48 
50 public:
52 
53  std::vector<PileupJetIdAlgo::AlgoGBRForestsAndConstants> const& vAlgoGBRForestsAndConstants() const {
55  }
56 
57  bool runMvas() const { return runMvas_; }
58  bool produceJetIds() const { return produceJetIds_; }
59  bool inputIsCorrected() const { return inputIsCorrected_; }
60  bool applyJec() const { return applyJec_; }
61  std::string const& jec() const { return jec_; }
62  bool residualsFromTxt() const { return residualsFromTxt_; }
63  edm::FileInPath const& residualsTxt() const { return residualsTxt_; }
64  bool usePuppi() const { return usePuppi_; }
65 
66 private:
67  std::vector<PileupJetIdAlgo::AlgoGBRForestsAndConstants> vAlgoGBRForestsAndConstants_;
68 
69  bool runMvas_;
72  bool applyJec_;
76  bool usePuppi_;
77 };
78 
79 class PileupJetIdProducer : public edm::stream::EDProducer<edm::GlobalCache<GBRForestsAndConstants>> {
80 public:
82  ~PileupJetIdProducer() override;
83 
84  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
85 
86  static std::unique_ptr<GBRForestsAndConstants> initializeGlobalCache(edm::ParameterSet const& pset) {
87  return std::make_unique<GBRForestsAndConstants>(pset);
88  }
89 
91 
92 private:
93  void produce(edm::Event&, const edm::EventSetup&) override;
94 
95  void initJetEnergyCorrector(const edm::EventSetup& iSetup, bool isData);
96 
97  std::vector<std::pair<std::string, std::unique_ptr<PileupJetIdAlgo>>> algos_;
98 
99  std::unique_ptr<FactorizedJetCorrector> jecCor_;
100  std::vector<JetCorrectorParameters> jetCorPars_;
101 
106 };
107 
108 #endif
std::vector< PileupJetIdAlgo::AlgoGBRForestsAndConstants > const & vAlgoGBRForestsAndConstants() const
std::vector< JetCorrectorParameters > jetCorPars_
edm::EDGetTokenT< reco::VertexCollection > input_vertex_token_
edm::EDGetTokenT< edm::View< reco::Jet > > input_jet_token_
std::string const & jec() const
static std::unique_ptr< GBRForestsAndConstants > initializeGlobalCache(edm::ParameterSet const &pset)
edm::FileInPath const & residualsTxt() const
edm::EDGetTokenT< double > input_rho_token_
std::vector< PileupJetIdAlgo::AlgoGBRForestsAndConstants > vAlgoGBRForestsAndConstants_
edm::FileInPath residualsTxt_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< std::pair< std::string, std::unique_ptr< PileupJetIdAlgo > > > algos_
GBRForestsAndConstants(edm::ParameterSet const &)
edm::EDGetTokenT< edm::ValueMap< StoredPileupJetIdentifier > > input_vm_pujetid_token_
std::unique_ptr< FactorizedJetCorrector > jecCor_
static void globalEndJob(GBRForestsAndConstants *)