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
PileupJetIdProducer::input_vertex_token_
edm::EDGetTokenT< reco::VertexCollection > input_vertex_token_
Definition: PileupJetIdProducer.h:103
GBRForestsAndConstants::produceJetIds_
bool produceJetIds_
Definition: PileupJetIdProducer.h:70
PileupJetIdProducer::~PileupJetIdProducer
~PileupJetIdProducer() override
Definition: PileupJetIdProducer.cc:65
PileupJetIdProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PileupJetIdProducer.cc:225
GBRForestsAndConstants::usePuppi_
bool usePuppi_
Definition: PileupJetIdProducer.h:76
PileupJetIdProducer::input_jet_token_
edm::EDGetTokenT< edm::View< reco::Jet > > input_jet_token_
Definition: PileupJetIdProducer.h:102
ESHandle.h
PileupJetIdAlgo.h
PileupJetIdProducer::jetCorPars_
std::vector< JetCorrectorParameters > jetCorPars_
Definition: PileupJetIdProducer.h:100
edm::EDGetTokenT
Definition: EDGetToken.h:33
EDProducer.h
Jet.h
GBRForestsAndConstants::runMvas_
bool runMvas_
Definition: PileupJetIdProducer.h:69
PileupJetIdProducer::jecCor_
std::unique_ptr< FactorizedJetCorrector > jecCor_
Definition: PileupJetIdProducer.h:99
GBRForestsAndConstants::applyJec
bool applyJec() const
Definition: PileupJetIdProducer.h:60
PileupJetIdProducer::globalEndJob
static void globalEndJob(GBRForestsAndConstants *)
Definition: PileupJetIdProducer.h:90
FileInPath.h
PileupJetIdentifier.h
JetCorrectionsRecord.h
GBRForestsAndConstants::usePuppi
bool usePuppi() const
Definition: PileupJetIdProducer.h:64
edm::FileInPath
Definition: FileInPath.h:64
MakerMacros.h
GBRForestsAndConstants
Definition: PileupJetIdProducer.h:49
GBRForestsAndConstants::residualsFromTxt
bool residualsFromTxt() const
Definition: PileupJetIdProducer.h:62
GBRForestsAndConstants::runMvas
bool runMvas() const
Definition: PileupJetIdProducer.h:57
GBRForestsAndConstants::vAlgoGBRForestsAndConstants
std::vector< PileupJetIdAlgo::AlgoGBRForestsAndConstants > const & vAlgoGBRForestsAndConstants() const
Definition: PileupJetIdProducer.h:53
JetCorrectorParameters.h
HLTBitAnalyser_cfi.isData
isData
Definition: HLTBitAnalyser_cfi.py:29
PileupJetIdProducer::input_rho_token_
edm::EDGetTokenT< double > input_rho_token_
Definition: PileupJetIdProducer.h:105
PileupJetIdProducer::PileupJetIdProducer
PileupJetIdProducer(const edm::ParameterSet &, GBRForestsAndConstants const *)
Definition: PileupJetIdProducer.cc:44
PileupJetIdProducer::initJetEnergyCorrector
void initJetEnergyCorrector(const edm::EventSetup &iSetup, bool isData)
Definition: PileupJetIdProducer.cc:234
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
GBRForestsAndConstants::inputIsCorrected
bool inputIsCorrected() const
Definition: PileupJetIdProducer.h:59
GBRForestsAndConstants::residualsTxt
edm::FileInPath const & residualsTxt() const
Definition: PileupJetIdProducer.h:63
PileupJetIdProducer::initializeGlobalCache
static std::unique_ptr< GBRForestsAndConstants > initializeGlobalCache(edm::ParameterSet const &pset)
Definition: PileupJetIdProducer.h:86
FactorizedJetCorrector.h
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
PileupJetIdProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: PileupJetIdProducer.cc:68
PileupJetIdProducer
Definition: PileupJetIdProducer.h:79
GBRForestsAndConstants::applyJec_
bool applyJec_
Definition: PileupJetIdProducer.h:72
GBRForestsAndConstants::inputIsCorrected_
bool inputIsCorrected_
Definition: PileupJetIdProducer.h:71
ValueMap.h
GBRForestsAndConstants::residualsFromTxt_
bool residualsFromTxt_
Definition: PileupJetIdProducer.h:74
GBRForestsAndConstants::produceJetIds
bool produceJetIds() const
Definition: PileupJetIdProducer.h:58
Frameworkfwd.h
GBRForestsAndConstants::jec_
std::string jec_
Definition: PileupJetIdProducer.h:73
GBRForestsAndConstants::jec
std::string const & jec() const
Definition: PileupJetIdProducer.h:61
PileupJetIdProducer::algos_
std::vector< std::pair< std::string, std::unique_ptr< PileupJetIdAlgo > > > algos_
Definition: PileupJetIdProducer.h:97
EventSetup.h
GBRForestsAndConstants::GBRForestsAndConstants
GBRForestsAndConstants(edm::ParameterSet const &)
Definition: PileupJetIdProducer.cc:21
GBRForestsAndConstants::residualsTxt_
edm::FileInPath residualsTxt_
Definition: PileupJetIdProducer.h:75
GBRForestsAndConstants::vAlgoGBRForestsAndConstants_
std::vector< PileupJetIdAlgo::AlgoGBRForestsAndConstants > vAlgoGBRForestsAndConstants_
Definition: PileupJetIdProducer.h:67
ParameterSet.h
PileupJetIdProducer::input_vm_pujetid_token_
edm::EDGetTokenT< edm::ValueMap< StoredPileupJetIdentifier > > input_vm_pujetid_token_
Definition: PileupJetIdProducer.h:104
edm::Event
Definition: Event.h:73
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27