1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /* $Id: runReconstruction.C 23207 2007-12-20 09:59:20Z ivana $ */
19 /// \file runDataReconstruction.C
20 /// \brief Macro for running reconstruction
22 /// Macro for running reconstruction on the cosmics run data.
24 /// \author Laurent Aphecetche, Nicole Bastid, Bogdan Vulpescu, ...
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"
36 //#include <TObjectTable.h>
39 // Data file, OCDB on Grid
40 TString input="alien:///alice/data/2008/LHC08b/000037057/raw/08000037057021.10.root";
41 TString ocdbPath = "alien://folder=/alice/data/2008/LHC08b/OCDB";
43 // Data file, OCDB locally
44 //TString input="$ALICE_ROOT/MUON/test_out.100/raw.root";
45 //TString ocdbPath = "local://$ALICE_ROOT";
47 TString caliboption1 = "NOGAIN";
48 TString caliboption2 = "GAINCONSTANTCAPA";
49 TString recoptions = "SAVEDIGITS";
52 void runDataReconstruction(Int_t calib = 1)
54 TGrid::Connect("alien://");
56 AliCDBManager* man = AliCDBManager::Instance();
57 man->SetDefaultStorage(ocdbPath.Data());
59 man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT");
60 man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT");
62 gRandom->SetSeed(seed);
64 // no magnetic field --> factor (4th parameter) = 0
65 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 0., 10., AliMagFMaps::k5kG);
66 AliTracker::SetFieldMap(field, kFALSE);
67 AliReconstruction *MuonRec = new AliReconstruction();
69 MuonRec->SetInput(input.Data());
70 MuonRec->SetRunVertexFinder(kFALSE);
71 MuonRec->SetRunLocalReconstruction("MUON");
72 MuonRec->SetRunTracking("MUON");
73 MuonRec->SetFillESD(" ");
74 MuonRec->SetLoadAlignData("MUON");
75 MuonRec->SetNumberOfEventsPerFile(0);
76 MuonRec->SetOption("MUON",recoptions.Data());
77 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetCosmicParam();
78 muonRecoParam->BypassSt45(kTRUE,kFALSE);
79 muonRecoParam->RequestStation(2,kFALSE);
80 muonRecoParam->SetPadGoodnessMask(0x400BE80);
81 TString caliboption = caliboption1;
82 if ( calib == 2 ) caliboption = caliboption2;
83 muonRecoParam->SetCalibrationMode(caliboption.Data());
84 muonRecoParam->Print("FULL");
86 AliMUONReconstructor::SetRecoParam(muonRecoParam);
88 MuonRec->SetRunQA("MUON:ALL");
94 //gObjectTable->Print();