16 LogDebug(
"FourVectorHLT") <<
"constructor....";
20 LogWarning(
"Status") <<
"unable to get DQMStore service?";
23 dirname_ =
"HLT/FourVectorHLT";
25 if (
dbe_ !=
nullptr) {
26 LogDebug(
"Status") <<
"Setting current directory to " << dirname_;
38 std::vector<edm::ParameterSet>
filters = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"filters");
39 for (std::vector<edm::ParameterSet>::iterator filterconf =
filters.begin(); filterconf !=
filters.end();
42 int objectType = filterconf->getParameter<
unsigned int>(
"type");
43 float ptMin = filterconf->getUntrackedParameter<
double>(
"ptMin");
44 float ptMax = filterconf->getUntrackedParameter<
double>(
"ptMax");
47 if (!hltPaths_.empty() && plotAll_) {
49 LogWarning(
"Configuration") <<
"Using both plotAll and a list. "
50 "list will be ignored.";
76 iEvent.getByToken(triggerSummaryToken_, triggerObj);
78 edm::LogInfo(
"Status") <<
"Summary HLT object (TriggerEvent) not found, "
86 for (
size_t ia = 0; ia < triggerObj->
sizeFilters(); ++ia) {
91 size_t p = fullname.find_first_of(
':');
92 if (
p != std::string::npos) {
93 name = fullname.substr(0,
p);
98 LogDebug(
"Parameter") <<
"filter " << ia <<
", full name = " << fullname <<
", p = " <<
p
99 <<
", abbreviated = " <<
name;
101 PathInfoCollection::iterator pic = hltPaths_.find(
name);
102 if (pic == hltPaths_.end()) {
107 LogDebug(
"Status") <<
"new histo with name " << histoname;
112 histoname =
name +
"_eta";
116 histoname =
name +
"_phi";
118 phi =
dbe_->
book1D(histoname.c_str(),
title.c_str(), nBins_, -3.14, 3.14);
120 histoname =
name +
"_etaphi";
122 etavsphi =
dbe_->
book2D(histoname.c_str(),
title.c_str(), nBins_, -2.7, 2.7, nBins_, -3.14, 3.14);
126 hltPaths_.push_back(
e);
127 pic = hltPaths_.begin() + hltPaths_.size() - 1;
130 for (trigger::Keys::const_iterator ki =
k.begin(); ki !=
k.end(); ++ki) {
131 LogDebug(
"Parameters") <<
"pt, eta, phi = " << toc[*ki].pt() <<
", " << toc[*ki].eta() <<
", "
133 pic->getEtHisto()->Fill(toc[*ki].
pt());
134 pic->getEtaHisto()->Fill(toc[*ki].
eta());
135 pic->getPhiHisto()->Fill(toc[*ki].phi());
136 pic->getEtaVsPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].phi());
141 for (PathInfoCollection::iterator
v = hltPaths_.begin();
v != hltPaths_.end(); ++
v) {
146 LogDebug(
"Status") <<
"filling ... ";
148 for (trigger::Keys::const_iterator ki =
k.begin(); ki !=
k.end(); ++ki) {
149 v->getEtHisto()->Fill(toc[*ki].
pt());
150 v->getEtaHisto()->Fill(toc[*ki].
eta());
151 v->getPhiHisto()->Fill(toc[*ki].phi());
152 v->getEtaVsPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].phi());
168 for (PathInfoCollection::iterator
v = hltPaths_.begin();
v != hltPaths_.end(); ++
v) {
172 et = dbe->
book1D(histoname.c_str(),
title.c_str(), nBins_,
v->getPtMin(),
v->getPtMax());
174 histoname =
v->getName() +
"_eta";
175 title =
v->getName() +
" #eta";
176 eta = dbe->
book1D(histoname.c_str(),
title.c_str(), nBins_, -2.7, 2.7);
178 histoname =
v->getName() +
"_phi";
179 title =
v->getName() +
" #phi";
180 phi = dbe->
book1D(histoname.c_str(), histoname.c_str(), nBins_, -3.14, 3.14);
182 histoname =
v->getName() +
"_etaphi";
183 title =
v->getName() +
" #eta vs #phi";
184 etavsphi = dbe->
book2D(histoname.c_str(),
title.c_str(), nBins_, -2.7, 2.7, nBins_, -3.14, 3.14);
186 v->setHistos(
et,
eta, phi, etavsphi);
194 LogInfo(
"Status") <<
"endJob: analyzed " << nev_ <<
" events";
200 LogDebug(
"Status") <<
"beginRun, run " <<
run.id();