StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
res2.C
1 void res2(TString baseName="R_dzVsTanL_3")
2 {
3  TCanvas * c = new TCanvas();
4  TString name;
5  TString name1;
6  TString name2;
7  TString nameGif;
8  for (int layer=0;layer<6;++layer)
9  {
10  int nSector;
11  switch (layer)
12  {
13  case 0: nSector = 4; break;
14  case 1: nSector = 4; break;
15  case 2: nSector = 6; break;
16  case 3: nSector = 6; break;
17  case 4: nSector = 8; break;
18  case 5: nSector = 8; break;
19  }
20  for (int sector=0;sector<nSector;++sector)
21  {
22  name = baseName+"_L"+layer+"_S"+sector;
23  name1 = name + "_1";
24  name2 = name + "_2";
25  nameGif = name+".gif";
26  TH2D * h2 = (TH2D *) gDirectory->Get(name);
27  h2->FitSlicesY(0,40,60,10);
28  h2->Draw("ZCOL");
29  TH1D * mean = (TH1D*) gDirectory->Get(name1);
30  TH1D * rms = (TH1D*) gDirectory->Get(name2);
31  h2->Draw("ZCOL");
32  mean->SetLineColor(4);
33  mean->SetMarkerColor(4);
34  mean->SetLineWidth(3);
35  mean->Draw("SAME");
36  //rms->SetLineColor(4);
37  //rms->SetMarkerColor(4);
38  //rms->SetLineWidth(3);
39  //rms->Draw("SAME");
40  c->Print(nameGif);
41  }
42  }
43 }
44 
45  /*
46  R_dzVsTanL_3_L0_S0.FitSlicesY(0,40,60,10);
47  R_dzVsTanL_3_L0_S0.Draw("ZCOL");
48  R_dzVsTanL_3_L0_S0_1.SetLineColor(4);
49  R_dzVsTanL_3_L0_S0_1.SetLineWidth(2);
50  R_dzVsTanL_3_L0_S0_1.SetMarkerColor(4);
51  R_dzVsTanL_3_L0_S0_1.Draw("SAME");
52 
53  TH1D *h2_1 = (TH1D*)gDirectory->Get("h2_1");
54 
55  */
56