// fStrip : strips number //
// fPadx : pad number along x //
// fPadz : pad number along z //
-// fTdc : TArrayF of TDC values //
-// fAdc : TArrayF of ADC values //
+// fTdc : TArrayI of TDC values //
+// fAdc : TArrayI of ADC values //
// //
// Getters, setters and member functions defined here //
// //
// -- Authors: F. Pierella, A. Seganti, D. Vicinanza //
//_________________________________________________________________________//
-#include "TArrayF.h"
#include "TArrayI.h"
#include "AliLog.h"
ClassImp(AliTOFSDigit)
////////////////////////////////////////////////////////////////////////
- AliTOFSDigit::AliTOFSDigit()
+AliTOFSDigit::AliTOFSDigit():
+ fSector(-1),
+ fPlate(-1),
+ fStrip(-1),
+ fPadx(-1),
+ fPadz(-1),
+ fNDigits(0),
+ fTdc(0x0),
+ fAdc(0x0),
+ fTracks(0x0)
{
//
// default ctor
//
- fNDigits = 0;
- fTdc = 0;
- fAdc = 0;
- fTracks = 0;
}
////////////////////////////////////////////////////////////////////////
-AliTOFSDigit::AliTOFSDigit(Int_t tracknum, Int_t *vol,Float_t *digit)
-:TObject()
+AliTOFSDigit::AliTOFSDigit(Int_t tracknum, Int_t *vol,Int_t *digit):
+ TObject(),
+ fSector(-1),
+ fPlate(-1),
+ fStrip(-1),
+ fPadx(-1),
+ fPadz(-1),
+ fNDigits(0),
+ fTdc(0x0),
+ fAdc(0x0),
+ fTracks(0x0)
{
//
// Constructor of digit object
fPadx = vol[3];
fPadz = vol[4];
fNDigits = 1;
- fTdc = new TArrayF(fNDigits);
+ fTdc = new TArrayI(fNDigits);
(*fTdc)[0] = digit[0];
- fAdc = new TArrayF(fNDigits);
+ fAdc = new TArrayI(fNDigits);
(*fAdc)[0] = digit[1];
fTracks = new TArrayI(kMAXDIGITS*fNDigits);
(*fTracks)[0] = tracknum;
}
////////////////////////////////////////////////////////////////////////
-AliTOFSDigit::AliTOFSDigit(const AliTOFSDigit & digit)
-:TObject()
+AliTOFSDigit::AliTOFSDigit(const AliTOFSDigit & digit):
+ TObject(),
+ fSector(-1),
+ fPlate(-1),
+ fStrip(-1),
+ fPadx(-1),
+ fPadz(-1),
+ fNDigits(0),
+ fTdc(0x0),
+ fAdc(0x0),
+ fTracks(0x0)
{
//
// copy ctor for AliTOFSDigit object
fPadx = digit.fPadx;
fPadz = digit.fPadz;
fNDigits = digit.fNDigits;
- fTdc = new TArrayF(*digit.fTdc);
- fAdc = new TArrayF(*digit.fAdc);
+ fTdc = new TArrayI(*digit.fTdc);
+ fAdc = new TArrayI(*digit.fAdc);
fTracks = new TArrayI(*digit.fTracks);
}
////////////////////////////////////////////////////////////////////////
AliTOFSDigit::AliTOFSDigit(Int_t sector, Int_t plate, Int_t strip, Int_t padx,
- Int_t padz, Float_t tdc, Float_t adc)
+ Int_t padz, Int_t tdc, Int_t adc):
+ fSector(sector),
+ fPlate(plate),
+ fStrip(strip),
+ fPadx(padx),
+ fPadz(padz),
+ fNDigits(1),
+ fTdc(0x0),
+ fAdc(0x0),
+ fTracks(0x0)
{
//
// Constructor for sdigit
//
- fSector = sector;
- fPlate = plate;
- fStrip = strip;
- fPadx = padx;
- fPadz = padz;
- fNDigits = 1;
- fTdc = new TArrayF(fNDigits);
+ fTdc = new TArrayI(fNDigits);
(*fTdc)[0] = tdc;
- fAdc = new TArrayF(fNDigits);
+ fAdc = new TArrayI(fNDigits);
(*fAdc)[0] = adc;
// no tracks were specified, set them to -1
fTracks = new TArrayI(kMAXDIGITS*fNDigits);
}
if (sameTime >= 0) {
- (*fAdc)[sameTime] += static_cast<Float_t>(adc);
+ (*fAdc)[sameTime] += adc;
// update track - find the first -1 value and replace it by the
// track number
for (Int_t iTrack=0; iTrack<kMAXDIGITS; iTrack++) {
}
if (sameTime >= 0) {
- (*fAdc)[sameTime] += static_cast<Float_t>(adc);
+ (*fAdc)[sameTime] += adc;
// update track - find the first -1 value and replace it by the
// track number
for (Int_t iTrack=0; iTrack<kMAXDIGITS; iTrack++) {
////////////////////////////////////////////////////////////////////////
-Int_t AliTOFSDigit::GetTotPad(AliTOFGeometry *tofGeom) const
+Int_t AliTOFSDigit::GetTotPad() const
{
//
// Get the "total" index of the pad inside a Sector
//before = 0;
break;
case 1:
- before = tofGeom->NStripC();
+ before = AliTOFGeometry::NStripC();
break;
case 2:
- before = AliTOFGeometry::NStripB() + tofGeom->NStripC();
+ before = AliTOFGeometry::NStripB() + AliTOFGeometry::NStripC();
break;
case 3:
- before = AliTOFGeometry::NStripA() + AliTOFGeometry::NStripB() + tofGeom->NStripC();
+ before = AliTOFGeometry::NStripA() + AliTOFGeometry::NStripB() + AliTOFGeometry::NStripC();
break;
case 4:
- before = AliTOFGeometry::NStripA() + 2*AliTOFGeometry::NStripB() + tofGeom->NStripC();
+ before = AliTOFGeometry::NStripA() + 2*AliTOFGeometry::NStripB() + AliTOFGeometry::NStripC();
break;
}