TPC reconstruction macro - according Marco Meoni
[u/mrichter/AliRoot.git] / TPC / macros / testTPC / rec.C
CommitLineData
799564e6 1void rec(const char *filename="data.root", const char *ocdbpath = "alien://folder=/alice/data/2007/LHC07w/OCDB/")\r
2{
d1ad7a9c 3 gSystem->Load("libXrdClient.so");
799564e6 4 gSystem->Load("libNetx.so");
5 AliLog::SetClassDebugLevel("AliTPCRawStream",-5);
6 AliLog::SetClassDebugLevel("AliRawReaderDate",-5);
7 AliLog::SetClassDebugLevel("AliTPCAltroMapping",-5);
8 AliLog::SetModuleDebugLevel("RAW",-5);
9 AliLog::SetGlobalLogLevel(3);
d1ad7a9c 10 //
799564e6 11 // First version of the reconstruction
12 // script for the FDR'07
13
14 // Set the CDB storage location
15 // AliLog::SetModuleDebugLevel("STEER",2);
16 AliCDBManager * man = AliCDBManager::Instance();
17 //man->SetDefaultStorage("alien://folder=/alice/data/2007/LHC07w/OCDB/");
18 man->SetDefaultStorage(ocdbpath);
19 // man->SetSpecificStorage("TPC/Calib/Parameters","local:///data/test2007/");
20 // man->SetSpecificStorage("TPC/Calib/PadNoise","local:///data/test2007/");
21 // man->SetSpecificStorage("ITS/Calib/DDLMapSDD","local://$ALICE_ROOT");
22 // man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT");
23 // man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT");
24
25 // TPC settings
26 AliLog::SetClassDebugLevel("AliTPCclustererMI",2);
27 AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE);
28 tpcRecoParam->SetTimeInterval(60,940);
29 tpcRecoParam->Dump();
30 AliTPCReconstructor::SetRecoParam(tpcRecoParam);
31 AliTPCReconstructor::SetStreamLevel(1);
32
33 // PHOS settings
34 AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
35 recEmc->SetSubtractPedestals(kTRUE);
36 recEmc->SetMinE(0.05);
37 recEmc->SetClusteringThreshold(0.10);
38 AliPHOSReconstructor::SetRecoParamEmc(recEmc);
39
40 // T0 settings
41 AliLog::SetModuleDebugLevel("T0", 10);
42
43 // MUON settings
44 AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3);
45
46 // Tracking settings
47 // AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
48 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 0., 10., 2);
49 AliTracker::SetFieldMap(field,1);
50
51 // AliReconstruction settings
52 AliReconstruction rec;
53 rec.SetUniformFieldTracking(kFALSE);
54 rec.SetWriteESDfriend(kTRUE);
55 rec.SetWriteAlignmentData();
56 rec.SetInput(filename);
57 //
58 //rec.SetRunLocalReconstruction("");
59 rec.SetRunReconstruction("TPC");
d1ad7a9c 60 rec.SetFillESD("TPC");
799564e6 61 rec.SetRunV0Finder(kFALSE);
d1ad7a9c 62 rec.SetRunVertexFinder(kFALSE);
799564e6 63
64 rec.SetRunQA(kTRUE);
65
66 // Detector options if any
67 rec.SetOption("MUON","SAVEDIGITS");
68 rec.SetOption("TPC","OldRCUFormat");
69 rec.SetOption("PHOS","OldRCUFormat");
70
71 // To be enabled when CTP readout starts
72 rec.SetFillTriggerESD(kFALSE);
73
74 // all events in one single file
75 rec.SetNumberOfEventsPerFile(-1);
76
77 // switch off cleanESD
78 rec.SetCleanESD(kFALSE);
79
80 //AliLog::SetGlobalDebugLevel(2);
81 rec.Run();
82
83 cout << "-----------------------------------------------------------------" << endl;
84 cout << "-----------------------------------------------------------------" << endl;
85 cout << "--------- Reconstruction Completed. Start merging QAs -----------" << endl;
86 cout << "-----------------------------------------------------------------" << endl;
87 cout << "-----------------------------------------------------------------" << endl;
88 AliQADataMakerSteer qas;
89 qas.Merge();
90}