- Int_t occupancy;
- // value of (buspatch, manu) occupancy
- char bpmanuname[256];
- AliMUONErrorCounter* manuCounter;
- sprintf(bpmanuname,"bp%dmanu%d",busPatchId,manuId);
- manuCounter = (AliMUONErrorCounter*)fManuBuspatchTable->FindObject(bpmanuname);
- occupancy = manuCounter->Events()/64/eventCounter;
- if(occupancy>1)
- {
- cout << " !!! BIG WARNING: ManuId = " << manuId << " !!! in BP = " << busPatchId << " occupancy (>1) = " << occupancy << endl;
- (*fFilcout) << " !!! BIG WARNING: ManuId = " << manuId << " !!! in BP = " << busPatchId << " occupancy (>1) = " << occupancy <<endl;
+ if (pedMean >= 0) // connected channels
+ {
+ ped->SetValueAsDouble(channelId, 0, pedMean/(Double_t)eventCounter);
+ pedMean = ped->ValueAsDouble(channelId, 0);
+ pedSigma = ped->ValueAsDouble(channelId, 1);
+ ped->SetValueAsDouble(channelId, 1, TMath::Sqrt(TMath::Abs(pedSigma/(Double_t)eventCounter - pedMean*pedMean)));
+
+ if(eventCounter < fNEvthreshold )
+ { nADCmax++; ped->SetValueAsDouble(channelId, 0, ADCMax());
+ ped->SetValueAsDouble(channelId, 1, ADCMax());}
+ if( ped->ValueAsDouble(channelId, 1) < pedSigmalimit )
+ { nADC4090++; ped->SetValueAsDouble(channelId, 0, ADCMax()-5);
+ ped->SetValueAsDouble(channelId, 1, ADCMax()-5);}
+ if(manuId == 0 || occupancy>1)
+ { nADCmax++; ped->SetValueAsDouble(channelId, 0, ADCMax());
+ ped->SetValueAsDouble(channelId, 1, ADCMax());
+ if(occupancy>1 && channelId==0)ped->SetValueAsDouble(channelId, 0, ADCMax()+occupancy);}
+ }
+ else
+ { nADCmax++; ped->SetValueAsDouble(channelId, 0, ADCMax());
+ ped->SetValueAsDouble(channelId, 1, ADCMax());}
+ }