16 if (m_modulePath.size() != 0)
29 {
edm::LogError(
"ScoutingAnalyzerBase::prepareStore")<<
"No DQMStore found !" ; }
45 (
const std::string &
name,
const std::string &
title,
46 int nchX,
double lowX,
double highX,
47 const std::string & titleX,
const std::string & titleY,
50 MonitorElement * me = m_store->book1DD(newName(name),title,nchX,lowX,highX) ;
51 if (titleX!=
"") { me->
getTH1()->GetXaxis()->SetTitle(titleX.c_str()) ; }
52 if (titleY!=
"") { me->
getTH1()->GetYaxis()->SetTitle(titleY.c_str()) ; }
53 if (TString(option)!=
"") { me->
getTH1()->SetOption(option) ; }
60 (
const std::string & name,
const std::string & title,
61 int nchX,
double lowX,
double highX,
62 const std::string & titleX,
const std::string & titleY,
67 MonitorElement * me = m_store->book1DD(newName(name),title,nchX,lowX,highX) ;
69 if (titleX!=
"") { me->
getTH1()->GetXaxis()->SetTitle(titleX.c_str()) ; }
70 if (titleY!=
"") { me->
getTH1()->GetYaxis()->SetTitle(titleY.c_str()) ; }
71 if (TString(option)!=
"") { me->
getTH1()->SetOption(option) ; }
78 (
const std::string & name,
const std::string & title,
79 int nchX,
float *xbinsize,
80 const std::string & titleX,
const std::string & titleY,
83 MonitorElement * me = m_store->book1D(newName(name),title,nchX,xbinsize) ;
85 if (titleX!=
"") { me->
getTH1()->GetXaxis()->SetTitle(titleX.c_str()) ; }
86 if (titleY!=
"") { me->
getTH1()->GetYaxis()->SetTitle(titleY.c_str()) ; }
87 if (TString(option)!=
"") { me->
getTH1()->SetOption(option) ; }
94 (
const std::string & name,
const std::string & title,
95 int nchX,
float *xbinsize,
96 const std::string & titleX,
const std::string & titleY,
101 MonitorElement * me = m_store->book1D(newName(name),title,nchX,xbinsize) ;
104 if (titleX!=
"") { me->
getTH1()->GetXaxis()->SetTitle(titleX.c_str()) ; }
105 if (titleY!=
"") { me->
getTH1()->GetYaxis()->SetTitle(titleY.c_str()) ; }
106 if (TString(option)!=
"") { me->
getTH1()->SetOption(option) ; }
113 (
const std::string & name,
const std::string & title,
114 int nchX,
double lowX,
double highX,
115 int nchY,
double lowY,
double highY,
116 const std::string & titleX,
const std::string & titleY,
119 MonitorElement * me = m_store->book2DD(newName(name),title,nchX,lowX,highX,nchY,lowY,highY) ;
120 if (titleX!=
"") { me->
getTH1()->GetXaxis()->SetTitle(titleX.c_str()) ; }
121 if (titleY!=
"") { me->
getTH1()->GetYaxis()->SetTitle(titleY.c_str()) ; }
122 if (TString(option)!=
"") { me->
getTH1()->SetOption(option) ; }
129 (
const std::string & name,
const std::string & title,
130 int nchX,
double lowX,
double highX,
131 int nchY,
double lowY,
double highY,
132 const std::string & titleX,
const std::string & titleY,
135 MonitorElement * me = m_store->book2DD(newName(name),title,nchX,lowX,highX,nchY,lowY,highY) ;
137 if (titleX!=
"") { me->
getTH1()->GetXaxis()->SetTitle(titleX.c_str()) ; }
138 if (titleY!=
"") { me->
getTH1()->GetYaxis()->SetTitle(titleY.c_str()) ; }
139 if (TString(option)!=
"") { me->
getTH1()->SetOption(option) ; }
146 (
const std::string & name,
const std::string & title,
147 int nchX,
double lowX,
double highX,
148 double lowY,
double highY,
149 const std::string & titleX,
const std::string & titleY,
152 MonitorElement * me = m_store->bookProfile(newName(name),title,nchX,lowX,highX,lowY,highY,
" ") ;
153 if (titleX!=
"") { me->
getTProfile()->GetXaxis()->SetTitle(titleX.c_str()) ; }
154 if (titleY!=
"") { me->
getTProfile()->GetYaxis()->SetTitle(titleY.c_str()) ; }
155 if (TString(option)!=
"") { me->
getTProfile()->SetOption(option) ; }
163 const std::string & titleX,
const std::string & titleY,
164 const std::string & title )
166 std::string name2 = newName(name) ;
167 TH1D * h_temp =
dynamic_cast<TH1D*
>( num->
getTH1()->Clone(name2.c_str()) );
170 h_temp->GetXaxis()->SetTitle(titleX.c_str()) ;
171 h_temp->GetYaxis()->SetTitle(titleY.c_str()) ;
172 if (title!=
"") { h_temp->SetTitle(title.c_str()) ; }
173 if (m_verbosityLevel>0) { h_temp->Print() ; }
183 const std::string & titleX,
const std::string & titleY,
184 const std::string & title )
186 std::string name2 = newName(name) ;
187 TH2D * h_temp =
dynamic_cast<TH2D*
>( num->
getTH1()->Clone(name2.c_str()) );
190 h_temp->GetXaxis()->SetTitle(titleX.c_str()) ;
191 h_temp->GetYaxis()->SetTitle(titleY.c_str()) ;
192 if (title!=
"") { h_temp->SetTitle(title.c_str()) ; }
193 if (m_verbosityLevel>0) { h_temp->Print() ; }
203 const std::string & title,
const std::string & titleX,
const std::string & titleY,
204 Double_t minimum, Double_t maximum )
206 std::string name2 = me2d->
getName()+
"_pfx" ;
207 TProfile * p1_temp = me2d->
getTH2D()->ProfileX() ;
208 if (title!=
"") { p1_temp->SetTitle(title.c_str()) ; }
209 if (titleX!=
"") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; }
210 if (titleY!=
"") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; }
211 if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; }
212 if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; }
222 const std::string & title,
const std::string & titleX,
const std::string & titleY,
223 Double_t minimum, Double_t maximum )
225 std::string name2 = me2d->
getName()+
"_pfy" ;
226 TProfile * p1_temp = me2d->
getTH2D()->ProfileY() ;
227 if (title!=
"") { p1_temp->SetTitle(title.c_str()) ; }
228 if (titleX!=
"") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; }
229 if (titleY!=
"") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; }
230 if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; }
231 if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; }
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
virtual ~ScoutingAnalyzerBase()
unsigned m_verbosityLevel
MonitorElement * bookH2withSumw2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
MonitorElement * bookH1withSumw2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
TH2D * getTH2D(void) const
MonitorElement * bookP1(const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
MonitorElement * bookH1withSumw2BinArray(const std::string &name, const std::string &title, int nchX, float *xbinsize, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
MonitorElement * profileY(MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
std::string newName(const std::string &name)
MonitorElement * profileX(MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
void setVerbose(unsigned level)
ScoutingAnalyzerBase(const edm::ParameterSet &conf)
MonitorElement * bookH1BinArray(const std::string &name, const std::string &title, int nchX, float *xbinsize, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
TProfile * getTProfile(void) const
MonitorElement * bookH1(const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
MonitorElement * bookH2andDivide(const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
MonitorElement * bookH1andDivide(const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
void setCurrentFolder(const std::string &fullpath)
MonitorElement * bookH2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")