]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/macros/recMag5.C
The reconstruction setup for TPC +ITS
[u/mrichter/AliRoot.git] / TPC / macros / recMag5.C
1 void recMag5(const char *filename="data.root")
2 {
3   /////////////////////////////////////////////////////////////////////////////////////////
4   //
5   // First version of the reconstruction
6   // script for the FDR'08
7
8   // Set the CDB storage location
9   // AliLog::SetModuleDebugLevel("STEER",2);
10   AliCDBManager * man = AliCDBManager::Instance();
11   //  man->SetDefaultStorage("local://LocalCDB");
12   man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08b/OCDB/"); 
13   //man->SetDefaultStorage("local:///data/OCDB");
14   
15   // Files that we can not read from alien...solved
16   //  man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT");
17   //  man->SetSpecificStorage("ITS/Calib/MapsTimeSDD","local://$ALICE_ROOT");
18   //  man->SetSpecificStorage("TPC/Calib/ExB","local://$ALICE_ROOT");
19
20   // Objects not found if using LHC07w database...solved
21   //  man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local:///afs/cern.ch/user/c/cheshkov/public/OCDB");
22   // man->SetSpecificStorage("GRP/GRP/Data","local://$ALICE_ROOT");
23   // man->SetSpecificStorage("ITS/Calib/DDLMapSDD","local://$ALICE_ROOT");
24   // man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT");
25   // man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT");
26   
27   AliITSRecoParam * itsRecoParam =  AliITSRecoParam::GetCosmicTestParam();
28   itsRecoParam->SetFactorSAWindowSizes(20);
29   itsRecoParam->SetClusterErrorsParam(2);
30   itsRecoParam->SetFindV0s(kFALSE);
31   itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);
32   itsRecoParam->SetUseAmplitudeInfo(kFALSE);
33   // In case we want to switch off a layer
34   //  itsRecoParam->SetLayerToSkip(<N>);
35   // itsRecoParam->SetLayerToSkip(4);
36   // itsRecoParam->SetLayerToSkip(5);
37  itsRecoParam->SetLayerToSkip(2);
38  itsRecoParam->SetLayerToSkip(3);
39  itsRecoParam->SetClusterMisalError(1.0); // [cm]
40  itsRecoParam->SetSAUseAllClusters();
41  AliITSReconstructor::SetRecoParam(itsRecoParam); 
42  
43   // TPC settings
44   AliLog::SetClassDebugLevel("AliTPCclustererMI",2);
45   AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE);
46   Double_t sysError[5]={0.3,3, 0.3/150., 3./150.,0.3/(150*150.)};
47   tpcRecoParam->SetSystematicError(sysError);
48   tpcRecoParam->SetTimeInterval(60,940);
49   tpcRecoParam->Dump();
50   AliTPCReconstructor::SetRecoParam(tpcRecoParam);
51   AliTPCReconstructor::SetStreamLevel(10);
52
53
54   // TRD setting
55   AliTRDrawStreamBase::SetRawStreamVersion("TB");
56
57   // PHOS settings
58   AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
59   recEmc->SetSubtractPedestals(kTRUE);
60   recEmc->SetMinE(0.05);
61   recEmc->SetClusteringThreshold(0.10);
62   AliPHOSReconstructor::SetRecoParamEmc(recEmc);
63
64   // T0 settings
65   AliLog::SetModuleDebugLevel("T0", 10);
66
67   // MUON settings
68   AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3);
69   AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
70   muonRecoParam->CombineClusterTrackReco(kTRUE);
71   muonRecoParam->SetCalibrationMode("NOGAIN");
72   //muonRecoParam->SetClusteringMode("PEAKFIT");
73   //muonRecoParam->SetClusteringMode("PEAKCOG");
74   muonRecoParam->Print("FULL");
75   AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
76  
77   // Tracking settings
78   //  AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
79   AliMagF* field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG);
80   AliTracker::SetFieldMap(field,1);
81   Double_t mostProbPt=0.35;
82   AliExternalTrackParam::SetMostProbablePt(mostProbPt);
83
84   // AliReconstruction settings
85   AliReconstruction rec;
86   rec.SetUniformFieldTracking(kFALSE);
87   rec.SetWriteESDfriend(kTRUE);
88   rec.SetWriteAlignmentData();
89   rec.SetInput(filename);
90   rec.SetRunReconstruction("ALL");
91   rec.SetUseTrackingErrorsForAlignment("ITS");
92
93   // In case some detectors have to be switched off...
94   //  rec.SetRunLocalReconstruction("ALL");
95   //  rec.SetRunTracking("ALL");
96   //  rec.SetFillESD("ALL");
97   // Enable vertex finder - it is needed for cosmic track reco
98   rec.SetRunVertexFinder(kFALSE);
99
100   // To be enabled if some equipment IDs are not set correctly by DAQ
101   //  rec.SetEquipmentIdMap("EquipmentIdMap.data");
102
103   // Detector options if any
104   //  rec.SetOption("ITS","cosmics,onlyITS");
105   //rec.SetOption("ITS","cosmics,MI");
106   rec.SetOption("ITS","cosmics");
107   rec.SetOption("MUON","SAVEDIGITS");
108   rec.SetOption("TPC","OldRCUFormat");
109   rec.SetOption("PHOS","OldRCUFormat");
110   rec.SetOption("T0","cosmic");
111
112   // To be enabled when CTP readout starts
113   rec.SetFillTriggerESD(kFALSE);
114
115   // all events in one single file
116   rec.SetNumberOfEventsPerFile(-1);
117
118   // switch off cleanESD
119   rec.SetCleanESD(kFALSE);
120
121   // AliLog::SetGlobalDebugLevel(2);
122
123   rec.SetRunQA(kFALSE);
124   AliLog::Flush();
125   //TPC addition 
126   rec.SetRunReconstruction("ITS TPC");
127   rec.SetFillESD("ITS TPC"); 
128   //rec.SetEventRange(0,40);
129   // filter logs
130   AliLog::SetClassDebugLevel("AliTPCRawStream",-5);
131   AliLog::SetClassDebugLevel("AliRawReaderDate",-5);
132   AliLog::SetClassDebugLevel("AliTPCAltroMapping",-5);
133   AliLog::SetModuleDebugLevel("RAW",-5);  
134   // 
135   rec.Run();
136
137   //cout << "-----------------------------------------------------------------" << endl;
138   //cout << "-----------------------------------------------------------------" << endl;
139   //cout << "--------- Reconstruction Completed. Start merging QAs -----------" << endl;
140   //cout << "-----------------------------------------------------------------" << endl;
141   //cout << "-----------------------------------------------------------------" << endl;
142   //AliQADataMakerSteer qas;
143   //qas.Merge();
144   //  exit(10);
145 }