11 TDirectory *
DAQdir = (TDirectory*)gDirectory->FindObjectAny(
"DAQ");
13 cout <<
"Can't find 'DAQ' directory! (aborting macro)" << endl;
17 if(!daq_words_by_type){
18 cout <<
"Can't find 'daq_words_by_type' histogram! (aborting macro)" << endl;
23 cout <<
"gPad==NULL!! aborting macro" << endl;
31 gPad->SetBottomMargin(0.3);
32 gPad->SetLeftMargin(0.05);
33 gPad->SetRightMargin(0.02);
36 gPad->GetCanvas()->SetTicks();
37 gPad->GetCanvas()->SetLogy();
39 double max = daq_words_by_type->GetMaximum()*1.3;
42 daq_words_by_type->SetStats(0);
43 daq_words_by_type->SetYTitle(
"Total number of 32-bit words");
44 daq_words_by_type->GetYaxis()->SetTitleOffset(0.6);
45 daq_words_by_type->GetYaxis()->SetRangeUser(min, max);
46 daq_words_by_type->Draw();
48 double ylab = pow(10.0, 0.3*(log(max)-log(min)) + log(min));
51 latex.SetTextSize(0.030);
52 latex.SetTextAlign(12);
53 latex.SetTextAngle(90.0);
55 Int_t
Nbins = daq_words_by_type->GetNbinsX();
56 double Nword_tot = daq_words_by_type->GetBinContent(Nbins-1);
58 for(
int ibin=1; ibin<=
Nbins; ibin++){
60 double x = daq_words_by_type->GetXaxis()->GetBinCenter(ibin);
61 double Nwords = daq_words_by_type->GetBinContent(ibin);
62 double percent = 100.0 * Nwords /
Nword_tot;
64 if(Nwords == 0)
continue;
66 if(ibin < Nbins-2) sum += Nwords;
69 sprintf(str,
"%3.1f%%", percent);
70 if(ibin < Nbins-2)
sprintf(str,
"%s _{(%3.1f%% total)}", str, 100.0*sum/Nword_tot);
71 latex.DrawLatex( x, ylab, str);
sprintf(text,"Post KinFit Cut")