]>
Commit | Line | Data |
---|---|---|
58f66025 | 1 | /************************************************************************** |
2 | * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | // Base class for the PHOS reconstruction parameters. | |
19 | // Do not use in the reconstruction; use derivative classes instead. | |
20 | // Author: Boris Polichtchouk. | |
21 | ||
22 | // --- AliRoot header files --- | |
7e88424f | 23 | #include "AliCDBManager.h" |
24 | #include "AliCDBEntry.h" | |
0428f331 | 25 | #include "AliLog.h" |
58f66025 | 26 | #include "AliPHOSRecoParam.h" |
27 | ||
28 | ClassImp(AliPHOSRecoParam) | |
29 | ||
7e88424f | 30 | TObjArray* AliPHOSRecoParam::fgkMaps =0; //ALTRO mappings |
31 | ||
58f66025 | 32 | //----------------------------------------------------------------------------- |
75b88769 | 33 | AliPHOSRecoParam::AliPHOSRecoParam() : |
cf4e2a86 | 34 | AliDetectorRecoParam(), |
7e88424f | 35 | fEMCClusteringThreshold(0.2), |
36 | fEMCLocMaxCut(0.03), | |
12dd7f10 | 37 | fEMCRawDigitThreshold(2), |
38 | fEMCMinE(0.012), | |
7e88424f | 39 | fEMCW0(4.5), |
40 | fEMCSampleQualityCut(1.), | |
41 | fEMCEcoreRadius(3.), | |
42 | fEMCEcore2ESD(kFALSE), | |
43 | fEMCSubtractPedestals(kTRUE), | |
44 | fEMCUnfold(kTRUE), | |
71994f35 | 45 | fEMCEnergyCorrectionOn(kTRUE), |
379c5c09 | 46 | fEMCFitterVersion(""), |
0428f331 | 47 | fGlobalAltroOffset(0), |
f78c9781 | 48 | fGlobalAltroThreshold(0), |
7e88424f | 49 | fCPVClusteringThreshold(0.0), |
50 | fCPVLocMaxCut(0.03), | |
51 | fCPVMinE(0.0), | |
52 | fCPVW0(4.0), | |
53 | fCPVUnfold(kTRUE) | |
58f66025 | 54 | { |
55 | //Default constructor. | |
56 | } | |
57 | ||
58 | //----------------------------------------------------------------------------- | |
308fb942 | 59 | AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ): |
cf4e2a86 | 60 | AliDetectorRecoParam(), |
7e88424f | 61 | fEMCClusteringThreshold(0.2), |
62 | fEMCLocMaxCut(0.03), | |
12dd7f10 | 63 | fEMCRawDigitThreshold(2), |
64 | fEMCMinE(0.012), | |
7e88424f | 65 | fEMCW0(4.5), |
66 | fEMCSampleQualityCut(1.), | |
67 | fEMCEcoreRadius(3.), | |
68 | fEMCEcore2ESD(kFALSE), | |
69 | fEMCSubtractPedestals(kTRUE), | |
70 | fEMCUnfold(kTRUE), | |
71994f35 | 71 | fEMCEnergyCorrectionOn(kTRUE), |
379c5c09 | 72 | fEMCFitterVersion(""), |
0428f331 | 73 | fGlobalAltroOffset(0), |
f78c9781 | 74 | fGlobalAltroThreshold(0), |
7e88424f | 75 | fCPVClusteringThreshold(0.0), |
76 | fCPVLocMaxCut(0.03), | |
77 | fCPVMinE(0.0), | |
78 | fCPVW0(4.0), | |
79 | fCPVUnfold(kTRUE) | |
58f66025 | 80 | { |
81 | //Copy constructor. | |
82 | } | |
83 | ||
84 | //----------------------------------------------------------------------------- | |
85 | AliPHOSRecoParam& AliPHOSRecoParam::operator = (const AliPHOSRecoParam& recoParam) | |
86 | { | |
87 | //Assignment operator. | |
88 | ||
89 | if(this != &recoParam) { | |
7e88424f | 90 | fEMCClusteringThreshold = recoParam.fEMCClusteringThreshold; |
91 | fEMCLocMaxCut = recoParam.fEMCLocMaxCut; | |
12dd7f10 | 92 | fEMCRawDigitThreshold = recoParam.fEMCRawDigitThreshold; |
7e88424f | 93 | fEMCMinE = recoParam.fEMCMinE; |
94 | fEMCW0 = recoParam.fEMCW0; | |
95 | fEMCSampleQualityCut = recoParam.fEMCSampleQualityCut; | |
96 | fEMCEcoreRadius = recoParam.fEMCEcoreRadius; | |
97 | fEMCEcore2ESD = recoParam.fEMCEcore2ESD; | |
98 | fEMCSubtractPedestals = recoParam.fEMCSubtractPedestals; | |
99 | fEMCUnfold = recoParam.fEMCUnfold; | |
71994f35 | 100 | fEMCEnergyCorrectionOn = recoParam.fEMCEnergyCorrectionOn; |
379c5c09 | 101 | fEMCFitterVersion = recoParam.fEMCFitterVersion; |
0428f331 | 102 | fGlobalAltroOffset = recoParam.fGlobalAltroOffset; |
f78c9781 | 103 | fGlobalAltroThreshold = recoParam.fGlobalAltroThreshold; |
7e88424f | 104 | fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold; |
105 | fCPVLocMaxCut = recoParam.fCPVLocMaxCut; | |
106 | fCPVMinE = recoParam.fCPVMinE; | |
107 | fCPVW0 = recoParam.fCPVW0; | |
108 | fCPVUnfold = recoParam.fCPVUnfold; | |
58f66025 | 109 | } |
110 | ||
111 | return *this; | |
112 | } | |
7e88424f | 113 | |
0428f331 | 114 | //----------------------------------------------------------------------------- |
332c745b | 115 | void AliPHOSRecoParam::Print(Option_t * /*option*/) const |
0428f331 | 116 | { |
117 | AliDebug(2,Form("PHOS reconstruction parameters:\n" | |
118 | "\tEMCClusteringThreshold = %f\n" | |
119 | "\tEMCLocMaxCut = %f\n" | |
12dd7f10 | 120 | "\tEMCRawDigitThreshold = %f\n" |
0428f331 | 121 | "\tEMCMinE = %f\n" |
122 | "\tEMCW0 = %f\n" | |
123 | "\tEMCSampleQualityCut = %f\n" | |
124 | "\tEMCEcoreRadius = %f\n" | |
125 | "\tEMCEcore2ESD = %d\n" | |
126 | "\tEMCSubtractPedestals = %d\n" | |
127 | "\tEMCUnfold = %d\n" | |
71994f35 | 128 | "\tEMCEnergyCorrectionOn = %d\n" |
379c5c09 | 129 | "\tEMCFitterVersion = \"%s\"\n" |
0428f331 | 130 | "\tGlobalAltroOffset = %d", |
f78c9781 | 131 | "\tGlobalAltroThreshold = %d", |
0428f331 | 132 | fEMCClusteringThreshold, |
133 | fEMCLocMaxCut, | |
12dd7f10 | 134 | fEMCRawDigitThreshold, |
0428f331 | 135 | fEMCMinE, |
136 | fEMCW0, | |
137 | fEMCSampleQualityCut, | |
138 | fEMCEcoreRadius, | |
139 | fEMCEcore2ESD, | |
140 | fEMCSubtractPedestals, | |
141 | fEMCUnfold, | |
71994f35 | 142 | fEMCEnergyCorrectionOn, |
379c5c09 | 143 | fEMCFitterVersion.Data(), |
f78c9781 | 144 | fGlobalAltroOffset, |
145 | fGlobalAltroThreshold)); | |
0428f331 | 146 | |
147 | } | |
148 | ||
7e88424f | 149 | //----------------------------------------------------------------------------- |
150 | AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters() | |
151 | { | |
152 | //Default parameters for the reconstruction | |
153 | ||
154 | AliPHOSRecoParam* params = new AliPHOSRecoParam(); | |
155 | return params; | |
156 | } | |
157 | ||
158 | //----------------------------------------------------------------------------- | |
159 | const TObjArray* AliPHOSRecoParam::GetMappings() | |
160 | { | |
161 | //Returns array of AliAltroMappings for RCU0..RCU3. | |
162 | //If not found, read it from OCDB. | |
163 | ||
164 | //Quick check as follows: | |
162637e4 | 165 | // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
7e88424f | 166 | // root [1] AliCDBManager::Instance()->SetRun(1); |
167 | // root [2] TObjArray* maps = AliPHOSRecoParam::GetMappings(); | |
168 | // root [3] maps->Print(); | |
169 | ||
170 | if(fgkMaps) return fgkMaps; | |
171 | ||
172 | AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping"); | |
173 | if(entry) | |
174 | fgkMaps = (TObjArray*)entry->GetObject(); | |
175 | ||
176 | return fgkMaps; | |
177 | ||
178 | } |