]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSDigit.cxx
Bug correction
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigit.cxx
index a374834c68b88734c518e6e780ce53cdfb1b7069..c39203b062b873f034c2da256bcd738827ab8d6e 100644 (file)
@@ -47,6 +47,8 @@ ClassImp(AliPHOSDigit)
   fIndexInList = -1 ; 
   fNprimary    = 0 ;  
   fPrimary = 0;
+  fTime = 0. ; 
+  fTimeR = 0. ; 
 }
 
 //____________________________________________________________________________
@@ -56,6 +58,7 @@ AliPHOSDigit::AliPHOSDigit(Int_t primary, Int_t id, Int_t digEnergy, Float_t tim
 
   fAmp         = digEnergy ;
   fTime        = time ;
+  fTimeR       = fTime ;
   fId          = id ;
   fIndexInList = index ; 
   if( primary != -1){
@@ -84,6 +87,7 @@ AliPHOSDigit::AliPHOSDigit(const AliPHOSDigit & digit) : AliDigitNew(digit)
     fPrimary = 0 ;
   fAmp         = digit.fAmp ;
   fTime        = digit.fTime ;
+  fTimeR       = digit.fTimeR ;
   fId          = digit.fId;
   fIndexInList = digit.fIndexInList ; 
 }
@@ -132,9 +136,10 @@ Int_t AliPHOSDigit::GetPrimary(Int_t index) const
   
 }
 //____________________________________________________________________________
-void AliPHOSDigit::Print(Option_t *) const
+void AliPHOSDigit::Print() const
 {
-  printf("PHOS digit: Amp=%d, Id=%d, Time=%f, NPrim=%d ",fAmp,fId,fTime,fNprimary);
+  // Print the digit together with list of primaries
+  printf("PHOS digit: Amp=%d, Id=%d, Time=%e, TimeR=%e, NPrim=%d ",fAmp,fId,fTime,fTimeR,fNprimary);
   for(Int_t index = 0; index <fNprimary; index ++ )
     printf(" %d ",fPrimary[index]); 
   printf("\n") ;
@@ -185,6 +190,7 @@ AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const & digit)
    fAmp += digit.fAmp ;
    if(fTime > digit.fTime)
       fTime = digit.fTime ;
+   fTimeR = fTime ; 
    return *this ;
 }
 //____________________________________________________________________________