18 resetMe_(
true), currentRun_(-99)
20 LogDebug(
"FourVectorHLT") <<
"constructor...." ;
24 LogWarning(
"Status") <<
"unable to get DQMStore service?";
47 std::vector<edm::ParameterSet>
filters =
48 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"filters");
49 for(std::vector<edm::ParameterSet>::iterator
50 filterconf = filters.begin() ; filterconf != filters.end();
53 int objectType = filterconf->getParameter<
unsigned int>(
"type");
54 float ptMin = filterconf->getUntrackedParameter<
double>(
"ptMin");
55 float ptMax = filterconf->getUntrackedParameter<
double>(
"ptMax");
60 LogWarning(
"Configuration") <<
"Using both plotAll and a list. "
61 "list will be ignored." ;
90 using namespace trigger;
96 if(!triggerObj.isValid()) {
97 edm::LogInfo(
"Status") <<
"Summary HLT object (TriggerEvent) not found, "
105 for (
size_t ia = 0; ia < triggerObj->sizeFilters(); ++ ia) {
106 std::string fullname = triggerObj->filterTag(ia).encode();
110 size_t p = fullname.find_first_of(
':');
111 if ( p != std::string::npos) {
112 name = fullname.substr(0, p);
118 LogDebug(
"Parameter") <<
"filter " << ia <<
", full name = " << fullname
120 <<
", abbreviated = " <<
name ;
128 LogDebug(
"Status") <<
"new histo with name "<< histoname ;
132 title.c_str(),
nBins_, 0, 100);
134 histoname = name+
"_eta";
135 title = name+
" #eta";
137 title.c_str(),
nBins_,-2.7,2.7);
139 histoname = name+
"_phi";
140 title = name+
" #phi";
142 title.c_str(),
nBins_,-3.14,3.14);
145 histoname = name+
"_etaphi";
146 title = name+
" #eta vs #phi";
158 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
159 LogDebug(
"Parameters") <<
"pt, eta, phi = "
160 << toc[*ki].pt() <<
", "
161 << toc[*ki].eta() <<
", "
163 pic->getEtHisto()->Fill(toc[*ki].
pt());
164 pic->getEtaHisto()->Fill(toc[*ki].
eta());
165 pic->getPhiHisto()->Fill(toc[*ki].
phi());
166 pic->getEtaVsPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
173 for(PathInfoCollection::iterator
v =
hltPaths_.begin();
175 const int index = triggerObj->filterIndex(
v->getName());
176 if ( index >= triggerObj->sizeFilters() ) {
179 LogDebug(
"Status") <<
"filling ... " ;
181 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
182 v->getEtHisto()->Fill(toc[*ki].
pt());
183 v->getEtaHisto()->Fill(toc[*ki].
eta());
184 v->getPhiHisto()->Fill(toc[*ki].
phi());
185 v->getEtaVsPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
210 for(PathInfoCollection::iterator
v =
hltPaths_.begin();
215 et = dbe->
book1D(histoname.c_str(),
220 histoname =
v->getName()+
"_eta";
221 title =
v->getName()+
" #eta";
222 eta = dbe->
book1D(histoname.c_str(),
225 histoname =
v->getName()+
"_phi";
226 title =
v->getName()+
" #phi";
227 phi = dbe->
book1D(histoname.c_str(),
228 histoname.c_str(),
nBins_,-3.14,3.14);
231 histoname =
v->getName()+
"_etaphi";
232 title =
v->getName()+
" #eta vs #phi";
233 etavsphi = dbe->
book2D(histoname.c_str(),
238 v->setHistos( et, eta, phi, etavsphi);
248 LogInfo(
"Status") <<
"endJob: analyzed " <<
nev_ <<
" events";
256 LogDebug(
"Status") <<
"beginRun, run " << run.
id();
262 LogDebug(
"Status") <<
"endRun, run " << run.
id();
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
FourVectorHLT(const edm::ParameterSet &)
std::vector< TPRegexp > filters
void setVerbose(unsigned level)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
std::vector< size_type > Keys
PathInfoCollection hltPaths_
std::vector< PathInfo >::iterator find(std::string pathName)
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void beginRun(const edm::Run &run, const edm::EventSetup &c)
void setCurrentFolder(const std::string &fullpath)
edm::InputTag triggerSummaryLabel_