Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / test / cosmic / rec.C
CommitLineData
5225c9db 1void rec(const char *filename="raw.root", const Int_t mfield=1)\r
40d0f38f 2{\r
40d0f38f 3 /////////////////////////////////////////////////////////////////////////////////////////\r
4 //\r
09244196 5 // Second version of the reconstruction\r
6 // script for the 2008 cosmic data (LHC08b) \r
7 //\r
8 /////////////////////////////////////////////////////////////////////////////////////////\r
9 //AliLog::SetGlobalLogLevel(AliLog::kWarning);\r
5225c9db 10 AliLog::SetGlobalLogLevel(AliLog::kError);\r
09244196 11\r
12 gSystem->Load("libRAliEn.so");\r
13 gSystem->Load("libNet.so");\r
5225c9db 14 gSystem->Load("libMonaLisa.so");\r
15 new TMonaLisaWriter(0, "GridAliRoot-rec.C", 0, 0, "global");\r
16 gSystem->Setenv("APMON_INTERVAL", "120");\r
40d0f38f 17\r
18 // Set the CDB storage location\r
40d0f38f 19 AliCDBManager * man = AliCDBManager::Instance();\r
162637e4 20 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");\r
5225c9db 21 //man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08a/OCDB/");\r
162637e4 22 man->SetSpecificStorage("ITS/Calib/*","local://$ALICE_ROOT/OCDB");\r
40d0f38f 23 \r
09244196 24 // Example in case a specific CDB storage is needed\r
162637e4 25 // man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT/OCDB");\r
40d0f38f 26\r
09244196 27 // Reconstruction settings\r
28 AliReconstruction rec;\r
40d0f38f 29\r
30 // ITS settings\r
31 AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetCosmicTestParam();\r
09244196 32 itsRecoParam->SetFactorSAWindowSizes(20);\r
40d0f38f 33 itsRecoParam->SetClusterErrorsParam(2);\r
34 itsRecoParam->SetFindV0s(kFALSE);\r
35 itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);\r
36 itsRecoParam->SetUseAmplitudeInfo(kFALSE);\r
37 // In case we want to switch off a layer\r
38 // itsRecoParam->SetLayerToSkip(<N>);\r
09244196 39 // itsRecoParam->SetLayerToSkip(4);\r
40 // itsRecoParam->SetLayerToSkip(5);\r
40d0f38f 41 itsRecoParam->SetLayerToSkip(2);\r
42 itsRecoParam->SetLayerToSkip(3);\r
09244196 43 //itsRecoParam->SetSAOnePointTracks();\r
44 itsRecoParam->SetClusterMisalError(0.1); // [cm]\r
45 itsRecoParam->SetSAUseAllClusters();\r
46 rec.SetRecoParam("ITS",itsRecoParam);\r
40d0f38f 47\r
48 // TPC settings\r
09244196 49 //AliLog::SetClassDebugLevel("AliTPCclustererMI",2);\r
50 AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE);\r
40d0f38f 51 tpcRecoParam->SetTimeInterval(60,940);\r
09244196 52 Double_t sysError[5]={0.3,1, 0.3/150., 1./150.,0.3/(150*150.)};\r
53 tpcRecoParam->SetSystematicError(sysError);\r
54 tpcRecoParam->SetMinMaxCutAbs(4.);\r
55 tpcRecoParam->SetMinLeftRightCutAbs(6.);\r
56 tpcRecoParam->SetMinUpDownCutAbs(6.);\r
57 // tpcRecoParam->Dump();\r
58 rec.SetRecoParam("TPC",tpcRecoParam);\r
40d0f38f 59 AliTPCReconstructor::SetStreamLevel(1);\r
60\r
462112b2 61 // TRD setting\r
09244196 62 // Settings for the TRD Raw Reader\r
462112b2 63 AliTRDrawStreamBase::SetRawStreamVersion("TB");\r
09244196 64 AliTRDrawStreamTB::SetNoErrorWarning();\r
65 AliTRDrawStreamTB::AllowCorruptedData();\r
66 AliTRDrawStreamTB::DisableStackNumberChecker();\r
67 AliTRDrawStreamTB::DisableStackLinkNumberChecker();\r
68 AliTRDrawStreamTB::SetSubtractBaseline(10);\r
69 \r
70 // TRD reconstruction params\r
71 AliTRDrecoParam *fTRDrecoParam = AliTRDrecoParam::GetCosmicTestParam();\r
72 rec.SetRecoParam("TRD",fTRDrecoParam);\r
73 AliTRDtrackerV1::SetNTimeBins(30);\r
462112b2 74\r
40d0f38f 75 // PHOS settings\r
09244196 76 AliPHOSRecoParam* recPHOS = new AliPHOSRecoParam();\r
77 recPHOS->SetEMCSubtractPedestals(kTRUE);\r
78 recPHOS->SetEMCMinE(0.05);\r
79 recPHOS->SetEMCClusteringThreshold(0.10);\r
80 rec.SetRecoParam("PHOS",recPHOS);\r
40d0f38f 81\r
82 // T0 settings\r
09244196 83 //AliLog::SetModuleDebugLevel("T0", 10);\r
40d0f38f 84\r
85 // MUON settings\r
09244196 86 //AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3);\r
40d0f38f 87 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();\r
88 muonRecoParam->CombineClusterTrackReco(kTRUE);\r
89 muonRecoParam->SetCalibrationMode("NOGAIN");\r
90 //muonRecoParam->SetClusteringMode("PEAKFIT");\r
91 //muonRecoParam->SetClusteringMode("PEAKCOG");\r
92 muonRecoParam->Print("FULL");\r
09244196 93 rec.SetRecoParam("MUON",muonRecoParam);\r
40d0f38f 94 \r
95 // Tracking settings\r
f7a1cc68 96 AliMagF* field;\r
5225c9db 97 if (mfield)\r
f7a1cc68 98 field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);\r
5225c9db 99 else\r
f7a1cc68 100 field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k2kG);\r
101\r
40d0f38f 102 Double_t mostProbPt=0.35;\r
103 AliExternalTrackParam::SetMostProbablePt(mostProbPt);\r
104\r
105 // AliReconstruction settings\r
40d0f38f 106 rec.SetUniformFieldTracking(kFALSE);\r
107 rec.SetWriteESDfriend(kTRUE);\r
108 rec.SetWriteAlignmentData();\r
21d4a8d1 109 rec.SetInput(filename);\r
09244196 110 // rec.SetRunReconstruction("ALL");\r
40d0f38f 111 rec.SetUseTrackingErrorsForAlignment("ITS");\r
112\r
113 // In case some detectors have to be switched off...\r
5225c9db 114 rec.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS MUON FMD PMD T0 VZERO ZDC ACORDE");\r
09244196 115\r
62b2441a 116 // Enable vertex finder - it is needed for cosmic track reco\r
117 rec.SetRunVertexFinder(kTRUE);\r
40d0f38f 118\r
119 // To be enabled if some equipment IDs are not set correctly by DAQ\r
120 // rec.SetEquipmentIdMap("EquipmentIdMap.data");\r
121\r
122 // Detector options if any\r
09244196 123 rec.SetOption("ITS","cosmics");\r
40d0f38f 124 rec.SetOption("MUON","SAVEDIGITS");\r
cbc0d7f8 125 rec.SetOption("T0","cosmic");\r
40d0f38f 126\r
09244196 127 // Enabled when CTP readout starts\r
128 rec.SetFillTriggerESD(kTRUE);\r
40d0f38f 129\r
130 // all events in one single file\r
131 rec.SetNumberOfEventsPerFile(-1);\r
132\r
133 // switch off cleanESD\r
134 rec.SetCleanESD(kFALSE);\r
135\r
09244196 136 //rec.SetEventRange(0,15);\r
40d0f38f 137\r
5225c9db 138 rec.SetRunQA("ITS TPC:ESD RECPOINT");\r
09244196 139 rec.SetRunGlobalQA(kTRUE);\r
40d0f38f 140 AliLog::Flush();\r
141 rec.Run();\r
142\r
143 //cout << "-----------------------------------------------------------------" << endl;\r
144 //cout << "-----------------------------------------------------------------" << endl;\r
145 //cout << "--------- Reconstruction Completed. Start merging QAs -----------" << endl;\r
146 //cout << "-----------------------------------------------------------------" << endl;\r
147 //cout << "-----------------------------------------------------------------" << endl;\r
148 //AliQADataMakerSteer qas;\r
149 //qas.Merge();\r
150}\r