StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StFgtPool
StFgtClusterTools
macros
saveClusterSizes.C
1
2
void
saveClusterSizes(Char_t* signalFile=
"signalShapes.root"
)
3
{
4
//clusterSizePInDisk_6_quad_3-
5
TFile f(signalFile);
6
Char_t buffer[100];
7
Char_t quadName[10];
8
Char_t layerName[10];
9
Int_t counter=0;
10
sprintf(buffer,
"ClusterSizes"
);
11
TCanvas c(buffer,buffer,10,10,4000,3000);
12
c.Divide(6,5);
13
for
(
int
iD=1;iD<7;iD++)
14
{
15
for
(
int
iQ=0;iQ<4;iQ++)
16
{
17
if
(iD>1 && iQ >1)
18
continue
;
19
if
(iQ==0)
20
sprintf(quadName,
"A"
);
21
if
(iQ==1)
22
sprintf(quadName,
"B"
);
23
if
(iQ==2)
24
sprintf(quadName,
"C"
);
25
if
(iQ==3)
26
sprintf(quadName,
"D"
);
27
for
(
int
iL=0;iL<2;iL++)
28
{
29
if
(iL==0)
30
sprintf(layerName,
"P"
);
31
else
32
sprintf(layerName,
"R"
);
33
counter++;
34
35
//clusterSizePInDisk_6_quad_3-
36
sprintf(buffer,
"clusterSize%sInDisk_%d_quad_%d"
,layerName,iD,iQ);
37
cout <<
"loading "
<< buffer <<
" counter: "
<< counter <<endl;
38
// TCanvas c2;
39
TH1D* h=(TH1D*)f.Get(buffer);
40
h->SetFillColor(kYellow);
41
sprintf(buffer,
"ClusterSize%s_disc%d_quad%s"
,layerName,iD,quadName);
42
c->cd(counter);
43
if
(h!=0)
44
{
45
h->SetTitle(buffer);
46
h->SetAxisRange(0.0,10);
47
h->SetName(buffer);
48
h->Draw();
49
}
50
51
}
52
}
53
}
54
sprintf(buffer,
"ClusterSizes.png"
);
55
c.SaveAs(buffer);
56
sprintf(buffer,
"ClusterSizes.C"
);
57
c.SaveAs(buffer);
58
}
Generated by
1.8.5