6 #include "TDirectory.h" 12 TCanvas*
printSOF(TFile*
file,
const int run,
const int firstLS,
const int zoom) {
13 TCanvas* canout =
nullptr;
21 TProfile* badmod =
nullptr;
22 TH1F* evtanydcs =
nullptr;
23 TH1F* evtdcson =
nullptr;
24 TH1F* evtnostrip =
nullptr;
30 badmod = (TProfile*)gDirectory->Get(
"badmodrun_HVDCS");
33 sprintf(
dname,
"eventtimedistranydcs/%s",
rname);
35 evtanydcs = (TH1F*)gDirectory->Get(
"orbit");
38 sprintf(
dname,
"eventtimedistribution/%s",
rname);
40 evtdcson = (TH1F*)gDirectory->Get(
"orbit");
43 sprintf(
dname,
"eventtimedistrnostrip/%s",
rname);
45 evtnostrip = (TH1F*)gDirectory->Get(
"orbit");
48 if (badmod && evtanydcs && evtdcson && evtnostrip) {
49 badmod->SetStats(kFALSE);
50 badmod->SetLineColor(kGreen);
51 badmod->SetMarkerColor(kGreen);
52 evtanydcs->SetStats(kFALSE);
53 evtanydcs->SetLineColor(kBlue);
54 evtdcson->SetStats(kFALSE);
55 evtdcson->SetLineColor(kRed);
56 evtnostrip->SetStats(kFALSE);
57 evtnostrip->SetLineColor(kRed);
58 evtnostrip->SetFillColor(kRed);
59 evtnostrip->SetFillStyle(1000);
64 badmod->GetYaxis()->SetRangeUser(1, 100000);
65 badmod->GetYaxis()->SetTitle(
"");
66 badmod->SetTitle(
rname);
67 badmod->GetXaxis()->SetRangeUser((firstLS - zoom) * 262144, (firstLS + zoom) * 262144);
68 evtanydcs->Draw(
"same");
69 evtdcson->Draw(
"same");
70 evtnostrip->Rebin(
int(badmod->GetBinWidth(1) / evtnostrip->GetBinWidth(1)));
71 std::cout <<
"rebin " <<
int(badmod->GetBinWidth(1) / evtnostrip->GetBinWidth(1)) << std::endl;
72 evtnostrip->Draw(
"same");
74 TGaxis* lsaxis =
new TGaxis((firstLS - zoom) * 262144,
76 (firstLS + zoom) * 262144,
87 TLine*
line =
new TLine((firstLS - 1) * 262144, 1, (firstLS - 1) * 262144, 100000);
88 line->SetLineWidth(2);
89 line->SetLineStyle(2);
92 TLegend* leg =
new TLegend(.5, .65, .9, .85,
"");
93 leg->AddEntry(badmod,
"Modules with HV off",
"l");
94 leg->AddEntry(evtanydcs,
"Events with any DCS bit",
"l");
95 leg->AddEntry(evtdcson,
"Events with DCS bit ON",
"l");
96 leg->AddEntry(evtnostrip,
"DCS bit ON No strip clus (masked FED)",
"f");
97 leg->AddEntry(
line,
"first good LS (DCSonly JSON)",
"l");
TCanvas * printSOF(TFile *file, const int run, const int firstLS, const int zoom)
const G4String rname[NREG]