173 TF1 *turnon =
new TF1(
"turnon",
"[0]*0.5*(TMath::Erf((x -[1])*0.5/[2])+1.)",0,30);
179 if (!hcalEff_num)
std::cout <<
"numerator not found\n";
181 if (!hcalEff_den)
std::cout <<
"denominator not found\n";
188 turnon->SetParameter(0,1);
189 turnon->SetParameter(1,2);
190 turnon->SetParameter(2,6);
191 eff_histo->Fit(
"turnon",
"LL,E");
194 if (!hcalEff_num)
std::cout <<
"numerator not found\n";
196 if (!hcalEff_den)
std::cout <<
"denominator not found\n";
203 turnon->SetParameter(0,1);
204 turnon->SetParameter(1,2);
205 turnon->SetParameter(2,6);
206 eff_histo->Fit(
"turnon",
"LL,E");
209 if (!hcalEff_num)
std::cout <<
"numerator not found\n";
211 if (!hcalEff_den)
std::cout <<
"denominator not found\n";
218 turnon->SetParameter(0,1);
219 turnon->SetParameter(1,3);
220 turnon->SetParameter(2,6);
221 eff_histo->Fit(
"turnon",
"LL,E");
224 if (!hcalEff_num)
std::cout <<
"numerator not found\n";
226 if (!hcalEff_den)
std::cout <<
"denominator not found\n";
233 turnon->SetParameter(0,1);
234 turnon->SetParameter(1,1);
235 turnon->SetParameter(2,6);
236 eff_histo->Fit(
"turnon",
"LL,E");
243 for (
int i=0;
i < 56;
i++)
245 char hname[20],htitle[30];
248 for (
int j=0;
j < 72;
j++)
251 if (
i<28) ieta =
i-28;
253 sprintf(hname,
"eff_%d_%d",ieta,iphi);
254 sprintf(htitle,
"Eff <%d,%d>",ieta,iphi);
256 sprintf(subdirname,
"%sEffByChannel/EtaTower%d/",
input_dir.c_str(),ieta);
257 hcalEff_num = this->
get1DHisto((
string)subdirname+(
string)hname+
"_num",
dbe);
258 hcalEff_den = this->
get1DHisto((
string)subdirname+(
string)hname+
"_den",
dbe);
259 if (!hcalEff_num)
std::cout <<(string)subdirname+(
string)hname+"_num" << "numerator not
found\
n";
260 if (!hcalEff_num) std::
cout << "numerator not
found\n";
266 sprintf(subdirname,
"%sEffByChannel/EtaTower%d/",
output_dir.c_str(),ieta);
267 eff_histo = this->
get1DHisto((
string)subdirname+(
string)hname,
dbe);
268 turnon->SetParameter(0,1);
269 turnon->SetParameter(1,3);
270 turnon->SetParameter(2,6);
271 eff_histo->Fit(
"turnon",
"LL,E");
272 plateau = turnon->GetParameter(0);
274 width = turnon->GetParameter(2);
282 for (
int i=0;
i < 8;
i++)
284 char hname[20],htitle[30];
287 for (
int j=0; j < 18; j++)
290 if (
i<4) ieta =
i-32;
292 sprintf(hname,
"eff_%d_%d",ieta,iphi);
293 sprintf(htitle,
"Eff <%d,%d>",ieta,iphi);
295 sprintf(subdirname,
"%sEffByChannel/EtaTower%d/",
input_dir.c_str(),ieta);
296 hcalEff_num = this->
get1DHisto((
string)subdirname+(
string)hname+
"_num",
dbe);
297 hcalEff_den = this->
get1DHisto((
string)subdirname+(
string)hname+
"_den",
dbe);
298 if (!hcalEff_num)
std::cout <<(string)subdirname+(
string)hname+"_num" << "numerator not
found\n";
303 sprintf(subdirname,
"%sEffByChannel/EtaTower%d/",
output_dir.c_str(),ieta);
304 eff_histo = this->
get1DHisto((
string)subdirname+(
string)hname,
dbe);
305 turnon->SetParameter(0,1);
306 turnon->SetParameter(1,1);
307 turnon->SetParameter(2,6);
308 eff_histo->Fit(
"turnon",
"LL,E");
309 plateau = turnon->GetParameter(0);
311 width = turnon->GetParameter(2);
MonitorElement * hcalEff_1_
void calcEff(TH1F *num, TH1F *den, MonitorElement *me)
MonitorElement * hcalEff_4_
MonitorElement * hcalEff_2_
MonitorElement * hcalEff_HF[8][18]
TH1F * get1DHisto(std::string meName, DQMStore *dbi)
MonitorElement * hcalThreshold_
perl if(1 lt scalar(@::datatypes))
MonitorElement * hcalPlateau_
MonitorElement * hcalWidth_
MonitorElement * hcalEff_3_
MonitorElement * hcalEff_HBHE[56][72]