FairRoot/PandaRoot
Functions
digiLut.C File Reference

Go to the source code of this file.

Functions

int digiLut (Int_t nEvents=0, TString inFile="simlut.root", TString outFile="digilut.root", TString parFile1="parlut.root")
 

Function Documentation

int digiLut ( Int_t  nEvents = 0,
TString  inFile = "simlut.root",
TString  outFile = "digilut.root",
TString  parFile1 = "parlut.root" 
)

Definition at line 1 of file digiLut.C.

References ctime, Double_t, drcdigi, fRun, hitfind, inFile, iVerbose, nEvents, outFile, parInput1, rtdb, rtime, PndDrcDigiTask::SetChargeSharing(), PndDrcDigiTask::SetTimeResolution(), and timer.

1  {
2  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
3  Int_t iVerbose = 3;
4 
5  // ----- Timer --------------------------------------------------------
6  TStopwatch timer;
7  timer.Start();
8 
9  // ----- Reconstruction run -------------------------------------------
10  FairRunAna *fRun= new FairRunAna();
11  fRun->SetInputFile(inFile);
12  fRun->SetOutputFile(outFile);
13  fRun->SetUseFairLinks(kTRUE);
14 
15  // ----- Parameter database --------------------------------------------
16  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
17  FairParRootFileIo* parInput1 = new FairParRootFileIo();
18  parInput1->open(parFile1.Data());
19  rtdb->setFirstInput(parInput1);
20 
21  // ----- DRC Digitization stage ----------------------------------------
23  drcdigi->SetChargeSharing(kFALSE);
24  drcdigi->SetTimeResolution(0);
25  fRun->AddTask(drcdigi);
26 
27  // ----- DRC hit producer --------------------------------------------
29  fRun->AddTask(hitfind);
30 
31  // ----- Initialize and run --------------------------------------------
32  fRun->Init();
33  fRun->Run(0,nEvents);
34 
35  // ----- Finish -------------------------------------------------------
36  timer.Stop();
37  Double_t rtime = timer.RealTime();
38  Double_t ctime = timer.CpuTime();
39  cout << endl << endl;
40  cout << "Macro finished succesfully." << endl;
41  cout << "Output file is " << outFile << endl;
42  cout << "Parameter file is " << parFile1 << endl;
43  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
44  cout << endl;
45  return 0;
46 }
void SetChargeSharing(Bool_t ct=0)
TString outFile
Definition: hit_dirc.C:17
FairRunAna * fRun
Definition: hit_dirc.C:58
TString inFile
Definition: hit_dirc.C:8
PndDrcHitFinder * hitfind
Definition: hit_dirc.C:97
Double_t
PndDrcDigiTask * drcdigi
Definition: hit_dirc.C:91
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
Double_t ctime
Definition: hit_dirc.C:114
void SetTimeResolution(Double_t var)
Int_t iVerbose
Double_t rtime
Definition: hit_dirc.C:113