FairRoot/PandaRoot
Functions
run_HypSimpleAna_Geo2.C File Reference

Go to the source code of this file.

Functions

int run_HypSimpleAna_Geo2 (TString base="Hit_hypIdReco", int nevts=0, TString outfile="")
 

Function Documentation

int run_HypSimpleAna_Geo2 ( TString  base = "Hit_hypIdReco",
int  nevts = 0,
TString  outfile = "" 
)

Definition at line 10 of file run_HypSimpleAna_Geo2.C.

References ctime, Double_t, PndHypSimpleAna::Finish(), gDebug, infile(), nEvents, outfile, parFile, printf(), rootlogon(), rtime, timer, and TString.

11 {
12  TStopwatch timer;
13  timer.Start();
14  gDebug=0;
15 
16  // Load basic libraries
17  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
18  rootlogon();
19 
20  gSystem->Load("librazhyp");
21  gSystem->Load("libHyp");
22 
23  gSystem->Load("libRho");
24 
25 
26  //if (outfile=="") outfile=infile+"_ana.root";
27 
28  //analysis
29 
30 
31  //aida second step 0.5 T
32  TString simfile = "../Alicia/Bup_hypFSG41TXm.root";//Bup_hypFSG41TXXb_Geo2.root";
33  Int_t nEvents = 0;//50000;
34  TString parFile="../Alicia/Bup_hypFS1TG4Xmparams.root";//Bup_hypFS1TG4XXb_Geo2params.root";
35  TString recofile = "../Alicia/hypIdealrecoXm_Geo2.root";
36  TString infile = "../Alicia/MicroSimpleG4Bup1TXm_Geo2.root";//MicroSimpleG4Bup1TXXbP8_Geo2.root";
37  if (outfile=="") outfile="AnaFSimpleBup1TXm_Bg.root";//AnaFSimpleP8Bup1TXXb.root";
38 
39 
40 
41 
42 
43 
44 
45  FairRunAna *fRunA= new FairRunAna();
46 
47 
48  fRunA->SetInputFile(simfile.Data());
49  fRunA->AddFriend(infile);
50  fRunA->AddFriend(recofile);
51  // fRunA->AddFile(simfile2.Data());
52  // fRunA->AddFriend(infile);
53  // fRunA->AddFriend(recofile);
54 
55 
56  fRunA->SetOutputFile(outfile.Data());
57 
58  //append the analysis task
59  //PndMicroWriter *tcandTask=new PndMicroWriter();
60  //fRunAA->AddTask(tcandTask);
61 
62  PndHypSimpleAna *anaTask=new PndHypSimpleAna();
63  fRunA->AddTask(anaTask);
64 
65  fRunA->Init();
66  //if (nevts==0) nevts=10;
67  fRunA->Run(0,nevts);
68  anaTask->Finish(base.Data());
69 
70 
71  timer.Stop();
72  Double_t rtime = timer.RealTime();
73  Double_t ctime = timer.CpuTime();
74  printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
75  return 0;
76 }
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
void Finish(TString cat)
Double_t
TString parFile
Definition: hit_dirc.C:14
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
gDebug
Definition: sim_emc_apd.C:6
Double_t ctime
Definition: hit_dirc.C:114
Double_t rtime
Definition: hit_dirc.C:113
TFile infile("dedx_out.root","READ")
TString outfile