+
+//____________________________________________________________________________
+Int_t AliPHOSDigit::GetPrimary(Int_t index) const
+{
+ // retrieves the primary particle number given its index in the list
+ Int_t rv = -1 ;
+ if ( index <= fNprimary && index > 0){
+ rv = fPrimary[index-1] ;
+ }
+
+ return rv ;
+
+}
+//____________________________________________________________________________
+void AliPHOSDigit::Print(const Option_t *) const
+{
+ // Print the digit together with list of primaries
+ printf("PHOS digit: Amp=%d/E=%.3f, Id=%d, Time=%.3e, TimeR=%.3e, NPrim=%d ",fAmp,fEnergy,fId,fTime,fTimeR,fNprimary);
+ for(Int_t index = 0; index <fNprimary; index ++ )
+ printf(" %d ",fPrimary[index]);
+ printf("\n") ;
+}
+//____________________________________________________________________________
+void AliPHOSDigit::ShiftPrimary(Int_t shift)
+{
+ //shifts primary number to BIG offset, to separate primary in different TreeK
+ for(Int_t index = 0; index <fNprimary; index ++ ){
+ fPrimary[index]+= shift ;
+ }
+}