190 art::ServiceHandle<art::TFileService>
tfs;
245 uint8_t mac = (*it).first;
248 std::string htitle =
"noise rate: mac5 "+
std::to_string(mac)+
" [Side CRT]";
249 TH1F *
h = tfs->make<TH1F>(hname.c_str(),htitle.c_str(),4000,0.0,40.0);
250 h->GetXaxis()->SetTitle(
"rate [kHz]");
251 h->GetXaxis()->SetTitleSize(0.04);
252 h->GetXaxis()->SetLabelSize(0.04);
253 h->GetYaxis()->SetLabelSize(0.04);
257 float* rate =
new float[
n];
258 float* time =
new float[
n];
260 for(
size_t i=0; i<
n; i++){
267 std::cout <<
"mean rate before division: " << meanRate << std::endl;
269 std::cout <<
"mean rate averaged over " << n <<
" points: " << meanRate << std::endl;
272 std::cout <<
"relative (to 30kHz) average "+htitle <<
" = " << meanRate << std::endl;
275 std::string gtitle =
"noise rate: mac5 "+
std::to_string(mac)+
" [Side CRT]";
276 TGraph *
g = tfs->make<TGraph>(
n,time,rate);
277 g->SetName(gname.c_str());
278 g->SetTitle(gtitle.c_str());
279 g->GetXaxis()->SetTitle(
"run time [s]");
280 g->GetYaxis()->SetTitle(
"rate [kHz]");
281 g->GetXaxis()->SetTitleSize(0.04);
282 g->GetYaxis()->SetTitleSize(0.04);
283 g->GetXaxis()->SetLabelSize(0.04);
284 g->GetYaxis()->SetLabelSize(0.04);
286 g->SetMarkerStyle(8);
297 uint8_t mac = (*it).first;
300 std::string htitle =
"noise rate: mac5 "+
std::to_string(mac)+
" [Top CRT]";
301 TH1F *h = tfs->make<TH1F>(hname.c_str(),htitle.c_str(),4000,0.0,40.0);
302 h->GetXaxis()->SetTitle(
"rate [kHz]");
303 h->GetXaxis()->SetTitleSize(0.04);
304 h->GetXaxis()->SetLabelSize(0.04);
305 h->GetYaxis()->SetLabelSize(0.04);
309 float* rate =
new float[
n];
310 float* time =
new float[
n];
312 for(
size_t i=0; i<
n; i++){
319 std::cout <<
"mean rate before division: " << meanRate << std::endl;
321 std::cout <<
"mean rate averaged over " << n <<
" points: " << meanRate << std::endl;
324 std::cout <<
"relative (to 30kHz) average "+htitle <<
" = " << meanRate << std::endl;
327 std::string gtitle =
"noise rate: mac5 "+
std::to_string(mac)+
" [Top CRT]";
328 TGraph *g = tfs->make<TGraph>(
n,time,rate);
329 g->SetName(gname.c_str());
330 g->SetTitle(gtitle.c_str());
331 g->GetXaxis()->SetTitle(
"run time [s]");
332 g->GetYaxis()->SetTitle(
"rate [kHz]");
333 g->GetXaxis()->SetTitleSize(0.04);
334 g->GetYaxis()->SetTitleSize(0.04);
335 g->GetXaxis()->SetLabelSize(0.04);
336 g->GetYaxis()->SetLabelSize(0.04);
338 g->SetMarkerStyle(8);
std::string to_string(WindowPattern const &pattern)
art::ServiceHandle< art::TFileService > tfs
BEGIN_PROLOG could also be cout