]>
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(); | |
22 | phosRecoParam->SetEventSpecie(AliRecoParam::kCosmic); | |
23 | phosRecoParam->SetEMCSubtractPedestals(kTRUE); | |
24 | phosRecoParam->SetEMCMinE(0.01); | |
25 | phosRecoParam->SetEMCClusteringThreshold(0.02); | |
26 | phosRecoParam->SetEMCDecoderVersion("v1"); | |
27 | recoParamArray->AddLast(phosRecoParam); | |
28 | } | |
29 | { | |
30 | AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters(); | |
31 | recoParamArray->AddLast(phosRecoParam); | |
32 | phosRecoParam->SetEventSpecie(AliRecoParam::kDefault); | |
33 | } | |
34 | ||
35 | // Set the default | |
36 | Bool_t defaultIsSet = kFALSE; | |
37 | for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) { | |
38 | AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i); | |
39 | if (!param) continue; | |
40 | if (default & param->GetEventSpecie()) { | |
41 | param->SetAsDefault(); | |
42 | defaultIsSet = kTRUE; | |
43 | } | |
44 | } | |
45 | ||
46 | if (!defaultIsSet) { | |
47 | Error(macroname,"The default reconstruction parameters are not set! Exiting..."); | |
48 | return; | |
49 | } | |
50 | ||
51 | // save in CDB storage | |
52 | AliCDBMetaData *md= new AliCDBMetaData(); | |
53 | md->SetResponsible("Yuri Kharlov"); | |
54 | md->SetComment("Reconstruction parameters PHOS"); | |
55 | md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
56 | md->SetBeamPeriod(0); | |
57 | AliCDBId id("PHOS/Calib/RecoParam",0,AliCDBRunRange::Infinity()); | |
58 | cdb->GetDefaultStorage()->Put(recoParamArray,id, md); | |
59 | ||
60 | return; | |
61 | } | |
62 |