// 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 "CbmL1MC.h" // definition of CbmL1MCPoint and CbmL1MCTrack #include "CbmL1TrackShort.h" typedef CbmL1TrackShort CbmL1Track; // in Performance will be used short version of CbmL1Track in same way as full // #include "../Algo/L1AlgoInter.h" // #include "../Algo/L1Algo/L1Algo.h" #include #include #include using namespace std; class L1Algo; class CbmL1HitStore{ public: int ExtIndex; int iStation; double x, y; }; struct ProfileData{ // element of data for build profile double x,y; }; struct HistoData{ // element of data for build profile double x; }; class Performance { public: int iVerbose; // level of detailed of info int maxNEvent; // number of all analyse event int nEvent; // number of current analysing event char work_dir[100]; // path to input and output files 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 private: vector vMCPoints; // list of MonteCarlo(=simulated) point vector vMCTracks; // list of MonteCarlo(=simulated) track vector vRTracks; // reconstracted tracks vector vHitMCRef; // index the registred(effective(reference??)) MonteCarlo points(=hits) in vMCPoints public: vector vHitStore; // array of all hits. all hits must have corespondend point, which marked in vHitMCRef Performance() { p_eff_all_vs_mom.clear(); p_eff_prim_vs_mom.clear(); p_eff_sec_vs_mom.clear(); p_eff_d0_vs_mom.clear(); for( int i = 0; i < 5; i++ ) for ( int k = 0; k < 3; k++) hist[i][k].clear(); }; ~Performance() {}; /// 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, L1AlgoInter *algoint_); /// read event data from file, run performance. Before call it you must full the vRTracks void RunEv(); /// write histogram data to file void WriteHisto(); private: L1Algo *algo; /// read data for performance(vMCPoints, vMCTracks, vHitMCRef, vHitStore) of one event from file void ReadStAPPerfoData(); /// fill vRTracks from algo members void GetAlgoResults(); /// L1 Fit performance void ExecPerf(); }; #include "Performance.cxx" //cxx #endif //_Performance_h