]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFSDigit.cxx
Corrected a bug in kalman tracking (final parameters and covariances
[u/mrichter/AliRoot.git] / TOF / AliTOFSDigit.cxx
index 5ed787dffee9acad4c2b9807f0f1e92994457fd4..b848272d50544accfe82c176b0b780a57d3f368b 100644 (file)
 //  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"
@@ -59,7 +58,7 @@ AliTOFSDigit::AliTOFSDigit():
 }
 
 ////////////////////////////////////////////////////////////////////////
-AliTOFSDigit::AliTOFSDigit(Int_t tracknum, Int_t *vol,Float_t *digit):
+AliTOFSDigit::AliTOFSDigit(Int_t tracknum, Int_t *vol,Int_t *digit):
   TObject(),
   fSector(-1),
   fPlate(-1),
@@ -81,9 +80,9 @@ AliTOFSDigit::AliTOFSDigit(Int_t tracknum, Int_t *vol,Float_t *digit):
   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;
@@ -114,8 +113,8 @@ AliTOFSDigit::AliTOFSDigit(const AliTOFSDigit & digit):
   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);
 }
 
@@ -140,7 +139,7 @@ AliTOFSDigit& AliTOFSDigit::operator=(const AliTOFSDigit & digit)
 
 ////////////////////////////////////////////////////////////////////////
 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),
@@ -154,9 +153,9 @@ AliTOFSDigit::AliTOFSDigit(Int_t sector, Int_t plate, Int_t strip, Int_t padx,
   //
   // Constructor for sdigit
   //
-  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);
@@ -197,7 +196,7 @@ void AliTOFSDigit::Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track)
   }
   
   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++) {
@@ -256,7 +255,7 @@ void AliTOFSDigit::Update(AliTOFSDigit* sdig)
     }
     
     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++) {
@@ -299,7 +298,7 @@ AliTOFSDigit::~AliTOFSDigit()
 
 ////////////////////////////////////////////////////////////////////////
 
-Int_t AliTOFSDigit::GetTotPad(AliTOFGeometry *tofGeom) const
+Int_t AliTOFSDigit::GetTotPad() const
 {
   //
   // Get the "total" index of the pad inside a Sector
@@ -315,16 +314,16 @@ Int_t AliTOFSDigit::GetTotPad(AliTOFGeometry *tofGeom) const
     //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;
   }