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