fGainA1Limits(0,1E30),
fGainA2Limits(-1E-30,1E30),
fGainThresLimits(0,4095),
-fHVSt12Limits(0,5000),
-fHVSt345Limits(0,5000),
fPedMeanLimits(0,4095),
fPedSigmaLimits(0,4095),
fManuOccupancyLimits(0,1.0),
fBuspatchOccupancyLimits(0,1.0),
fDEOccupancyLimits(0,1.0),
fStatus(new AliMUON2DMap(true)),
-fHV(new TExMap),
+fHV(0x0),
fPedestals(calibData.Pedestals()),
fGains(calibData.Gains()),
fTrackerData(0x0)
/// create a tracker data from the occupancy map
fTrackerData = new AliMUONTrackerData("OCC","OCC",*(calibData.OccupancyMap()));
}
+ if ( calibData.HV() )
+ {
+ /// Only create the fHV internal store if there are some HV values available
+ fHV = new TExMap;
+ }
+ SetHVLimit(-1,0.0);
}
//_____________________________________________________________________________
{
/// return a human readable version of the integer status
+ if ( status == 0 )
+ {
+ return "Brave New World";
+ }
+
Int_t pedStatus;
Int_t gainStatus;
Int_t hvStatus;
AliCodeTimerAuto("",0)
+ if (!fHV) return kFALSE;
+
Bool_t error = kFALSE;
hvChannelTooLow = kFALSE;
hvChannelTooHigh = kFALSE;
hvChannelON = kTRUE;
+ Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
+
AliMpDCSNamer hvNamer("TRACKER");
TString hvChannel(hvNamer.DCSChannelName(detElemId,sector));
}
else
{
- // find out min and max value, and makes a cut
+ // find out min value, and makes a cut
Float_t hvMin(1E9);
- Float_t hvMax(0);
TIter next(values);
AliDCSValue* val;
{
Float_t hv = val->GetFloat();
hvMin = TMath::Min(hv,hvMin);
- hvMax = TMath::Max(hv,hvMax);
}
- float lowThreshold = fHVSt12Limits.X();
- float highThreshold = fHVSt12Limits.Y();
+ float lowThreshold = HVLimit(chamberId);
if ( hvMin < lowThreshold ) hvChannelTooLow = kTRUE;
- if ( hvMax > highThreshold ) hvChannelTooHigh = kTRUE;
- if ( hvMin < 1 ) hvChannelON = kFALSE;
+ if ( hvMin < hvNamer.TrackerHVOFF() ) hvChannelON = kFALSE;
}
}
AliCodeTimerAuto("",0)
+ if (!fHV) return kFALSE;
+
Bool_t error = kFALSE;
hvChannelTooLow = kFALSE;
hvChannelTooHigh = kFALSE;
AliMpDCSNamer hvNamer("TRACKER");
+ Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
+
TString hvChannel(hvNamer.DCSChannelName(detElemId));
TMap* hvMap = fkCalibrationData.HV();
}
else
{
- // find out min and max value, and makes a cut
+ // find out min value, and makes a cut
Float_t hvMin(1E9);
- Float_t hvMax(0);
TIter next(values);
AliDCSValue* val;
{
Float_t hv = val->GetFloat();
hvMin = TMath::Min(hv,hvMin);
- hvMax = TMath::Max(hv,hvMax);
}
- float lowThreshold = fHVSt345Limits.X();
- float highThreshold = fHVSt345Limits.Y();
+ float lowThreshold = HVLimit(chamberId);
if ( hvMin < lowThreshold ) hvChannelTooLow = kTRUE;
- else if ( hvMax > highThreshold ) hvChannelTooHigh = kTRUE;
- if ( hvMin < 1 ) hvChannelON = kFALSE;
+ if ( hvMin < hvNamer.TrackerHVOFF() ) hvChannelON = kFALSE;
}
}
AliCodeTimerAuto("",0)
- if ( !fkCalibrationData.HV() ) return kMissing;
+ if ( !fHV ) return kMissing;
Long_t lint = fHV->GetValue(AliMpManuUID::BuildUniqueID(detElemId,manuId));
}
}
+//_____________________________________________________________________________
+Double_t
+AliMUONPadStatusMaker::HVLimit(Int_t chamberId) const
+{
+ /// Get HV limit for a given chamber
+ if ( chamberId >=0 && chamberId < 10 )
+ {
+ return fHVLimit[chamberId];
+ }
+ return 0.0;
+}
+
+//_____________________________________________________________________________
+void
+AliMUONPadStatusMaker::SetHVLimit(Int_t chamberId, Double_t hv)
+{
+ /// Set hv limit for a given chamber (or all if chamberId==-1)
+
+ if ( chamberId == -1 )
+ {
+ for ( Int_t i = 0; i < 10; ++i )
+ {
+ fHVLimit[i] = hv;
+ }
+ }
+ else if ( chamberId >= 0 && chamberId < 10 )
+ {
+ fHVLimit[chamberId]=hv;
+ }
+ else
+ {
+ AliError(Form("chamberId=%d is invalid",chamberId));
+ }
+}
+
//_____________________________________________________________________________
void
AliMUONPadStatusMaker::SetLimits(const AliMUONRecoParam& recoParams)
{
/// Set the limits from the recoparam
- SetHVSt12Limits(recoParams.HVSt12LowLimit(),recoParams.HVSt12HighLimit());
- SetHVSt345Limits(recoParams.HVSt345LowLimit(),recoParams.HVSt345HighLimit());
+ for ( int i = 0; i < 10; ++i )
+ {
+ SetHVLimit(i,recoParams.HVLimit(i));
+ }
SetPedMeanLimits(recoParams.PedMeanLowLimit(),recoParams.PedMeanHighLimit());
SetPedSigmaLimits(recoParams.PedSigmaLowLimit(),recoParams.PedSigmaHighLimit());
Int_t status = PadStatus(detElemId,manuId,i);
- if ( ( status & mask) || (!mask && status) )
+ if ( mask && ( status & mask) ) // note that if mask == 0, all pads are good...
{
++nBadPads;
log.Log(AsString(status));
}
}
+ if (!nPads)
+ {
+ AliError("Got no pad from the iterator ?! That's not normal. Please check !");
+ return;
+ }
+
TString msg;
Int_t ntimes;
cout << Form("According to mask %x (human readable form below) %6d pads are bad (over a total of %6d, i.e. %7.2f %%)",
- mask,nBadPads,nPads,nPads ? nBadPads*100.0/nPads : 0.0) << endl;
+ mask,nBadPads,nPads,nBadPads*100.0/nPads) << endl;
cout << AliMUONPadStatusMaker::AsCondition(mask) << endl;
cout << "--------" << endl;