39 f =
new TFile(HitFileName);
41 t = (TTree*)
f->Get(
"T");
43 arr =
new TClonesArray(
"PndMvdSiHit");
45 cout <<
"---------------------------------------" << endl;
46 cout <<
"Number of events: " <<
t->GetEntries() << endl;
47 cout <<
"---------------------------------------" << endl;
49 t->SetBranchAddress(
"events",&
tsEv);
50 cout <<
t->GetEntries() <<
" events in File" << endl;
57 cout<<
"** end of PndMvdConvertApv::PndMvdConvertApv(const TString& , const TString&) **"<<endl;
72 std::ifstream calibfile(CalibFileName);
75 cout<<
"Calibration file not found"<<endl;
79 while (!calibfile.eof())
83 if (calibfile.eof())
break;
87 calibfile.getline(str,256);
95 calibfile >> boxID >> channel >> value;
107 cout<<
"Calibration succesfully read"<<endl;
116 std::vector<PndSdsDigiStrip> result;
117 for(UInt_t hitnumber=0;hitnumber<hitlist.size();hitnumber++)
122 q=1.*hitlist[hitnumber].GetADC();
124 if (
fCalibPars[hitlist[hitnumber].GetModuleID()].size())
126 if (
fCalibPars[hitlist[hitnumber].GetModuleID()][hitlist[hitnumber].GetChannel()])
128 q=
fCalibPars[hitlist[hitnumber].GetModuleID()][hitlist[hitnumber].GetChannel()]*(hitlist[hitnumber].GetADC())*1000.;
173 hitlist[hitnumber].GetFeID(),
174 hitlist[hitnumber].GetChannel(),
176 hitlist[hitnumber].GetTimestamp()
178 DigiHit.SetTimeStampError(hitlist[hitnumber].GetTriggerID());
182 result.push_back(DigiHit);
186 hitlist[hitnumber].GetModuleID(),
187 hitlist[hitnumber].GetFeID(),
188 hitlist[hitnumber].GetChannel(),
190 hitlist[hitnumber].GetTimestamp()
192 DigiHit.SetTimeStampError(hitlist[hitnumber].GetTriggerID());
196 result.push_back(DigiHit);
215 std::vector<PndSdsDigiStrip> digiList;
227 UInt_t ClockReset = 0.;
228 ULong64_t ClockCounts = 0.;
242 for (Int_t kk = 0 ; kk <
arr->GetEntries() ; kk++)
252 moduleID = hit->
fBox;
259 PndMvdApvHit Hit(ev, moduleID, fe, ClockReset, ClockCounts, frame, ch, q, l);
281 std::vector<PndSdsDigiStrip> result;
284 std::vector<PndSdsDigiStrip> dummy=
ReadNext();
285 for(
unsigned int i=0;
i<dummy.size();++
i) result.push_back(dummy[
i]);
Int_t fTopModuleID
stored fake module top side
ULong64_t GetExtClockTimeStamp(UInt_t &resetCount)
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: <moduleID<FE<channel> > >
Class for digitised strip hits.
Bool_t fFake
knows if fake is allowed
long int fEvent
stored current eventID
std::vector< PndSdsDigiStrip > ReadAll()
Class to store data of Apv-Sensors.
std::vector< PndSdsDigiStrip > ReadNext()
long int fNofEvents
stored last eventID of the hitfile
static PndGeoHandling * Instance()
long int fLastEvent
last eventID
Int_t fBottomModuleID
stored fake module bottom side
std::vector< PndMvdApvHit > fhitlist
stored readed events
TClonesArray * GetSiHitList()
void LoadCalibration(TString CalibFileName)
bool fNoCalib
true if calib was succesfull loaded