PandaRoot
PndMvdConvertApv.h
Go to the documentation of this file.
1 // --------------------------------------------------------
2 // ---- PndMvdConvertApv header file ---
3 // ---- Created 06.01.09 by Lars Ackermann ---
4 // ---- on the basic of the ana tool of dts ---
5 // --------------------------------------------------------
6 
11 #ifndef PNDMVDCONVERTAPV_H
12 #define PNDMVDCONVERTAPV_H
13 
14 #include "TFile.h"
15 #include "TTree.h"
16 #include "TClonesArray.h"
17 #include "TString.h"
18 #include "TObject.h"
19 #include <iostream>
20 #include <vector>
21 #include <fstream>
22 #include <map>
23 #include "PndMvdApvHit.h"
24 #include "PndGeoHandling.h"
25 
26 // class PndMvdApv;
27 #include "PndSdsDigiStrip.h"
28 
29 #include "PndMvdTsEvent.h"
30 
40  public:
43  : fCalibPars(), fNofEvents(0), fEvent(-1), fLastEvent(0), fNoCalib(kFALSE), fHitFileName(""), fDataFile(), fhitlist(), fTopModuleID(0), fBottomModuleID(0), fFake(kFALSE),
44  f(nullptr), t(nullptr), tsEv(nullptr), arr(nullptr), fGeoH(nullptr){};
45 
51  PndMvdConvertApv(const TString &CalibFileName, const TString &HitFileName);
52 
54  virtual ~PndMvdConvertApv() { fDataFile.close(); };
55 
56  PndMvdConvertApv(const PndMvdConvertApv &) = delete;
57 
58  PndMvdConvertApv &operator=(const PndMvdConvertApv &) = delete;
59 
65  long int GetNofEvents();
66 
73  std::vector<PndSdsDigiStrip> ReadAll();
74 
81  std::vector<PndSdsDigiStrip> ReadNext();
82 
88  Bool_t Init();
89 
97  void SetFakePair(Int_t TopModuleID, Int_t BottomModuleID);
98 
99  private:
118  // void LoadCalibration(TString CalibFileName, std::vector<Int_t> modules);
119  void LoadCalibration(TString CalibFileName);
127  std::vector<PndSdsDigiStrip> Calc(std::vector<PndMvdApvHit> hitlist);
128 
130  // std::vector<std::map<Int_t, std::vector<double> > > fCalibPars;
131  std::map<Int_t, std::map<Int_t, double>> fCalibPars;
132 
134  long int fNofEvents;
135 
137  long int fEvent;
138 
140  long int fLastEvent;
141 
143  bool fNoCalib;
144 
146  TString fHitFileName;
147 
149  std::ifstream fDataFile;
150 
152  std::vector<PndMvdApvHit> fhitlist;
153 
155  Int_t fTopModuleID;
156 
158  Int_t fBottomModuleID;
159 
161  Bool_t fFake;
162 
163  TFile *f;
164  TTree *t;
165  PndMvdTsEvent *tsEv;
166 
167  TClonesArray *arr;
168 
169  PndGeoHandling *fGeoH;
170 
171  ClassDef(PndMvdConvertApv, 1);
172 };
173 
174 #endif
void SetFakePair(Int_t TopModuleID, Int_t BottomModuleID)
virtual ~PndMvdConvertApv()
Convert meassured data into PndSdsDigiStrip.
std::vector< PndSdsDigiStrip > ReadAll()
Class to access the naming information of the MVD.
PndMvdConvertApv & operator=(const PndMvdConvertApv &)=delete
std::vector< PndSdsDigiStrip > ReadNext()
long int GetNofEvents()