6 #include "TDirectory.h"
17 sprintf(rname,
"run_%d",run);
19 if(file==0)
return canout;
28 sprintf(dname,
"ssqhistory/%s",rname);
29 if(file->cd(dname)) { badmod = (TProfile*)gDirectory->Get(
"badmodrun_HVDCS"); }
31 sprintf(dname,
"eventtimedistranydcs/%s",rname);
32 if(file->cd(dname)) { evtanydcs = (TH1F*)gDirectory->Get(
"orbit"); }
34 sprintf(dname,
"eventtimedistribution/%s",rname);
35 if(file->cd(dname)) { evtdcson = (TH1F*)gDirectory->Get(
"orbit"); }
37 sprintf(dname,
"eventtimedistrnostrip/%s",rname);
38 if(file->cd(dname)) { evtnostrip = (TH1F*)gDirectory->Get(
"orbit"); }
40 if(badmod && evtanydcs && evtdcson && evtnostrip) {
42 badmod->SetStats(kFALSE);
43 badmod->SetLineColor(kGreen); badmod->SetMarkerColor(kGreen);
44 evtanydcs->SetStats(kFALSE);
45 evtanydcs->SetLineColor(kBlue);
46 evtdcson->SetStats(kFALSE);
47 evtdcson->SetLineColor(kRed);
48 evtnostrip->SetStats(kFALSE);
49 evtnostrip->SetLineColor(kRed);
50 evtnostrip->SetFillColor(kRed); evtnostrip->SetFillStyle(1000);
55 badmod->GetYaxis()->SetRangeUser(1,100000); badmod->GetYaxis()->SetTitle(
""); badmod->SetTitle(rname);
56 badmod->GetXaxis()->SetRangeUser((firstLS-zoom)*262144,(firstLS+zoom)*262144);
57 evtanydcs->Draw(
"same");
58 evtdcson->Draw(
"same");
59 evtnostrip->Rebin(
int(badmod->GetBinWidth(1)/evtnostrip->GetBinWidth(1)));
60 std::cout <<
"rebin " << int(badmod->GetBinWidth(1)/evtnostrip->GetBinWidth(1)) << std::endl;
61 evtnostrip->Draw(
"same");
63 TGaxis* lsaxis =
new TGaxis((firstLS-zoom)*262144,100000,(firstLS+zoom)*262144,100000,
64 firstLS-zoom+1,firstLS+zoom+1,2*zoom,
"-SM");
70 TLine*
line =
new TLine((firstLS-1)*262144,1,(firstLS-1)*262144,100000);
71 line->SetLineWidth(2); line->SetLineStyle(2);
74 TLegend*
leg =
new TLegend(.5,.65,.9,.85,
"");
75 leg->AddEntry(badmod,
"Modules with HV off",
"l");
76 leg->AddEntry(evtanydcs,
"Events with any DCS bit",
"l");
77 leg->AddEntry(evtdcson,
"Events with DCS bit ON",
"l");
78 leg->AddEntry(evtnostrip,
"DCS bit ON No strip clus (masked FED)",
"f");
79 leg->AddEntry(line,
"first good LS (DCSonly JSON)",
"l");
TCanvas * printSOF(TFile *file, const int run, const int firstLS, const int zoom)