Definition at line 35 of file PFCandidateAnalyzerDQM.cc.
Reimplemented from DQMEDAnalyzer.
Definition at line 111 of file PFCandidateAnalyzerDQM.cc.
References funct::abs(), edm::Event::getByToken(), mps_fire::i, edm::HandleBase::isValid(), me, pdgMap, and PFCandToken.
117 edm::LogInfo(
"OutputInfo") <<
" failed to retrieve data required by ParticleFlow Task";
118 edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task cannot continue...!";
124 for (
unsigned int i = 0;
i < pfHandle->size();
i++) {
127 me[
"AllCandidateLog10Pt"]->Fill(log10(pfHandle->at(
i).pt()));
128 me[
"AllCandidateEta"]->Fill(pfHandle->at(
i).eta());
129 me[
"AllCandidatePhi"]->Fill(pfHandle->at(
i).phi());
130 me[
"AllCandidateCharge"]->Fill(pfHandle->at(
i).charge());
131 me[
"AllCandidatePtLow"]->Fill(pfHandle->at(
i).pt());
132 me[
"AllCandidatePtMid"]->Fill(pfHandle->at(
i).pt());
133 me[
"AllCandidatePtHigh"]->Fill(pfHandle->at(
i).pt());
135 int pdgId =
abs(pfHandle->at(
i).pdgId());
137 me[
pdgMap[pdgId] +
"Log10Pt"]->Fill(log10(pfHandle->at(
i).pt()));
138 me[
pdgMap[pdgId] +
"Eta"]->Fill(pfHandle->at(
i).eta());
139 me[
pdgMap[pdgId] +
"Phi"]->Fill(pfHandle->at(
i).phi());
140 me[
pdgMap[pdgId] +
"Charge"]->Fill(pfHandle->at(
i).charge());
141 me[
pdgMap[pdgId] +
"PtLow"]->Fill(pfHandle->at(
i).pt());
142 me[
pdgMap[pdgId] +
"PtMid"]->Fill(pfHandle->at(
i).pt());
143 me[
pdgMap[pdgId] +
"PtHigh"]->Fill(pfHandle->at(
i).pt());
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Abs< T >::type abs(const T &t)
std::map< uint32_t, std::string > pdgMap
Log< level::Info, false > LogInfo
std::map< std::string, MonitorElement * > me
edm::EDGetTokenT< edm::View< pat::PackedCandidate > > PFCandToken
Implements DQMEDAnalyzer.
Definition at line 66 of file PFCandidateAnalyzerDQM.cc.
References dqm::implementation::IBooker::book1D(), filterCSVwithJSON::copy, etabins, M_PI, me, dqmiodumpmetadata::n, ecaldqm::binning::nPhiBins, pdgMap, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.
72 float etabinArray[
etabins.size()];
76 TH1F* etaHist =
new TH1F(
"AllCandidateEta",
"AllCandidateEta", n, etabinArray);
77 me[
"AllCandidateEta"] = booker.
book1D(
"AllCandidateEta", etaHist);
79 me[
"AllCandidateLog10Pt"] = booker.
book1D(
"AllCandidateLog10Pt",
"AllCandidateLog10Pt", 120, -2, 4);
83 double phiBinWidth =
M_PI / (nPhiBins - 1) * 2.;
84 me[
"AllCandidatePhi"] = booker.
book1D(
85 "AllCandidatePhi",
"AllCandidatePhi", nPhiBins, -
M_PI - 0.25 * phiBinWidth, +
M_PI + 0.75 * phiBinWidth);
87 me[
"AllCandidateCharge"] = booker.
book1D(
"AllCandidateCharge",
"AllCandidateCharge", 3, -1.5, 1.5);
88 me[
"AllCandidatePtLow"] = booker.
book1D(
"AllCandidatePtLow",
"AllCandidatePtLow", 100, 0., 5.);
89 me[
"AllCandidatePtMid"] = booker.
book1D(
"AllCandidatePtMid",
"AllCandidatePtMid", 100, 0., 200.);
90 me[
"AllCandidatePtHigh"] = booker.
book1D(
"AllCandidatePtHigh",
"AllCandidatePtHigh", 100, 0., 1000.);
93 for (
auto& pair :
pdgMap) {
97 etaHistName = pair.second +
"Eta";
98 TH1F* etaHist =
new TH1F(etaHistName.c_str(), etaHistName.c_str(),
n, etabinArray);
99 me[pair.second +
"Eta"] = booker.
book1D(pair.second +
"Eta", etaHist);
101 me[pair.second +
"Log10Pt"] = booker.
book1D(pair.second +
"Log10Pt", pair.second +
"Log10Pt", 120, -2, 4);
102 me[pair.second +
"Phi"] = booker.
book1D(
103 pair.second +
"Phi", pair.second +
"Phi", nPhiBins, -
M_PI - 0.25 * phiBinWidth, +
M_PI + 0.75 * phiBinWidth);
104 me[pair.second +
"Charge"] = booker.
book1D(pair.second +
"Charge", pair.second +
"Charge", 3, -1.5, 1.5);
105 me[pair.second +
"PtLow"] = booker.
book1D(pair.second +
"PtLow", pair.second +
"PtLow", 100, 0., 5.);
106 me[pair.second +
"PtMid"] = booker.
book1D(pair.second +
"PtMid", pair.second +
"PtMid", 100, 0., 200.);
107 me[pair.second +
"PtHigh"] = booker.
book1D(pair.second +
"PtHigh", pair.second +
"PtHigh", 100, 0., 1000.);
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< double > etabins
std::map< uint32_t, std::string > pdgMap
std::map< std::string, MonitorElement * > me
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::vector<double> PFCandidateAnalyzerDQM::etabins |
|
private |
std::map<uint32_t, std::string> PFCandidateAnalyzerDQM::pdgMap |
|
private |