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 
23 // system include files
24 #include <memory>
25 
26 // user include files
34 
36 
41 
45 
47 
48 // ------------------------------------------------------------------------------------------
49 
51 public:
52 
54 
55  std::vector<PileupJetIdAlgo::AlgoGBRForestsAndConstants> const& vAlgoGBRForestsAndConstants() const {
57  }
58 
59  bool runMvas() const { return runMvas_; }
60  bool produceJetIds() const { return produceJetIds_; }
61  bool inputIsCorrected() const { return inputIsCorrected_; }
62  bool applyJec() const { return applyJec_; }
63  std::string const& jec() const { return jec_; }
64  bool residualsFromTxt() const { return residualsFromTxt_; }
65  edm::FileInPath const& residualsTxt() const { return residualsTxt_; }
66 
67 private:
68 
69  std::vector<PileupJetIdAlgo::AlgoGBRForestsAndConstants> vAlgoGBRForestsAndConstants_;
70 
71  bool runMvas_;
74  bool applyJec_;
78 };
79 
80 class PileupJetIdProducer : public edm::stream::EDProducer<edm::GlobalCache<GBRForestsAndConstants>> {
81 public:
83  ~PileupJetIdProducer() override;
84 
85  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
86 
87  static std::unique_ptr<GBRForestsAndConstants> initializeGlobalCache(edm::ParameterSet const& pset) {
88  return std::make_unique<GBRForestsAndConstants>(pset);
89  }
90 
92 
93 private:
94  void produce(edm::Event&, const edm::EventSetup&) override;
95 
96 
97  void initJetEnergyCorrector(const edm::EventSetup &iSetup, bool isData);
98 
99  std::vector<std::pair<std::string, std::unique_ptr<PileupJetIdAlgo>> > algos_;
100 
101  std::unique_ptr<FactorizedJetCorrector> jecCor_;
102  std::vector<JetCorrectorParameters> jetCorPars_;
103 
108 
109 };
110 
111 #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)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::FileInPath const & residualsTxt() const
edm::EDGetTokenT< double > input_rho_token_
std::vector< PileupJetIdAlgo::AlgoGBRForestsAndConstants > vAlgoGBRForestsAndConstants_
edm::FileInPath residualsTxt_
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 *)