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  bool usePuppi() const { return usePuppi_; }
67 
68 private:
69 
70  std::vector<PileupJetIdAlgo::AlgoGBRForestsAndConstants> vAlgoGBRForestsAndConstants_;
71 
72  bool runMvas_;
75  bool applyJec_;
79  bool usePuppi_;
80 };
81 
82 class PileupJetIdProducer : public edm::stream::EDProducer<edm::GlobalCache<GBRForestsAndConstants>> {
83 public:
85  ~PileupJetIdProducer() override;
86 
87  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
88 
89  static std::unique_ptr<GBRForestsAndConstants> initializeGlobalCache(edm::ParameterSet const& pset) {
90  return std::make_unique<GBRForestsAndConstants>(pset);
91  }
92 
94 
95 private:
96  void produce(edm::Event&, const edm::EventSetup&) override;
97 
98 
99  void initJetEnergyCorrector(const edm::EventSetup &iSetup, bool isData);
100 
101  std::vector<std::pair<std::string, std::unique_ptr<PileupJetIdAlgo>> > algos_;
102 
103  std::unique_ptr<FactorizedJetCorrector> jecCor_;
104  std::vector<JetCorrectorParameters> jetCorPars_;
105 
110 
111 };
112 
113 #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 *)