FairRoot/PandaRoot
detectors/mvd/TimeOrderedSim/run_reco_sttcombi_timebased.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_timebased.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  fRun->RunWithTimeStamps();
43  FairGeane *Geane = new FairGeane();
44  fRun->AddTask(Geane);
45  // ------------------------------------------------------------------------
46 
47  // ----- Parameter database --------------------------------------------
48  TString allDigiFile = sysFile+"/macro/params/all.par";
49 
50  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
51  FairParRootFileIo* parInput1 = new FairParRootFileIo();
52  parInput1->open(parFile.Data());
53 
54  FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
55  parIo1->open(allDigiFile.Data(),"in");
56 
57  rtdb->setFirstInput(parInput1);
58  rtdb->setSecondInput(parIo1);
59  // ------------------------------------------------------------------------
60 
62  mvdmccls->SetVerbose(iVerbose);
63  fRun->AddTask(mvdmccls);
64 
66  fRun->AddTask(emcMakeCluster);
67 
69  fRun->AddTask(emcMakeBump);
70 
72  fRun->AddTask(emcHdrFiller); // ECM header
73 
75  fRun->AddTask(mdtTrkProd);
76 
77  PndGemFindHits* gemFindHits = new PndGemFindHits("GEM Hit Finder", iVerbose);
78  fRun->AddTask(gemFindHits);
79 
80  // ----- Intialise and run --------------------------------------------
82  fRun->Init();
83  fRun->Run(0, nEvents);
84 
85  rtdb->saveOutput();
86  rtdb->print();
87 
88  // ------------------------------------------------------------------------
89 
90  // ----- Finish -------------------------------------------------------
91 
92  timer.Stop();
93  Double_t rtime = timer.RealTime();
94  Double_t ctime = timer.CpuTime();
95  cout << endl << endl;
96  cout << "Macro finished succesfully." << endl;
97  cout << "Output file is " << outFile << endl;
98  cout << "Parameter file is " << parFile << endl;
99  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
100  cout << endl;
101  // ------------------------------------------------------------------------
102 
103 
104 }
std::string GetParFileName(std::string addon="", bool cut=false)
PndFileNameCreator creator(MCFile.Data())
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
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.