41 TList* ring =
static_cast<TList*
>(p->FindObject(Form(
"FMD%d%c",d,r)));
43 Error(
"DrawNeighbors",
"List FMD%d%c not found in %s",d,r,p->GetName());
47 TH2* before =
static_cast<TH2D*
>(ring->FindObject(
"neighborsBefore"));
49 Error(
"DrawRingNeighbors",
"Histogram neighborsBefore not found in FMD%d%c",
53 TH2* after =
static_cast<TH2D*
>(ring->FindObject(
"neighborsAfter"));
55 Error(
"DrawRingNeighbors",
"Histogram neighborsAfter not found in FMD%d%c",
60 gPad->SetFillColor(0);
61 TPad* pad = (TPad*)gPad;
63 pad->SetPad(pad->GetXlowNDC(), pad->GetYlowNDC(), .99,
64 pad->GetYlowNDC()+pad->GetHNDC());
65 pad->SetRightMargin(0.15);
69 before->SetTitle(Form(
"FMD%d%c",d,r));
71 after->Draw(
"same box");
73 before->GetXaxis()->SetRangeUser(-.5, 2);
74 before->GetYaxis()->SetRangeUser(-.5, 2);
76 TLatex* ltx =
new TLatex(gPad->GetLeftMargin()+.01,
77 gPad->GetBottomMargin()+.01,
80 ltx->SetTextSize(.07);
97 const char* folder=
"ForwardResults")
99 gStyle->SetPalette(1);
100 gStyle->SetOptFit(0);
101 gStyle->SetOptStat(0);
102 gStyle->SetTitleW(.4);
103 gStyle->SetTitleH(.1);
104 gStyle->SetTitleX(.1);
105 gStyle->SetTitleY(.1);
106 gStyle->SetTitleColor(0);
107 gStyle->SetTitleStyle(0);
108 gStyle->SetTitleBorderSize(0);
109 gStyle->SetOptTitle(0);
113 Error(
"DrawNeighbors",
"failed to open %s",
filename);
117 TList* forward =
static_cast<TList*
>(file->Get(folder));
119 Error(
"DrawNeighbors",
"List %s not found in %s", folder,
filename);
123 TList* sf =
static_cast<TList*
>(forward->FindObject(
"fmdSharingFilter"));
125 Error(
"DrawNeighbors",
"List fmdSharingFilter not found in Forward");
129 TCanvas*
c =
new TCanvas(
"neighbors",
"Correlation of Neighbor strips",
133 c->Divide(3, 2, 0, 0);
140 c->cd(4)->SetFillColor(0);
142 c->SaveAs(
"neighbors.png");
void DrawRingNeighbors(TList *p, UShort_t d, Char_t r)
void DrawNeighbors(const char *filename="forward.root", const char *folder="ForwardResults")