StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Run.C
1 #include "TSystem.h"
2 #include "TString.h"
3 
4 void Run(const char *jobid="test")
5 {
6  Int_t nev=99999999;
7 
8  TString input0("/star/u/russcher/gamma/analysis/data/dAu/dAuCombined_0.root");
9  TString input1("/star/u/russcher/gamma/analysis/data/dAu/dAuCombined_1.root");
10  TString input2("/star/u/russcher/gamma/analysis/data/dAu/UPCCombined.root");
11  TString input3("/star/u/russcher/gamma/analysis/data/dAu/dAuUPCCombined.root");
12 
13  TString outdir("/star/u/russcher/gamma/analysis/output/dAu/");
14  TString psout("pi0_dAu.ps");
15  TString rootout("pi0_dAu.root");
16  psout.Prepend(jobid);
17  rootout.Prepend(jobid);
18  TString command("mkdir ");
19  command.Append(outdir.Data());
20  command.Append(jobid);
21  gSystem->Exec(command.Data());
22  cout<<endl<<"storing results in: "<<command.Data()<<endl<<endl;
23  outdir.Append(jobid);
24  outdir.Append("/");
25 
26  psout.Prepend(outdir.Data());
27  rootout.Prepend(outdir.Data());
28 
29  gSystem->Load("$HOME/MyEvent/MyEvent.so");
30  gSystem->Load("$HOME/gamma/analysis/lib/AnaCuts.so");
31  gSystem->Load("$HOME/gamma/analysis/lib/EventMixer.so");
32  gSystem->Load("$HOME/gamma/analysis/lib/Pi0Analysis.so");
33 
34  Pi0Analysis *pi0=new Pi0Analysis(psout.Data(),"/dev/null","dAu");
35  pi0->setMC(kFALSE);
36  pi0->init(rootout.Data());
37 
38  pi0->make(nev,input0.Data());
39  pi0->make(nev,input1.Data());
40  pi0->printPrescales();
41  //pi0->setNoMINBIAS(kTRUE);
42  pi0->make(nev,input2.Data());
43  pi0->printPrescales();
44  pi0->make(nev,input3.Data());
45  pi0->printPrescales();
46 
47  pi0->getYield();
48  pi0->finish();
49 }