12 #include "TMultiGraph.h"
21 fin =
new TFile(filename.c_str());
24 output =
new TFile((outputDir+outputFilename).c_str(),
"recreate");
33 data = (TTree*)
fin->Get(
"alignTree");
34 data->SetBranchAddress(
"id",&
id_);
39 data->SetBranchAddress(
"x",&
x_);
40 data->SetBranchAddress(
"y",&
y_);
41 data->SetBranchAddress(
"z",&
z_);
47 data->SetBranchAddress(
"r",&
r_);
48 data->SetBranchAddress(
"dx",&
dx_);
49 data->SetBranchAddress(
"dy",&
dy_);
50 data->SetBranchAddress(
"dz",&
dz_);
52 data->SetBranchAddress(
"dr",&
dr_);
62 gStyle->SetTitleAlign(22);
63 gStyle->SetTitleX(0.5);
64 gStyle->SetTitleY(0.97);
65 gStyle->SetTitleFont(62);
67 TDirectory* plotDir =
output->mkdir( dirName );
69 double minimum, maximum;
73 TH1F* phdphi =
new TH1F(
"phdphi",
"phdphi", 200, -10, 10);
74 data->Project(
"phdphi",
"dphi",Cut);
80 minimum = -0.0004, maximum = 0.0004;
84 TH2F* h_dphiVz =
new TH2F(
"h_dphiVz",
"#Delta #phi vs. z", 200,minimum,maximum, 200,minimum,maximum);
85 h_dphiVz->SetMarkerStyle(6);
96 zCut[0] =
"sublevel==1";
97 zCut[1] =
"sublevel==2";
98 zCut[2] =
"sublevel==3";
99 zCut[3] =
"sublevel==4";
100 zCut[4] =
"sublevel==5";
101 zCut[5] =
"sublevel==6";
104 std::stringstream st;
105 st <<
"dphi > " << minimum <<
" && dphi < " << maximum;
107 TCut minmaxCut(st.str().c_str());
109 data->Project(
"h_dphiVz",
"dphi:z",Cut+minmaxCut);
110 TGraph* gr_dphiVz_Array[
j];
111 TMultiGraph* mgr_dphiVz=
new TMultiGraph();
112 for (
int i = 0;
i <
j;
i++) {
113 data->Draw(
"dphi:z",Cut+zCut[
i]+minmaxCut);
114 gr_dphiVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
115 gr_dphiVz_Array[
i]->SetMarkerColor(
int(
i/4)+
i+1);
116 gr_dphiVz_Array[
i]->SetMarkerStyle(6);
117 gr_dphiVz_Array[
i]->SetMaximum(maximum);
118 gr_dphiVz_Array[
i]->SetMinimum(minimum);
119 mgr_dphiVz->Add(gr_dphiVz_Array[
i],
"p");
125 TCanvas*
c =
new TCanvas(
"c_twist",
"c_twist", 200, 10, 600, 600);
127 data->SetMarkerSize(0.5);
128 data->SetMarkerStyle(6);
131 mgr_dphiVz->SetTitle(
"#Delta #phi vs. z");
135 mgr_dphiVz->SetMaximum(maximum);
136 mgr_dphiVz->SetMinimum(minimum);
137 mgr_dphiVz->Draw(
"a");
143 if (savePlot) c->Print((
_outputDir+
"plotTwist_"+plotName).c_str());
151 gStyle->SetTitleFont(62);
152 gStyle->SetOptTitle(0);
154 gStyle->SetFrameBorderMode(0);
155 gStyle->SetCanvasBorderMode(0);
156 gStyle->SetPadBorderMode(0);
157 gStyle->SetPadColor(0);
158 gStyle->SetCanvasColor(0);
159 gStyle->SetTitleColor(1);
160 gStyle->SetStatColor(0);
161 gStyle->SetStatBorderSize(1);
162 gStyle->SetFrameFillColor(0);
164 gStyle->SetTextFont(132);
165 gStyle->SetTextSize(0.08);
166 gStyle->SetLabelFont(132,
"x");
167 gStyle->SetLabelFont(132,
"y");
168 gStyle->SetLabelFont(132,
"z");
169 gStyle->SetTitleSize(0.08,
"x");
170 gStyle->SetTitleSize(0.08,
"y");
171 gStyle->SetTitleSize(0.08,
"z");
172 gStyle->SetLabelSize(0.08,
"x");
173 gStyle->SetLabelSize(0.08,
"y");
174 gStyle->SetLabelSize(0.08,
"z");
176 gStyle->SetMarkerStyle(8);
177 gStyle->SetHistLineWidth(1.85);
178 gStyle->SetLineStyleString(2,
"[12 12]");
180 gStyle->SetPadTickX(1);
181 gStyle->SetPadTickY(1);
183 TDirectory* plotDir =
output->mkdir( dirName );
185 double minimumR, maximumR;
186 double minimumZ, maximumZ;
187 double minimumPhi, maximumPhi;
188 double minimumDalpha, maximumDalpha;
189 double minimumDbeta, maximumDbeta;
190 double minimumDgamma, maximumDgamma;
194 TH1F* phr =
new TH1F(
"phr",
"phr", 200, 0, 200);
195 TH1F* phz =
new TH1F(
"phz",
"phz", 400, -300, 300);
196 TH1F* phphi =
new TH1F(
"phphi",
"phphi", 200, -3.15, 3.15);
197 TH1F* phdalpha =
new TH1F(
"phdalpha",
"phdalpha", 2000, -10, 10);
198 TH1F* phdbeta =
new TH1F(
"phdbeta",
"phdbeta", 2000, -10, 10);
199 TH1F* phdgamma =
new TH1F(
"phdgamma",
"phdgamma", 200, -10, 10);
200 data->Project(
"phr",
"r",Cut);
201 data->Project(
"phz",
"z",Cut);
202 data->Project(
"phphi",
"phi",Cut);
203 data->Project(
"phdalpha",
"dalpha",Cut);
204 data->Project(
"phdbeta",
"dbeta",Cut);
205 data->Project(
"phdgamma",
"dgamma",Cut);
214 minimumR = 0., maximumR = 200.;
215 minimumZ = -300., maximumZ = 300.;
216 minimumPhi = -3.15, maximumPhi = 3.15;
217 minimumDalpha = -1, maximumDalpha = 1;
218 minimumDbeta = -1, maximumDbeta = 1;
219 minimumDgamma = -1, maximumDgamma = 1;
223 TH2F* h_dalphaVr =
new TH2F(
"h_dalphaVr",
"#Delta #alpha vs. r",200,minimumR,maximumR,200,minimumDalpha,maximumDalpha);
224 TH2F* h_dbetaVr =
new TH2F(
"h_dbetaVr",
"#Delta #beta vs. r", 200,minimumR,maximumR,200,minimumDbeta, maximumDbeta);
225 TH2F* h_dgammaVr =
new TH2F(
"h_dgammaVr",
"#Delta #gamma vs. r",200,minimumR,maximumR,200,minimumDgamma,maximumDgamma);
227 TH2F* h_dalphaVz =
new TH2F(
"h_dalphaVz",
"#Delta #alpha vs. z", 200,minimumZ,maximumZ, 200,minimumDalpha,maximumDalpha);
228 TH2F* h_dbetaVz =
new TH2F(
"h_dbetaVz",
"#Delta #beta vs. z", 200,minimumZ,maximumZ, 200,minimumDbeta, maximumDbeta);
229 TH2F* h_dgammaVz =
new TH2F(
"h_dgammaVz",
"#Delta #gama vs. z", 200,minimumZ,maximumZ, 200,minimumDgamma,maximumDgamma);
231 TH2F* h_dalphaVphi =
new TH2F(
"h_dalphaVphi",
"#Delta #alpha vs. #phi", 200,minimumPhi,maximumPhi,200,minimumDalpha,maximumDalpha);
232 TH2F* h_dbetaVphi =
new TH2F(
"h_dbetaVphi",
"#Delta #beta vs. #phi", 200,minimumPhi,maximumPhi,200,minimumDbeta, maximumDbeta);
233 TH2F* h_dgammaVphi =
new TH2F(
"h_dgammaVphi",
"#Delta #gamma vs. #phi", 200,minimumPhi,maximumPhi,200,minimumDgamma,maximumDgamma);
235 h_dalphaVr ->SetMarkerStyle(6) ;
236 h_dbetaVr ->SetMarkerStyle(6) ;
237 h_dgammaVr ->SetMarkerStyle(6) ;
239 h_dalphaVz ->SetMarkerStyle(6) ;
240 h_dbetaVz ->SetMarkerStyle(6) ;
241 h_dgammaVz ->SetMarkerStyle(6) ;
243 h_dalphaVphi ->SetMarkerStyle(6) ;
244 h_dbetaVphi ->SetMarkerStyle(6) ;
245 h_dgammaVphi ->SetMarkerStyle(6) ;
252 if (ColorCode == 1) {
255 zCut[0] =
"sublevel==1";
256 zCut[1] =
"sublevel==2";
257 zCut[2] =
"sublevel==3";
258 zCut[3] =
"sublevel==4";
259 zCut[4] =
"sublevel==5";
260 zCut[5] =
"sublevel==6";
263 data->Project(
"h_dalphaVr",
"dalpha*1000:r",Cut);
264 TGraph* gr_dalphaVr_Array[
j];
265 TMultiGraph* mgr_dalphaVr=
new TMultiGraph();
266 for (
int i = 0;
i <
j;
i++) {
267 data->Draw(
"dalpha*1000:r",Cut+zCut[
i]);
268 gr_dalphaVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
269 gr_dalphaVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
270 gr_dalphaVr_Array[
i]->SetMarkerStyle(6);
271 mgr_dalphaVr->Add(gr_dalphaVr_Array[i],
"p");
274 data->Project(
"h_dbetaVr",
"dbeta*1000:r",Cut);
275 TGraph* gr_dbetaVr_Array[
j];
276 TMultiGraph* mgr_dbetaVr=
new TMultiGraph();
277 for (
int i = 0;
i <
j;
i++) {
278 data->Draw(
"dbeta*1000:r",Cut+zCut[
i]);
279 gr_dbetaVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
280 gr_dbetaVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
281 gr_dbetaVr_Array[
i]->SetMarkerStyle(6);
282 mgr_dbetaVr->Add(gr_dbetaVr_Array[i],
"p");
285 data->Project(
"h_dgammaVr",
"dgamma*1000:r",Cut);
286 TGraph* gr_dgammaVr_Array[
j];
287 TMultiGraph* mgr_dgammaVr=
new TMultiGraph();
288 for (
int i = 0;
i <
j;
i++) {
289 data->Draw(
"dgamma*1000:r",Cut+zCut[
i]);
290 gr_dgammaVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
291 gr_dgammaVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
292 gr_dgammaVr_Array[
i]->SetMarkerStyle(6);
293 mgr_dgammaVr->Add(gr_dgammaVr_Array[i],
"p");
296 data->Project(
"h_dalphaVz",
"dalpha*1000:z",Cut);
297 TGraph* gr_dalphaVz_Array[
j];
298 TMultiGraph* mgr_dalphaVz=
new TMultiGraph();
299 for (
int i = 0;
i <
j;
i++) {
300 data->Draw(
"dalpha*1000:z",Cut+zCut[
i]);
301 gr_dalphaVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
302 gr_dalphaVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
303 gr_dalphaVz_Array[
i]->SetMarkerStyle(6);
304 mgr_dalphaVz->Add(gr_dalphaVz_Array[i],
"p");
307 data->Project(
"h_dbetaVz",
"dbeta*1000:z",Cut);
308 TGraph* gr_dbetaVz_Array[
j];
309 TMultiGraph* mgr_dbetaVz=
new TMultiGraph();
310 for (
int i = 0;
i <
j;
i++) {
311 data->Draw(
"dbeta*1000:z",Cut+zCut[
i]);
312 gr_dbetaVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
313 gr_dbetaVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
314 gr_dbetaVz_Array[
i]->SetMarkerStyle(6);
315 mgr_dbetaVz->Add(gr_dbetaVz_Array[i],
"p");
318 data->Project(
"h_dgammaVz",
"dgamma*1000:z",Cut);
319 TGraph* gr_dgammaVz_Array[
j];
320 TMultiGraph* mgr_dgammaVz=
new TMultiGraph();
321 for (
int i = 0;
i <
j;
i++) {
322 data->Draw(
"dgamma*1000:z",Cut+zCut[
i]);
323 gr_dgammaVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
324 gr_dgammaVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
325 gr_dgammaVz_Array[
i]->SetMarkerStyle(6);
326 mgr_dgammaVz->Add(gr_dgammaVz_Array[i],
"p");
329 data->Project(
"h_dalphaVphi",
"dalpha*1000:phi",Cut);
330 TGraph* gr_dalphaVphi_Array[
j];
331 TMultiGraph* mgr_dalphaVphi=
new TMultiGraph();
332 for (
int i = 0;
i <
j;
i++) {
333 data->Draw(
"dalpha*1000:phi",Cut+zCut[
i]);
334 gr_dalphaVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
335 gr_dalphaVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
336 gr_dalphaVphi_Array[
i]->SetMarkerStyle(6);
337 mgr_dalphaVphi->Add(gr_dalphaVphi_Array[i],
"p");
340 data->Project(
"h_dbetaVphi",
"dbeta*1000:phi",Cut);
341 TGraph* gr_dbetaVphi_Array[
j];
342 TMultiGraph* mgr_dbetaVphi=
new TMultiGraph();
343 for (
int i = 0;
i <
j;
i++) {
344 data->Draw(
"dbeta*1000:phi",Cut+zCut[
i]);
345 gr_dbetaVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
346 gr_dbetaVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
347 gr_dbetaVphi_Array[
i]->SetMarkerStyle(6);
348 mgr_dbetaVphi->Add(gr_dbetaVphi_Array[i],
"p");
351 data->Project(
"h_dgammaVphi",
"dgamma*1000:phi",Cut);
352 TGraph* gr_dgammaVphi_Array[
j];
353 TMultiGraph* mgr_dgammaVphi=
new TMultiGraph();
354 for (
int i = 0;
i <
j;
i++) {
355 data->Draw(
"dgamma*1000:phi",Cut+zCut[
i]);
356 gr_dgammaVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
357 gr_dgammaVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
358 gr_dgammaVphi_Array[
i]->SetMarkerStyle(6);
359 mgr_dgammaVphi->Add(gr_dgammaVphi_Array[i],
"p");
363 TCanvas*
c =
new TCanvas(
"c",
"c", 200, 10, 1200, 700);
365 data->SetMarkerSize(0.5);
366 data->SetMarkerStyle(6);
369 if (!autolimits) h_dalphaVr->Draw();
370 if (autolimits) mgr_dalphaVr->Draw(
"a");
373 if (!autolimits) h_dbetaVr->Draw();
374 if (autolimits) mgr_dbetaVr->Draw(
"a");
377 if (!autolimits) h_dgammaVr->Draw();
378 if (autolimits) mgr_dgammaVr->Draw(
"a");
380 if (!autolimits) h_dalphaVz->Draw();
381 if (autolimits) mgr_dalphaVz->Draw(
"a");
383 if (!autolimits) h_dbetaVz->Draw();
384 if (autolimits) mgr_dbetaVz->Draw(
"a");
386 if (!autolimits) h_dgammaVz->Draw();
387 if (autolimits) mgr_dgammaVz->Draw(
"a");
389 if (!autolimits) h_dalphaVphi->Draw();
390 if (autolimits) mgr_dalphaVphi->Draw(
"a");
392 if (!autolimits) h_dbetaVphi->Draw();
393 if (autolimits) mgr_dbetaVphi->Draw(
"a");
395 if (!autolimits) h_dgammaVphi->Draw();
396 if (autolimits) mgr_dgammaVphi->Draw(
"a");
398 mgr_dalphaVr->GetXaxis() ->SetTitle(
"r (cm)");
399 mgr_dbetaVr->GetXaxis() ->SetTitle(
"r (cm)");
400 mgr_dgammaVr->GetXaxis() ->SetTitle(
"r (cm)");
401 mgr_dalphaVz->GetXaxis() ->SetTitle(
"z (cm)");
402 mgr_dbetaVz->GetXaxis() ->SetTitle(
"z (cm)");
403 mgr_dgammaVz->GetXaxis() ->SetTitle(
"z (cm)");
404 mgr_dalphaVphi->GetXaxis()->SetTitle(
"#phi");
405 mgr_dbetaVphi->GetXaxis() ->SetTitle(
"#phi");
406 mgr_dgammaVphi->GetXaxis()->SetTitle(
"#phi");
408 mgr_dalphaVr->GetYaxis() ->SetTitle(
"#Delta #alpha (mrad)");
409 mgr_dbetaVr->GetYaxis() ->SetTitle(
"#Delta #beta (mrad)");
410 mgr_dgammaVr->GetYaxis() ->SetTitle(
"#Delta #gamma (mrad)");
411 mgr_dalphaVz->GetYaxis() ->SetTitle(
"#Delta #alpha (mrad)");
412 mgr_dbetaVz->GetYaxis() ->SetTitle(
"#Delta #beta (mrad)");
413 mgr_dgammaVz->GetYaxis() ->SetTitle(
"#Delta #gamma (mrad)");
414 mgr_dalphaVphi->GetYaxis()->SetTitle(
"#Delta #alpha (mrad)");
415 mgr_dbetaVphi->GetYaxis() ->SetTitle(
"#Delta #beta (mrad)");
416 mgr_dgammaVphi->GetYaxis()->SetTitle(
"#Delta #gamma (mrad)");
426 if (savePlot) c->Print((
_outputDir+
"plot3x3Rot_"+plotName).c_str());
436 gStyle->SetTitleFont(62);
437 gStyle->SetOptTitle(0);
439 gStyle->SetFrameBorderMode(0);
440 gStyle->SetCanvasBorderMode(0);
441 gStyle->SetPadBorderMode(0);
442 gStyle->SetPadColor(0);
443 gStyle->SetCanvasColor(0);
444 gStyle->SetTitleColor(1);
445 gStyle->SetStatColor(0);
446 gStyle->SetStatBorderSize(1);
447 gStyle->SetFrameFillColor(0);
449 gStyle->SetTextFont(132);
450 gStyle->SetTextSize(0.08);
451 gStyle->SetLabelFont(132,
"x");
452 gStyle->SetLabelFont(132,
"y");
453 gStyle->SetLabelFont(132,
"z");
454 gStyle->SetTitleSize(0.08,
"x");
455 gStyle->SetTitleSize(0.08,
"y");
456 gStyle->SetTitleSize(0.08,
"z");
457 gStyle->SetLabelSize(0.08,
"x");
458 gStyle->SetLabelSize(0.08,
"y");
459 gStyle->SetLabelSize(0.08,
"z");
461 gStyle->SetMarkerStyle(8);
462 gStyle->SetHistLineWidth(1.85);
463 gStyle->SetLineStyleString(2,
"[12 12]");
465 gStyle->SetTitleAlign(22);
466 gStyle->SetTitleX(0.5);
467 gStyle->SetTitleY(0.97);
468 gStyle->SetTitleFont(62);
470 gStyle->SetPadTickX(1);
471 gStyle->SetPadTickY(1);
473 gStyle->SetPadTopMargin(0.1);
474 gStyle->SetPadRightMargin(0.05);
475 gStyle->SetPadBottomMargin(0.16);
476 gStyle->SetPadLeftMargin(0.18);
480 TDirectory* plotDir =
output->mkdir( dirName );
483 double minimumR, maximumR;
484 double minimumZ, maximumZ;
485 double minimumPhi, maximumPhi;
486 double minimumDR, maximumDR;
487 double minimumDZ, maximumDZ;
488 double minimumRDPhi, maximumRDPhi;
489 double minimumDX, maximumDX;
490 double minimumDY, maximumDY;
493 TH1F* phr =
new TH1F(
"phr",
"phr", 200, 0, 200 );
494 TH1F* phz =
new TH1F(
"phz",
"phz", 400, -300, 300 );
495 TH1F* phphi =
new TH1F(
"phphi",
"phphi", 200, -3.15, 3.15);
496 TH1F* phdr =
new TH1F(
"phdr",
"phdr", 20000,-1000, 1000 );
497 TH1F* phdz =
new TH1F(
"phdz",
"phdz", 20000,-1000, 1000 );
498 TH1F* phrdphi =
new TH1F(
"phrdphi",
"phrdphi", 20000,-1000, 1000 );
499 TH1F* phdx =
new TH1F(
"phdx",
"phy", 20000,-1000, 1000 );
500 TH1F* phdy =
new TH1F(
"phdy",
"phy", 20000,-1000, 1000 );
501 data->Project(
"phr",
"r",Cut);
502 data->Project(
"phz",
"z",Cut);
503 data->Project(
"phphi",
"phi",Cut);
504 data->Project(
"phdr",
"dr*10000",Cut);
505 data->Project(
"phdz",
"dz*10000",Cut);
506 data->Project(
"phrdphi",
"r*dphi*10000",Cut);
507 data->Project(
"phdx",
"dx*10000",Cut);
508 data->Project(
"phdy",
"dy*10000",Cut);
519 minimumR = 0., maximumR = 200.;
520 minimumZ = -300., maximumZ = 300.;
521 minimumPhi = -3.15, maximumPhi = 3.15;
522 minimumDR = -1, maximumDR = 1;
523 minimumDZ = -1, maximumDZ = 1;
524 minimumRDPhi = -1, maximumRDPhi = 1;
525 minimumDX = -1, maximumDX = 1;
526 minimumDY = -1, maximumDY = 1;
531 TH1F* h_dr =
new TH1F(
"h_dr",
"#Delta r", 2000, minimumDR, maximumDR);
532 TH1F* h_dz =
new TH1F(
"h_dz",
"#Delta z", 2000, minimumDZ, maximumDZ);
533 TH1F* h_rdphi =
new TH1F(
"h_rdphi",
"r* #Delta #phi", 2000, minimumRDPhi, maximumRDPhi);
534 TH2F* h_drVr =
new TH2F(
"h_drVr",
"#Delta r vs. r",200,minimumR,maximumR,200,minimumDR,maximumDR);
535 TH2F* h_dzVr =
new TH2F(
"h_dzVr",
"#Delta z vs. r",200,minimumR,maximumR,200,minimumDZ,maximumDZ);
536 TH2F* h_rdphiVr =
new TH2F(
"h_rdphiVr",
"r#Delta #phi vs. r",200,minimumR,maximumR,200,minimumRDPhi,maximumRDPhi);
537 TH2F* h_dxVr =
new TH2F(
"h_dxVr",
"#Delta x vs. r", 200,minimumR,maximumR, 200,minimumDX,maximumDX);
538 TH2F* h_dyVr =
new TH2F(
"h_dyVr",
"#Delta y vs. r", 200,minimumR,maximumR, 200,minimumDY,maximumDY);
539 TH2F* h_drVz =
new TH2F(
"h_drVz",
"#Delta r vs. z", 200,minimumZ,maximumZ, 200,minimumDR,maximumDR);
540 TH2F* h_dzVz =
new TH2F(
"h_dzVz",
"#Delta z vs. z", 200,minimumZ,maximumZ, 200,minimumDZ,maximumDZ);
541 TH2F* h_rdphiVz =
new TH2F(
"h_rdphiVz",
"r#Delta #phi vs. z", 200,minimumZ,maximumZ, 200,minimumRDPhi,maximumRDPhi);
542 TH2F* h_dxVz =
new TH2F(
"h_dxVz",
"#Delta x vs. z", 200,minimumZ,maximumZ, 200,minimumDX,maximumDX);
543 TH2F* h_dyVz =
new TH2F(
"h_dyVz",
"#Delta y vs. z", 200,minimumZ,maximumZ, 200,minimumDY,maximumDY);
544 TH2F* h_drVphi =
new TH2F(
"h_drVphi",
"#Delta r vs. #phi", 200,minimumPhi,maximumPhi,200,minimumDR,maximumDR);
545 TH2F* h_dzVphi =
new TH2F(
"h_dzVphi",
"#Delta z vs. #phi", 200,minimumPhi,maximumPhi, 200,minimumDZ,maximumDZ);
546 TH2F* h_rdphiVphi =
new TH2F(
"h_rdphiVphi",
"r#Delta #phi vs. #phi", 200,minimumPhi,maximumPhi,200,minimumRDPhi,maximumRDPhi);
547 TH2F* h_dxVphi =
new TH2F(
"h_dxVphi",
"#Delta x vs. #phi", 200,minimumPhi,maximumPhi, 200,minimumDX,maximumDX);
548 TH2F* h_dyVphi =
new TH2F(
"h_dyVphi",
"#Delta y vs. #phi", 200,minimumPhi,maximumPhi, 200,minimumDY,maximumDY);
550 h_drVr->SetMarkerStyle(6);
551 h_dzVr->SetMarkerStyle(6);
552 h_rdphiVr->SetMarkerStyle(6);
553 h_dxVr->SetMarkerStyle(6);
554 h_dyVr->SetMarkerStyle(6);
555 h_drVz->SetMarkerStyle(6);
556 h_dzVz->SetMarkerStyle(6);
557 h_rdphiVz->SetMarkerStyle(6);
558 h_dxVz->SetMarkerStyle(6);
559 h_dyVz->SetMarkerStyle(6);
560 h_drVphi->SetMarkerStyle(6);
561 h_dzVphi->SetMarkerStyle(6);
562 h_rdphiVphi->SetMarkerStyle(6);
563 h_dxVphi->SetMarkerStyle(6);
564 h_dyVphi->SetMarkerStyle(6);
573 if (ColorCode == 1) {
576 zCut[0] =
"sublevel==1";
577 zCut[1] =
"sublevel==2";
578 zCut[2] =
"sublevel==3";
579 zCut[3] =
"sublevel==4";
580 zCut[4] =
"sublevel==5";
581 zCut[5] =
"sublevel==6";
585 data->Project(
"h_dr",
"dr*10000",Cut);
586 data->Project(
"h_dz",
"dz*10000",Cut);
587 data->Project(
"h_rdphi",
"r*dphi*10000",Cut);
590 data->Project(
"h_drVr",
"dr*10000:r",Cut);
591 TGraph* gr_drVr_Array[
j];
592 TMultiGraph* mgr_drVr=
new TMultiGraph();
593 for (
int i = 0;
i <
j;
i++) {
594 data->Draw(
"dr*10000:r",Cut+zCut[
i]);
595 gr_drVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
596 gr_drVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
597 gr_drVr_Array[
i]->SetMarkerStyle(6);
598 mgr_drVr->Add(gr_drVr_Array[i],
"p");
601 data->Project(
"h_dzVr",
"dz*10000:r",Cut);
602 TGraph* gr_dzVr_Array[
j];
603 TMultiGraph* mgr_dzVr=
new TMultiGraph();
604 for (
int i = 0;
i <
j;
i++) {
605 data->Draw(
"dz*10000:r",Cut+zCut[
i]);
606 gr_dzVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
607 gr_dzVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
608 gr_dzVr_Array[
i]->SetMarkerStyle(6);
609 mgr_dzVr->Add(gr_dzVr_Array[i],
"p");
612 data->Project(
"h_rdphiVr",
"r*dphi*10000:r",Cut);
613 TGraph* gr_rdphiVr_Array[
j];
614 TMultiGraph* mgr_rdphiVr=
new TMultiGraph();
615 for (
int i = 0;
i <
j;
i++) {
616 data->Draw(
"r*dphi*10000:r",Cut+zCut[
i]);
617 gr_rdphiVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
618 gr_rdphiVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
619 gr_rdphiVr_Array[
i]->SetMarkerStyle(6);
620 mgr_rdphiVr->Add(gr_rdphiVr_Array[i],
"p");
623 data->Project(
"h_dxVr",
"dx*10000:r",Cut);
624 TGraph* gr_dxVr_Array[
j];
625 TMultiGraph* mgr_dxVr=
new TMultiGraph();
626 for (
int i = 0;
i <
j;
i++) {
627 data->Draw(
"dx*10000:r",Cut+zCut[
i]);
628 gr_dxVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
629 gr_dxVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
630 gr_dxVr_Array[
i]->SetMarkerStyle(6);
631 mgr_dxVr->Add(gr_dxVr_Array[i],
"p");
634 data->Project(
"h_dyVr",
"dy*10000:r",Cut);
635 TGraph* gr_dyVr_Array[
j];
636 TMultiGraph* mgr_dyVr=
new TMultiGraph();
637 for (
int i = 0;
i <
j;
i++) {
638 data->Draw(
"dy*10000:r",Cut+zCut[
i]);
639 gr_dyVr_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
640 gr_dyVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
641 gr_dyVr_Array[
i]->SetMarkerStyle(6);
642 mgr_dyVr->Add(gr_dyVr_Array[i],
"p");
645 data->Project(
"h_drVz",
"dr*10000:z",Cut);
646 TGraph* gr_drVz_Array[
j];
647 TMultiGraph* mgr_drVz=
new TMultiGraph();
648 for (
int i = 0;
i <
j;
i++) {
649 data->Draw(
"dr*10000:z",Cut+zCut[
i]);
650 gr_drVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
651 gr_drVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
652 gr_drVz_Array[
i]->SetMarkerStyle(6);
653 mgr_drVz->Add(gr_drVz_Array[i],
"p");
656 data->Project(
"h_dzVz",
"dz*10000:z",Cut);
657 TGraph* gr_dzVz_Array[
j];
658 TMultiGraph* mgr_dzVz=
new TMultiGraph();
659 for (
int i = 0;
i <
j;
i++) {
660 data->Draw(
"dz*10000:z",Cut+zCut[
i]);
661 gr_dzVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
662 gr_dzVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
663 gr_dzVz_Array[
i]->SetMarkerStyle(6);
664 mgr_dzVz->Add(gr_dzVz_Array[i],
"p");
667 data->Project(
"h_rdphiVz",
"r*dphi*10000:z",Cut);
668 TGraph* gr_rdphiVz_Array[
j];
669 TMultiGraph* mgr_rdphiVz=
new TMultiGraph();
670 for (
int i = 0;
i <
j;
i++) {
671 data->Draw(
"r*dphi*10000:z",Cut+zCut[
i]);
672 gr_rdphiVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
673 gr_rdphiVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
674 gr_rdphiVz_Array[
i]->SetMarkerStyle(6);
675 mgr_rdphiVz->Add(gr_rdphiVz_Array[i],
"p");
678 data->Project(
"h_dxVz",
"dx*10000:z",Cut);
679 TGraph* gr_dxVz_Array[
j];
680 TMultiGraph* mgr_dxVz=
new TMultiGraph();
681 for (
int i = 0;
i <
j;
i++) {
682 data->Draw(
"dx*10000:z",Cut+zCut[
i]);
683 gr_dxVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
684 gr_dxVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
685 gr_dxVz_Array[
i]->SetMarkerStyle(6);
686 mgr_dxVz->Add(gr_dxVz_Array[i],
"p");
689 data->Project(
"h_dyVz",
"dy*10000:z",Cut);
690 TGraph* gr_dyVz_Array[
j];
691 TMultiGraph* mgr_dyVz=
new TMultiGraph();
692 for (
int i = 0;
i <
j;
i++) {
693 data->Draw(
"dy*10000:z",Cut+zCut[
i]);
694 gr_dyVz_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
695 gr_dyVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
696 gr_dyVz_Array[
i]->SetMarkerStyle(6);
697 mgr_dyVz->Add(gr_dyVz_Array[i],
"p");
700 data->Project(
"h_drVphi",
"dr*10000:phi",Cut);
701 TGraph* gr_drVphi_Array[
j];
702 TMultiGraph* mgr_drVphi=
new TMultiGraph();
703 for (
int i = 0;
i <
j;
i++) {
704 data->Draw(
"dr*10000:phi",Cut+zCut[
i]);
705 gr_drVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
706 gr_drVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
707 gr_drVphi_Array[
i]->SetMarkerStyle(6);
708 mgr_drVphi->Add(gr_drVphi_Array[i],
"p");
711 data->Project(
"h_dzVphi",
"dz*10000:phi",Cut);
712 TGraph* gr_dzVphi_Array[
j];
713 TMultiGraph* mgr_dzVphi=
new TMultiGraph();
714 for (
int i = 0;
i <
j;
i++) {
715 data->Draw(
"dz*10000:phi",Cut+zCut[
i]);
716 gr_dzVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
717 gr_dzVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
718 gr_dzVphi_Array[
i]->SetMarkerStyle(6);
719 mgr_dzVphi->Add(gr_dzVphi_Array[i],
"p");
722 data->Project(
"h_rdphiVphi",
"r*dphi*10000:phi",Cut);
723 TGraph* gr_rdphiVphi_Array[
j];
724 TMultiGraph* mgr_rdphiVphi=
new TMultiGraph();
725 for (
int i = 0;
i <
j;
i++) {
726 data->Draw(
"r*dphi*10000:phi",Cut+zCut[
i]);
727 gr_rdphiVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
728 gr_rdphiVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
729 gr_rdphiVphi_Array[
i]->SetMarkerStyle(6);
730 mgr_rdphiVphi->Add(gr_rdphiVphi_Array[i],
"p");
733 data->Project(
"h_dxVphi",
"dx*10000:phi",Cut);
734 TGraph* gr_dxVphi_Array[
j];
735 TMultiGraph* mgr_dxVphi=
new TMultiGraph();
736 for (
int i = 0;
i <
j;
i++) {
737 data->Draw(
"dx*10000:phi",Cut+zCut[
i]);
738 gr_dxVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
739 gr_dxVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
740 gr_dxVphi_Array[
i]->SetMarkerStyle(6);
741 mgr_dxVphi->Add(gr_dxVphi_Array[i],
"p");
744 data->Project(
"h_dyVphi",
"dy*10000:phi",Cut);
745 TGraph* gr_dyVphi_Array[
j];
746 TMultiGraph* mgr_dyVphi=
new TMultiGraph();
747 for (
int i = 0;
i <
j;
i++) {
748 data->Draw(
"dy*10000:phi",Cut+zCut[
i]);
749 gr_dyVphi_Array[
i] =
new TGraph(
data->GetSelectedRows(),
data->GetV2(),
data->GetV1());
750 gr_dyVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
751 gr_dyVphi_Array[
i]->SetMarkerStyle(6);
752 mgr_dyVphi->Add(gr_dyVphi_Array[i],
"p");
758 TCanvas* c0 =
new TCanvas(
"c0",
"c0", 200, 10, 900, 300);
767 if (savePlot) c0->Print((
_outputDir+
"plot3x1_"+plotName).c_str());
770 mgr_drVr->SetTitle(
"#Delta r vs. r");
771 mgr_dzVr->SetTitle(
"#Delta z vs. r");
772 mgr_rdphiVr->SetTitle(
"r#Delta #phi vs. r");
773 mgr_dxVr->SetTitle(
"#Delta x vs. r");
774 mgr_dyVr->SetTitle(
"#Delta y vs. r");
775 mgr_drVz->SetTitle(
"#Delta r vs. z");
776 mgr_dzVz->SetTitle(
"#Delta z vs. z");
777 mgr_rdphiVz->SetTitle(
"r#Delta #phi vs. z");
778 mgr_dxVz->SetTitle(
"#Delta x vs. z");
779 mgr_dyVz->SetTitle(
"#Delta y vs. z");
780 mgr_drVphi->SetTitle(
"#Delta r vs. #phi");
781 mgr_dzVphi->SetTitle(
"#Delta z vs. #phi");
782 mgr_rdphiVphi->SetTitle(
"r#Delta #phi vs. #phi");
783 mgr_dxVphi->SetTitle(
"#Delta x vs. #phi");
784 mgr_dyVphi->SetTitle(
"#Delta y vs. #phi");
787 TCanvas*
c =
new TCanvas(
"c",
"c", 200, 10, 1200, 700);
789 data->SetMarkerSize(0.5);
790 data->SetMarkerStyle(6);
793 if (!autolimits) h_drVr->Draw();
794 if (autolimits) mgr_drVr->Draw(
"a");
797 if (!autolimits) h_dzVr->Draw();
798 if (autolimits) mgr_dzVr->Draw(
"a");
801 if (!autolimits) h_rdphiVr->Draw();
802 if (autolimits) mgr_rdphiVr->Draw(
"a");
804 if (!autolimits) h_dxVr->Draw();
805 if (autolimits) mgr_dxVr->Draw(
"a");
807 if (!autolimits) h_dyVr->Draw();
808 if (autolimits) mgr_dyVr->Draw(
"a");
810 if (!autolimits) h_drVz->Draw();
811 if (autolimits) mgr_drVz->Draw(
"a");
813 if (!autolimits) h_dzVz->Draw();
814 if (autolimits) mgr_dzVz->Draw(
"a");
816 if (!autolimits) h_rdphiVz->Draw();
817 if (autolimits) mgr_rdphiVz->Draw(
"a");
819 if (!autolimits) h_dxVz->Draw();
820 if (autolimits) mgr_dxVz->Draw(
"a");
822 if (!autolimits) h_dyVz->Draw();
823 if (autolimits) mgr_dyVz->Draw(
"a");
825 if (!autolimits) h_drVphi->Draw();
826 if (autolimits) mgr_drVphi->Draw(
"a");
828 if (!autolimits) h_dzVphi->Draw();
829 if (autolimits) mgr_dzVphi->Draw(
"a");
831 if (!autolimits) h_rdphiVphi->Draw();
832 if (autolimits) mgr_rdphiVphi->Draw(
"a");
834 if (!autolimits) h_dxVphi->Draw();
835 if (autolimits) mgr_dxVphi->Draw(
"a");
837 if (!autolimits) h_dyVphi->Draw();
838 if (autolimits) mgr_dyVphi->Draw(
"a");
840 mgr_drVr->GetXaxis()->SetTitle(
"r (cm)");
841 mgr_dzVr->GetXaxis()->SetTitle(
"r (cm)");
842 mgr_rdphiVr->GetXaxis()->SetTitle(
"r (cm)");
843 mgr_dxVr->GetXaxis()->SetTitle(
"r (cm)");
844 mgr_dyVr->GetXaxis()->SetTitle(
"r (cm)");
845 mgr_drVz->GetXaxis()->SetTitle(
"z (cm)");
846 mgr_dzVz->GetXaxis()->SetTitle(
"z (cm)");
847 mgr_rdphiVz->GetXaxis()->SetTitle(
"z (cm)");
848 mgr_dxVz->GetXaxis()->SetTitle(
"z (cm)");
849 mgr_dyVz->GetXaxis()->SetTitle(
"z (cm)");
850 mgr_drVphi->GetXaxis()->SetTitle(
"#phi");
851 mgr_dzVphi->GetXaxis()->SetTitle(
"#phi");
852 mgr_rdphiVphi->GetXaxis()->SetTitle(
"#phi");
853 mgr_dxVphi->GetXaxis()->SetTitle(
"#phi");
854 mgr_dyVphi->GetXaxis()->SetTitle(
"#phi");
856 mgr_drVr->GetYaxis()->SetTitle(
"#Delta r (#mum)");
857 mgr_dzVr->GetYaxis()->SetTitle(
"#Delta z (#mum)");
858 mgr_rdphiVr->GetYaxis()->SetTitle(
"r#Delta #phi (#mum)");
859 mgr_dxVr->GetYaxis()->SetTitle(
"#Delta x (#mum)");
860 mgr_dyVr->GetYaxis()->SetTitle(
"#Delta y (#mum)");
861 mgr_drVz->GetYaxis()->SetTitle(
"#Delta r (#mum)");
862 mgr_dzVz->GetYaxis()->SetTitle(
"#Delta z (#mum)");
863 mgr_rdphiVz->GetYaxis()->SetTitle(
"r#Delta #phi (#mum)");
864 mgr_dxVz->GetYaxis()->SetTitle(
"#Delta x (#mum)");
865 mgr_dyVz->GetYaxis()->SetTitle(
"#Delta y (#mum)");
866 mgr_drVphi->GetYaxis()->SetTitle(
"#Delta r (#mum)");
867 mgr_dzVphi->GetYaxis()->SetTitle(
"#Delta z (#mum)");
868 mgr_rdphiVphi->GetYaxis()->SetTitle(
"r#Delta #phi (#mum)");
869 mgr_dxVphi->GetYaxis()->SetTitle(
"#Delta x (#mum)");
870 mgr_dyVphi->GetYaxis()->SetTitle(
"#Delta y (#mum)");
872 mgr_drVr->GetYaxis()->SetTitleOffset(1.15);
873 mgr_dzVr->GetYaxis()->SetTitleOffset(1.15);
874 mgr_rdphiVr->GetYaxis()->SetTitleOffset(1.15);
875 mgr_dxVr->GetYaxis()->SetTitleOffset(1.15);
876 mgr_dyVr->GetYaxis()->SetTitleOffset(1.15);
877 mgr_drVz->GetYaxis()->SetTitleOffset(1.15);
878 mgr_dzVz->GetYaxis()->SetTitleOffset(1.15);
879 mgr_rdphiVz->GetYaxis()->SetTitleOffset(1.15);
880 mgr_dxVz->GetYaxis()->SetTitleOffset(1.15);
881 mgr_dyVz->GetYaxis()->SetTitleOffset(1.15);
882 mgr_drVphi->GetYaxis()->SetTitleOffset(1.15);
883 mgr_dzVphi->GetYaxis()->SetTitleOffset(1.15);
884 mgr_rdphiVphi->GetYaxis()->SetTitleOffset(1.15);
885 mgr_dxVphi->GetYaxis()->SetTitleOffset(1.15);
886 mgr_dyVphi->GetYaxis()->SetTitleOffset(1.15);
892 h_dr->Write(); h_dz->Write(); h_rdphi->Write();
893 h_drVr->Write(); h_dzVr->Write(); h_rdphiVr->Write(); h_dxVr->Write(); h_dyVr->Write();
894 h_drVz->Write(); h_dzVz->Write(); h_rdphiVz->Write(); h_dxVz->Write(); h_dyVz->Write();
895 h_drVphi->Write(); h_dzVphi->Write(); h_rdphiVphi->Write(); h_dxVphi->Write(); h_dyVphi->Write();
897 if (savePlot) c->Print((
_outputDir+
"plot3x5_"+plotName).c_str());
908 gStyle->SetTitleFont(62);
909 gStyle->SetOptTitle(0);
911 gStyle->SetFrameBorderMode(0);
912 gStyle->SetCanvasBorderMode(0);
913 gStyle->SetPadBorderMode(0);
914 gStyle->SetPadColor(0);
915 gStyle->SetCanvasColor(0);
916 gStyle->SetTitleColor(1);
917 gStyle->SetStatColor(0);
918 gStyle->SetStatBorderSize(1);
919 gStyle->SetFrameFillColor(0);
921 gStyle->SetTextFont(132);
922 gStyle->SetTextSize(0.08);
923 gStyle->SetLabelFont(132,
"x");
924 gStyle->SetLabelFont(132,
"y");
925 gStyle->SetLabelFont(132,
"z");
926 gStyle->SetTitleSize(0.08,
"x");
927 gStyle->SetTitleSize(0.08,
"y");
928 gStyle->SetTitleSize(0.08,
"z");
929 gStyle->SetLabelSize(0.08,
"x");
930 gStyle->SetLabelSize(0.08,
"y");
931 gStyle->SetLabelSize(0.08,
"z");
933 gStyle->SetTitleAlign(22);
934 gStyle->SetTitleX(0.5);
935 gStyle->SetTitleY(0.97);
936 gStyle->SetTitleFont(62);
938 gStyle->SetPadTickX(1);
939 gStyle->SetPadTickY(1);
941 gStyle->SetPadTopMargin(0.1);
942 gStyle->SetPadRightMargin(0.05);
943 gStyle->SetPadBottomMargin(0.16);
944 gStyle->SetPadLeftMargin(0.18);
950 s.append(
"_profile");
951 TDirectory* plotDir =
output->mkdir( s.data() );
960 if (ColorCode == 1) {
963 zCut[0] =
"sublevel==1";
964 zCut[1] =
"sublevel==2";
965 zCut[2] =
"sublevel==3";
966 zCut[3] =
"sublevel==4";
967 zCut[4] =
"sublevel==5";
968 zCut[5] =
"sublevel==6";
972 double minimumR, maximumR;
973 double minimumZ, maximumZ;
974 double minimumPhi, maximumPhi;
975 double minimumDR, maximumDR;
976 double minimumDZ, maximumDZ;
977 double minimumRDPhi, maximumRDPhi;
978 double minimumDX, maximumDX;
979 double minimumDY, maximumDY;
982 TH1F* phr =
new TH1F(
"phr",
"phr", 200, 0, 200 );
983 TH1F* phz =
new TH1F(
"phz",
"phz", 400, -300, 300 );
984 TH1F* phphi =
new TH1F(
"phphi",
"phphi", 200, -3.15, 3.15);
985 TH1F* phdr =
new TH1F(
"phdr",
"phdr", 20000,-1000, 1000 );
986 TH1F* phdz =
new TH1F(
"phdz",
"phdz", 20000,-1000, 1000 );
987 TH1F* phrdphi =
new TH1F(
"phrdphi",
"phrdphi", 20000,-1000, 1000 );
988 TH1F* phdx =
new TH1F(
"phdx",
"phy", 20000,-1000, 1000 );
989 TH1F* phdy =
new TH1F(
"phdy",
"phy", 20000,-1000, 1000 );
990 data->Project(
"phr",
"r",Cut);
991 data->Project(
"phz",
"z",Cut);
992 data->Project(
"phphi",
"phi",Cut);
993 data->Project(
"phdr",
"dr*10000",Cut);
994 data->Project(
"phdz",
"dz*10000",Cut);
995 data->Project(
"phrdphi",
"r*dphi*10000",Cut );
996 data->Project(
"phdx",
"dx*10000",Cut );
997 data->Project(
"phdy",
"dy*10000",Cut );
1008 minimumR = 0., maximumR = 200.;
1009 minimumZ = -300., maximumZ = 300.;
1010 minimumPhi = -3.15, maximumPhi = 3.15;
1011 minimumDR = -1, maximumDR = 1;
1012 minimumDZ = -1, maximumDZ = 1;
1013 minimumRDPhi = -1, maximumRDPhi = 1;
1014 minimumDX = -1, maximumDX = 1;
1015 minimumDY = -1, maximumDY = 1;
1019 TProfile* hprof_drVr =
new TProfile(
"hprof_drVr",
"#Delta r vs. r",nBins,minimumR,maximumR,minimumDR,maximumDR);
1020 TProfile* hprof_dzVr =
new TProfile(
"hprof_dzVr",
"#Delta z vs. r",nBins,minimumR,maximumR,minimumDZ,maximumDZ);
1021 TProfile* hprof_rdphiVr =
new TProfile(
"hprof_rdphiVr",
"r#Delta #phi vs. r",nBins,minimumR,maximumR,minimumRDPhi,maximumRDPhi);
1022 TProfile* hprof_dxVr =
new TProfile(
"hprof_dxVr",
"#Delta x vs. r", nBins,minimumR,maximumR,minimumDX,maximumDX);
1023 TProfile* hprof_dyVr =
new TProfile(
"hprof_dyVr",
"#Delta y vs. r", nBins,minimumR,maximumR,minimumDY,maximumDY);
1024 TProfile* hprof_drVz =
new TProfile(
"hprof_drVz",
"#Delta r vs. z", nBins,minimumZ,maximumZ,minimumDR,maximumDR);
1025 TProfile* hprof_dzVz =
new TProfile(
"hprof_dzVz",
"#Delta z vs. z", nBins,minimumZ,maximumZ,minimumDZ,maximumDZ);
1026 TProfile* hprof_rdphiVz =
new TProfile(
"hprof_rdphiVz",
"r#Delta #phi vs. z", nBins,minimumZ,maximumZ,minimumRDPhi,maximumRDPhi);
1027 TProfile* hprof_dxVz =
new TProfile(
"hprof_dxVz",
"#Delta x vs. z", nBins,minimumZ,maximumZ,minimumDX,maximumDX);
1028 TProfile* hprof_dyVz =
new TProfile(
"hprof_dyVz",
"#Delta y vs. z", nBins,minimumZ,maximumZ,minimumDY,maximumDY);
1029 TProfile* hprof_drVphi =
new TProfile(
"hprof_drVphi",
"#Delta r vs. #phi", nBins,minimumPhi,maximumPhi,minimumDR,maximumDR);
1030 TProfile* hprof_dzVphi =
new TProfile(
"hprof_dzVphi",
"#Delta z vs. #phi", nBins,minimumPhi,maximumPhi,minimumDZ,maximumDZ);
1031 TProfile* hprof_rdphiVphi =
new TProfile(
"hprof_rdphiVphi",
"r#Delta #phi vs. #phi", nBins,minimumPhi,maximumPhi,minimumRDPhi,maximumRDPhi);
1032 TProfile* hprof_dxVphi =
new TProfile(
"hprof_dxVphi",
"#Delta x vs. #phi", nBins,minimumPhi,maximumPhi,minimumDX,maximumDX);
1033 TProfile* hprof_dyVphi =
new TProfile(
"hprof_dyVphi",
"#Delta y vs. #phi", nBins,minimumPhi,maximumPhi,minimumDY,maximumDY);
1035 TProfile* gr_drVr_Array[
j];
1036 THStack* mgr_drVr=
new THStack(
"mgr_drVr",
"");
1038 for (
int i = 0;
i <
j;
i++) {
1039 data->Draw(
"dr*10000:r>>hprof_drVr",Cut+zCut[
i],
"prof");
1040 if (hprof_drVr->GetEntries()>0){
1041 gr_drVr_Array[
i] =(TProfile*)hprof_drVr->Clone() ;
1042 gr_drVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1043 gr_drVr_Array[
i]->SetLineColor(
int(i/4)+i+1);
1044 mgr_drVr->Add(gr_drVr_Array[i]);
1049 if ( (mgr_drVr->GetMaximum(
"nostack")>0.0005*10000)||(mgr_drVr->GetMinimum(
"nostack")<-0.0005*10000) ){
1050 mgr_drVr->SetMaximum( 2.*mgr_drVr->GetMaximum(
"nostack") );
1051 mgr_drVr->SetMinimum( 2.*mgr_drVr->GetMinimum(
"nostack") );
1054 mgr_drVr->SetMaximum(10.);
1055 mgr_drVr->SetMinimum( -10.);
1059 TProfile* gr_dzVr_Array[
j];
1060 THStack* mgr_dzVr=
new THStack(
"mgr_dzVr",
"");
1061 for (
int i = 0;
i <
j;
i++) {
1062 data->Draw(
"dz*10000:r>>hprof_dzVr",Cut+zCut[
i],
"prof");
1063 if (hprof_dzVr->GetEntries()>0){
1064 gr_dzVr_Array[
i] =(TProfile*)hprof_dzVr->Clone() ;
1065 gr_dzVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1066 gr_dzVr_Array[
i]->SetLineColor(
int(i/4)+i+1);
1067 mgr_dzVr->Add(gr_dzVr_Array[i]);
1070 if ( (mgr_dzVr->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dzVr->GetMinimum(
"nostack")<-0.0005*10000) ){
1071 mgr_dzVr->SetMaximum( 2.*mgr_dzVr->GetMaximum(
"nostack") );
1072 mgr_dzVr->SetMinimum( 2.*mgr_dzVr->GetMinimum(
"nostack") );
1075 mgr_dzVr->SetMaximum( 10.);
1076 mgr_dzVr->SetMinimum( -10.);
1080 TProfile* gr_rdphiVr_Array[
j];
1081 THStack* mgr_rdphiVr=
new THStack();
1082 for (
int i = 0;
i <
j;
i++) {
1083 data->Draw(
"r*dphi*10000:r>>hprof_rdphiVr",Cut+zCut[
i],
"prof");
1084 if (hprof_rdphiVr->GetEntries()>0){
1085 gr_rdphiVr_Array[
i] = (TProfile*)hprof_rdphiVr->Clone() ;
1086 gr_rdphiVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1087 gr_rdphiVr_Array[
i]->SetLineColor(
int(i/4)+i+1);
1088 mgr_rdphiVr->Add(gr_rdphiVr_Array[i]);
1091 if ( (mgr_rdphiVr->GetMaximum(
"nostack")>0.0005*10000)||(mgr_rdphiVr->GetMinimum(
"nostack")<-0.0005*10000) ){
1092 mgr_rdphiVr->SetMaximum( 2.*mgr_rdphiVr->GetMaximum(
"nostack") );
1093 mgr_rdphiVr->SetMinimum( 2.*mgr_rdphiVr->GetMinimum(
"nostack") );
1096 mgr_rdphiVr->SetMaximum( 10.);
1097 mgr_rdphiVr->SetMinimum( -10.);
1101 TProfile* gr_dxVr_Array[
j];
1102 THStack* mgr_dxVr=
new THStack();
1103 for (
int i = 0;
i <
j;
i++) {
1104 data->Draw(
"dx*10000:r>>hprof_dxVr",Cut+zCut[
i],
"prof");
1105 if (hprof_dxVr->GetEntries()>0){
1106 gr_dxVr_Array[
i] = (TProfile*)hprof_dxVr->Clone() ;
1107 gr_dxVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1108 gr_dxVr_Array[
i]->SetLineColor(
int(i/4)+i+1);
1109 mgr_dxVr->Add(gr_dxVr_Array[i]);
1112 if ( (mgr_dxVr->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dxVr->GetMinimum(
"nostack")<-0.0005*10000) ){
1113 mgr_dxVr->SetMaximum( 2.*mgr_dxVr->GetMaximum(
"nostack") );
1114 mgr_dxVr->SetMinimum( 2.*mgr_dxVr->GetMinimum(
"nostack") );
1117 mgr_dxVr->SetMaximum( 10.);
1118 mgr_dxVr->SetMinimum( -10.);
1122 TProfile* gr_dyVr_Array[
j];
1123 THStack* mgr_dyVr=
new THStack();
1124 for (
int i = 0;
i <
j;
i++) {
1125 data->Draw(
"dy*1000:r>>hprof_dyVr",Cut+zCut[
i],
"prof");
1126 if (hprof_dyVr->GetEntries()>0){
1127 gr_dyVr_Array[
i] = (TProfile*)hprof_dyVr->Clone() ;
1128 gr_dyVr_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1129 gr_dyVr_Array[
i]->SetLineColor(
int(i/4)+i+1);
1130 mgr_dyVr->Add(gr_dyVr_Array[i]);
1133 if ( (mgr_dyVr->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dyVr->GetMinimum(
"nostack")<-0.0005*10000) ){
1134 mgr_dyVr->SetMaximum( 2.*mgr_dyVr->GetMaximum(
"nostack") );
1135 mgr_dyVr->SetMinimum( 2.*mgr_dyVr->GetMinimum(
"nostack") );
1138 mgr_dyVr->SetMaximum( 10.);
1139 mgr_dyVr->SetMinimum( -10.);
1143 TProfile* gr_drVz_Array[
j];
1144 THStack* mgr_drVz=
new THStack();
1145 for (
int i = 0;
i <
j;
i++) {
1146 data->Draw(
"dr*10000:z>>hprof_drVz",Cut+zCut[
i],
"prof");
1147 if (hprof_drVz->GetEntries()>0){
1148 gr_drVz_Array[
i] = (TProfile*)hprof_drVz->Clone() ;
1149 gr_drVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1150 gr_drVz_Array[
i]->SetLineColor(
int(i/4)+i+1);
1151 mgr_drVz->Add(gr_drVz_Array[i]);
1154 if ( (mgr_drVz->GetMaximum(
"nostack")>0.0005*10000)||(mgr_drVz->GetMinimum(
"nostack")<-0.0005*10000) ){
1155 mgr_drVz->SetMaximum( 2.*mgr_drVz->GetMaximum(
"nostack") );
1156 mgr_drVz->SetMinimum( 2.*mgr_drVz->GetMinimum(
"nostack") );
1159 mgr_drVz->SetMaximum( 10.);
1160 mgr_drVz->SetMinimum( -10.);
1164 TProfile* gr_dzVz_Array[
j];
1165 THStack* mgr_dzVz=
new THStack();
1166 for (
int i = 0;
i <
j;
i++) {
1167 data->Draw(
"dz*10000:z>>hprof_dzVz",Cut+zCut[
i],
"prof");
1168 if (hprof_dzVz->GetEntries()>0){
1169 gr_dzVz_Array[
i] = (TProfile*)hprof_dzVz->Clone() ;
1170 gr_dzVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1171 gr_dzVz_Array[
i]->SetLineColor(
int(i/4)+i+1);
1172 mgr_dzVz->Add(gr_dzVz_Array[i]);
1175 if ( (mgr_dzVz->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dzVz->GetMinimum(
"nostack")<-0.0005*10000) ){
1176 mgr_dzVz->SetMaximum( 2.*mgr_dzVz->GetMaximum(
"nostack") );
1177 mgr_dzVz->SetMinimum( 2.*mgr_dzVz->GetMinimum(
"nostack") );
1180 mgr_dzVz->SetMaximum( 10.);
1181 mgr_dzVz->SetMinimum( -10.);
1185 TProfile* gr_rdphiVz_Array[
j];
1186 THStack* mgr_rdphiVz=
new THStack();
1187 for (
int i = 0;
i <
j;
i++) {
1188 data->Draw(
"r*dphi*10000:z>>hprof_rdphiVz",Cut+zCut[
i],
"prof");
1189 if (hprof_rdphiVz->GetEntries()>0){
1190 gr_rdphiVz_Array[
i] = (TProfile*)hprof_rdphiVz->Clone() ;
1191 gr_rdphiVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1192 gr_rdphiVz_Array[
i]->SetLineColor(
int(i/4)+i+1);
1193 mgr_rdphiVz->Add(gr_rdphiVz_Array[i]);
1196 if ( (mgr_rdphiVz->GetMaximum(
"nostack")>0.0005*10000)||(mgr_rdphiVz->GetMinimum(
"nostack")<-0.0005*10000) ){
1197 mgr_rdphiVz->SetMaximum( 2.*mgr_rdphiVz->GetMaximum(
"nostack") );
1198 mgr_rdphiVz->SetMinimum( 2.*mgr_rdphiVz->GetMinimum(
"nostack") );
1201 mgr_rdphiVz->SetMaximum( 10.);
1202 mgr_rdphiVz->SetMinimum( -10.);
1206 TProfile* gr_dxVz_Array[
j];
1207 THStack* mgr_dxVz=
new THStack();
1208 for (
int i = 0;
i <
j;
i++) {
1209 data->Draw(
"dx*10000:z>>hprof_dxVz",Cut+zCut[
i],
"prof");
1210 if (hprof_dxVz->GetEntries()>0){
1211 gr_dxVz_Array[
i] = (TProfile*)hprof_dxVz->Clone() ;
1212 gr_dxVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1213 gr_dxVz_Array[
i]->SetLineColor(
int(i/4)+i+1);
1214 mgr_dxVz->Add(gr_dxVz_Array[i]);
1217 if ( (mgr_dxVz->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dxVz->GetMinimum(
"nostack")<-0.0005*10000) ){
1218 mgr_dxVz->SetMaximum( 2.*mgr_dxVz->GetMaximum(
"nostack") );
1219 mgr_dxVz->SetMinimum( 2.*mgr_dxVz->GetMinimum(
"nostack") );
1222 mgr_dxVz->SetMaximum( 10.);
1223 mgr_dxVz->SetMinimum( -10.);
1227 TProfile* gr_dyVz_Array[
j];
1228 THStack* mgr_dyVz=
new THStack();
1229 for (
int i = 0;
i <
j;
i++) {
1230 data->Draw(
"dy*10000:z>>hprof_dyVz",Cut+zCut[
i],
"prof");
1231 if (hprof_dyVz->GetEntries()>0){
1232 gr_dyVz_Array[
i] = (TProfile*)hprof_dyVz->Clone() ;
1233 gr_dyVz_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1234 gr_dyVz_Array[
i]->SetLineColor(
int(i/4)+i+1);
1235 mgr_dyVz->Add(gr_dyVz_Array[i],
"p");
1238 if ( (mgr_dyVz->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dyVz->GetMinimum(
"nostack")<-0.0005*10000) ){
1239 mgr_dyVz->SetMaximum( 2.*mgr_dyVz->GetMaximum(
"nostack") );
1240 mgr_dyVz->SetMinimum( 2.*mgr_dyVz->GetMinimum(
"nostack") );
1243 mgr_dyVz->SetMaximum( 10.);
1244 mgr_dyVz->SetMinimum( -10.);
1248 TProfile* gr_drVphi_Array[
j];
1249 THStack* mgr_drVphi=
new THStack();
1250 for (
int i = 0;
i <
j;
i++) {
1251 data->Draw(
"dr*10000:phi>>hprof_drVphi",Cut+zCut[
i],
"prof");
1252 if (hprof_drVphi->GetEntries()>0){
1253 gr_drVphi_Array[
i] = (TProfile*)hprof_drVphi->Clone() ;
1254 gr_drVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1255 gr_drVphi_Array[
i]->SetLineColor(
int(i/4)+i+1);
1256 mgr_drVphi->Add(gr_drVphi_Array[i],
"p");
1259 if ( (mgr_drVphi->GetMaximum(
"nostack")>0.0005*10000)||(mgr_drVphi->GetMinimum(
"nostack")<-0.0005*10000) ){
1260 mgr_drVphi->SetMaximum( 2.*mgr_drVphi->GetMaximum(
"nostack") );
1261 mgr_drVphi->SetMinimum( 2.*mgr_drVphi->GetMinimum(
"nostack") );
1264 mgr_drVphi->SetMaximum( 10.);
1265 mgr_drVphi->SetMinimum( -10.);
1269 TProfile* gr_dzVphi_Array[
j];
1270 THStack* mgr_dzVphi=
new THStack();
1271 for (
int i = 0;
i <
j;
i++) {
1272 data->Draw(
"dz*10000:phi>>hprof_dzVphi",Cut+zCut[
i],
"prof");
1273 if (hprof_dzVphi->GetEntries()>0){
1274 gr_dzVphi_Array[
i] = (TProfile*)hprof_dzVphi->Clone() ;
1275 gr_dzVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1276 gr_dzVphi_Array[
i]->SetLineColor(
int(i/4)+i+1);
1277 mgr_dzVphi->Add(gr_dzVphi_Array[i],
"p");
1280 if ( (mgr_dzVphi->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dzVphi->GetMinimum(
"nostack")<-0.0005*10000) ){
1281 mgr_dzVphi->SetMaximum( 2.*mgr_dzVphi->GetMaximum(
"nostack") );
1282 mgr_dzVphi->SetMinimum( 2.*mgr_dzVphi->GetMinimum(
"nostack") );
1285 mgr_dzVphi->SetMaximum( 10.);
1286 mgr_dzVphi->SetMinimum( -10.);
1290 TProfile* gr_rdphiVphi_Array[
j];
1291 THStack* mgr_rdphiVphi=
new THStack();
1292 for (
int i = 0;
i <
j;
i++) {
1293 data->Draw(
"r*dphi*10000:phi>>hprof_rdphiVphi",Cut+zCut[
i],
"prof");
1294 if (hprof_rdphiVphi->GetEntries()>0){
1295 gr_rdphiVphi_Array[
i] = (TProfile*)hprof_rdphiVphi->Clone() ;
1296 gr_rdphiVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1297 gr_rdphiVphi_Array[
i]->SetLineColor(
int(i/4)+i+1);
1298 mgr_rdphiVphi->Add(gr_rdphiVphi_Array[i],
"p");
1301 if ( (mgr_rdphiVphi->GetMaximum(
"nostack")>0.0005*10000)||(mgr_rdphiVphi->GetMinimum(
"nostack")<-0.0005*10000) ){
1302 mgr_rdphiVphi->SetMaximum( 2.*mgr_rdphiVphi->GetMaximum(
"nostack") );
1303 mgr_rdphiVphi->SetMinimum( 2.*mgr_rdphiVphi->GetMinimum(
"nostack") );
1306 mgr_rdphiVphi->SetMaximum( 10.);
1307 mgr_rdphiVphi->SetMinimum( -10.);
1311 TProfile* gr_dxVphi_Array[
j];
1312 THStack* mgr_dxVphi=
new THStack();
1313 for (
int i = 0;
i <
j;
i++) {
1314 data->Draw(
"dx*10000:phi>>hprof_dxVphi",Cut+zCut[
i],
"prof");
1315 if (hprof_dxVphi->GetEntries()>0){
1316 gr_dxVphi_Array[
i] = (TProfile*)hprof_dxVphi->Clone() ;
1317 gr_dxVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1318 gr_dxVphi_Array[
i]->SetLineColor(
int(i/4)+i+1);
1319 mgr_dxVphi->Add(gr_dxVphi_Array[i],
"p");
1322 if ( (mgr_dxVphi->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dxVphi->GetMinimum(
"nostack")<-0.0005*10000) ){
1323 mgr_dxVphi->SetMaximum( 2.*mgr_dxVphi->GetMaximum(
"nostack") );
1324 mgr_dxVphi->SetMinimum( 2.*mgr_dxVphi->GetMinimum(
"nostack") );
1327 mgr_dxVphi->SetMaximum( 10.);
1328 mgr_dxVphi->SetMinimum( -10.);
1332 TProfile* gr_dyVphi_Array[
j];
1333 THStack* mgr_dyVphi=
new THStack();
1334 for (
int i = 0;
i <
j;
i++) {
1335 data->Draw(
"dy*10000:phi>>hprof_dyVphi",Cut+zCut[
i],
"prof");
1336 if (hprof_dyVphi->GetEntries()>0){
1337 gr_dyVphi_Array[
i] = (TProfile*)hprof_dyVphi->Clone() ;
1338 gr_dyVphi_Array[
i]->SetMarkerColor(
int(i/4)+i+1);
1339 gr_dyVphi_Array[
i]->SetLineColor(
int(i/4)+i+1);
1340 mgr_dyVphi->Add(gr_dyVphi_Array[i],
"p");
1343 if ( (mgr_dyVphi->GetMaximum(
"nostack")>0.0005*10000)||(mgr_dyVphi->GetMinimum(
"nostack")<-0.0005*10000) ){
1344 mgr_dyVphi->SetMaximum( 2.*mgr_dyVphi->GetMaximum(
"nostack") );
1345 mgr_dyVphi->SetMinimum( 2.*mgr_dyVphi->GetMinimum(
"nostack") );
1348 mgr_dyVphi->SetMaximum( 10.);
1349 mgr_dyVphi->SetMinimum( -10.);
1352 mgr_drVr->SetTitle(
"#Delta r vs. r");
1353 mgr_dzVr->SetTitle(
"#Delta z vs. r");
1354 mgr_rdphiVr->SetTitle(
"r#Delta #phi vs. r");
1355 mgr_dxVr->SetTitle(
"#Delta x vs. r");
1356 mgr_dyVr->SetTitle(
"#Delta y vs. r");
1357 mgr_drVz->SetTitle(
"#Delta r vs. z");
1358 mgr_dzVz->SetTitle(
"#Delta z vs. z");
1359 mgr_rdphiVz->SetTitle(
"r#Delta #phi vs. z");
1360 mgr_dxVz->SetTitle(
"#Delta x vs. z");
1361 mgr_dyVz->SetTitle(
"#Delta y vs. z");
1362 mgr_drVphi->SetTitle(
"#Delta r vs. #phi");
1363 mgr_dzVphi->SetTitle(
"#Delta z vs. #phi");
1364 mgr_rdphiVphi->SetTitle(
"r#Delta #phi vs. #phi");
1365 mgr_dxVphi->SetTitle(
"#Delta x vs. #phi");
1366 mgr_dyVphi->SetTitle(
"#Delta y vs. #phi");
1369 TCanvas*
c =
new TCanvas(
"c",
"c", 200, 10, 1200, 700);
1371 data->SetMarkerSize(0.5);
1372 data->SetMarkerStyle(6);
1375 if (!autolimits) mgr_drVr->Draw(
"nostack");
1376 if (autolimits) mgr_drVr->Draw(
"nostack");
1379 if (!autolimits) mgr_dzVr->Draw(
"nostack");
1380 if (autolimits) mgr_dzVr->Draw(
"nostack");
1383 if (!autolimits) mgr_rdphiVr->Draw(
"nostack");
1384 if (autolimits) mgr_rdphiVr->Draw(
"nostack");
1386 if (!autolimits) mgr_dxVr->Draw(
"nostack");
1387 if (autolimits) mgr_dxVr->Draw(
"nostack");
1389 if (!autolimits) mgr_dyVr->Draw(
"nostack");
1390 if (autolimits) mgr_dyVr->Draw(
"nostack");
1392 if (!autolimits) mgr_drVz->Draw(
"nostack");
1393 if (autolimits) mgr_drVz->Draw(
"nostack");
1395 if (!autolimits) mgr_dzVz->Draw(
"nostack");
1396 if (autolimits) mgr_dzVz->Draw(
"nostack");
1398 if (!autolimits) mgr_rdphiVz->Draw(
"nostack");
1399 if (autolimits) mgr_rdphiVz->Draw(
"nostack");
1401 if (!autolimits) mgr_dxVz->Draw(
"nostack");
1402 if (autolimits) mgr_dxVz->Draw(
"nostack");
1404 if (!autolimits) mgr_dyVz->Draw(
"nostack");
1405 if (autolimits) mgr_dyVz->Draw(
"nostack");
1407 if (!autolimits) mgr_drVphi->Draw(
"nostack");
1408 if (autolimits) mgr_drVphi->Draw(
"nostack");
1410 if (!autolimits) mgr_dzVphi->Draw(
"nostack");
1411 if (autolimits) mgr_dzVphi->Draw(
"nostack");
1413 if (!autolimits) mgr_rdphiVphi->Draw(
"nostack");
1414 if (autolimits) mgr_rdphiVphi->Draw(
"nostack");
1416 if (!autolimits) mgr_dxVphi->Draw(
"nostack");
1417 if (autolimits) mgr_dxVphi->Draw(
"nostack");
1419 if (!autolimits) mgr_dyVphi->Draw(
"nostack");
1420 if (autolimits) mgr_dyVphi->Draw(
"nostack");
1422 mgr_drVr->GetXaxis()->SetTitle(
"r (cm)");
1423 mgr_dzVr->GetXaxis()->SetTitle(
"r (cm)");
1424 mgr_rdphiVr->GetXaxis()->SetTitle(
"r (cm)");
1425 mgr_dxVr->GetXaxis()->SetTitle(
"r (cm)");
1426 mgr_dyVr->GetXaxis()->SetTitle(
"r (cm)");
1427 mgr_drVz->GetXaxis()->SetTitle(
"z (cm)");
1428 mgr_dzVz->GetXaxis()->SetTitle(
"z (cm)");
1429 mgr_rdphiVz->GetXaxis()->SetTitle(
"z (cm)");
1430 mgr_dxVz->GetXaxis()->SetTitle(
"z (cm)");
1431 mgr_dyVz->GetXaxis()->SetTitle(
"z (cm)");
1432 mgr_drVphi->GetXaxis()->SetTitle(
"#phi");
1433 mgr_dzVphi->GetXaxis()->SetTitle(
"#phi");
1434 mgr_rdphiVphi->GetXaxis()->SetTitle(
"#phi");
1435 mgr_dxVphi->GetXaxis()->SetTitle(
"#phi");
1436 mgr_dyVphi->GetXaxis()->SetTitle(
"#phi");
1438 mgr_drVr->GetYaxis()->SetTitle(
"#Delta r (#mum)");
1439 mgr_dzVr->GetYaxis()->SetTitle(
"#Delta z (#mum)");
1440 mgr_rdphiVr->GetYaxis()->SetTitle(
"r#Delta #phi (#mum)");
1441 mgr_dxVr->GetYaxis()->SetTitle(
"#Delta x (#mum)");
1442 mgr_dyVr->GetYaxis()->SetTitle(
"#Delta y (#mum)");
1443 mgr_drVz->GetYaxis()->SetTitle(
"#Delta r (#mum)");
1444 mgr_dzVz->GetYaxis()->SetTitle(
"#Delta z (#mum)");
1445 mgr_rdphiVz->GetYaxis()->SetTitle(
"r#Delta #phi (#mum)");
1446 mgr_dxVz->GetYaxis()->SetTitle(
"#Delta x (#mum)");
1447 mgr_dyVz->GetYaxis()->SetTitle(
"#Delta y (#mum)");
1448 mgr_drVphi->GetYaxis()->SetTitle(
"#Delta r (#mum)");
1449 mgr_dzVphi->GetYaxis()->SetTitle(
"#Delta z (#mum)");
1450 mgr_rdphiVphi->GetYaxis()->SetTitle(
"r#Delta #phi (#mum)");
1451 mgr_dxVphi->GetYaxis()->SetTitle(
"#Delta x (#mum)");
1452 mgr_dyVphi->GetYaxis()->SetTitle(
"#Delta y (#mum)");
1454 mgr_drVr->GetYaxis()->SetTitleOffset(1.15);
1455 mgr_dzVr->GetYaxis()->SetTitleOffset(1.15);
1456 mgr_rdphiVr->GetYaxis()->SetTitleOffset(1.15);
1457 mgr_dxVr->GetYaxis()->SetTitleOffset(1.15);
1458 mgr_dyVr->GetYaxis()->SetTitleOffset(1.15);
1459 mgr_drVz->GetYaxis()->SetTitleOffset(1.15);
1460 mgr_dzVz->GetYaxis()->SetTitleOffset(1.15);
1461 mgr_rdphiVz->GetYaxis()->SetTitleOffset(1.15);
1462 mgr_dxVz->GetYaxis()->SetTitleOffset(1.15);
1463 mgr_dyVz->GetYaxis()->SetTitleOffset(1.15);
1464 mgr_drVphi->GetYaxis()->SetTitleOffset(1.15);
1465 mgr_dzVphi->GetYaxis()->SetTitleOffset(1.15);
1466 mgr_rdphiVphi->GetYaxis()->SetTitleOffset(1.15);
1467 mgr_dxVphi->GetYaxis()->SetTitleOffset(1.15);
1468 mgr_dyVphi->GetYaxis()->SetTitleOffset(1.15);
1475 hprof_drVr->Write(); hprof_dzVr->Write(); hprof_rdphiVr->Write(); hprof_dxVr->Write(); hprof_dyVr->Write();
1476 hprof_drVz->Write(); hprof_dzVz->Write(); hprof_rdphiVz->Write(); hprof_dxVz->Write(); hprof_dyVz->Write();
1477 hprof_drVphi->Write(); hprof_dzVphi->Write(); hprof_rdphiVphi->Write(); hprof_dxVphi->Write(); hprof_dyVphi->Write();
1540 if (savePlot) c->Print((
_outputDir+
"plot3x5Prof_"+plotName).c_str());
1556 int nEntries =
data->GetEntries();
1557 for (
int i = 1;
i < nEntries; ++
i){
1582 int nBins = hist->GetNbinsX();
1583 for (
int i = 0;
i < nBins; ++
i){
1584 double binContent = hist->GetBinContent(
i);
1585 if (binContent > 0){
1588 if (flag == 0) max = hist->GetBinLowEdge(
i) + 2.*hist->GetBinWidth(
i) + 0.1*hist->GetBinLowEdge(
i);
1589 if (flag == 1) max = hist->GetBinLowEdge(
i) + hist->GetBinWidth(
i) + 0.1*hist->GetBinLowEdge(
i);
1592 for (
int i = (nBins-1);
i >= 0;
i--){
1593 double binContent = hist->GetBinContent(
i);
1594 if (binContent > 0) min = hist->GetBinLowEdge(
i) - 0.1*hist->GetBinLowEdge(
i);
void plotTwist(TCut Cut, char *dirName, bool savePlot=false, std::string plotName="plot3x5.eps", bool autolimits=false, int ColorCode=1)
void getHistMaxMin(TH1 *hist, double &max, double &min, int flag)
comparisonPlots(std::string filename, std::string outputDir, std::string outputFilename="OUTPUT_comparison.root")
void plot3x5(TCut Cut, char *dirName, bool savePlot=false, std::string plotName="plot3x5.eps", bool autolimits=false, int ColorCode=1)
void plot3x5Profile(TCut Cut, char *dirName, int nBins, bool savePlot=false, std::string plotName="plot3x5Profile.eps", bool autolimits=false, int ColorCode=1)
void plot3x3Rot(TCut Cut, char *dirName, bool savePlot=false, std::string plotName="plot3x5.eps", bool autolimits=false, int ColorCode=1)