FairRoot/PandaRoot
writeMicro_Geo2_Bg.C
Go to the documentation of this file.
1 // *******
2 // Macro for running analysis in a Task
3 // Take a look to tutorials/anatask/PndAnalysis.cxx
4 // Add the line add_subdirectory(tutorials/anatask)
5 // to pandaroot/CMakeLists.txt
6 // and do a 'make install' in build directory first
7 // *******
8 
9 
10 int writeMicro_Geo2(TString base="Hit_hypIdReco",int nevts=0, TString outfile="")
11 {
12  TStopwatch timer;
13  timer.Start();
14  gDebug=0;
15 
16  // Load basic libraries
17  //gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
18  //basiclibs();
19 
20  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
21  rootlogon();
22  // Load this example libraries
23 
24  gSystem->Load("librazhyp");
25  gSystem->Load("libHyp");
26  //gSystem->Load("libSciT");
27  //gSystem->Load("libHypGe");
28 
29 
30 
31 
32  // XXb calculations 05.09.13 2K ev.
33 
34 // first step --> Xim + Xib (annihilation) production at 3 GeV/c (pbar)
35 
36  // TString infile="/d/pndint02/asanchez/FFeb09/HypIdFi1TAidGrecdos.root";
37  // if (outfile=="") outfile="/d/pndint02/asanchez/FFeb09/Hit_hypIdReco.fullG4Fi1TAidG.root";
38  // TString RecoFile = "/d/pndint02/asanchez/FFeb09/hypIdealFi1TAidGreco.root";
39 
40  // second step --> Hypernuclei formation
41 
42  TString infile="../Alicia/PiTrGeo1_recdos.root";//HypId1TXXbP8pmBup_Geo2recdos.root";
43  if (outfile=="") outfile="../Alicia/MicroSimpleG4Bup1TXm_Geo2.root";//MicroSimpleG4Bup1TXXbP8_Geo2.root";
44  TString RecoFile = "../Alicia/hypIdealrecoXm_Geo2.root";//hypIdealrecoXXb_Geo2.root";
45 
46 
47 
48 
49  //tof trigger second step 1 T
50  //second step
51  // TString infile="/d/pndint02/asanchez/FOct09/HitIdBup41TTgAidGrecdos.root";
52 // if (outfile=="") outfile="/d/pndint02/asanchez/FOct09/Hit_hypIdReco.fullBupG41TTgAG.root";
53 // TString RecoFile ="/d/pndint02/asanchez/FOct09/hypIdealBupG41TTgAxxbGreco.root";
54 // TString parFile="../BupG41TTgAxxbGparams.root";
55 
56  //first step tof trigger 1T
57  /* TString infile="/d/pndint02/asanchez/FOct09/HitIdhyp41TTg80AidGrecdos3.root"; //80 ps
58  if (outfile=="") outfile="/d/pndint02/asanchez/FOct09/Hit_hypIdReco.fullhypG41TTgAG80.root";
59  TString RecoFile ="../../tof/trig_kaonmulAidaG1T80LHcps.root";
60  TString parFile="../SimG41TAxxbGparams.root";
61 
62  */
63 
64 
65 
66  FairRunAna *fRunA= new FairRunAna();
67  fRunA->SetInputFile(infile);
68  fRunA->AddFriend(RecoFile);
69 
70  fRunA->SetOutputFile(outfile.Data());
71 
72  // ----- Parameter database --------------------------------------------
73 
74  /* FairRuntimeDb* rtdb = fRunA->GetRuntimeDb();
75  FairParRootFileIo* parInput1 = new FairParRootFileIo();
76  parInput1->open(parFile.Data());
77 
78  Bool_t kParameterMerged=kTRUE;
79  rtdb->setFirstInput(parInput1);*/
80 
81  //append the analysis task
82 
83 
84  PndHypMicroWriter *tcandTask=new PndHypMicroWriter();
85  fRunA->AddTask(tcandTask);
86 
87 
88  //PndHypMicroIdealWriter *tcandTask=new PndHypMicroIdealWriter();
89  //fRunA->AddTask(tcandTask);
90 
91 
92 
93  fRunA->Init();
94  //if (nevts==0) nevts=10;
95  fRunA->Run(0,nevts);
96 
97 
98  timer.Stop();
99  Double_t rtime = timer.RealTime();
100  Double_t ctime = timer.CpuTime();
101  printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
102  return 0;
103 }
104 
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
TString RecoFile
int writeMicro_Geo2(TString base="Hit_hypIdReco", int nevts=0, TString outfile="")
Double_t
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