Cleanup of collisions geometries and headers.
[u/mrichter/AliRoot.git] / PHOS / MakePHOSRecoParam.C
CommitLineData
d6f59657 1void MakePHOSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult)
85ffaf6c 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";
d6f59657 13 const Int_t firstRun = 0;
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();
d6f59657 20
85ffaf6c 21 {
112d73c4 22 // Reconstruction parameters for cosmic run 2009
85ffaf6c 23 AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
0428f331 24 phosRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
112d73c4 25 phosRecoParam->SetEMCSubtractPedestals(kFALSE);
26 phosRecoParam->SetEMCMinE(0.025);
27 phosRecoParam->SetEMCClusteringThreshold(0.05);
28 phosRecoParam->SetEMCFitterVersion("v0");
29 phosRecoParam->SetEMCUnfolding(kFALSE);
30 phosRecoParam->SetEMCEnergyCorrectionOn(kFALSE);
31 phosRecoParam->SetName("Cosmic2009");
32 recoParamArray->AddLast(phosRecoParam);
33 }
34 {
35 // Reconstruction parameters for the first pp run 2009
36 AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
37 phosRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
38 phosRecoParam->SetEMCSubtractPedestals(kFALSE);
39 phosRecoParam->SetEMCRawDigitThreshold(2);
40 phosRecoParam->SetEMCMinE(0.012);
41 phosRecoParam->SetEMCClusteringThreshold(0.22);
42 phosRecoParam->SetEMCFitterVersion("v0");
43 phosRecoParam->SetEMCUnfolding(kTRUE);
d6f59657 44 phosRecoParam->SetEMCSampleQualityCut(10.);
112d73c4 45 phosRecoParam->SetName("LowMult2009");
46 recoParamArray->AddLast(phosRecoParam);
47 }
48 {
49 // Reconstruction parameters for the first PbPb run 2010
50 AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
51 phosRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
52 phosRecoParam->SetEMCSubtractPedestals(kFALSE);
53 phosRecoParam->SetEMCRawDigitThreshold(2);
54 phosRecoParam->SetEMCMinE(0.015);
55 phosRecoParam->SetEMCClusteringThreshold(0.40);
56 phosRecoParam->SetEMCFitterVersion("v0");
57 phosRecoParam->SetEMCUnfolding(kTRUE);
58 phosRecoParam->SetName("HighMult2009");
59 recoParamArray->AddLast(phosRecoParam);
85ffaf6c 60 }
d6f59657 61 { // Reconstruction parameters for "calibration" events
62 AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
63 phosRecoParam->SetEventSpecie(AliRecoParam::kCalib);
64 phosRecoParam->SetEMCSubtractPedestals(kFALSE);
65 phosRecoParam->SetEMCMinE(0.025);
66 phosRecoParam->SetEMCClusteringThreshold(0.05);
67 phosRecoParam->SetEMCFitterVersion("v0");
68 phosRecoParam->SetEMCUnfolding(kFALSE);
69 phosRecoParam->SetEMCEnergyCorrectionOn(kFALSE);
70 phosRecoParam->SetName("Calib2009");
71 recoParamArray->AddLast(phosRecoParam);
72 }
85ffaf6c 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}