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