]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Allow reco of trigger alone or tracker w/o HV if we do not request to cut on HV values
authorlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Nov 2009 10:38:49 +0000 (10:38 +0000)
committerlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Nov 2009 10:38:49 +0000 (10:38 +0000)
MUON/AliMUONPadStatusMaker.cxx
MUON/AliMUONReconstructor.cxx

index 6b8c3abaa75418db5d0e385a490cfcab2f359532..d3ee831d485da9022da0a1e4ddff8e3d6325eb57 100644 (file)
@@ -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));
   
index 729b132d46e748b53c0c089ff2a46add4a9361b1..10fba9c87c114746c704f1482e49bfc8ebf1f1ad 100644 (file)
@@ -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"
 #include "AliCDBManager.h"
 #include "AliCodeTimer.h"
 #include "AliLog.h"
+#include "AliRunInfo.h"
 
 #include <Riostream.h>
 #include <TObjArray.h>
@@ -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());