Introduction of the correction for signal-saturation in PbPb runs. The reco-param...
[u/mrichter/AliRoot.git] / VZERO / MakeVZERORecoParam.C
CommitLineData
ed90abb8 1void MakeVZERORecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult) {
2//========================================================================
3//
4// Steering macro for VZERO reconstruction parameters
5//
6// Author: Brigitte Cheynis
7//
8//========================================================================
9
10 const char* macroname = "MakeVZERORecoParam.C";
11
12 // Activate CDB storage and load geometry from CDB
13 AliCDBManager* cdb = AliCDBManager::Instance();
14 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB");
15
16 TObjArray *recoParamArray = new TObjArray();
17
18 {
19 AliVZERORecoParam * vzeroRecoParam = new AliVZERORecoParam;
20 vzeroRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
21 recoParamArray->AddLast(vzeroRecoParam);
22 }
23 {
24 AliVZERORecoParam * vzeroRecoParam = new AliVZERORecoParam;
25 vzeroRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
26 recoParamArray->AddLast(vzeroRecoParam);
27 }
28 {
29 AliVZERORecoParam * vzeroRecoParam = new AliVZERORecoParam;
53ad561b 30 vzeroRecoParam->SetNPreClocks(6);
ed90abb8 31 vzeroRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
32 recoParamArray->AddLast(vzeroRecoParam);
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("Brigitte Cheynis");
54 md->SetComment("Reconstruction parameters for VZERO");
55 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
56 md->SetBeamPeriod(0);
57 AliCDBId id("VZERO/Calib/RecoParam",0,AliCDBRunRange::Infinity());
58 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
59
60 return;
61}