From: laphecet Date: Tue, 24 Nov 2009 10:38:49 +0000 (+0000) Subject: Allow reco of trigger alone or tracker w/o HV if we do not request to cut on HV values X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=00977a6468bfca3d4224aedba4338cc94949d179;p=u%2Fmrichter%2FAliRoot.git Allow reco of trigger alone or tracker w/o HV if we do not request to cut on HV values --- diff --git a/MUON/AliMUONPadStatusMaker.cxx b/MUON/AliMUONPadStatusMaker.cxx index 6b8c3abaa75..d3ee831d485 100644 --- a/MUON/AliMUONPadStatusMaker.cxx +++ b/MUON/AliMUONPadStatusMaker.cxx @@ -81,7 +81,7 @@ 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) @@ -92,7 +92,11 @@ 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; + } } //_____________________________________________________________________________ @@ -212,6 +216,8 @@ AliMUONPadStatusMaker::HVSt12Status(Int_t detElemId, Int_t sector, AliCodeTimerAuto("",0) + if (!fHV) return kFALSE; + Bool_t error = kFALSE; hvChannelTooLow = kFALSE; hvChannelTooHigh = kFALSE; @@ -322,6 +328,8 @@ AliMUONPadStatusMaker::HVSt345Status(Int_t detElemId, Int_t pcbIndex, AliCodeTimerAuto("",0) + if (!fHV) return kFALSE; + Bool_t error = kFALSE; hvChannelTooLow = kFALSE; hvChannelTooHigh = kFALSE; @@ -406,7 +414,7 @@ AliMUONPadStatusMaker::HVStatus(Int_t detElemId, Int_t manuId) const AliCodeTimerAuto("",0) - if ( !fkCalibrationData.HV() ) return kMissing; + if ( !fHV ) return kMissing; Long_t lint = fHV->GetValue(AliMpManuUID::BuildUniqueID(detElemId,manuId)); diff --git a/MUON/AliMUONReconstructor.cxx b/MUON/AliMUONReconstructor.cxx index 729b132d46e..10fba9c87c1 100644 --- a/MUON/AliMUONReconstructor.cxx +++ b/MUON/AliMUONReconstructor.cxx @@ -89,6 +89,7 @@ #include "AliMUONDigitStoreV1.h" #include "AliMUONDigitStoreV2R.h" #include "AliMUONGeometryTransformer.h" +#include "AliMUONPadStatusMaker.h" #include "AliMUONPreClusterFinder.h" #include "AliMUONPreClusterFinderV2.h" #include "AliMUONPreClusterFinderV3.h" @@ -110,6 +111,7 @@ #include "AliCDBManager.h" #include "AliCodeTimer.h" #include "AliLog.h" +#include "AliRunInfo.h" #include #include @@ -187,7 +189,7 @@ AliMUONReconstructor::Calibrate(AliMUONVDigitStore& digitStore) const CreateCalibrator(); } AliCodeTimerAuto(Form("%s::Calibrate(AliMUONVDigitStore*)",fDigitCalibrator->ClassName()),0) - fDigitCalibrator->Calibrate(digitStore); + fDigitCalibrator->Calibrate(digitStore); } //_____________________________________________________________________________ @@ -428,12 +430,51 @@ AliMUONReconstructor::CreateCalibrator() const return; } - // Check that we get all the calibrations we'll need - if ( !fCalibrationData->Pedestals() || - !fCalibrationData->Gains() || - !fCalibrationData->HV() ) + // It is now time to check whether we have everything to proceed. + // What we need depends on whether both tracker and trigger + // are in the readout chain, and what specific "bad channel policy" + // we use + + Bool_t kTracker(kFALSE); + Bool_t kTrigger(kFALSE); + + const AliRunInfo* runInfo = GetRunInfo(); + if (!runInfo) + { + AliError("Could not get runinfo ?") + } + else + { + TString detectors(runInfo->GetActiveDetectors()); + if (detectors.Contains("MUONTRK")) kTracker=kTRUE; + if (detectors.Contains("MUONTRG")) kTrigger=kTRUE; + } + + AliInfo(Form("Run with MUON TRIGGER : %s and MUON TRACKER : %s", + kTrigger ? "YES":"NO" , + kTracker ? "YES":"NO")); + + if ( kTracker ) { - AliFatal("Could not access all required calibration data"); + // Check that we get all the calibrations we'll need + if ( !fCalibrationData->Pedestals() || + !fCalibrationData->Gains() ) + { + AliFatal(Form("Could not access all required calibration data (PED %p GAIN %p)", + fCalibrationData->Pedestals(),fCalibrationData->Gains())); + } + + if ( !fCalibrationData->HV() ) + { + // Special treatment of HV. We only break if the values + // are not there *AND* we cut on them. + UInt_t mask = GetRecoParam()->PadGoodnessMask(); + TString smask(AliMUONPadStatusMaker::AsCondition(mask)); + if ( smask.Contains("HV") ) + { + AliFatal("Could not access all required calibration data (HV)"); + } + } } TString opt(GetOption());