AliRoot Core  edcc906 (edcc906)
MakeClusterParam.C
Go to the documentation of this file.
1 
7 
8 void MakeClusterParam(const char *fnresolc="Output.root", const char *fnresolg="Output.root"){
9  gSystem->Load("libTPCcalib");
10  TFile fresolc(fnresolc);
11  TFile fresolg(fnresolg);
12  AliTPCcalibTracks *calibtracks = (AliTPCcalibTracks*)fresolc.Get("calibTracks");
13  AliTPCcalibTracksGain *calibtracksGain = (AliTPCcalibTracksGain*)fresolg.Get("calibTracksGain");
14 
15  AliTPCClusterParam clParam;
16  //
17  // Make a resolution tree
18  //
19  calibtracks->MakeResPlotsQTree(200,"plots");
20  TFile fres("plots/resol.root");
21  TTree *treeres = (TTree*)fres.Get("Resol");
22  // Fit the resolution parameterization
23  clParam.FitResol(treeres);
24  clParam.FitRMS(treeres);
25  clParam.SetInstance(&clParam);
26  TF1 f1z_z("f1z_z","AliTPCClusterParam::SGetError0Par(1,0,x,0)",0,250);
27  //
28  // angular effect calibration - usable only with the
29  // cosmic tracks
30  //
31  calibtracksGain->UpdateClusterParam(&clParam);
32  //
33  //
34  //
35  TFile fclparam("TPCClusterParam.root","recreate");
36  clParam->Write("Param");
37  fclparam.Close();
38  StoreObject(clParam);
40 }
41 
43 {
45 
46  Int_t gkDummyRun = 0;
47  char *gCDBpath = "local://$ALICE_ROOT/OCDB";
48  AliCDBMetaData *md1= new AliCDBMetaData();
49  AliCDBId id1("TPC/Calib/ClusterParam", gkDummyRun, gkDummyRun);
52  gStorLoc = man->GetStorage(gCDBpath);
53 
54  md1->SetObjectClassName("AliTPCClusterParam");
55  md1->SetResponsible("Marian Ivanov");
56  md1->SetBeamPeriod(1);
57  md1->SetAliRootVersion("v5-08-Release"); //root version
58  md1->SetComment("Calibration data using the MC cosmic");
59  gStorLoc->Put(&clParam, id1, md1);
60 }
61 
62 
void MakeClusterParam(const char *fnresolc="Output.root", const char *fnresolg="Output.root")
Bool_t Put(TObject *object, AliCDBId &id, AliCDBMetaData *metaData, const char *mirrors="", AliCDBManager::DataType type=AliCDBManager::kPrivate)
void SetComment(const char *comment)
void SetResponsible(const char *yourName)
AliCDBStorage * gStorLoc
void FitRMS(TTree *tree)
TPC cluster error, shape and charge parameterization as function of drift length and inclination angl...
void StoreObject(AliTPCClusterParam *param)
AliCDBStorage * GetStorage(const char *dbString)
void SetBeamPeriod(UInt_t period)
void SetInstance(AliTPCClusterParam *const param)
void SetAliRootVersion(const char *version)
char * gCDBpath
void FitResol(TTree *tree)
void SetObjectClassName(const char *name)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
Int_t gkDummyRun