157 double time2=0;
double time1=0;
double time3=0;
double time4=0;
158 double dtime2=0;
double dtime1=0;
double dtime3=0;
double dtime4=0;
164 else if(
m_fitflag==4)
m_outFile<<
"Det Eta,Phi,D Mean Error Peak Error MeanEv Error PeakEv Error"<<std::endl;
170 time1 =
_meol->second[10].first->GetMean();
175 for(
int j=0; j<10; j++)
_meol->second[10].first->SetBinError(j+1,
_meol->second[j].first->GetRMS()/
sqrt((
float)
evt_curr));
178 _meol->second[10].first->Fit(
"landau",
"Q");
180 TF1 *
fit =
_meol->second[10].first->GetFunction(
"landau");
182 time2=fit->GetParameter(1);
183 dtime2=fit->GetParError(1);
186 time3 =
_meol->second[12].first->GetMean();
187 dtime3 =
_meol->second[12].first->GetRMS()/
sqrt((
float)
_meol->second[12].first->GetEntries());
190 time4 =
_meol->second[13].first->GetMean();
191 dtime4 =
_meol->second[13].first->GetRMS()/
sqrt((
float)
_meol->second[13].first->GetEntries());
193 for (
int i=0;
i<10;
i++){
194 _meol->second[
i].first->GetXaxis()->SetTitle(
"Pulse height (fC)");
195 _meol->second[
i].first->GetYaxis()->SetTitle(
"Counts");
198 _meol->second[10].first->GetXaxis()->SetTitle(
"Time slice");
199 _meol->second[10].first->GetYaxis()->SetTitle(
"Averaged pulse (fC)");
201 _meol->second[10].second.first[0].push_back(time1);
202 _meol->second[10].second.first[1].push_back(dtime1);
203 _meol->second[11].second.first[0].push_back(time2);
204 _meol->second[11].second.first[1].push_back(dtime2);
205 _meol->second[12].first->GetXaxis()->SetTitle(
"Mean TS");
206 _meol->second[12].first->GetYaxis()->SetTitle(
"Counts");
208 _meol->second[12].second.first[0].push_back(time3);
209 _meol->second[12].second.first[1].push_back(dtime3);
210 _meol->second[13].first->GetXaxis()->SetTitle(
"Peak TS");
211 _meol->second[13].first->GetYaxis()->SetTitle(
"Counts");
213 _meol->second[13].second.first[0].push_back(time4);
214 _meol->second[13].second.first[1].push_back(dtime4);
215 _meol->second[14].first->GetXaxis()->SetTitle(
"Peak TS error");
216 _meol->second[14].first->GetYaxis()->SetTitle(
"Counts");
218 _meol->second[15].first->GetXaxis()->SetTitle(
"Chi2/NDF");
219 _meol->second[15].first->GetYaxis()->SetTitle(
"Counts");
221 _meol->second[16].first->GetXaxis()->SetTitle(
"Integrated Signal");
222 _meol->second[16].first->Write();
230 m_outFile<<detid<<
" "<<time1<<
" "<<dtime1<<std::endl;
233 snprintf(
output,
sizeof output,
" <VERSION>version:1</VERSION>");
237 snprintf(
output,
sizeof output,
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>");
247 if(detid.
subdet() == 1) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HB</DETECTOR_NAME>");
248 if(detid.
subdet() == 2) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HE</DETECTOR_NAME>");
249 if(detid.
subdet() == 3) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HO</DETECTOR_NAME>");
250 if(detid.
subdet() == 4) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HF</DETECTOR_NAME>");
252 snprintf(
output,
sizeof output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
258 snprintf(
output,
sizeof output,
" <MEAN_TIME>%7f</MEAN_TIME>", time1);
260 snprintf(
output,
sizeof output,
" <OFFSET_TIME> 0</OFFSET_TIME>");
262 snprintf(
output,
sizeof output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime1);
266 snprintf(
output,
sizeof output,
" <STATUS_WORD> 0</STATUS_WORD>");
275 m_outFile<<detid<<
" "<<time2<<
" "<<dtime2<<std::endl;
278 snprintf(
output,
sizeof output,
" <VERSION>version:1</VERSION>");
282 snprintf(
output,
sizeof output,
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>");
292 if(detid.
subdet() == 1) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HB</DETECTOR_NAME>");
293 if(detid.
subdet() == 2) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HE</DETECTOR_NAME>");
294 if(detid.
subdet() == 3) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HO</DETECTOR_NAME>");
295 if(detid.
subdet() == 4) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HF</DETECTOR_NAME>");
297 snprintf(
output,
sizeof output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
303 snprintf(
output,
sizeof output,
" <MEAN_TIME>%7f</MEAN_TIME>", time2);
305 snprintf(
output,
sizeof output,
" <OFFSET_TIME> 0</OFFSET_TIME>");
307 snprintf(
output,
sizeof output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime2);
311 snprintf(
output,
sizeof output,
" <STATUS_WORD> 0</STATUS_WORD>");
320 m_outFile<<detid<<
" "<<time3<<
" "<<dtime3<<std::endl;
323 snprintf(
output,
sizeof output,
" <VERSION>version:1</VERSION>");
327 snprintf(
output,
sizeof output,
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>");
337 if(detid.
subdet() == 1) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HB</DETECTOR_NAME>");
338 if(detid.
subdet() == 2) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HE</DETECTOR_NAME>");
339 if(detid.
subdet() == 3) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HO</DETECTOR_NAME>");
340 if(detid.
subdet() == 4) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HF</DETECTOR_NAME>");
342 snprintf(
output,
sizeof output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
348 snprintf(
output,
sizeof output,
" <MEAN_TIME>%7f</MEAN_TIME>", time3);
350 snprintf(
output,
sizeof output,
" <OFFSET_TIME> 0</OFFSET_TIME>");
352 snprintf(
output,
sizeof output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime3);
356 snprintf(
output,
sizeof output,
" <STATUS_WORD> 0</STATUS_WORD>");
364 m_outFile<<detid<<
" "<<time4<<
" "<<dtime4<<std::endl;
367 snprintf(
output,
sizeof output,
" <VERSION>version:1</VERSION>");
371 snprintf(
output,
sizeof output,
" <EXTENSION_TABLE_NAME>HCAL_CHANNELS</EXTENSION_TABLE_NAME>");
381 if(detid.
subdet() == 1) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HB</DETECTOR_NAME>");
382 if(detid.
subdet() == 2) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HE</DETECTOR_NAME>");
383 if(detid.
subdet() == 3) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HO</DETECTOR_NAME>");
384 if(detid.
subdet() == 4) snprintf(
output,
sizeof output,
" <DETECTOR_NAME>HF</DETECTOR_NAME>");
386 snprintf(
output,
sizeof output,
" <HCAL_CHANNEL_ID>%10i</HCAL_CHANNEL_ID>", detid.
rawId() );
392 snprintf(
output,
sizeof output,
" <MEAN_TIME>%7f</MEAN_TIME>", time4);
394 snprintf(
output,
sizeof output,
" <OFFSET_TIME> 0</OFFSET_TIME>");
396 snprintf(
output,
sizeof output,
" <ERROR_STAT>%7f</ERROR_STAT>", dtime4);
400 snprintf(
output,
sizeof output,
" <STATUS_WORD> 0</STATUS_WORD>");
409 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)
constexpr uint32_t rawId() const
get the raw id
std::string m_outputFileText
int depth() const
get the tower depth
int ietaAbs() const
get the absolute value of the cell ieta
std::ofstream m_outputFileXML
int iphi() const
get the cell iphi
std::map< HcalDetId, std::map< int, LEDBUNCH > >::iterator _meol