15 FairRunAna *
fRun=
new FairRunAna();
16 fRun->SetInputFile(MCFile);
17 fRun->SetOutputFile(outFile);
22 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
23 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
24 parInput1->open(parFile.Data());
26 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
27 parIo1->open(allDigiFile.Data(),
"in");
29 rtdb->setFirstInput(parInput1);
30 rtdb->setSecondInput(parIo1);
35 fRun->AddTask(gemDigitize);
38 fRun->AddTask(gemFindHits);
44 fRun->AddTask(finderTask);
55 FairGeane *
Geane =
new FairGeane();
64 fRun->AddTask(recoKalman);
70 fRun->AddTask(trackFinderQA);
79 cout <<
"=====================================================================" << endl;
80 cout <<
"Trying to read histograms..." << flush;
82 TH1F* fhMCPrimVsP = (TH1F*)gDirectory->Get(
"GemTrackFinderQA/hMCPrimVsP");
83 TH1F* fhRecoPrimVsP = (TH1F*)gDirectory->Get(
"GemTrackFinderQA/hRecoPrimVsP");
84 TH1F* fhRecoPrimP = (TH1F*)gDirectory->Get(
"GemTrackFinderQA/hRecoPrimP");
85 TH1F* fhNofHitsPT = (TH1F*)gDirectory->Get(
"GemTrackFinderQA/hNofHitsPerTrack");
94 if ( fhMCPrimVsP && fhRecoPrimVsP && fhRecoPrimP ) {
95 cout <<
" DONE" << endl;
96 Int_t fNofMCPrim = fhMCPrimVsP ->Integral();
97 Int_t fNofRecoPrim = fhRecoPrimVsP->Integral();
98 Int_t fNofRecoTracks = fhNofHitsPT ->Integral();
100 if ( fNofMCPrim ) effPrim = 100.*(
Double_t)fNofRecoPrim/((
Double_t)fNofMCPrim);
101 cout <<
" Simulated / Reconstructed:" << endl;
102 cout <<
" quantity : " << fNofMCPrim <<
" / " << fNofRecoPrim <<
" >>>> " << effPrim <<
"%" << endl;
103 Double_t mcMomenta = fhRecoPrimVsP->GetMean();
104 Double_t recoMomenta = fhRecoPrimP ->GetMean();
106 if ( recoMomenta != 0. ) momQuality = mcMomenta/recoMomenta;
107 cout <<
" quality : " << mcMomenta <<
" / " << recoMomenta <<
" >>>> " << momQuality <<
"" << endl;
109 Double_t recoMomRMS = fhRecoPrimP ->GetRMS();
111 if ( mcMomenta != 0. ) momResolution = recoMomRMS/mcMomenta*100.;
112 cout <<
" resolution: >>>> " << momResolution <<
"%" << endl;
114 if ( effPrim > minEfficiency &&
115 momQuality > minQuality &&
116 momQuality < maxQuality &&
117 momResolution < maxResolution )
121 if ( !fTest && fNofRecoTracks > fNofMCPrim*minEfficiency/100. ) {
122 cout <<
"=====================================================================" << endl;
123 cout <<
"Reconstructed tracks do not match MC tracks, but there are enough of them" << endl;
128 cout <<
" FAILED" << endl;
129 cout <<
"=====================================================================" << endl;
134 cout <<
" Test passed" << endl;
135 cout <<
" All ok " << endl;
137 cout <<
" Test Failed" << endl;
138 cout <<
" Not Ok " << endl;
PndGemFindHits * gemFindHits
void SetPrimary(const Int_t &primary)
OnHits track finding algorithm.
void UseFinder(PndGemTrackFinder *finder)
void SetTrackOutBranchName(const TString &name)
void SetVerbose(const Int_t &verbose)
void SetVerbose(const Int_t &verbose)
FairParRootFileIo * parInput1
PndGemDigitize * gemDigitize
FairParAsciiFileIo * parIo1
void SetTrackInBranchName(const TString &name)
PndRecoKalmanTask * recoKalman
track finding quality assesment task
Task class for track finding in the Gem.
void SetUseHitOrDigi(TString useHitOrDigi="hit")