21 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE 23 #ifndef PNDCAPERFORMANCE_H 24 #define PNDCAPERFORMANCE_H 43 class PndCATopoReconstructor;
58 class PndCAPerformance {
60 typedef PndCAPerformanceBase::PndCAHitLabel PndCAHitLabel;
63 virtual ~PndCAPerformance();
66 bool SetNewEvent(
PndCAGBTracker *
const Tracker,
string mcTracksFile,
string mcPointsFile);
67 void InitSubPerformances();
70 static PndCAPerformance &Instance();
73 void ExecPerformance();
77 const PndCAHitLabel &HitLabel(
int i)
const {
return fHitLabels[
i]; }
80 void SetTracker(
PndCAGBTracker *
const tracker) { fTracker = tracker; };
81 void SetTopoReconstructor(PndCATopoReconstructor *
const tr) { fTopoReconstructor = tr; };
82 void SetMCTracks(vector<PndCAMCTrack> &mcTracks);
83 void SetMCPoints(vector<PndCALocalMCPoint> &mcPoints);
84 void SetHitLabels(vector<PndCAHitLabel> &hitLabels);
86 vector<PndCAHitLabel> *GetHitLabels() {
return &fHitLabels; }
87 vector<PndCAMCTrack> *GetMCTracks() {
return &fMCTracks; }
88 vector<PndCALocalMCPoint> *GetMCPoints() {
return &fLocalMCPoints; }
90 PndCAPerformanceBase *GetSubPerformance(
string name);
92 const double *PV()
const {
return fPV; }
94 bool CreateHistos(
string name);
97 void SetOutputFile(TFile *oF) { fOutputFile = oF; }
99 void SaveDataInFiles(
string prefix)
const;
100 bool ReadDataFromFiles(
string prefix);
109 void ReadMCEvent(FILE *in);
110 void ReadLocalMCPoints(FILE *in);
112 void WriteMCEvent(FILE *out)
const;
115 struct TSubPerformance {
116 PndCAPerformanceBase *perf;
121 TSubPerformance(PndCAPerformanceBase *perf_,
string name_,
bool IsGlobalPerf_ = 1)
125 IsGlobalPerf = IsGlobalPerf_;
126 perf->SetHistoCreated(0);
130 PndCAPerformanceBase &
operator*() {
return *perf; }
131 PndCAPerformanceBase *operator->() {
return perf; }
133 vector<TSubPerformance> subPerformances;
137 const PndCATopoReconstructor *fTopoReconstructor;
139 vector<PndCAHitLabel> fHitLabels;
140 vector<PndCAMCTrack> fMCTracks;
141 vector<PndCALocalMCPoint> fLocalMCPoints;
148 TDirectory *fHistoDir;
151 void WriteDir2Current(TObject *obj);
153 PndCAPerformance(
const PndCAPerformance &);
154 PndCAPerformance &operator=(
const PndCAPerformance &);
158 #endif // DO_TPCCATRACKER_EFF_PERFORMANCE
friend F32vec4 operator*(const F32vec4 &a, const F32vec4 &b)