2 Example macro to build AliTPCClusterParam
3 postprocessing the output of the calibration using tracks
4 In the future this macro will be part of the Preprocesor
8 void StoreObject(AliTPCClusterParam *param);
10 void MakeClusterParam(const char *fnresolc="Output.root", const char *fnresolg="Output.root"){
11 gSystem->Load("libTPCcalib.so");
12 TFile fresolc(fnresolc);
13 TFile fresolg(fnresolg);
14 AliTPCcalibTracks *calibtracks = (AliTPCcalibTracks*)fresolc.Get("calibTracks");
15 AliTPCcalibTracksGain *calibtracksGain = (AliTPCcalibTracksGain*)fresolg.Get("calibTracksGain");
17 AliTPCClusterParam clParam;
19 // Make a resolution tree
21 calibtracks->MakeResPlotsQTree(200,"plots");
22 TFile fres("plots/resol.root");
23 TTree *treeres = (TTree*)fres.Get("Resol");
24 // Fit the resolution parameterization
25 clParam.FitResol(treeres);
26 clParam.FitRMS(treeres);
27 clParam.SetInstance(&clParam);
28 TF1 f1z_z("f1z_z","AliTPCClusterParam::SGetError0Par(1,0,x,0)",0,250);
30 // angular effect calibration - usable only with the
33 calibtracksGain->UpdateClusterParam(&clParam);
37 TFile fclparam("TPCClusterParam.root","recreate");
38 clParam->Write("Param");
41 AliTPCClusterParam::SetInstance(&clParam);
44 void StoreObject(AliTPCClusterParam *clParam)
50 char *gCDBpath = "local://$ALICE_ROOT/OCDB";
51 AliCDBMetaData *md1= new AliCDBMetaData();
52 AliCDBId id1("TPC/Calib/ClusterParam", gkDummyRun, gkDummyRun);
53 AliCDBStorage* gStorLoc = 0;
54 AliCDBManager *man = AliCDBManager::Instance();
55 gStorLoc = man->GetStorage(gCDBpath);
57 md1->SetObjectClassName("AliTPCClusterParam");
58 md1->SetResponsible("Marian Ivanov");
59 md1->SetBeamPeriod(1);
60 md1->SetAliRootVersion("v5-08-Release"); //root version
61 md1->SetComment("Calibration data using the MC cosmic");
62 gStorLoc->Put(&clParam, id1, md1);