]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_embedding/UpdateRecoParam.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_embedding / UpdateRecoParam.C
CommitLineData
6e4947dd 1UpdateRecoParam(const Int_t runNumber)
2{
3 // Read the array of PHOS recoparam objects from OCDB and update
4 // EMC fitter version to "v4".
5 // Write the updated object to OCDB.
6 // Yuri Kharlov. 9.12.2011
7 //
8 /* $Id: UpdateRecoParam.C 53497 2011-12-09 12:22:47Z kharlov $ */
9
10 AliCDBManager::Instance()->SetDefaultStorage("local://./OCDB");
11 AliCDBManager::Instance()->SetRun(runNumber);
12
13 AliCDBEntry* cdbEntry = AliCDBManager::Instance()->Get("PHOS/Calib/RecoParam");
14 AliCDBMetaData *md = cdbEntry->GetMetaData();
15 cout << "Responsible: " << md->GetResponsible() << endl;
16 cout << "MD Comment : " << md->GetComment() << endl;
17 TObjArray* arrayRecoParam = (TObjArray*)cdbEntry->GetObject();
18
19 cout << "N recoparam = " << arrayRecoParam->GetEntries() << endl;
20
21 AliPHOSRecoParam *rp = 0;
22 for (Int_t i=0; i<arrayRecoParam->GetEntries(); i++) {
23 rp = (AliPHOSRecoParam*)arrayRecoParam->At(i);
24// printf("RP %d: event specie = %d, fitter version = %s\n",
25// i,rp->GetEventSpecie(),rp->EMCFitterVersion());
26 rp->SetEMCMinE(0.);
27 }
28
29 // Writing new recoparam to OCDB
30
31 AliCDBManager* cdb = AliCDBManager::Instance();
32 cdb->SetDefaultStorage("local://PHOSRP");
33
34 AliCDBMetaData *md= new AliCDBMetaData();
35 md->SetResponsible("Dmitri Peresunko");
36 md->SetComment("PHOS recoparameters: EMC minimum energy set to 0. Should be used only for embedding!!");
37 AliCDBId id("PHOS/Calib/RecoParam",80000,AliCDBRunRange::Infinity());
38 cdb->Put(arrayRecoParam,id, md);
39
40}
41//-----------------------------------------------------------------------------
42
43ReadRecoParam(const Int_t runNumber)
44{
45 // Read the array of PHOS recoparam objects from OCDB and
46 // print its content to stdout
47
48 AliCDBManager::Instance()->SetDefaultStorage("local://./OCDB");
49 AliCDBManager::Instance()->SetRun(runNumber);
50
51 AliCDBEntry* cdbEntry = AliCDBManager::Instance()->Get("PHOS/Calib/RecoParam");
52 AliCDBMetaData *md = cdbEntry->GetMetaData();
53 printf("Responsible: %s\n",md->GetResponsible());
54 printf("MD Comment : %s\n",md->GetComment());
55 TObjArray* arrayRecoParam = (TObjArray*)cdbEntry->GetObject();
56
57 AliPHOSRecoParam *rp = 0;
58 for (Int_t i=0; i<arrayRecoParam->GetEntries(); i++) {
59 rp = (AliPHOSRecoParam*)arrayRecoParam->At(i);
60 printf("Recoparam %d: event specie = %d\n",
61 i,rp->GetEventSpecie());
62
63 printf("\tEMCClusteringThreshold = %g\n",rp->GetEMCClusteringThreshold());
64 printf("\tEMCLocalMaxCut = %g\n",rp->GetEMCLocalMaxCut());
65 printf("\tEMCRawDigitThreshold = %g\n",rp->GetEMCRawDigitThreshold());
66 printf("\tEMCMinE = %g\n",rp->GetEMCMinE());
67 printf("\tEMCLogWeight = %g\n",rp->GetEMCLogWeight());
68 printf("\tEMCSampleQualityCut = %g\n",rp->GetEMCSampleQualityCut());
69 printf("\tEMCEcoreRadius = %g\n",rp->GetEMCEcoreRadius());
70 printf("\tEMCEcore2ESD = %d\n",rp->EMCEcore2ESD());
71 printf("\tEMCSubtractPedestals = %d\n",rp->EMCSubtractPedestals());
72 printf("\tEMCToUnfold = %d\n",rp->EMCToUnfold());
73 printf("\tEMCfitter version = %s\n",rp->EMCFitterVersion());
74 printf("\tEMCEnergyCorrectionOn = %d\n",rp->GetEMCEnergyCorrectionOn());
75 printf("\tGlobalAltroOffset = %f\n",rp->GetGlobalAltroOffset());
76 printf("\tGlobalAltroThreshold = %d\n",rp->GetGlobalAltroThreshold());
77 printf("\tTimeGateAmpThresh = %g\n",rp->GetTimeGateAmpThresh());
78 printf("\tTimeGateLow = %g\n",rp->GetTimeGateLow());
79 printf("\tTimeGateHigh = %g\n",rp->GetTimeGateHigh());
80 printf("\tNonlinearityCorrectionVersion = %s\n",rp->GetNonlinearityCorrectionVersion());
81 }
82}