|
|
Go to the documentation of this file.
48 std::map<std::string, MonitorElement*>
me;
50 std::map<uint32_t, std::string>
pdgMap;
61 std::vector<std::string>
pdgStrs = iConfig.
getParameter<std::vector<std::string>>(
"pdgStrs");
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);
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.);
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());
virtual void setCurrentFolder(std::string const &fullpath)
std::map< uint32_t, std::string > pdgMap
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Info, false > LogInfo
std::map< std::string, MonitorElement * > me
#define DEFINE_FWK_MODULE(type)
PFCandidateAnalyzerDQM(const edm::ParameterSet &)
edm::EDGetTokenT< edm::View< pat::PackedCandidate > > PFCandToken
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T getParameter(std::string const &) const
Abs< T >::type abs(const T &t)
std::vector< double > etabins
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())