// 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 "CbmL1StsHit.h" // typedef CbmL1TrackShort CbmL1Track; // in Performance will be used short version of CbmL1Track in same way as full #include "L1PerfEfficiencies.h" #include "L1AlgoInputMCData.h" // #include "../Algo/L1AlgoInter.h" // #include "../Algo/L1Algo/L1Algo.h" #include "CbmKFParticleFinder.h" #include #include #include using namespace std; class L1AlgoInter; class CbmL1MCTrack; class L1Algo; class CbmKFVertex; 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_, vector *kfpart, 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 SetPrimaryVertex(const CbmKFVertex& PV_); /// 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 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 friend class L1AlgoDraw; private: 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 vHitMCRef; // index the registred(effective(reference)) MonteCarlo points(=hits) in vMCPoints const CbmKFVertex* fPV; L1Algo *algo; vector *fKFParticles; void ExecPerf(); void TrackMatch(); void EfficienciesPerformance(); void GetMCParticles(); // create MC particles from MC tracks void FindReconstructableMCParticles(); void MatchParticles(); // Procedure for match Reconstructed and MC Particles. Should be called before Performances void PartEffPerformance(); // calculate efficiencies // void TrackFitPerformance(); // pulls & residuals. Can be called only after Performance() void HistoPerformance(); // fill some histograms and calculate efficiencies void PartHistoPerformance(); // histograms for particle finder ///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(); public: TL1PerfEfficiencies L1_NTRA; // average efficiencies int L1_NEVENTS; double L1_CATIME; }_fvecalignment; #endif //_Performance_h