45 TList* ring =
static_cast<TList*
>(p->FindObject(Form(
"FMD%d%c",d,r)));
47 Error(
"Draw123",
"List FMD%d%c not found in %s",d,r,p->GetName());
51 TH1* one =
static_cast<TH1*
>(ring->FindObject(
"singleEloss"));
52 TH1* two =
static_cast<TH1*
>(ring->FindObject(
"doubleEloss"));
53 TH1* three =
static_cast<TH1*
>(ring->FindObject(
"tripleEloss"));
54 if (!one || !two || !three) {
55 Error(
"DrawRing123",
"Histograms of Eloss not found in FMD%d%c", d, r);
59 one->SetTitle(Form(
"FMD%d%c", d, r));
60 one->GetXaxis()->SetRangeUser(0, 8);
63 gPad->SetFillColor(0);
66 if (two) two->Draw(
"same");
67 if (three) three->Draw(
"same");
69 TLegend* l =
new TLegend(.6, .6, .95, 1);
73 if (two) l->AddEntry(two);
74 if (three) l->AddEntry(three);
93 const char* folder=
"ForwardResults")
95 gStyle->SetPalette(1);
97 gStyle->SetOptStat(0);
98 gStyle->SetOptTitle(1);
99 gStyle->SetTitleW(.4);
100 gStyle->SetTitleH(.1);
101 gStyle->SetTitleColor(0);
102 gStyle->SetTitleStyle(0);
103 gStyle->SetTitleBorderSize(0);
104 gStyle->SetTitleX(.6);
108 Error(
"Draw123",
"failed to open %s",
filename);
112 TList* forward =
static_cast<TList*
>(file->Get(folder));
114 Error(
"Draw123",
"List %s not found in %s", folder,
filename);
118 TList* sf =
static_cast<TList*
>(forward->FindObject(
"fmdSharingFilter"));
120 Error(
"Draw123",
"List fmdSharingFilter not found in Forward");
124 TCanvas*
c =
new TCanvas(
"123",
125 "singles, doubles, and tripples", 900, 700);
128 c->SetLeftMargin(0.15);
129 c->SetRightMargin(0.02);
130 c->SetTopMargin(0.02);
131 c->Divide(3, 2, 0, 0);
138 TVirtualPad* p = c->cd(4);
140 p->SetRightMargin(0.15);
142 TH2D* highCuts =
static_cast<TH2D*
>(sf->FindObject(
"highCuts"));
143 if (highCuts) highCuts->Draw(
"colz");
145 c->SaveAs(
"123.png");
void DrawRing123(TList *p, UShort_t d, Char_t r)
void Draw123(const char *filename="forward.root", const char *folder="ForwardResults")