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"
32 #include "AliTracker.h"
33 #include "AliReconstruction.h"
37 //#include <TObjectTable.h>
40 TString caliboption1 = "NOGAIN";
41 TString caliboption2 = "GAINCONSTANTCAPA";
42 TString recoptions = "SAVEDIGITS";
45 void runDataReconstruction(const char* input = "/Users/laurent/Alice/Data/Raw/09000067495031.10.root",
46 const char* ocdbPath = "alien://folder=/alice/data/2009/OCDB",
49 TGrid::Connect("alien://");
51 AliCDBManager* man = AliCDBManager::Instance();
52 man->SetDefaultStorage(ocdbPath);
54 gRandom->SetSeed(seed);
56 TString socdb(ocdbPath);
57 if ( socdb.Contains("local://") )
60 AliMagF* field = new AliMagF("Maps","Maps",2,0.,0., 10.,AliMagF::k5kG);
61 TGeoGlobalMagField::Instance()->SetField(field);
62 TGeoGlobalMagField::Instance()->Lock();
65 AliReconstruction *MuonRec = new AliReconstruction();
67 MuonRec->SetInput(gSystem->ExpandPathName(input));
68 MuonRec->SetRunVertexFinder(kFALSE);
69 MuonRec->SetRunLocalReconstruction("MUON");
70 MuonRec->SetRunTracking("MUON");
71 MuonRec->SetFillESD(" ");
72 MuonRec->SetLoadAlignData("MUON");
73 MuonRec->SetNumberOfEventsPerFile(0);
74 MuonRec->SetOption("MUON",recoptions.Data());
76 // reconstruction parameters
77 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetCosmicParam();
80 TString caliboption = caliboption1;
81 if ( calib == 2 ) caliboption = caliboption2;
82 muonRecoParam->SetCalibrationMode(caliboption.Data());
84 // cut on (non)bending slopes
85 muonRecoParam->SetMaxNonBendingSlope(0.4);
86 muonRecoParam->SetMaxBendingSlope(0.5);
89 muonRecoParam->MakeMoreTrackCandidates(kTRUE);
90 muonRecoParam->RequestStation(0, kFALSE);
91 muonRecoParam->RequestStation(2, kFALSE);
92 muonRecoParam->RequestStation(3, kFALSE);
93 muonRecoParam->RequestStation(4, kFALSE);
95 muonRecoParam->Print("FULL");
97 MuonRec->SetRecoParam("MUON",muonRecoParam);
99 MuonRec->SetRunQA("MUON:ALL");
105 //gObjectTable->Print();