-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_model.C
36 lines (32 loc) · 1.04 KB
/
make_model.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//================================================
void make_model()
{
TBW();
}
//================================================
void TBW()
{
const char *fname[4] = {"060","020","2040","4060"};
const char *hname[4] = {"0060","0020","2040","4060"};
TFile *fin[4];
TH1F *hTBW[4];
TH1F *hTBW2[4];
for(int i=0; i<4; i++)
{
fin[i] = TFile::Open(Form("Rootfiles/Published/Zebo/TBW/dimuon/star_mumu_ee/TBW_Jpsi_STAR_mumu_ee_%s.root",fname[i]),"read");
hTBW[i] = (TH1F*)fin[i]->Get("hFit5");
hTBW[i]->SetName(Form("TBW_JpsiInvYield_AuAu200_cent%s",cent_Title[i]));
hTBW2[i] = (TH1F*)hTBW[i]->Clone(Form("TBW_JpsiYield_AuAu200_cent%s",cent_Title[i]));
for(int bin=1; bin<=hTBW2[i]->GetNbinsX(); bin++)
{
double pt = hTBW2[i]->GetBinCenter(bin);
hTBW2[i]->SetBinContent(bin,hTBW2[i]->GetBinContent(bin)*pt);
}
}
TFile *fout = TFile::Open("Rootfiles/models.root","update");
for(int i=0; i<4; i++)
{
hTBW[i]->Write("",TObject::kOverwrite);
hTBW2[i]->Write("",TObject::kOverwrite);
}
}