CMS 3D CMS Logo

PFJetDQMAnalyzer.cc
Go to the documentation of this file.
2 
4 
9 
15 
18 
19 //
20 // -- Constructor
21 //
23 
24 {
26  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
27  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
28  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
29 
30  pfJetMonitor_.setParameters(parameterSet); // set parameters for booking histograms and validating jet
31 
32  myJet_ = consumes<edm::View<reco::Jet>>(inputLabel_);
33  myMatchedJet_ = consumes<edm::View<reco::Jet>>(matchLabel_);
34 
36 
37  subsystemname_ = "ParticleFlow";
39 
40  nBadEvents_ = 0;
41 }
42 
43 //
44 // -- BookHistograms
45 //
47  edm::Run const & /* iRun */,
48  edm::EventSetup const & /* iSetup */) {
50 
51  edm::LogInfo("PFJetDQMAnalyzer") << " PFJetDQMAnalyzer::bookHistograms "
52  << "Histogram Folder path set to " << eventInfoFolder_;
53 
54  pfJetMonitor_.setup(ibooker, pSet_);
55 }
56 
57 //
58 // -- Analyze
59 //
62  iEvent.getByToken(myJet_, jetCollection);
63 
64  edm::Handle<edm::View<reco::Jet>> matchedJetCollection;
65  iEvent.getByToken(myMatchedJet_, matchedJetCollection);
66 
67  float maxRes = 0.0;
68  float minRes = 99.99;
69  float jetpT = 0.0;
70  if (jetCollection.isValid() && matchedJetCollection.isValid()) {
72  *matchedJetCollection,
73  minRes,
74  maxRes,
75  jetpT,
76  pSet_); // match collections and fill pt eta phi and charge histos for
77  // candidate jet, fill delta_x_VS_y histos for matched couples,
78  // book and fill delta_frac_VS_frac histos for matched couples
79  }
80 }
81 
PFJetDQMAnalyzer::nBadEvents_
int nBadEvents_
Definition: PFJetDQMAnalyzer.h:36
CaloJetCollection.h
PFJetDQMAnalyzer.h
Handle.h
PFJetDQMAnalyzer::myMatchedJet_
edm::EDGetTokenT< edm::View< reco::Jet > > myMatchedJet_
Definition: PFJetDQMAnalyzer.h:25
MessageLogger.h
PFCandidate.h
edm::Run
Definition: Run.h:45
printsummarytable.folder
folder
Definition: printsummarytable.py:7
PFJet.h
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DQMStore.h
PFJetMonitor::setup
void setup(DQMStore::IBooker &b)
book histograms
Definition: PFJetMonitor.cc:119
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
PFJetDQMAnalyzer::benchmarkLabel_
std::string benchmarkLabel_
Definition: PFJetDQMAnalyzer.h:28
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
MakerMacros.h
PFJetDQMAnalyzer::inputLabel_
edm::InputTag inputLabel_
Definition: PFJetDQMAnalyzer.h:27
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
PFJetMonitor::fill
void fill(const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, float &jetpT, const edm::ParameterSet &parameterSet)
fill histograms with all particle
Definition: PFJetMonitor.h:65
PFJetMonitor::setParameters
void setParameters(const edm::ParameterSet &parameterSet)
set the parameters accessing them from ParameterSet
Definition: PFJetMonitor.cc:39
PFJetDQMAnalyzer::PFJetDQMAnalyzer
PFJetDQMAnalyzer(const edm::ParameterSet &parameterSet)
Definition: PFJetDQMAnalyzer.cc:22
JetCollection.h
jetfilter_cfi.jetCollection
jetCollection
Definition: jetfilter_cfi.py:4
PFJetDQMAnalyzer::subsystemname_
std::string subsystemname_
Definition: PFJetDQMAnalyzer.h:34
PFJetDQMAnalyzer::matchLabel_
edm::InputTag matchLabel_
Definition: PFJetDQMAnalyzer.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
PFJetDQMAnalyzer
Definition: PFJetDQMAnalyzer.h:15
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:58
PFJetDQMAnalyzer::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: PFJetDQMAnalyzer.cc:60
InputTag.h
PFJetDQMAnalyzer::pSet_
edm::ParameterSet pSet_
Definition: PFJetDQMAnalyzer.h:32
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
ParameterSet.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
PFJetDQMAnalyzer::pfJetMonitor_
PFJetMonitor pfJetMonitor_
Definition: PFJetDQMAnalyzer.h:30
PFJetDQMAnalyzer::eventInfoFolder_
std::string eventInfoFolder_
Definition: PFJetDQMAnalyzer.h:33
PFJetDQMAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: PFJetDQMAnalyzer.cc:46
edm::InputTag
Definition: InputTag.h:15
PFJetDQMAnalyzer::myJet_
edm::EDGetTokenT< edm::View< reco::Jet > > myJet_
Definition: PFJetDQMAnalyzer.h:24
PFCandidateFwd.h