]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFdigit.cxx
Adapted to LegoTrain with all event types in wagons
[u/mrichter/AliRoot.git] / TOF / AliTOFdigit.cxx
index 62423629f89a4f01ca1cd90e092e0a12f9200e06..47a3b80f7ffc0104f8e504b48fa958f0ff9e182e 100644 (file)
@@ -37,6 +37,8 @@
 #include "AliTOFdigit.h"
 #include "AliTOFGeometry.h"
 
+using std::endl;
+using std::cout;
 ClassImp(AliTOFdigit)
 
 //______________________________________________________________________________
@@ -155,8 +157,7 @@ Int_t AliTOFdigit::GetTotPad() const
     break;
   }
   
-  Int_t pad = 2*fPadx + fPadz;
-  //Int_t pad = fPadx+AliTOFGeometry::NpadX()*fPadz;
+  Int_t pad = AliTOFGeometry::NpadZ()*fPadx + fPadz;
   Int_t strip  = fStrip + before;
   Int_t padTot = AliTOFGeometry::NpadXStrip()*strip + pad;
 
@@ -170,13 +171,13 @@ void AliTOFdigit::AddTrack(Int_t track)
 // Add a new and different track to the digit 
 //
   if (track==fTracks[0] || track==fTracks[1] || track==fTracks[2]) return;
-   if (fTracks[1]==0){
+   if (fTracks[1]==-1)
       fTracks[1] = track;
-   }else if (fTracks[2]==0){
+   else if (fTracks[2]==-1)
       fTracks[2] = track;
-   }else{
-   // printf("AliTOFdigit::AddTrack ERROR: Too many Tracks (>3) \n");
-   }
+   else
+     printf("W-AliTOFdigit::AddTrack: Too many tracks (>3) that contribute to the same TOF digit\n");
+
 }
 
 // Overloading of Streaming, Sum and Comparison operators
@@ -221,7 +222,7 @@ if  (fSector==digit.fSector &&
 }
 
 //______________________________________________________________________________
-ostream& operator << (ostream& out, const AliTOFdigit &digit)
+ostream& operator << (ostream & out, const AliTOFdigit &digit)
 {
   //
   // Output streamer: output of the digit data