]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONReconstructor.cxx
Write trigger digits if SAVEDIGITS activated (Bogdan)
[u/mrichter/AliRoot.git] / MUON / AliMUONReconstructor.cxx
index 0ddd4ebe331d22bee7d45aa9d40e72f21102c96a..59f0c1e5de01f49472c3be3d78e281ec506ca660 100644 (file)
@@ -44,6 +44,9 @@
 /// option either, as center-of-gravity is generally not a good estimate
 /// of the cluster position...
 ///
+/// PEAKCOG : COG cluster finder around local maxima
+/// PEAKFIT : fit around local maxima with up to 3 peaks, COG otherwise
+///
 /// NOCLUSTERING : bypass completely the clustering stage
 ///
 /// ------
@@ -78,6 +81,8 @@
 #include "AliMUONClusterFinderCOG.h"
 #include "AliMUONClusterFinderMLEM.h"
 #include "AliMUONClusterFinderSimpleFit.h"
+#include "AliMUONClusterFinderPeakCOG.h"
+#include "AliMUONClusterFinderPeakFit.h"
 #include "AliMUONConstants.h"
 #include "AliMUONDigitCalibrator.h"
 #include "AliMUONDigitMaker.h"
@@ -90,7 +95,6 @@
 #include "AliMUONRecoParam.h"
 #include "AliMUONSimpleClusterServer.h"
 #include "AliMUONTracker.h"
-#include "AliMUONTriggerChamberEff.h"
 #include "AliMUONTriggerCircuit.h"
 #include "AliMUONTriggerCrateStore.h"
 #include "AliMUONTriggerStoreV1.h"
@@ -132,8 +136,7 @@ fCalibrationData(0x0),
 fDigitCalibrator(0x0),
 fClusterServer(0x0),
 fTriggerStore(0x0),
-fTrackStore(0x0),
-fTrigChamberEff(0x0)
+fTrackStore(0x0)
 {
   /// normal ctor
 
@@ -161,7 +164,6 @@ AliMUONReconstructor::~AliMUONReconstructor()
   delete fClusterServer;
   delete fTriggerStore;
   delete fTrackStore;
-  delete fTrigChamberEff;
 }
 
 //_____________________________________________________________________________
@@ -279,6 +281,11 @@ AliMUONReconstructor::CreateDigitMaker() const
     useFastDecoder = kTRUE;
   }
   fDigitMaker = new AliMUONDigitMaker(enableErrorLogging, useFastDecoder);
+  option.ToUpper();
+  if ( option.Contains("SAVEDIGITS" ))
+    {
+      fDigitMaker->SetMakeTriggerDigits(kTRUE);
+    }
 }
 
 //_____________________________________________________________________________
@@ -294,19 +301,6 @@ AliMUONReconstructor::CreateTriggerCircuit() const
 
 }
 
-//_____________________________________________________________________________
-void
-AliMUONReconstructor::CreateTriggerChamberEff() const
-{
-  /// Create (and create if necessary) the trigger chamber efficiency class
-  if (fTrigChamberEff) return;
-
-  AliCodeTimerAuto("")
-
-  fTrigChamberEff = new AliMUONTriggerChamberEff(fTransformer,fDigitMaker,kTRUE);
-  //fTrigChamberEff->SetDebugLevel(1);
-}
-
 //_____________________________________________________________________________
 AliTracker* 
 AliMUONReconstructor::CreateTracker() const
@@ -315,7 +309,6 @@ AliMUONReconstructor::CreateTracker() const
   
   CreateTriggerCircuit();
   CreateDigitMaker();
-  CreateTriggerChamberEff();
   CreateClusterServer();
   
   if (!fClusterServer) 
@@ -324,13 +317,11 @@ AliMUONReconstructor::CreateTracker() const
     return 0x0;
   }
   
-  fClusterServer->UseDigitStore(*(DigitStore()));
-  
   AliMUONTracker* tracker = new AliMUONTracker(*fClusterServer,
+                                              *DigitStore(),
                                                fDigitMaker,
                                                fTransformer,
-                                               fTriggerCircuit,
-                                               fTrigChamberEff);
+                                               fTriggerCircuit);
   
   return tracker;
 }
@@ -360,6 +351,14 @@ AliMUONReconstructor::CreateClusterFinder(const char* clusterFinderType) const
   {
     clusterFinder = new AliMUONPreClusterFinder;
   }  
+  else if ( strstr(opt,"PEAKCOG") )
+  {
+    clusterFinder = new AliMUONClusterFinderPeakCOG(kFALSE,new AliMUONPreClusterFinder);
+  }
+  else if ( strstr(opt,"PEAKFIT") )
+  {
+    clusterFinder = new AliMUONClusterFinderPeakFit(kFALSE,new AliMUONPreClusterFinder);
+  }
   else if ( strstr(opt,"COG") )
   {
     clusterFinder = new AliMUONClusterFinderCOG(new AliMUONPreClusterFinder);
@@ -455,7 +454,9 @@ AliMUONReconstructor::CreateCalibrator() const
     AliWarning("NOSTATUSMAP is obsolete");
   }
 
-  fDigitCalibrator = new AliMUONDigitCalibrator(*fCalibrationData);
+  TString calibMode = GetRecoParam()->GetCalibrationMode();
+
+  fDigitCalibrator = new AliMUONDigitCalibrator(*fCalibrationData,calibMode.Data());
 }
 
 //_____________________________________________________________________________
@@ -635,7 +636,7 @@ AliMUONReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const
     // i.e. w/o going through raw data, this will be the case)
     TIter next(fDigitStore->CreateIterator());
     AliMUONVDigit* digit = static_cast<AliMUONVDigit*>(next());
-    if (!digit->IsCalibrated())
+    if (digit && !digit->IsCalibrated())
     {
       Calibrate(*fDigitStore);
     }