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 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, bzfac, 1., 10., smag));
59 printf("\n\nSET EXB FIELD\t%f\n\n", -bz);
60 AliTPCcalibDB::Instance()->SetExBField(-bz);
66 TGeoManager::Import("/u/miranov/proof/geometry.root");
67 AliGeomManager::LoadGeometry("/u/miranov/proof/geometry.root");
69 AliTPCClusterParam * paramCl = AliTPCcalibDB::Instance()->GetClusterParam();
70 AliTPCParam * paramTPC = AliTPCcalibDB::Instance()->GetParameters();
71 paramCl->SetInstance(paramCl);
76 AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
77 AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
78 transform->SetCurrentRecoParam(tpcRecoParam);
79 tpcRecoParam->SetUseRPHICorrection(kTRUE);
81 tpcRecoParam->SetUseRadialCorrection(kFALSE);
82 tpcRecoParam->SetUseQuadrantAlignment(kTRUE);
84 tpcRecoParam->SetUseSectorAlignment(kFALSE);
85 tpcRecoParam->SetUseDriftCorrectionTime(kFALSE);
86 tpcRecoParam->SetUseDriftCorrectionGY(kTRUE);
87 tpcRecoParam->SetUseGainCorrectionTime(kFALSE);
88 tpcRecoParam->SetUseFieldCorrection(kFALSE);
89 tpcRecoParam->SetUseExBCorrection(kTRUE);
93 TFile fposcor("~/OCDB/calibUnlin.root");
94 AliTPCPointCorrection *pcorr = fposcor.Get("correction");
95 if (pcorr) pcorr->SetInstance(pcorr);
99 printf("END of SETUP OCBD for TPC\n");