FairRoot/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 {
41  public :
44  fCalibPars(),
45  fNofEvents(0),
46  fEvent(-1),
47  fLastEvent(0),
48  fNoCalib(kFALSE),
49  fHitFileName(""),
50  fDataFile(),
51  fhitlist(),
52  fTopModuleID(0),
53  fBottomModuleID(0),
54  fFake(kFALSE),
55  f(NULL),
56  t(NULL),
57  tsEv(NULL),
58  arr(NULL),
59  fGeoH(NULL)
60  {};
61 
68 
71  { fDataFile.close(); };
72 
73  PndMvdConvertApv(const PndMvdConvertApv& ) = delete;
74 
75  PndMvdConvertApv& operator=(const PndMvdConvertApv& ) = delete;
76 
82  long int GetNofEvents();
83 
90  std::vector<PndSdsDigiStrip> ReadAll();
91 
98  std::vector<PndSdsDigiStrip> ReadNext();
99 
105  Bool_t Init();
106 
114  void SetFakePair(Int_t TopModuleID, Int_t BottomModuleID);
115 
116  private :
135  //void LoadCalibration(TString CalibFileName, std::vector<Int_t> modules);
144  std::vector<PndSdsDigiStrip> Calc(std::vector<PndMvdApvHit> hitlist);
145 
147 // std::vector<std::map<Int_t, std::vector<double> > > fCalibPars;
148  std::map<Int_t, std::map<Int_t, double> > fCalibPars;
149 
151  long int fNofEvents;
152 
154  long int fEvent;
155 
157  long int fLastEvent;
158 
160  bool fNoCalib;
161 
164 
166  std::ifstream fDataFile;
167 
169  std::vector<PndMvdApvHit> fhitlist;
170 
173 
176 
179 
180  TFile *f;
181  TTree *t;
183 
184  TClonesArray *arr;
185 
187 
188 
190 };
191 
192 #endif
193 
Int_t fTopModuleID
stored fake module top side
std::vector< PndSdsDigiStrip > Calc(std::vector< PndMvdApvHit > hitlist)
void SetFakePair(Int_t TopModuleID, Int_t BottomModuleID)
std::map< Int_t, std::map< Int_t, double > > fCalibPars
Calib Parameters: &lt;moduleID&lt;FE&lt;channel&gt; &gt; &gt;
virtual ~PndMvdConvertApv()
Bool_t fFake
knows if fake is allowed
long int fEvent
stored current eventID
Convert meassured data into PndSdsDigiStrip.
TString fHitFileName
name of hitfile
TString HitFileName
std::vector< PndSdsDigiStrip > ReadAll()
Class to access the naming information of the MVD.
PndMvdConvertApv & operator=(const PndMvdConvertApv &)=delete
std::vector< PndSdsDigiStrip > ReadNext()
long int fNofEvents
stored last eventID of the hitfile
PndMvdTsEvent * tsEv
long int fLastEvent
last eventID
std::ifstream fDataFile
fstream of hitfile
Int_t fBottomModuleID
stored fake module bottom side
std::vector< PndMvdApvHit > fhitlist
stored readed events
TClonesArray * arr
void LoadCalibration(TString CalibFileName)
bool fNoCalib
true if calib was succesfull loaded
PndGeoHandling * fGeoH
TString CalibFileName
ClassDef(PndMvdConvertApv, 1)
Gives Access to the Path info of a hit.