]>
Commit | Line | Data |
---|---|---|
674af238 | 1 | /* |
2 | macro to extract the OCDB entries | |
3 | ||
4 | input: CalibObjects.root | |
5 | ouput: TimeGain and TimeVdrift calibration objects for TPC and TRD | |
6 | ||
7 | Example: | |
2bfe5463 | 8 | .L $ALICE_ROOT/PWGPP/CalibMacros/Pass0/makeOCDB.C |
674af238 | 9 | makeOCDB("105160"); |
10 | ||
11 | */ | |
12 | ||
674af238 | 13 | void makeOCDB(TString runNumberString, TString ocdbStorage="") |
14 | { | |
15 | // | |
16 | // extract TPC OCDB entries | |
17 | // | |
18 | gROOT->Macro("LoadLibraries.C"); | |
19 | gROOT->LoadMacro("ConfigCalibTrain.C"); | |
8ec63e76 | 20 | |
674af238 | 21 | // switch off log info |
22 | AliLog::SetClassDebugLevel("AliESDEvent",0); | |
23 | ||
24 | // config GRP | |
25 | Int_t runNumber = runNumberString.Atoi(); | |
26 | printf("runNumber from runCalibTrain = %d\n",runNumber); | |
27 | ConfigCalibTrain(runNumber, "raw://"); | |
8ec63e76 | 28 | |
674af238 | 29 | // Steering Tasks - set output storage |
30 | // DefaultStorage set already before - in ConfigCalibTrain.C | |
8ec63e76 | 31 | //ocdbStorage+="?se=ALICE::CERN::SE"; |
32 | ||
674af238 | 33 | AliCDBManager::Instance()->SetSpecificStorage("*/*/*",ocdbStorage.Data()); |
8ec63e76 | 34 | |
674af238 | 35 | // set OCDB storage |
36 | if (ocdbStorage.Length()==0) ocdbStorage+="local://"+gSystem->GetFromPipe("pwd")+"/OCDB"; | |
37 | ||
38 | // TPC part | |
39 | TFile fcalib("CalibObjects.root"); | |
40 | AliTPCPreprocessorOffline proces; | |
41 | ||
42 | // switch on parameter validation | |
278563e2 | 43 | proces.SetTimeGainRange(0.5,3.0); |
674af238 | 44 | proces.SwitchOnValidation(); |
45 | ||
46 | // Make timegain calibration | |
47 | //proces.CalibTimeGain("CalibObjects.root", runNumber,AliCDBRunRange::Infinity(),ocdbStorage); | |
48 | proces.CalibTimeGain("CalibObjects.root", runNumber,runNumber,ocdbStorage); | |
49 | ||
50 | // Make vdrift calibration | |
51 | //proces.CalibTimeVdrift("CalibObjects.root",runNumber,AliCDBRunRange::Infinity(),ocdbStorage); | |
52 | proces.CalibTimeVdrift("CalibObjects.root",runNumber,runNumber,ocdbStorage); | |
b171a803 | 53 | // |
54 | // TOF part | |
55 | // | |
56 | AliTOFAnalysisTaskCalibPass0 calibTask; | |
57 | Printf("Calibrating TOF"); | |
58 | calibTask.ProcessOutput("CalibObjects.root", ocdbStorage); | |
278563e2 | 59 | // |
60 | // | |
674af238 | 61 | |
278563e2 | 62 | // T0 part |
63 | AliT0PreprocessorOffline procesT0; | |
64 | // Make calibration of channels offset | |
65 | procesT0.Process("CalibObjects.root",runNumber, runNumber, ocdbStorage); | |
674af238 | 66 | |
278563e2 | 67 | |
68 | ||
69 | //TRD part | |
68307a00 | 70 | AliTRDPreprocessorOffline procestrd; |
71 | procestrd.SetLinearFitForVdrift(kTRUE); | |
72 | procestrd.SetMinStatsVdriftT0PH(600*10); | |
73 | procestrd.SetMinStatsVdriftLinear(50); | |
74 | procestrd.SetMinStatsGain(600); | |
471e9aad | 75 | procestrd.SetLimitValidateNoData(40); |
76 | procestrd.SetLimitValidateBadCalib(40); | |
8b5ef4b6 | 77 | procestrd.SetAlternativeDriftVelocityFit(kTRUE); |
68307a00 | 78 | procestrd.Init("CalibObjects.root"); |
79 | Int_t versionVdriftUsed = procestrd.GetVersionVdriftUsed(); | |
80 | Int_t subversionVdriftUsed = procestrd.GetSubVersionVdriftUsed(); | |
81 | Int_t versionGainUsed = procestrd.GetVersionGainUsed(); | |
82 | Int_t subversionGainUsed = procestrd.GetSubVersionGainUsed(); | |
83 | Int_t versionExBUsed = procestrd.GetVersionExBUsed(); | |
84 | Int_t subversionExBUsed = procestrd.GetSubVersionExBUsed(); | |
85 | printf("version and subversion vdrift %d and %d\n",versionVdriftUsed,subversionVdriftUsed); | |
86 | printf("version and subversion gain %d and %d\n",versionGainUsed,subversionGainUsed); | |
87 | printf("version and subversion exb %d and %d\n",versionExBUsed,subversionExBUsed); | |
88 | procestrd.Process("CalibObjects.root",runNumber,runNumber,ocdbStorage); | |
89 | Int_t trdstatus = procestrd.GetStatus(); | |
90 | ||
278563e2 | 91 | |
92 | //Mean Vertex | |
93 | AliMeanVertexPreprocessorOffline procesMeanVtx; | |
94 | procesMeanVtx.ProcessOutput("CalibObjects.root", ocdbStorage, runNumber); | |
95 | ||
674af238 | 96 | return; |
97 | } |