1 |
|
/** |
2 |
|
* \file ToFLevel2.cpp |
3 |
|
* \author Gianfranca DeRosa, Wolfgang Menn |
4 |
|
*/ |
5 |
|
|
6 |
#include <TObject.h> |
#include <TObject.h> |
7 |
#include <ToFLevel2.h> |
#include <ToFLevel2.h> |
8 |
#include <iostream> |
#include <iostream> |
206 |
}; |
}; |
207 |
|
|
208 |
|
|
209 |
|
/** |
210 |
|
* Method to get the mean dEdx from a given ToF plane |
211 |
|
* @param notrack Track Number |
212 |
|
* @param plane Plane index (0,1,2,3,4,5). |
213 |
|
*/ |
214 |
Float_t ToFLevel2::GetdEdx(Int_t notrack, Int_t plane){ |
Float_t ToFLevel2::GetdEdx(Int_t notrack, Int_t plane){ |
215 |
|
|
216 |
Float_t dedx = 0.; |
Float_t dedx = 0.; |
240 |
}; |
}; |
241 |
|
|
242 |
|
|
243 |
|
/** |
244 |
|
* Method to fill the ADC_C (dEdx) and TDC matrix (4,12) |
245 |
|
* @param notrack Track Number |
246 |
|
* @param adc ADC_C matrix with dEdx values |
247 |
|
* @param tdc TDC matrix |
248 |
|
*/ |
249 |
void ToFLevel2::GetMatrix(Int_t notrack, Float_t adc[4][12], Float_t tdc[4][12]){ |
void ToFLevel2::GetMatrix(Int_t notrack, Float_t adc[4][12], Float_t tdc[4][12]){ |
250 |
// |
// |
251 |
for (Int_t aa=0; aa<4;aa++){ |
for (Int_t aa=0; aa<4;aa++){ |
286 |
}; |
}; |
287 |
|
|
288 |
|
|
289 |
|
/** |
290 |
|
* Method to get the plane index (0 - 5) for the PMT_ID as input |
291 |
|
* @param pmt_id PMT_ID (0 - 47) |
292 |
|
*/ |
293 |
Int_t ToFLevel2::GetPlaneIndex(Int_t pmt_id){ |
Int_t ToFLevel2::GetPlaneIndex(Int_t pmt_id){ |
294 |
TString pmtname = GetPMTName(pmt_id); |
TString pmtname = GetPMTName(pmt_id); |
295 |
pmtname.Resize(3); |
pmtname.Resize(3); |
302 |
return(-1); |
return(-1); |
303 |
}; |
}; |
304 |
|
|
305 |
|
/** |
306 |
|
* Method to get the PMT_ID if the index (4,12) is given |
307 |
|
* @param hh Channel |
308 |
|
* @param kk HalfBoard |
309 |
|
*/ |
310 |
Int_t ToFLevel2::GetPMTid(Int_t hh, Int_t kk){ |
Int_t ToFLevel2::GetPMTid(Int_t hh, Int_t kk){ |
311 |
// |
// |
312 |
short tof[4][24] = { |
short tof[4][24] = { |
335 |
return ind; |
return ind; |
336 |
}; |
}; |
337 |
|
|
338 |
|
/** |
339 |
|
* Method to get the PMT name (like "S11_1A") if the PMT_ID is given |
340 |
|
* @param ind PMT_ID (0 - 47) |
341 |
|
*/ |
342 |
TString ToFLevel2::GetPMTName(Int_t ind){ |
TString ToFLevel2::GetPMTName(Int_t ind){ |
343 |
|
|
344 |
TString pmtname = " "; |
TString pmtname = " "; |
359 |
return pmtname; |
return pmtname; |
360 |
}; |
}; |
361 |
|
|
362 |
|
/** |
363 |
|
* Method to get the PMT index if the PMT ID is given |
364 |
|
* @param ind PMT_ID (0 - 47) |
365 |
|
* @param hb HalfBoard |
366 |
|
* @param ch Channel |
367 |
|
*/ |
368 |
void ToFLevel2::GetPMTIndex(Int_t ind, Int_t &hb, Int_t &ch){ |
void ToFLevel2::GetPMTIndex(Int_t ind, Int_t &hb, Int_t &ch){ |
369 |
// |
// |
370 |
short tof[4][24] = { |
short tof[4][24] = { |