Line 1027 FPTime[ind] = ( sumFPTime / numFPTime );
is relaced by FPTime[ind] = ( sumPlaneTime[ind] / numPlaneTime[ind] );

and following code is added before loop over planes:
      Int_t numPlaneTime[fNPlanes];
      Double_t sumPlaneTime[fNPlanes],FPTime[fNPlanes];
      for ( Int_t dp = 0; dp <  fNPlanes; dp++ ){
	numPlaneTime[dp] = 0;
	sumPlaneTime[dp] = 0.;
	FPTime[dp] = 0.;
      }