The present commit corresponds to an important change in the way 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
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>
36//#include <TObjectTable.h>
37#endif
38
39// Data file, OCDB on Grid
de487b6e 40TString input="alien:///alice/data/2008/LHC08b/000037057/raw/08000037057021.10.root";
41TString ocdbPath = "alien://folder=/alice/data/2008/LHC08b/OCDB";
cc727848 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://");
0e894e58 55
cc727848 56 AliCDBManager* man = AliCDBManager::Instance();
57 man->SetDefaultStorage(ocdbPath.Data());
de487b6e 58
59 man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT");
60 man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT");
0e894e58 61
cc727848 62 gRandom->SetSeed(seed);
63
0e894e58 64 // no magnetic field --> factor (4th parameter) = 0
f7a1cc68 65 TGeoGlobalMagField::Instance()->GetField()->SetFactorSol(0);
66 TGeoGlobalMagField::Instance()->GetField()->SetFactorDip(0);
67
cc727848 68 AliReconstruction *MuonRec = new AliReconstruction();
0e894e58 69
cc727848 70 MuonRec->SetInput(input.Data());
71 MuonRec->SetRunVertexFinder(kFALSE);
72 MuonRec->SetRunLocalReconstruction("MUON");
73 MuonRec->SetRunTracking("MUON");
74 MuonRec->SetFillESD(" ");
75 MuonRec->SetLoadAlignData("MUON");
de487b6e 76 MuonRec->SetNumberOfEventsPerFile(0);
cc727848 77 MuonRec->SetOption("MUON",recoptions.Data());
0e894e58 78 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetCosmicParam();
de487b6e 79 muonRecoParam->BypassSt45(kTRUE,kFALSE);
0e894e58 80 muonRecoParam->RequestStation(2,kFALSE);
de487b6e 81 muonRecoParam->SetPadGoodnessMask(0x400BE80);
cc727848 82 TString caliboption = caliboption1;
83 if ( calib == 2 ) caliboption = caliboption2;
84 muonRecoParam->SetCalibrationMode(caliboption.Data());
cc727848 85 muonRecoParam->Print("FULL");
de487b6e 86
87 AliMUONReconstructor::SetRecoParam(muonRecoParam);
88
89 MuonRec->SetRunQA("MUON:ALL");
90
cc727848 91 MuonRec->Run();
92
93 delete MuonRec;
94
95 //gObjectTable->Print();
96}
97