]>
Commit | Line | Data |
---|---|---|
85ffaf6c | 1 | void MakePHOSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kDefault) |
2 | { | |
3 | //======================================================================== | |
4 | // | |
5 | // Steering macro for PHOS reconstruction parameters | |
6 | // | |
7 | // Author: Yuri Kharlov | |
112d73c4 | 8 | // 01.11.2009 |
85ffaf6c | 9 | //======================================================================== |
112d73c4 | 10 | // $Id$ */ |
85ffaf6c | 11 | |
12 | const char* macroname = "MakePHOSRecoParam.C"; | |
112d73c4 | 13 | const Int_t firstRun = 85779; |
85ffaf6c | 14 | |
15 | // Activate CDB storage and load geometry from CDB | |
16 | AliCDBManager* cdb = AliCDBManager::Instance(); | |
17 | if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB"); | |
18 | ||
19 | TObjArray *recoParamArray = new TObjArray(); | |
20 | ||
21 | { | |
112d73c4 | 22 | // Default reconstruction parameters |
85ffaf6c | 23 | AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters(); |
0428f331 | 24 | phosRecoParam->SetEventSpecie(AliRecoParam::kDefault); |
25 | phosRecoParam->SetEMCSubtractPedestals(kFALSE); | |
12dd7f10 | 26 | phosRecoParam->SetEMCRawDigitThreshold(2); |
27 | phosRecoParam->SetEMCMinE(0.012); | |
0428f331 | 28 | phosRecoParam->SetEMCClusteringThreshold(0.20); |
112d73c4 | 29 | phosRecoParam->SetEMCFitterVersion("v0"); |
12dd7f10 | 30 | phosRecoParam->SetEMCSampleQualityCut(10.); |
112d73c4 | 31 | phosRecoParam->SetName("Default"); |
85ffaf6c | 32 | recoParamArray->AddLast(phosRecoParam); |
33 | } | |
34 | { | |
112d73c4 | 35 | // Reconstruction parameters for cosmic run 2009 |
85ffaf6c | 36 | AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters(); |
0428f331 | 37 | phosRecoParam->SetEventSpecie(AliRecoParam::kCosmic); |
112d73c4 | 38 | phosRecoParam->SetEMCSubtractPedestals(kFALSE); |
39 | phosRecoParam->SetEMCMinE(0.025); | |
40 | phosRecoParam->SetEMCClusteringThreshold(0.05); | |
41 | phosRecoParam->SetEMCFitterVersion("v0"); | |
42 | phosRecoParam->SetEMCUnfolding(kFALSE); | |
43 | phosRecoParam->SetEMCEnergyCorrectionOn(kFALSE); | |
44 | phosRecoParam->SetName("Cosmic2009"); | |
45 | recoParamArray->AddLast(phosRecoParam); | |
46 | } | |
47 | { | |
48 | // Reconstruction parameters for the first pp run 2009 | |
49 | AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters(); | |
50 | phosRecoParam->SetEventSpecie(AliRecoParam::kLowMult); | |
51 | phosRecoParam->SetEMCSubtractPedestals(kFALSE); | |
52 | phosRecoParam->SetEMCRawDigitThreshold(2); | |
53 | phosRecoParam->SetEMCMinE(0.012); | |
54 | phosRecoParam->SetEMCClusteringThreshold(0.22); | |
55 | phosRecoParam->SetEMCFitterVersion("v0"); | |
56 | phosRecoParam->SetEMCUnfolding(kTRUE); | |
57 | phosRecoParam->SetName("LowMult2009"); | |
58 | recoParamArray->AddLast(phosRecoParam); | |
59 | } | |
60 | { | |
61 | // Reconstruction parameters for the first PbPb run 2010 | |
62 | AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters(); | |
63 | phosRecoParam->SetEventSpecie(AliRecoParam::kHighMult); | |
64 | phosRecoParam->SetEMCSubtractPedestals(kFALSE); | |
65 | phosRecoParam->SetEMCRawDigitThreshold(2); | |
66 | phosRecoParam->SetEMCMinE(0.015); | |
67 | phosRecoParam->SetEMCClusteringThreshold(0.40); | |
68 | phosRecoParam->SetEMCFitterVersion("v0"); | |
69 | phosRecoParam->SetEMCUnfolding(kTRUE); | |
70 | phosRecoParam->SetName("HighMult2009"); | |
71 | recoParamArray->AddLast(phosRecoParam); | |
85ffaf6c | 72 | } |
73 | ||
74 | // Set the default | |
75 | Bool_t defaultIsSet = kFALSE; | |
76 | for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) { | |
77 | AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i); | |
78 | if (!param) continue; | |
79 | if (default & param->GetEventSpecie()) { | |
80 | param->SetAsDefault(); | |
81 | defaultIsSet = kTRUE; | |
82 | } | |
83 | } | |
84 | ||
85 | if (!defaultIsSet) { | |
86 | Error(macroname,"The default reconstruction parameters are not set! Exiting..."); | |
87 | return; | |
88 | } | |
89 | ||
90 | // save in CDB storage | |
91 | AliCDBMetaData *md= new AliCDBMetaData(); | |
92 | md->SetResponsible("Yuri Kharlov"); | |
112d73c4 | 93 | md->SetComment("Reconstruction parameters PHOS for cosmic, lowMult and highMult"); |
85ffaf6c | 94 | md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); |
95 | md->SetBeamPeriod(0); | |
112d73c4 | 96 | AliCDBId id("PHOS/Calib/RecoParam",firstRun,AliCDBRunRange::Infinity()); |
85ffaf6c | 97 | cdb->GetDefaultStorage()->Put(recoParamArray,id, md); |
98 | ||
99 | return; | |
100 | } |