Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 }