14 #include "sPhenixStyle.C"
28 static const int NCONFIGS = 2;
31 int tpc_layer[NCONFIGS][4];
33 char label[NCONFIGS][500];
35 fin[0] =
new TFile(
"root_files/pileup_fix_inner16_200khz_cluster_resolution_out.root");
36 fin[1] =
new TFile(
"root_files/pileup_fix_inner16_100khz_cluster_resolution_out.root");
38 sprintf(label[0],
"NeCF4_400 16 inner layers 200 kHz");
39 sprintf(label[1],
"NeCF4_400 16 inner layers 100 kHz");
61 double layer_radius[4] = {30.0, 40.0, 60.0, 79.0};
63 bool use_last_inner =
true;
68 layer_radius[1] = 39.0;
71 TGraph *gzsize[4][NCONFIGS];
72 TGraph *gocc[4][NCONFIGS];
74 int col[4] = {kRed, kBlue, kBlack, kViolet};
76 for(
int i=0;
i<NCONFIGS;
i++)
80 cout <<
"Did not find file " << i <<
" quit!" << endl;
84 for(
int ilayer = 0;ilayer < 4; ilayer++)
86 int layer = tpc_layer[
i][ilayer];
88 sprintf(name1,
"goccz%i",layer);
89 cout <<
"Fetching object " << name1 <<
" for layer " << layer <<
" from file " << i << endl;
90 fin[
i]->GetObject(name1,gzsize[ilayer][i]);
92 sprintf(name2,
"gocc_clus%i",layer);
93 cout <<
"Fetching object " << name2 <<
" for layer " << layer <<
" from file " << i << endl;
94 fin[
i]->GetObject(name2,gocc[ilayer][i]);
96 if(!gzsize[ilayer][i])
98 cout <<
"Failed to find gzsize named " << name1 << endl;
103 cout <<
"Failed to find gocc named " << name2 << endl;
112 double hmaxz[4] = {3.5, 3.5, 3.5, 3.5};
114 TCanvas *cz =
new TCanvas(
"cz",
"cz",50,50,1200,800);
117 TH1F *hdz =
new TH1F(
"hdz",
"hdz",100, -110.0, 110.0);
118 hdz->SetMinimum(0.0);
119 hdz->GetXaxis()->SetTitle(
"Z (cm)");
120 hdz->GetXaxis()->SetTitleOffset(1.15);
121 hdz->GetYaxis()->SetTitle(
"Cluster Z size");
122 hdz->GetYaxis()->SetTitleOffset(1.3);
124 for(
int ilayer = 0;ilayer<4;ilayer++)
128 hdz->SetMaximum(hmaxz[ilayer]);
130 for(
int i=0;
i<NCONFIGS;
i++)
132 gzsize[ilayer][
i]->SetMarkerColor(col[
i]);
135 gzsize[ilayer][
i]->Draw(
"p");
137 gzsize[ilayer][
i]->Draw(
"same p");
141 sprintf(label,
"radius = %.1f cm",layer_radius[ilayer]);
142 TLatex *l3 =
new TLatex(0.25,0.25,label);
150 double hmax[4] = {0.45, 0.35, 0.25, 0.18};
152 TCanvas *cocc =
new TCanvas(
"cocc",
"cocc",50,50,1200,800);
155 TH1F *hd =
new TH1F(
"hd",
"hd",100, -110.0, 110.0);
157 hd->GetXaxis()->SetTitle(
"Z (cm)");
158 hd->GetXaxis()->SetTitleOffset(1.15);
159 hd->GetYaxis()->SetTitle(
"Cluster occupancy");
160 hd->GetYaxis()->SetTitleOffset(1.3);
162 for(
int ilayer = 0;ilayer<4;ilayer++)
166 hd->SetMaximum(hmax[ilayer]);
168 for(
int i=0;
i<NCONFIGS;
i++)
170 gocc[ilayer][
i]->SetMarkerColor(col[
i]);
173 gocc[ilayer][
i]->Draw(
"p");
175 gocc[ilayer][
i]->Draw(
"same p");
178 sprintf(label,
"radius = %.1f cm",layer_radius[ilayer]);
179 TLatex *l3 =
new TLatex(0.25,0.25,label);
184 TLegend *lpd =
new TLegend(0.20, 0.70, 0.9, 0.90,
"",
"NDC");
185 lpd->SetBorderSize(1);
186 lpd->SetFillColor(0);
187 lpd->SetFillStyle(0);
188 for(
int i=0;
i<NCONFIGS;
i++)
190 lpd->AddEntry(gocc[0][
i],label[i],
"p");
198 cout <<
"Done" << endl;