Go to the source code of this file.
Int_t gem_fitTracks |
( |
Int_t |
nStations, |
|
|
Double_t |
momentum = 15. , |
|
|
Int_t |
nEvents = 1000 , |
|
|
int |
verboseLevel = 0 |
|
) |
| |
Definition at line 4 of file gem_fitTracks.C.
References allDigiFile, ctime, Double_t, fRun, Geane, hitFile, MCFile, nEvents, outFile, parFile, parInput1, parIo1, recoKalman, rtdb, rtime, PndRecoKalmanTask::SetTrackInBranchName(), PndRecoKalmanTask::SetTrackOutBranchName(), sysFile, timer, and TString.
6 if ( nStations != 3 && nStations != 4 ) {
7 cout <<
"WRONG number of stations, only 3 or 4 allowed." << endl;
15 baseName.Form(
"Gem_%dStations_%gGeV_n%d",nStations,momentum,
nEvents);
19 TString digFile = baseName +
"_digi.root";
21 TString trkFile = baseName +
"_tracks.root";
24 std::cout <<
"Output File: " << outFile.Data()<< std::endl;
32 FairRunAna *
fRun=
new FairRunAna();
33 fRun->SetInputFile(trkFile);
34 fRun->AddFriend(MCFile);
35 fRun->AddFriend(digFile);
36 fRun->AddFriend(hitFile);
37 fRun->SetOutputFile(outFile);
38 fRun->SetUseFairLinks(kTRUE);
43 if ( nStations == 4 ) allDigiFile = sysFile+
"/macro/params/gem_4Stations.digi.par";
45 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
46 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
47 parInput1->open(parFile.Data());
49 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
50 parIo1->open(allDigiFile.Data(),
"in");
52 rtdb->setFirstInput(parInput1);
53 rtdb->setSecondInput(parIo1);
58 FairGeane *
Geane =
new FairGeane();
67 fRun->AddTask(recoKalman);
81 cout <<
"Macro finished succesfully." << endl;
82 cout <<
"Output file is " << outFile << endl;
83 cout <<
"Parameter file is " << parFile << endl;
84 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
void SetTrackOutBranchName(const TString &name)
FairParRootFileIo * parInput1
FairParAsciiFileIo * parIo1
void SetTrackInBranchName(const TString &name)
PndRecoKalmanTask * recoKalman