208 double time2=0;
double time1=0;
double time3=0;
double time4=0;
209 double dtime2=0;
double dtime1=0;
double dtime3=0;
double dtime4=0;
214 else if(
m_fitflag==4)
m_outFile<<
"Det Eta,Phi,D Mean Error Peak Error MeanEv Error PeakEv Error"<<std::endl;
220 time1 =
_meol->second[10].first->GetMean();
225 for(
int j=0; j<10; j++)
_meol->second[10].first->SetBinError(j+1,
_meol->second[j].first->GetRMS()/
sqrt((
float)
evt_curr));
228 _meol->second[10].first->Fit(
"landau",
"Q");
230 TF1 *
fit =
_meol->second[10].first->GetFunction(
"landau");
232 time2=fit->GetParameter(1);
233 dtime2=fit->GetParError(1);
236 time3 =
_meol->second[12].first->GetMean();
237 dtime3 =
_meol->second[12].first->GetRMS()/
sqrt((
float)
_meol->second[12].first->GetEntries());
240 time4 =
_meol->second[13].first->GetMean();
241 dtime4 =
_meol->second[13].first->GetRMS()/
sqrt((
float)
_meol->second[13].first->GetEntries());
243 for (
int i=0;
i<10;
i++){
244 _meol->second[
i].first->GetXaxis()->SetTitle(
"Pulse height (fC)");
245 _meol->second[
i].first->GetYaxis()->SetTitle(
"Counts");
248 _meol->second[10].first->GetXaxis()->SetTitle(
"Time slice");
249 _meol->second[10].first->GetYaxis()->SetTitle(
"Averaged pulse (fC)");
251 _meol->second[10].second.first[0].push_back(time1);
252 _meol->second[10].second.first[1].push_back(dtime1);
253 _meol->second[11].second.first[0].push_back(time2);
254 _meol->second[11].second.first[1].push_back(dtime2);
255 _meol->second[12].first->GetXaxis()->SetTitle(
"Mean TS");
256 _meol->second[12].first->GetYaxis()->SetTitle(
"Counts");
258 _meol->second[12].second.first[0].push_back(time3);
259 _meol->second[12].second.first[1].push_back(dtime3);
260 _meol->second[13].first->GetXaxis()->SetTitle(
"Peak TS");
261 _meol->second[13].first->GetYaxis()->SetTitle(
"Counts");
263 _meol->second[13].second.first[0].push_back(time4);
264 _meol->second[13].second.first[1].push_back(dtime4);
265 _meol->second[14].first->GetXaxis()->SetTitle(
"Peak TS error");
266 _meol->second[14].first->GetYaxis()->SetTitle(
"Counts");
268 _meol->second[15].first->GetXaxis()->SetTitle(
"Chi2/NDF");
269 _meol->second[15].first->GetYaxis()->SetTitle(
"Counts");
271 _meol->second[16].first->GetXaxis()->SetTitle(
"Integrated Signal");
272 _meol->second[16].first->Write();
280 m_outFile<<detid<<
" "<<time1<<
" "<<dtime1<<std::endl;
284 m_outputFileXML <<
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>" << endl;
287 sprintf(
output,
" <PHI>%2i</PHI>", detid.
iphi() );
289 sprintf(
output,
" <DEPTH>%2i</DEPTH>", detid.
depth() );
298 sprintf(
output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
302 sprintf(
output,
" <MEAN_TIME>%7f</MEAN_TIME>", time1);
305 sprintf(
output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime1);
315 m_outFile<<detid<<
" "<<time2<<
" "<<dtime2<<std::endl;
319 m_outputFileXML <<
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>" << endl;
322 sprintf(
output,
" <PHI>%2i</PHI>", detid.
iphi() );
324 sprintf(
output,
" <DEPTH>%2i</DEPTH>", detid.
depth() );
332 sprintf(
output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
336 sprintf(
output,
" <MEAN_TIME>%7f</MEAN_TIME>", time2);
339 sprintf(
output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime2);
349 m_outFile<<detid<<
" "<<time3<<
" "<<dtime3<<std::endl;
353 m_outputFileXML <<
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>" << endl;
356 sprintf(
output,
" <PHI>%2i</PHI>", detid.
iphi() );
358 sprintf(
output,
" <DEPTH>%2i</DEPTH>", detid.
depth() );
366 sprintf(
output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
370 sprintf(
output,
" <MEAN_TIME>%7f</MEAN_TIME>", time3);
373 sprintf(
output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime3);
382 m_outFile<<detid<<
" "<<time4<<
" "<<dtime4<<std::endl;
386 m_outputFileXML <<
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>" << endl;
389 sprintf(
output,
" <PHI>%2i</PHI>", detid.
iphi() );
391 sprintf(
output,
" <DEPTH>%2i</DEPTH>", detid.
depth() );
399 sprintf(
output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
403 sprintf(
output,
" <MEAN_TIME>%7f</MEAN_TIME>", time4);
406 sprintf(
output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime4);
416 m_outFile<<detid<<
" "<<time1<<
" "<<dtime1<<
" "<<time2<<
" "<<dtime2<<
" "<<time3<<
" "<<dtime3<<
" "<<time4<<
" "<<dtime4<<std::endl;
HcalSubdetector subdet() const
get the subdetector
int zside() const
get the z-side of the cell (1/-1)
uint32_t rawId() const
get the raw id
int depth() const
get the tower depth
std::ofstream m_outputFileXML
int ietaAbs() const
get the absolute value of the cell ieta
int iphi() const
get the cell iphi
std::string m_outputFileText
std::map< HcalDetId, std::map< int, LEDBUNCH > >::iterator _meol