AddMC.C
Go to the documentation of this file.
1 {
2 fin = filp[ipart] + filt[itarg] + ".root";
3 
4 TFile* fff = new TFile(fin);
5 TH1F* hhh;
6 
7 cout << "Opened file " << fin << " ixs= " << ixs << endl;
8 if(ixs==0) hhh = (TH1F*)fff->Get("h1");
9 if(ixs==1) hhh = (TH1F*)fff->Get("h2");
10 if(ixs==2) hhh = (TH1F*)fff->Get("h3");
11 if(ixs==3) hhh = (TH1F*)fff->Get("h4");
12 if(ixs==4) hhh = (TH1F*)fff->Get("h5");
13 if(ixs==5) hhh = (TH1F*)fff->Get("h6");
14 if(ixs==6) hhh = (TH1F*)fff->Get("h7");
15 
16 hhh->SetLineColor(col[itarg]);
17 hhh->SetLineWidth(2);
18 leg[ixs]->AddEntry(hhh, targ[itarg], "l");
19 hhh->Draw("C HIST SAME");
20 c1->Update();
21 }
TString filp[npart]
Definition: Style.C:31
TString fin
Definition: Style.C:24
Int_t itarg
Definition: Style.C:11
Int_t ipart
Definition: Style.C:10
TString targ[ntarg]
Definition: Style.C:27
TFile * fff
Definition: AddMC.C:4
Int_t ixs
Definition: Style.C:12
Int_t col[ntarg]
Definition: Style.C:29
OStream cout
Definition: OStream.cxx:6
c1
Definition: demo5.py:24
TH1F * hhh
Definition: AddMC.C:5
TString filt[ntarg]
Definition: Style.C:28