19 resetMe_(
true), currentRun_(-99)
21 LogDebug(
"FourVectorHLT") <<
"constructor...." ;
25 LogWarning(
"Status") <<
"unable to get DQMStore service?";
48 std::vector<edm::ParameterSet>
filters =
49 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"filters");
50 for(std::vector<edm::ParameterSet>::iterator
51 filterconf = filters.begin() ; filterconf != filters.end();
53 std::string me = filterconf->getParameter<std::string>(
"name");
54 int objectType = filterconf->getParameter<
unsigned int>(
"type");
55 float ptMin = filterconf->getUntrackedParameter<
double>(
"ptMin");
56 float ptMax = filterconf->getUntrackedParameter<
double>(
"ptMax");
61 LogWarning(
"Configuration") <<
"Using both plotAll and a list. "
62 "list will be ignored." ;
88 using namespace trigger;
94 if(!triggerObj.isValid()) {
95 edm::LogInfo(
"Status") <<
"Summary HLT object (TriggerEvent) not found, "
103 for (
size_t ia = 0; ia < triggerObj->sizeFilters(); ++ ia) {
104 std::string fullname = triggerObj->filterTag(ia).encode();
108 size_t p = fullname.find_first_of(
':');
109 if ( p != std::string::npos) {
110 name = fullname.substr(0, p);
116 LogDebug(
"Parameter") <<
"filter " << ia <<
", full name = " << fullname
118 <<
", abbreviated = " <<
name ;
125 std::string histoname(name+
"_et");
126 LogDebug(
"Status") <<
"new histo with name "<< histoname ;
128 std::string
title(name+
" E_{T}");
130 title.c_str(),
nBins_, 0, 100);
132 histoname = name+
"_eta";
133 title = name+
" #eta";
135 title.c_str(),
nBins_,-2.7,2.7);
137 histoname = name+
"_phi";
138 title = name+
" #phi";
140 title.c_str(),
nBins_,-3.14,3.14);
143 histoname = name+
"_etaphi";
144 title = name+
" #eta vs #phi";
156 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
157 LogDebug(
"Parameters") <<
"pt, eta, phi = "
158 << toc[*ki].pt() <<
", "
159 << toc[*ki].eta() <<
", "
161 pic->getEtHisto()->Fill(toc[*ki].pt());
162 pic->getEtaHisto()->Fill(toc[*ki].
eta());
163 pic->getPhiHisto()->Fill(toc[*ki].
phi());
164 pic->getEtaVsPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
171 for(PathInfoCollection::iterator
v =
hltPaths_.begin();
173 const int index = triggerObj->filterIndex(
v->getName());
174 if ( index >= triggerObj->sizeFilters() ) {
177 LogDebug(
"Status") <<
"filling ... " ;
179 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
180 v->getEtHisto()->Fill(toc[*ki].pt());
181 v->getEtaHisto()->Fill(toc[*ki].
eta());
182 v->getPhiHisto()->Fill(toc[*ki].
phi());
183 v->getEtaVsPhiHisto()->Fill(toc[*ki].
eta(), toc[*ki].
phi());
208 for(PathInfoCollection::iterator
v =
hltPaths_.begin();
211 std::string histoname(
v->getName()+
"_et");
212 std::string
title(
v->getName()+
" E_t");
213 et = dbe->
book1D(histoname.c_str(),
218 histoname =
v->getName()+
"_eta";
219 title =
v->getName()+
" #eta";
220 eta = dbe->
book1D(histoname.c_str(),
223 histoname =
v->getName()+
"_phi";
224 title =
v->getName()+
" #phi";
225 phi = dbe->
book1D(histoname.c_str(),
226 histoname.c_str(),
nBins_,-3.14,3.14);
229 histoname =
v->getName()+
"_etaphi";
230 title =
v->getName()+
" #eta vs #phi";
231 etavsphi = dbe->
book2D(histoname.c_str(),
236 v->setHistos( et, eta, phi, etavsphi);
246 LogInfo(
"Status") <<
"endJob: analyzed " <<
nev_ <<
" events";
254 LogDebug(
"Status") <<
"beginRun, run " << run.
id();
260 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)
FourVectorHLT(const edm::ParameterSet &)
std::vector< TPRegexp > filters
void setVerbose(unsigned level)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)
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_