]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/runReconstruction.C
8331f153fea241b668f8c5ac42391a94e70b40b5
[u/mrichter/AliRoot.git] / MUON / runReconstruction.C
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 /// \ingroup macros
19 /// \file runReconstruction.C
20 /// \brief Macro for running reconstruction
21 ///
22 /// Macro extracted from the MUON test script
23 ///
24 /// \author Laurent Aphecetche
25
26 #if !defined(__CINT__) || defined(__MAKECINT__)
27 #include "AliMUONReconstructor.h"
28 #include "AliMUONRecoParam.h"
29 #include "AliRecoParam.h"
30 #include "AliCDBManager.h"
31 #include "AliTracker.h"
32 #include "AliReconstruction.h"
33 #include <TRandom.h>
34 //#include <TObjectTable.h>
35 #endif
36
37 void runReconstruction(int seed, const char* input, const char* recoptions, bool embedding)
38
39   AliCDBManager* man = AliCDBManager::Instance();
40   
41   if ( embedding ) 
42   {
43     cout << "**** WILL USE RAW OCDB AS WE'RE RECONSTRUCTING EMBEDDED DATA" << endl;
44     man->SetDefaultStorage("raw://");
45   }
46   else
47   {
48     man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
49
50     man->SetSpecificStorage("GRP/GRP/Data",
51                             Form("local://%s",gSystem->pwd()));
52   }
53   
54   gRandom->SetSeed(seed);
55   
56   AliReconstruction* MuonRec = new AliReconstruction("galice.root");
57   MuonRec->SetInput(gSystem->ExpandPathName(input));
58   MuonRec->SetRunReconstruction("MUON");
59   MuonRec->SetFillESD("HLT");
60   MuonRec->SetOption("HLT", "libAliHLTMUON.so");
61   MuonRec->SetNumberOfEventsPerFile(1000);
62   MuonRec->SetOption("MUON",recoptions);
63   MuonRec->SetRunQA("MUON:ALL");
64   MuonRec->SetQAWriteExpert(AliQAv1::kMUON);
65   MuonRec->SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
66   MuonRec->SetWriteESDfriend(kFALSE);
67   MuonRec->SetCleanESD(kFALSE);  
68   MuonRec->SetStopOnError(kFALSE);
69   
70   // uncomment the following lines if you want to set custom RecoParam
71   // instead of getting them from the OCDB
72   //  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
73   //  muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
74   //  MuonRec->SetRecoParam("MUON",muonRecoParam);
75   
76   MuonRec->Run();
77   
78   delete MuonRec;
79   
80   //gObjectTable->Print();
81 }