4 int pz[9] = {1,2,4,8,12,16,32,40,50};
12 double intnum[1000] = {0};
13 double varnum[1000] = {0};
20 sprintf(infile,
"/sphenix/user/jpinkenburg/ShowerSize/ntuple/anti_neutron_eta0_50GeV.root");
22 sprintf(hname,
"anti_neutron50");
23 TH1F *
h1 =
new TH1F(hname, hname, 8000, 0, 2);
24 TFile *
f = TFile::Open(infile);
26 TNtuple *nt = (TNtuple *)f->Get(
"de");
27 nt->Project(hname,
"dtotal",
"(ID<=2)*edep",
"",100000);
58 intnum[
i] = h1->Integral(1,var);
59 varnum[
i] = .005*(i+1);
72 sprintf(fname,
"anti_neutron_ThinBins.root");
73 TFile *
fout = TFile::Open(fname,
"UPDATE");
77 TH2 *
h2 =
new TH2F(
"meanvals",
"anti_neutron",1,0,4,1,0,50);
78 gStyle->SetOptStat(0);
79 TMarker *
mean =
new TMarker();
80 mean->SetMarkerStyle(20);
81 mean->SetMarkerColor(3);
82 TCanvas *
c2 =
new TCanvas(
"c2",
"stupid graph",1);
84 TGraph *
gr =
new TGraph((i+1),varnum,intnum);
132 void EdepSmall(
const char *calo=
"HOe",
const char *part =
"e")
134 int pz[9] = {1,2,4,8,12,16,32,40,50};
141 sprintf(fname,
"%sShowerEdepPercent.root",part);
143 sprintf(area,
"%s",calo);
144 TFile *fin = TFile::Open(fname);
146 for (
int i=0;
i<9;
i++)
149 sprintf(hname,
"%s%s%dd",calo,part,pz[
i]);
150 TH1 *
h1 = (TH1F *) fin->Get(hname);
151 y[
i] = h1->GetMean(1);
152 yer[
i] = h1->GetRMS(1);
154 gr =
new TGraphErrors(9,x,y,xer,yer);
157 gr->SetMarkerStyle(20);
158 gr->SetMarkerColor(2);