]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/runDataReconstruction.C
An example macro creating 2d histograms for the
[u/mrichter/AliRoot.git] / MUON / runDataReconstruction.C
CommitLineData
cc727848 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: runReconstruction.C 23207 2007-12-20 09:59:20Z ivana $ */
17
18/// \ingroup macros
19/// \file runReconstruction.C
20/// \brief Macro for running reconstruction
21///
22/// Macro for running reconstruction on the cosmics run data.
23///
24/// \author Laurent Aphecetche, Nicole Bastid, Bogdan Vulpescu, ...
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 "AliMagFMaps.h"
32#include "AliTracker.h"
33#include "AliReconstruction.h"
34#include <TRandom.h>
35#include <TGrid.h>
36//#include <TObjectTable.h>
37#endif
38
39// Data file, OCDB on Grid
40TString input="alien:///alice/data/2007/LHC07w/000014493/raw/07000014493001.10.root";
41TString ocdbPath = "alien://folder=/alice/data/2008/LHC08a/OCDB";
42
43// Data file, OCDB locally
44//TString input="$ALICE_ROOT/MUON/test_out.100/raw.root";
45//TString ocdbPath = "local://$ALICE_ROOT";
46
47TString caliboption1 = "NOGAIN";
48TString caliboption2 = "GAINCONSTANTCAPA";
49TString recoptions = "SAVEDIGITS";
50Int_t seed = 1234567;
51
52void runDataReconstruction(Int_t calib = 1)
53{
54 TGrid::Connect("alien://");
55
56 AliCDBManager* man = AliCDBManager::Instance();
57 man->SetDefaultStorage(ocdbPath.Data());
58 man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT");
59 man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT");
60
61 gRandom->SetSeed(seed);
62
63 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
64 AliTracker::SetFieldMap(field, kFALSE);
65 AliReconstruction *MuonRec = new AliReconstruction();
66
67
68 MuonRec->SetInput(input.Data());
69 MuonRec->SetRunVertexFinder(kFALSE);
70 MuonRec->SetRunLocalReconstruction("MUON");
71 MuonRec->SetRunTracking("MUON");
72 MuonRec->SetFillESD(" ");
73 MuonRec->SetLoadAlignData("MUON");
74 MuonRec->SetNumberOfEventsPerFile(1000);
75 MuonRec->SetOption("MUON",recoptions.Data());
76 // MuonRec->SetEventRange(319,319);
77 MuonRec->SetWriteAOD();
78 //MuonRec.SetEventRange(0,100);
79 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
80 muonRecoParam->CombineClusterTrackReco(kTRUE);
81 TString caliboption = caliboption1;
82 if ( calib == 2 ) caliboption = caliboption2;
83 muonRecoParam->SetCalibrationMode(caliboption.Data());
84 //muonRecoParam->SetClusteringMode("PEAKFIT");
85 //muonRecoParam->SetClusteringMode("PEAKCOG");
86 muonRecoParam->Print("FULL");
87 AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
88
89 MuonRec->Run();
90
91 delete MuonRec;
92
93 //gObjectTable->Print();
94}
95