7 sprintf(hname,
"%s%sd",calo,part);
8 TH1F *
h1 =
new TH1F(hname, hname, 100, 0, 10);
9 for (
int i=0;
i<3;
i++)
12 sprintf(infile,
"/sphenix/user/jpinkenburg/ShowerSize/ntuple/%s_eta0_4GeV.root",part);
16 TFile *
f = TFile::Open(infile);
18 TNtuple *nt = (TNtuple *)f->Get(
"de");
20 sprintf(calid,
"ID==%s",
i);
21 nt->Project(hname,
"edep",calid);
52 sprintf(fname,
"%sShowerPercent.root",part);
53 TFile *
fout = TFile::Open(fname,
"UPDATE");
56 cout << h1->Integral() <<
" " << hname <<
" " endl;
61 void EdepSmall(
const char *calo=
"HOe",
const char *part =
"e")
63 int pz[9] = {1,2,4,8,12,16,32,40,50};
70 sprintf(fname,
"%spercent.root",part);
72 sprintf(area,
"%s",calo);
73 TFile *fin = TFile::Open(fname);
75 for (
int i=0;
i<9;
i++)
78 sprintf(hname,
"%s%s%dd",calo,part,pz[
i]);
79 TH1 *
h1 = (TH1F *) fin->Get(hname);
80 y[
i] = h1->GetMean(1);
81 yer[
i] = h1->GetRMS(1);
83 gr =
new TGraphErrors(9,x,y,xer,yer);
86 gr->SetMarkerStyle(20);
87 gr->SetMarkerColor(2);