make the update of the period level QA safe (by running in a temp location and only...
[u/mrichter/AliRoot.git] / TPC / recTPC.C
CommitLineData
53cc7be4 1//
2// example macro for reconstruction of the TPC raw data
3//
4// The path to the Calibration parameters is for the moment hard-wired in the code
5// Taken from /afs/
6//
7//
8
f3895d52 9void recTPC(Int_t type, const char *filename="data.root")
53cc7be4 10{
194b0609 11 //
12 // Set path to calibration data
13 //
530474cc 14 // type variable = 0 - cosmic test
15 // = 1 - laser test
53cc7be4 16 AliCDBManager * man = AliCDBManager::Instance();
162637e4 17 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
9355efb7 18 //man->SetRun(0);
19 //man->SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
194b0609 20 //
21 // Set reconstruction parameters
22 //
829455ad 23 AliLog::SetClassDebugLevel("AliTPCclusterer",2);
f5d176d8 24 AliTPCRecoParam * tpcRecoParam = 0;
4f543b2f 25 if (type==0) tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
26 if (type>0) tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kTRUE);
27 tpcRecoParam->Dump();
194b0609 28 AliTPCReconstructor::SetRecoParam(tpcRecoParam);
29 AliTPCReconstructor::SetStreamLevel(1);
30 //
31 //
32 //
53cc7be4 33 AliReconstruction rec;
162637e4 34 rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
cb83f73d 35 rec.SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
53cc7be4 36 rec.SetLoadAlignData("");
37 rec.SetWriteESDfriend(kTRUE);
38 rec.SetInput(filename);
39 rec.SetEquipmentIdMap("EquipmentIdMap.data");
40 rec.SetRunReconstruction("TPC");
9a090ccd 41 rec.SetOption("TPC","PedestalSubtraction");
53cc7be4 42 // rec.SetRunLocalReconstruction("");
43 // rec.SetRunTracking("TPC");
44 rec.SetFillESD("TPC");
45 rec.SetFillTriggerESD(kFALSE);
46 rec.SetRunVertexFinder(kFALSE);
53cc7be4 47 rec.SetWriteAlignmentData(kTRUE);
48 rec.Run();
49}
50
9355efb7 51void recTracking(Int_t type, const char *filename="data.root")
53cc7be4 52{
194b0609 53 //
54 // Set path to calibration data
55 //
53cc7be4 56 AliCDBManager * man = AliCDBManager::Instance();
162637e4 57 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
53cc7be4 58 man->SetRun(0);
cb83f73d 59 man->SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
194b0609 60 //
61 // Set reconstruction parameters
62 //
829455ad 63 AliLog::SetClassDebugLevel("AliTPCclusterer",2);
f5d176d8 64
65 AliTPCRecoParam * tpcRecoParam = 0;
4f543b2f 66 if (type==0) tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
67 if (type>0) tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kTRUE);
530474cc 68
194b0609 69 AliTPCReconstructor::SetRecoParam(tpcRecoParam);
70 AliTPCReconstructor::SetStreamLevel(1);
71
72 //
73 //
74 //
53cc7be4 75 AliReconstruction rec;
cb83f73d 76 rec.SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
53cc7be4 77 rec.SetLoadAlignData("");
78 rec.SetWriteESDfriend(kTRUE);
79 rec.SetInput(filename);
80 rec.SetEquipmentIdMap("EquipmentIdMap.data");
81 //rec.SetRunReconstruction("TPC");
9a090ccd 82 rec.SetOption("TPC","PedestalSubtraction");
53cc7be4 83 rec.SetRunLocalReconstruction("");
84 rec.SetRunTracking("TPC");
85 rec.SetFillESD("TPC");
86 rec.SetFillTriggerESD(kFALSE);
87 rec.SetRunVertexFinder(kFALSE);
53cc7be4 88 rec.SetWriteAlignmentData(kTRUE);
9355efb7 89 rec.Run(0);
53cc7be4 90}
91
92