- Adding a new group for macros
[u/mrichter/AliRoot.git] / MUON / runReconstruction.C
CommitLineData
4d717204 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// Macro extracted from MUON test script
19// By Laurent Aphecetche
20
21#if !defined(__CINT__) || defined(__MAKECINT__)
3304fa09 22#include "AliMUONReconstructor.h"
23#include "AliMUONRecoParam.h"
15d30ed4 24#include "AliRecoParam.h"
bde793f3 25#include "AliCDBManager.h"
26#include "AliMagFMaps.h"
27#include "AliTracker.h"
28#include "AliReconstruction.h"
29#include <TRandom.h>
3304fa09 30//#include <TObjectTable.h>
4d717204 31#endif
32
745f6baf 33void runReconstruction(int seed, const char* input, const char* recoptions)
4d717204 34{
15381c8b 35 AliCDBManager* man = AliCDBManager::Instance();
36 man->SetDefaultStorage("local://$ALICE_ROOT");
3304fa09 37
4d717204 38 gRandom->SetSeed(seed);
3304fa09 39
4d717204 40 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
41 AliTracker::SetFieldMap(field, kFALSE);
3304fa09 42
4d717204 43 AliReconstruction* MuonRec = new AliReconstruction("galice.root");
44 MuonRec->SetInput(input);
45 MuonRec->SetRunVertexFinder(kFALSE);
46 MuonRec->SetRunLocalReconstruction("MUON");
47 MuonRec->SetRunTracking("MUON");
48 MuonRec->SetFillESD("");
49 MuonRec->SetLoadAlignData("MUON");
50 MuonRec->SetNumberOfEventsPerFile(1000);
51 MuonRec->SetOption("MUON",recoptions);
52 // MuonRec->SetEventRange(319,319);
102edf65 53 MuonRec->SetWriteAOD();
3304fa09 54
55 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
e6b6754d 56 muonRecoParam->CombineClusterTrackReco(kTRUE);
3304fa09 57 muonRecoParam->Print("FULL");
15d30ed4 58 AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
3304fa09 59
4d717204 60 MuonRec->Run();
3304fa09 61
4d717204 62 delete MuonRec;
3304fa09 63
4d717204 64 //gObjectTable->Print();
65}
66