]>
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 | |
8 | // 13.08.2008 | |
9 | //======================================================================== | |
10 | ||
11 | ||
12 | const char* macroname = "MakePHOSRecoParam.C"; | |
13 | ||
14 | // Activate CDB storage and load geometry from CDB | |
15 | AliCDBManager* cdb = AliCDBManager::Instance(); | |
16 | if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB"); | |
17 | ||
18 | TObjArray *recoParamArray = new TObjArray(); | |
19 | ||
20 | { | |
21 | AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters(); | |
0428f331 | 22 | phosRecoParam->SetEventSpecie(AliRecoParam::kDefault); |
23 | phosRecoParam->SetEMCSubtractPedestals(kFALSE); | |
24 | phosRecoParam->SetEMCMinE(0.045); | |
25 | phosRecoParam->SetEMCClusteringThreshold(0.20); | |
85ffaf6c | 26 | phosRecoParam->SetEMCDecoderVersion("v1"); |
27 | recoParamArray->AddLast(phosRecoParam); | |
28 | } | |
29 | { | |
30 | AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters(); | |
31 | recoParamArray->AddLast(phosRecoParam); | |
0428f331 | 32 | phosRecoParam->SetEMCClusteringThreshold(0.02008); |
33 | phosRecoParam->SetEventSpecie(AliRecoParam::kCosmic); | |
85ffaf6c | 34 | } |
35 | ||
36 | // Set the default | |
37 | Bool_t defaultIsSet = kFALSE; | |
38 | for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) { | |
39 | AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i); | |
40 | if (!param) continue; | |
41 | if (default & param->GetEventSpecie()) { | |
42 | param->SetAsDefault(); | |
43 | defaultIsSet = kTRUE; | |
44 | } | |
45 | } | |
46 | ||
47 | if (!defaultIsSet) { | |
48 | Error(macroname,"The default reconstruction parameters are not set! Exiting..."); | |
49 | return; | |
50 | } | |
51 | ||
52 | // save in CDB storage | |
53 | AliCDBMetaData *md= new AliCDBMetaData(); | |
54 | md->SetResponsible("Yuri Kharlov"); | |
55 | md->SetComment("Reconstruction parameters PHOS"); | |
56 | md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
57 | md->SetBeamPeriod(0); | |
58 | AliCDBId id("PHOS/Calib/RecoParam",0,AliCDBRunRange::Infinity()); | |
59 | cdb->GetDefaultStorage()->Put(recoParamArray,id, md); | |
60 | ||
61 | return; | |
62 | } | |
63 |