FairRoot/PandaRoot
macro/detectors/mvd/TimeOrderedSim/run_reco_sttcombi.C
Go to the documentation of this file.
1 {
2  // ========================================================================
3  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
4  Int_t iVerbose = 0;
5 
6  // Input file
7 
8  TString MCFile = "Mvd_Sim.root";
9 
10  // Number of events to process
11  Int_t nEvents = 0;
12 
13  // ---- Load libraries -------------------------------------------------
14  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
15  rootlogon();
16 
17  PndFileNameCreator creator(MCFile.Data());
21 
22  std::cout << "MCFile : " << MCFile.Data()<< std::endl;
23  std::cout << "DigiFile: " << DigiFile.Data()<< std::endl;
24  std::cout << "RecoFile: " << outFile.Data()<< std::endl;
25  std::cout << "ParFile: " << parFile.Data()<< std::endl;
26 
27  TString sysFile = gSystem->Getenv("VMCWORKDIR");
28  // ------------------------------------------------------------------------
29  // In general, the following parts need not be touched
30  // ========================================================================
31 
32  // ----- Timer --------------------------------------------------------
33  TStopwatch timer;
34  timer.Start();
35  // ------------------------------------------------------------------------
36 
37  // ----- Digitization run -------------------------------------------
38  FairRunAna *fRun= new FairRunAna();
39  fRun->SetInputFile(DigiFile);
40  fRun->AddFriend(MCFile);
41  fRun->SetOutputFile(outFile);
42  FairGeane *Geane = new FairGeane();
43  fRun->AddTask(Geane);
44  // ------------------------------------------------------------------------
45 
46  // ----- Parameter database --------------------------------------------
47  TString allDigiFile = sysFile+"/macro/params/all.par";
48 
49  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
50  FairParRootFileIo* parInput1 = new FairParRootFileIo();
51  parInput1->open(parFile.Data());
52 
53  FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
54  parIo1->open(allDigiFile.Data(),"in");
55 
56  rtdb->setFirstInput(parInput1);
57  rtdb->setSecondInput(parIo1);
58  // ------------------------------------------------------------------------
59 
61  mvdmccls->SetVerbose(iVerbose);
62  fRun->AddTask(mvdmccls);
63 
65  fRun->AddTask(emcMakeCluster);
66 
68  fRun->AddTask(emcMakeBump);
69 
71  fRun->AddTask(emcHdrFiller); // ECM header
72 
74  fRun->AddTask(mdtTrkProd);
75 
76  PndGemFindHits* gemFindHits = new PndGemFindHits("GEM Hit Finder", iVerbose);
77  fRun->AddTask(gemFindHits);
78 
79  // ----- Intialise and run --------------------------------------------
81  fRun->Init();
82  fRun->Run(0, nEvents);
83 
84  rtdb->saveOutput();
85  rtdb->print();
86 
87  // ------------------------------------------------------------------------
88 
89  // ----- Finish -------------------------------------------------------
90 
91  timer.Stop();
92  Double_t rtime = timer.RealTime();
93  Double_t ctime = timer.CpuTime();
94  cout << endl << endl;
95  cout << "Macro finished succesfully." << endl;
96  cout << "Output file is " << outFile << endl;
97  cout << "Parameter file is " << parFile << endl;
98  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
99  cout << endl;
100  // ------------------------------------------------------------------------
101 
102 
103 }
std::string GetParFileName(std::string addon="", bool cut=false)
std::string GetDigiFileName(std::string addon="", bool cut=false)
std::string GetRecoFileName(std::string addon="", bool cut=false)
TString sysFile
A simple class which adds the corresponding file extensions to a given base class.
Double_t
PndFileNameCreator creator(MCFile.Data())
static void Init(Int_t MapVersion)
Takes clusters and slits them up into bumps.
void SetVerbose(Int_t iVerbose)
Task to cluster PndEmcDigis.
Int_t iVerbose
Task to create Emc header.