]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/runDataReconstruction.C
Fixing Doxygen warnings
[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
58681b6e 19/// \file runDataReconstruction.C
cc727848 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"
f7a1cc68 31#include "AliMagF.h"
cc727848 32#include "AliTracker.h"
33#include "AliReconstruction.h"
34#include <TRandom.h>
35#include <TGrid.h>
b6f591ae 36#include <TSystem.h>
cc727848 37//#include <TObjectTable.h>
38#endif
39
cc727848 40TString caliboption1 = "NOGAIN";
41TString caliboption2 = "GAINCONSTANTCAPA";
42TString recoptions = "SAVEDIGITS";
43Int_t seed = 1234567;
44
b6f591ae 45void runDataReconstruction(const char* input = "/Users/laurent/Alice/Data/Raw/09000067495031.10.root",
46 const char* ocdbPath = "alien://folder=/alice/data/2009/OCDB",
47 Int_t calib = 1)
cc727848 48{
49 TGrid::Connect("alien://");
0e894e58 50
cc727848 51 AliCDBManager* man = AliCDBManager::Instance();
b6f591ae 52 man->SetDefaultStorage(ocdbPath);
de487b6e 53
cc727848 54 gRandom->SetSeed(seed);
f7a1cc68 55
b6f591ae 56 TString socdb(ocdbPath);
57 if ( socdb.Contains("local://") )
58 {
59 // no magnetic field
60 AliMagF* field = new AliMagF("Maps","Maps",2,0.,0., 10.,AliMagF::k5kG);
61 TGeoGlobalMagField::Instance()->SetField(field);
62 TGeoGlobalMagField::Instance()->Lock();
63 }
64
cc727848 65 AliReconstruction *MuonRec = new AliReconstruction();
0e894e58 66
b6f591ae 67 MuonRec->SetInput(gSystem->ExpandPathName(input));
cc727848 68 MuonRec->SetRunVertexFinder(kFALSE);
69 MuonRec->SetRunLocalReconstruction("MUON");
70 MuonRec->SetRunTracking("MUON");
71 MuonRec->SetFillESD(" ");
72 MuonRec->SetLoadAlignData("MUON");
de487b6e 73 MuonRec->SetNumberOfEventsPerFile(0);
cc727848 74 MuonRec->SetOption("MUON",recoptions.Data());
b6f591ae 75
76 // reconstruction parameters
0e894e58 77 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetCosmicParam();
b6f591ae 78
79 // digit selection
cc727848 80 TString caliboption = caliboption1;
81 if ( calib == 2 ) caliboption = caliboption2;
82 muonRecoParam->SetCalibrationMode(caliboption.Data());
b6f591ae 83
b6f591ae 84 // cut on (non)bending slopes
6b191dea 85 muonRecoParam->SetMaxNonBendingSlope(0.4);
86 muonRecoParam->SetMaxBendingSlope(0.5);
b6f591ae 87
88 // tracking algorithm
89 muonRecoParam->MakeMoreTrackCandidates(kTRUE);
90 muonRecoParam->RequestStation(0, kFALSE);
91 muonRecoParam->RequestStation(2, kFALSE);
92 muonRecoParam->RequestStation(3, kFALSE);
93 muonRecoParam->RequestStation(4, kFALSE);
b6f591ae 94
cc727848 95 muonRecoParam->Print("FULL");
b6f591ae 96
97 MuonRec->SetRecoParam("MUON",muonRecoParam);
98
99 MuonRec->SetRunQA("MUON:ALL");
de487b6e 100
cc727848 101 MuonRec->Run();
102
103 delete MuonRec;
104
105 //gObjectTable->Print();
106}
107