3 // This is just example macro
4 // Responsible: marian.ivanov@cern.ch
6 // 1. Before invocation of the calibration - in the calibration trains
7 // 2. To setup calibration viewer.
9 // ConfigOCDB - setup default and specific data storage
10 // SetupCustom - user sepcific configuration
11 // - Values in local cache of OCDB are overwritten
15 void SetupCustom(Int_t run);
17 void ConfigOCDB(Int_t crun=-1){
19 printf("SETUP OCBD for TPC\n");
21 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
22 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/Parameters","local://$ALICE_ROOT/OCDB");
23 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/ClusterParam","local:///u/miranov/OCDB/TPCcosmic2/");
24 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/PadTime0","local://$ALICE_ROOT/OCDB");
25 AliCDBManager::Instance()->SetSpecificStorage("GRP/GRP/Data","local:///lustre/alice/alien/alice/data/2009/OCDB/");
26 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/Temperature","local:///lustre/alice/alien/alice/data/2009/OCDB/");
27 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/Goofie","local:///lustre/alice/alien/alice/data/2009/OCDB/");
28 AliCDBManager::Instance()->SetSpecificStorage("TPC/Calib/HighVoltage","local:///lustre/alice/alien/alice/data/2009/OCDB/");
31 AliCDBManager::Instance()->SetRun(run);
36 void SetupCustom(Int_t run){
39 // Custom part - to be empty once we are happy with the calibration
42 // Setup magnetic field
44 AliGRPObject *grp = AliTPCcalibDB::GetGRP(run);
48 current = grp->GetL3Current((AliGRPObject::Stats)0);
49 bz = 5*current/30000.;
50 printf("Run%d\tL3 current%f\tBz\t%f\n",run,current,bz);
53 printf("Run%d\tL3 current%f\tBz\t%f\n",run,current,bz);
55 AliMagF::BMap_t smag = AliMagF::k5kG;
56 Double_t bzfac = bz/5;
57 if (bzfac==0) { // force default magnetic field if 0 field used
61 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", bzfac, 1., smag));
63 printf("\n\nSET EXB FIELD\t%f\n\n", -bz);
64 AliTPCcalibDB::Instance()->SetExBField(-bz);
70 TGeoManager::Import("/u/miranov/proof/geometry.root");
71 AliGeomManager::LoadGeometry("/u/miranov/proof/geometry.root");
73 AliTPCClusterParam * paramCl = AliTPCcalibDB::Instance()->GetClusterParam();
74 AliTPCParam * paramTPC = AliTPCcalibDB::Instance()->GetParameters();
75 paramCl->SetInstance(paramCl);
80 AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
81 AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
82 transform->SetCurrentRecoParam(tpcRecoParam);
83 tpcRecoParam->SetUseRPHICorrection(kTRUE);
85 tpcRecoParam->SetUseRadialCorrection(kFALSE);
86 tpcRecoParam->SetUseQuadrantAlignment(kTRUE);
88 tpcRecoParam->SetUseSectorAlignment(kFALSE);
89 tpcRecoParam->SetUseDriftCorrectionTime(kFALSE);
90 tpcRecoParam->SetUseDriftCorrectionGY(kTRUE);
91 tpcRecoParam->SetUseGainCorrectionTime(kFALSE);
92 tpcRecoParam->SetUseFieldCorrection(kFALSE);
93 tpcRecoParam->SetUseExBCorrection(kTRUE);
97 TFile fposcor("~/OCDB/calibUnlin.root");
98 AliTPCPointCorrection *pcorr = fposcor.Get("correction");
99 if (pcorr) pcorr->SetInstance(pcorr);
103 printf("END of SETUP OCBD for TPC\n");