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