9 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE 11 #ifndef PNDCAPERFORMANCE_H 12 #define PNDCAPERFORMANCE_H 31 class PndCATopoReconstructor;
46 class PndCAPerformance {
48 typedef PndCAPerformanceBase::PndCAHitLabel PndCAHitLabel;
51 virtual ~PndCAPerformance();
54 bool SetNewEvent(
PndCAGBTracker *
const Tracker,
string mcTracksFile,
string mcPointsFile);
55 void InitSubPerformances();
58 static PndCAPerformance &Instance();
61 void ExecPerformance();
65 const PndCAHitLabel &HitLabel(
int i)
const {
return fHitLabels[
i]; }
68 void SetTracker(
PndCAGBTracker *
const tracker) { fTracker = tracker; };
69 void SetTopoReconstructor(PndCATopoReconstructor *
const tr) { fTopoReconstructor = tr; };
70 void SetMCTracks(vector<PndCAMCTrack> &mcTracks);
71 void SetMCPoints(vector<PndCALocalMCPoint> &mcPoints);
72 void SetHitLabels(vector<PndCAHitLabel> &hitLabels);
74 vector<PndCAHitLabel> *GetHitLabels() {
return &fHitLabels; }
75 vector<PndCAMCTrack> *GetMCTracks() {
return &fMCTracks; }
76 vector<PndCALocalMCPoint> *GetMCPoints() {
return &fLocalMCPoints; }
78 PndCAPerformanceBase *GetSubPerformance(
string name);
80 const double *PV()
const {
return fPV; }
82 bool CreateHistos(
string name);
85 void SetOutputFile(TFile *oF) { fOutputFile = oF; }
87 void SaveDataInFiles(
string prefix)
const;
88 bool ReadDataFromFiles(
string prefix);
97 void ReadMCEvent(FILE *in);
98 void ReadLocalMCPoints(FILE *in);
100 void WriteMCEvent(FILE *out)
const;
103 struct TSubPerformance {
104 PndCAPerformanceBase *perf;
109 TSubPerformance(PndCAPerformanceBase *perf_,
string name_,
bool IsGlobalPerf_ = 1)
113 IsGlobalPerf = IsGlobalPerf_;
114 perf->SetHistoCreated(0);
118 PndCAPerformanceBase &
operator*() {
return *perf; }
119 PndCAPerformanceBase *operator->() {
return perf; }
121 vector<TSubPerformance> subPerformances;
125 const PndCATopoReconstructor *fTopoReconstructor;
127 vector<PndCAHitLabel> fHitLabels;
128 vector<PndCAMCTrack> fMCTracks;
129 vector<PndCALocalMCPoint> fLocalMCPoints;
136 TDirectory *fHistoDir;
139 void WriteDir2Current(TObject *obj);
141 PndCAPerformance(
const PndCAPerformance &);
142 PndCAPerformance &operator=(
const PndCAPerformance &);
146 #endif // DO_TPCCATRACKER_EFF_PERFORMANCE
friend F32vec4 operator*(const F32vec4 &a, const F32vec4 &b)