+
+
+
+//______________________________________________________________________________
+Int_t AliITSHandleDaSSD::CheckOffChips() const
+{
+// Check if the chip, module are off
+ AliITSChannelDaSSD *strip;
+ Int_t offthreshold;
+ Int_t strnd, chipnd, modnd, stroff, chipoff, modoff;
+ offthreshold = TMath::Nint(fZsMinimum/fZsFactor);
+ modnd = modoff = 0;
+ for (Int_t mi = 0; mi < fNumberOfModules; mi++) {
+ if (!fModules[mi]) { modnd++; continue; }
+ if (fModules[mi]->GetModuleId() < 0) continue;
+ if (LadderIsOff(fModules[mi]->GetDdlId(), fModules[mi]->GetAD(), fModules[mi]->GetADC()) ) continue;
+ chipoff = chipnd = 0;
+ for (Int_t chipind = 0; chipind < AliITSModuleDaSSD::GetChipsPerModuleConst(); chipind++) {
+ strnd = stroff = 0;
+ Int_t stripind = chipind * AliITSModuleDaSSD::GetStripsPerChip();
+ for (Int_t strind = stripind; strind < (stripind + AliITSModuleDaSSD::GetStripsPerChip()); strind++) {
+ if (!(strip = fModules[mi]->GetStrip(strind))) { strnd++; continue; }
+ if (strip->GetNoiseCM() < offthreshold ) stroff++;
+ }
+ if (strnd == AliITSModuleDaSSD::GetStripsPerChip()) chipnd++;
+ else if (stroff == AliITSModuleDaSSD::GetStripsPerChip()) chipoff++;
+ else if ((stroff + strnd) == AliITSModuleDaSSD::GetStripsPerChip()) chipoff++;
+ }
+ if ((!chipoff) && (!chipnd)) continue;
+ if (chipnd == AliITSModuleDaSSD::GetChipsPerModuleConst()) {
+ AliInfo(Form("Module: (ddl/ad/adc) %i/%i/%i seems to be off and it is not on the ladders which are off!",
+ fModules[mi]->GetDdlId(), fModules[mi]->GetAD(), fModules[mi]->GetADC()));
+ modnd++;
+ }
+ if (chipoff == AliITSModuleDaSSD::GetChipsPerModuleConst()) {
+ AliInfo(Form("Module (ddl/ad/adc): %i/%i/%i seems to be off and it is not on the ladders which are off!",
+ fModules[mi]->GetDdlId(), fModules[mi]->GetAD(), fModules[mi]->GetADC()));
+ modoff++;
+ }
+ else if ((chipoff + chipnd) == AliITSModuleDaSSD::GetChipsPerModuleConst()) {
+ AliInfo(Form("Module: (ddl/ad/adc): %i/%i/%i seems to be off and it is not on the ladders which are off!",
+ fModules[mi]->GetDdlId(), fModules[mi]->GetAD(), fModules[mi]->GetADC()));
+ modoff++;
+ }
+ else if (chipoff) {
+ AliInfo(Form("Module: (ddl/ad/adc): %i/%i/%i has %i chips which are off!",
+ fModules[mi]->GetDdlId(), fModules[mi]->GetAD(), fModules[mi]->GetADC(), chipoff));
+ modoff++;
+ }
+ }
+ return (modoff + modnd);
+}