- if ( in.IsNewId() ) {
- if (!first) {
- FitRaw(lowGainFlag, gLowGain, gHighGain, signalF, energy, time) ;
-
- if (time == 0. && energy == 0.) {
- amp = 0 ;
+ if ( in.IsNewRow() ) {//phi
+ if ( in.IsNewColumn() ) {//eta
+ id = geom->GetAbsCellIdFromCellIndexes(in.GetModule(), in.GetRow(), in.GetColumn()) ;
+ if (!first) {
+ FitRaw(lowGainFlag, gLowGain, gHighGain, signalF, energy, time) ;
+
+ if (time == 0. && energy == 0.) {
+ amp = 0 ;
+ }
+ else {
+ amp = static_cast<Int_t>( (energy - digitizer->GetECApedestal()) / digitizer->GetECAchannel() + 0.5 ) ;
+ }
+
+ if (amp > 0) {
+ new((*digits)[idigit]) AliEMCALDigit( -1, -1, id, amp, time) ;
+ idigit++ ;
+ }
+ Int_t index ;
+ for (index = 0; index < GetRawFormatTimeBins(); index++) {
+ gLowGain->SetPoint(index, index * GetRawFormatTimeMax() / GetRawFormatTimeBins(), 0) ;
+ gHighGain->SetPoint(index, index * GetRawFormatTimeMax() / GetRawFormatTimeBins(), 0) ;
+ }
+ } // not first
+ first = kFALSE ;
+ id = geom->GetAbsCellIdFromCellIndexes(in.GetModule(), in.GetRow(), in.GetColumn()) ;
+ if (in.GetModule() == GetRawFormatLowGainOffset() ) {
+ lowGainFlag = kTRUE ;