]> git.uio.no Git - u/mrichter/AliRoot.git/blob - test/QA/recraw.C
updated with changes from Peter
[u/mrichter/AliRoot.git] / test / QA / recraw.C
1 void recraw() {
2   const char * kYear = "08" ; 
3  
4         AliLog::SetGlobalLogLevel(AliLog::kError);
5         
6         gSystem->Load("libRAliEn.so");
7   gSystem->Load("libNet.so");
8   gSystem->Load("libMonaLisa.so");
9   new TMonaLisaWriter(0, "GridAliRoot-rec.C", 0, 0, "global");
10   gSystem->Setenv("APMON_INTERVAL", "120");
11         
12         // Set the CDB storage location
13         AliCDBManager * man = AliCDBManager::Instance();
14   man->SetDefaultStorage("local://$ALICE_ROOT");
15   //man->SetDefaultStorage("alien://Folder=/alice/data/2008/LHC08b/OCDB/");
16
17         // Example in case a specific CDB storage is needed
18         man->SetSpecificStorage("EMCAL/*","local://DB");
19   
20   // ITS settings
21   AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetCosmicTestParam();
22   itsRecoParam->SetFactorSAWindowSizes(20);
23   itsRecoParam->SetClusterErrorsParam(2);
24   itsRecoParam->SetFindV0s(kFALSE);
25   itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);
26   itsRecoParam->SetUseAmplitudeInfo(kFALSE);
27   // In case we want to switch off a layer
28   //  itsRecoParam->SetLayerToSkip(<N>);
29   //  itsRecoParam->SetLayerToSkip(4);
30   //  itsRecoParam->SetLayerToSkip(5);
31   itsRecoParam->SetLayerToSkip(2);
32   itsRecoParam->SetLayerToSkip(3);
33   //itsRecoParam->SetSAOnePointTracks();
34   itsRecoParam->SetClusterMisalError(1.0); // [cm]
35   itsRecoParam->SetSAUseAllClusters();
36   AliITSReconstructor::SetRecoParam(itsRecoParam);
37         
38   // TPC settings
39   //AliLog::SetClassDebugLevel("AliTPCclustererMI",2);
40   AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE);
41   tpcRecoParam->SetTimeInterval(60,940);
42   Double_t sysError[5]={0.3,1, 0.3/150., 1./150.,0.3/(150*150.)};
43   tpcRecoParam->SetSystematicError(sysError);
44   tpcRecoParam->SetMinMaxCutAbs(4.);
45   tpcRecoParam->SetMinLeftRightCutAbs(6.);
46   tpcRecoParam->SetMinUpDownCutAbs(6.);
47   //  tpcRecoParam->Dump();
48   AliTPCReconstructor::SetRecoParam(tpcRecoParam);
49   AliTPCReconstructor::SetStreamLevel(1);
50         
51   // TRD setting
52   // Settings for the TRD Raw Reader
53   AliTRDrawStreamBase::SetRawStreamVersion("TB");
54   AliTRDrawStreamTB::SetNoErrorWarning();
55   AliTRDrawStreamTB::AllowCorruptedData();
56   AliTRDrawStreamTB::DisableStackNumberChecker();
57   AliTRDrawStreamTB::DisableStackLinkNumberChecker();
58   AliTRDrawStreamTB::SetSubtractBaseline(10);
59   
60   // TRD reconstruction params
61   AliTRDrecoParam *fTRDrecoParam = AliTRDrecoParam::GetCosmicTestParam();
62   AliTRDReconstructor::SetRecoParam(fTRDrecoParam);
63   AliTRDtrackerV1::SetNTimeBins(30);
64         
65   // PHOS settings
66   AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
67   recEmc->SetSubtractPedestals(kTRUE);
68   recEmc->SetMinE(0.05);
69   recEmc->SetClusteringThreshold(0.10);
70   AliPHOSReconstructor::SetRecoParamEmc(recEmc);
71         
72   // T0 settings
73   //AliLog::SetModuleDebugLevel("T0", 10);
74         
75   // MUON settings
76   //AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3);
77   AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
78   muonRecoParam->CombineClusterTrackReco(kTRUE);
79   muonRecoParam->SetCalibrationMode("NOGAIN");
80   //muonRecoParam->SetClusteringMode("PEAKFIT");
81   //muonRecoParam->SetClusteringMode("PEAKCOG");
82   muonRecoParam->Print("FULL");
83  // AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
84
85         // Tracking settings
86         // **** The field map settings must be the same as in Config.C !
87   AliMagFMaps *field=new AliMagFMaps("Maps", "Maps", 2, 1., 10., AliMagFMaps::k5kG);
88   Bool_t uniform = kFALSE;
89   AliTracker::SetFieldMap(field, uniform);
90         Double_t mostProbPt=0.35;
91   AliExternalTrackParam::SetMostProbablePt(mostProbPt);
92         
93         // AliReconstruction settings
94         AliReconstruction reco;
95         reco.SetUniformFieldTracking(uniform);
96         reco.SetWriteESDfriend(kTRUE);
97   reco.SetWriteAlignmentData();
98         reco.SetInput("raw.root");
99         reco.SetUseTrackingErrorsForAlignment("ITS");
100         
101         // In case some detectors have to be switched off...
102         reco.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS MUON FMD PMD T0 VZERO ZDC ACORDE");
103
104         reco.SetRunVertexFinder(kTRUE);
105         
106         // all events in one single file
107   reco.SetNumberOfEventsPerFile(-1);
108
109         // switch off cleanESD
110   reco.SetCleanESD(kFALSE);
111         
112         reco.SetRunQA("ALL:ALL") ;
113         //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
114   AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
115   
116         AliLog::Flush();
117         
118   TStopwatch timer;
119   timer.Start();
120   reco.Run();
121   timer.Stop();
122   timer.Print();
123 }
124