]>
Commit | Line | Data |
---|---|---|
a45764d9 | 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: | |
054d9070 | 8 | .L $ALICE_ROOT/PWGPP/CalibMacros/CPass1/makeOCDB.C |
a45764d9 | 9 | makeOCDB("105160"); |
10 | ||
11 | */ | |
12 | ||
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"); | |
20 | ||
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://"); | |
28 | ||
29 | // Steering Tasks - set output storage | |
30 | // DefaultStorage set already before - in ConfigCalibTrain.C | |
31 | //ocdbStorage+="?se=ALICE::CERN::SE"; | |
32 | ||
33 | AliCDBManager::Instance()->SetSpecificStorage("*/*/*",ocdbStorage.Data()); | |
34 | ||
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 | |
43 | proces.SetTimeGainRange(0.5,3.0); | |
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); | |
53 | // | |
54 | // TOF part | |
55 | // | |
56 | AliTOFAnalysisTaskCalibPass0 calibTask; | |
57 | Printf("Calibrating TOF"); | |
58 | calibTask.ProcessOutput("CalibObjects.root", ocdbStorage); | |
59 | // | |
60 | // | |
61 | ||
62 | // T0 part | |
63 | AliT0PreprocessorOffline procesT0; | |
64 | // Make calibration of channels offset | |
65 | procesT0.Process("CalibObjects.root",runNumber, runNumber, ocdbStorage); | |
66 | ||
67 | ||
68 | ||
69 | //TRD part | |
70 | AliTRDPreprocessorOffline procestrd; | |
71 | procestrd.SetLinearFitForVdrift(kTRUE); | |
72 | procestrd.SetMinStatsVdriftT0PH(600*10); | |
73 | procestrd.SetMinStatsVdriftLinear(50); | |
74 | procestrd.SetMinStatsGain(600); | |
75 | procestrd.SetLimitValidateNoData(40); | |
76 | procestrd.SetLimitValidateBadCalib(40); | |
77 | procestrd.SetAlternativeDriftVelocityFit(kTRUE); | |
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 | ||
91 | ||
92 | //Mean Vertex | |
93 | AliMeanVertexPreprocessorOffline procesMeanVtx; | |
94 | procesMeanVtx.ProcessOutput("CalibObjects.root", ocdbStorage, runNumber); | |
95 | ||
96 | return; | |
97 | } |