// iklm /// class for performance results of reconstracting tracks by CATrackFinder // use L1Algo - so performance must be call only after L1Algo::Init() #ifndef _Performance_h #define _Performance_h #include "CbmL1Def.h" // #include "CbmL1MC.h" // definition of CbmL1MCPoint and CbmL1MCTrack #include "CbmL1MCPoint.h" // #include "CbmL1MCTrack.h" #include "CbmL1Track.h" #include "L1Event.h" #include "L1MCEvent.h" #include "L1EventMatch.h" #include "CbmL1StsHit.h" // typedef CbmL1TrackShort CbmL1Track; // in Performance will be used short version of CbmL1Track in same way as full #include "L1PerfEfficiencies.h" #include "L1EventEfficiencies.h" #include "L1AlgoInputMCData.h" // #include "../Algo/L1AlgoInter.h" // #include "../Algo/L1Algo/L1Algo.h" #include "KFParticle.h" #include #include #include //ROOT includes #ifdef ROOT_IS_USED #include "TString.h" class TDirectory; class TFile; class TH1F; #endif using namespace std; class L1AlgoInter; class CbmL1MCTrack; class L1Algo; class KFPVertex; struct ProfileData{ // element of data for build profile double x,y; }; struct HistoData{ // element of data for build histogram double x; }; class Performance { public: Performance(); ~Performance(); static Performance *Instance(); static Performance *fInstance; /// init members /// @param algoint_ - interface for L1Algo, which contain algo /// @param _work_dir - first part of path in which read and write files (data_perfo.txt, data_algo.txt, geo_algo.txt) void Init(const char* _work_dir, L1Algo *algoint_, int iVerbose_ = 1); /// read event data from file, run performance. Before call it you must full the vRTracks void RunEv(); void PrintEff(); void SetData( const vector< CbmL1HitStore > & HitStore_, const vector< CbmL1StsHit > & StsHits_, const vector< CbmL1MCPoint > & MCPoints_, const vector< CbmL1MCTrack > & MCTracks_, const vector< int > & HitMCRef_ ); void SetRecoTracks( const vector< CbmL1Track > & RTracks_ ); void SetRecoEvents( const vector< L1Event > *Event_ ); void SetPrimaryVertex(const KFPVertex& PV_); #ifdef ROOT_IS_USED void FillHist(); #endif /// redefine new\delete for use alignment memmory void *operator new(size_t size, void *ptr) { return ::operator new(size, ptr);} void *operator new[](size_t size, void *ptr) { return ::operator new(size, ptr);} void *operator new(size_t size) { return _mm_malloc(size, 16); } void *operator new[](size_t size) { return _mm_malloc(size, 16); } void operator delete(void *ptr, size_t) { _mm_free(ptr); } void operator delete[](void *ptr, size_t) { _mm_free(ptr); } int iVerbose; // level of detailization of info int nEvent; // number of current analysing event char work_dir[100]; // path to input and output files vector& GetRTracks() { return vRTracks; } vector p_eff_all_vs_mom, p_eff_prim_vs_mom, p_eff_sec_vs_mom, p_eff_d0_vs_mom; // data for profiles vector hist[5][3]; // data for histo vector vHitStore; // array of all hits. all hits must have corespondend point, which marked in vHitMCRef TL1PerfEfficiencies L1_NTRA; // average efficiencies L1EventEfficiencies fEventEfficiency; // average efficiencies int L1_NEVENTS; double L1_CATIME; friend class L1AlgoDraw; void TrackMatch(); private: void ExecPerf(); void EfficienciesPerformance(); ///write mass distribution to file void WriteMasses(); /// write histogram data to file void WriteTrackParamInFile(); ///write primary vertex distribution to file void WritePV(); //write Prob for ghost & reco tracks void WriteProb(); KFTopoPerformance fTopoPerformance; vector vStsHits; // hits with hit-mcpoint match information vector vMCPoints; // list of MonteCarlo(=simulated) point vector vMCTracks; // list of MonteCarlo(=simulated) track vector vRTracks; // reconstracted tracks vector fMCEvents; vector fEventMatch; const vector *vEvent; vector vHitMCRef; // index the registred(effective(reference)) MonteCarlo points(=hits) in vMCPoints const KFPVertex* fPV; L1Algo *algo; vector *fKFParticles; #ifdef ROOT_IS_USED void TimeHist(); void WriteHistosCurFile( TObject *obj ); void EventEfficiency(); struct TH1FParameters { TString name, title; int nbins; float xMin, xMax; }; TFile* fPerfFile; TDirectory* fHistoDir; static const int fNTimeHistos = 22; TH1F* fTimeHisto[fNTimeHistos]; static const int fNGhostHistos = 9; TH1F* fGhostHisto[fNGhostHistos]; #endif }_fvecalignment; #endif //_Performance_h