Go to the source code of this file.
Int_t gem_findTracksQA |
( |
Int_t |
nStations, |
|
|
Double_t |
momentum = 15. , |
|
|
Int_t |
nEvents = 1000 , |
|
|
int |
verboseLevel = 0 |
|
) |
| |
Definition at line 4 of file gem_findTracksQA.C.
References allDigiFile, ctime, Double_t, fRun, hitFile, MCFile, nEvents, outFile, parFile, parInput1, parIo1, rtdb, rtime, PndGemTrackFinderQA::SetVerbose(), 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";
22 TString trkfitFile = baseName +
"_fitTracks.root";
25 std::cout <<
"Output File: " << outFile.Data()<< std::endl;
33 FairRunAna *
fRun=
new FairRunAna();
34 fRun->SetInputFile(trkfitFile);
35 fRun->AddFriend(MCFile);
36 fRun->AddFriend(digFile);
37 fRun->AddFriend(hitFile);
38 fRun->AddFriend(trkFile);
39 fRun->SetOutputFile(outFile);
40 fRun->SetUseFairLinks(kTRUE);
45 if ( nStations == 4 ) allDigiFile = sysFile+
"/macro/params/gem_4Stations.digi.par";
47 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
48 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
49 parInput1->open(parFile.Data());
51 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
52 parIo1->open(allDigiFile.Data(),
"in");
54 rtdb->setFirstInput(parInput1);
55 rtdb->setSecondInput(parIo1);
61 fRun->AddTask(trackFinderQA);
75 cout <<
"Macro finished succesfully." << endl;
76 cout <<
"Output file is " << outFile << endl;
77 cout <<
"Parameter file is " << parFile << endl;
78 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
void SetVerbose(const Int_t &verbose)
FairParRootFileIo * parInput1
FairParAsciiFileIo * parIo1
track finding quality assesment task