]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONReconstructor.cxx
TRD dEdx OADB framework: Nch and Ncls dependence added in the OADB object
[u/mrichter/AliRoot.git] / MUON / AliMUONReconstructor.cxx
index 09a1233a81bd23e34267b77a118f2107804eedf6..beaf1f5fa9f68ba23af4489748e9e93a276dbc69 100644 (file)
@@ -140,7 +140,8 @@ fClusterStore(0x0),
 fTriggerProcessor(0x0),
 fTriggerUtilities(0x0),
 fClusterServers(),
-fTrackers()
+fTrackers(),
+fShouldCalibrate(kTRUE)
 {
   /// normal ctor
 
@@ -205,8 +206,12 @@ AliMUONReconstructor::Calibrate(AliMUONVDigitStore& digitStore) const
   {
     CreateCalibrator();
   }
-  AliCodeTimerAuto(Form("%s::Calibrate(AliMUONVDigitStore*)",fDigitCalibrator->ClassName()),0)
-  fDigitCalibrator->Calibrate(digitStore);      
+    
+  if ( fShouldCalibrate )
+  {
+    AliCodeTimerAuto(Form("%s::Calibrate(AliMUONVDigitStore*)",fDigitCalibrator->ClassName()),0)
+    fDigitCalibrator->Calibrate(digitStore);
+  }
 }
 
 //_____________________________________________________________________________
@@ -465,8 +470,8 @@ AliMUONReconstructor::CreateClusterServer(const AliMUONRecoParam& rp) const
     
     clusterServer = new AliMUONSimpleClusterServer(clusterFinder,*fTransformer);
 
-    AliInfo(Form("Created AliMUONSimpleClusterServer (%p) for specie %d with clustering = %s",
-                 clusterServer,rp.GetEventSpecie(),clusterFinder->ClassName()));
+    AliInfo(Form("Created AliMUONSimpleClusterServer (%p) for specie %d with clustering = %s (following requesting clustering mode %s)",
+                 clusterServer,rp.GetEventSpecie(),clusterFinder->ClassName(),rp.GetClusteringMode()));
     
     fClusterServers.AddAtAndExpand(clusterServer,rp.GetEventSpecie());
   }
@@ -562,7 +567,28 @@ AliMUONReconstructor::CreateCalibrator() const
     AliWarning("NOSTATUSMAP is obsolete");
   }
 
-  fDigitCalibrator = new AliMUONDigitCalibrator(*fCalibrationData,GetRecoParam());
+  Bool_t kTracker(kFALSE);
+    
+  const AliRunInfo* runInfo = GetRunInfo();
+  if (!runInfo)
+  {
+    AliError("Could not get runinfo ?");
+  }
+  else
+  {
+    TString detectors(runInfo->GetActiveDetectors());
+    if (detectors.Contains("MUONTRK")) kTracker=kTRUE;
+  }
+    
+  if ( kTracker )
+  {
+    fDigitCalibrator = new AliMUONDigitCalibrator(*fCalibrationData,GetRecoParam());
+  }
+  else
+  {
+    AliWarning("Apparently running without MCH so will not instantiante the DigitCalibrator nor read MCH OCDB objects...");
+    fShouldCalibrate=kFALSE;
+  }
 }
 
 //_____________________________________________________________________________