]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/runReconstruction.C
Temporary solution to set RecoParam for the reconstruction
[u/mrichter/AliRoot.git] / MUON / runReconstruction.C
index 1cf0a3b2ddda0f4ca78959aa4883d31629edd182..45713fb0eeb67aa1ea5e1fc69945ddf7347fda5a 100644 (file)
 
 /* $Id$ */
 
-// Macro extracted from MUON test script
-// By Laurent Aphecetche
+/// \ingroup macros
+/// \file runReconstruction.C
+/// \brief Macro for running reconstruction
+///
+/// Macro extracted from the MUON test script
+///
+/// \author Laurent Aphecetche
 
 #if !defined(__CINT__) || defined(__MAKECINT__)
-// add
+#include "AliMUONReconstructor.h"
+#include "AliMUONRecoParam.h"
+#include "AliRecoParam.h"
+#include "AliCDBManager.h"
+#include "AliMagFMaps.h"
+#include "AliTracker.h"
+#include "AliReconstruction.h"
+#include <TRandom.h>
+//#include <TObjectTable.h>
 #endif
 
-void runReconstruction(int run, int seed, const char* input, const char* recoptions)
+void runReconstruction(int seed, const char* input, const char* recoptions)
 { 
-  AliCDBManager::Instance()->SetRun(run);
+  AliCDBManager* man = AliCDBManager::Instance();
+  man->SetDefaultStorage("local://$ALICE_ROOT");
+  
   gRandom->SetSeed(seed);
+  
   AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
   AliTracker::SetFieldMap(field, kFALSE);
+  
   AliReconstruction* MuonRec = new AliReconstruction("galice.root");
   MuonRec->SetInput(input);
   MuonRec->SetRunVertexFinder(kFALSE);
@@ -38,8 +55,21 @@ void runReconstruction(int run, int seed, const char* input, const char* recopti
   MuonRec->SetNumberOfEventsPerFile(1000);
   MuonRec->SetOption("MUON",recoptions);
   //  MuonRec->SetEventRange(319,319);
+  MuonRec->SetWriteAOD();
+  
+  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
+  //muonRecoParam->CombineClusterTrackReco(kTRUE);
+  //muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
+  //muonRecoParam->SetClusteringMode("PEAKFIT");
+  //muonRecoParam->SetClusteringMode("PEAKCOG");
+  muonRecoParam->Print("FULL");
+  AliMUONReconstructor::SetRecoParam(muonRecoParam);
+  
+  MuonRec->SetRunQA("MUON:ALL");
+  
   MuonRec->Run();
+  
   delete MuonRec;
+  
   //gObjectTable->Print();
 }
-