]>
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), | |
37 | fEMCMinE(0.01), | |
38 | fEMCW0(4.5), | |
39 | fEMCSampleQualityCut(1.), | |
40 | fEMCEcoreRadius(3.), | |
41 | fEMCEcore2ESD(kFALSE), | |
42 | fEMCSubtractPedestals(kTRUE), | |
43 | fEMCUnfold(kTRUE), | |
71994f35 | 44 | fEMCEnergyCorrectionOn(kTRUE), |
7e88424f | 45 | fEMCDecoderVersion(""), |
0428f331 | 46 | fGlobalAltroOffset(0), |
7e88424f | 47 | fCPVClusteringThreshold(0.0), |
48 | fCPVLocMaxCut(0.03), | |
49 | fCPVMinE(0.0), | |
50 | fCPVW0(4.0), | |
51 | fCPVUnfold(kTRUE) | |
58f66025 | 52 | { |
53 | //Default constructor. | |
54 | } | |
55 | ||
56 | //----------------------------------------------------------------------------- | |
308fb942 | 57 | AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ): |
cf4e2a86 | 58 | AliDetectorRecoParam(), |
7e88424f | 59 | fEMCClusteringThreshold(0.2), |
60 | fEMCLocMaxCut(0.03), | |
61 | fEMCMinE(0.01), | |
62 | fEMCW0(4.5), | |
63 | fEMCSampleQualityCut(1.), | |
64 | fEMCEcoreRadius(3.), | |
65 | fEMCEcore2ESD(kFALSE), | |
66 | fEMCSubtractPedestals(kTRUE), | |
67 | fEMCUnfold(kTRUE), | |
71994f35 | 68 | fEMCEnergyCorrectionOn(kTRUE), |
7e88424f | 69 | fEMCDecoderVersion(""), |
0428f331 | 70 | fGlobalAltroOffset(0), |
7e88424f | 71 | fCPVClusteringThreshold(0.0), |
72 | fCPVLocMaxCut(0.03), | |
73 | fCPVMinE(0.0), | |
74 | fCPVW0(4.0), | |
75 | fCPVUnfold(kTRUE) | |
58f66025 | 76 | { |
77 | //Copy constructor. | |
78 | } | |
79 | ||
80 | //----------------------------------------------------------------------------- | |
81 | AliPHOSRecoParam& AliPHOSRecoParam::operator = (const AliPHOSRecoParam& recoParam) | |
82 | { | |
83 | //Assignment operator. | |
84 | ||
85 | if(this != &recoParam) { | |
7e88424f | 86 | fEMCClusteringThreshold = recoParam.fEMCClusteringThreshold; |
87 | fEMCLocMaxCut = recoParam.fEMCLocMaxCut; | |
88 | fEMCMinE = recoParam.fEMCMinE; | |
89 | fEMCW0 = recoParam.fEMCW0; | |
90 | fEMCSampleQualityCut = recoParam.fEMCSampleQualityCut; | |
91 | fEMCEcoreRadius = recoParam.fEMCEcoreRadius; | |
92 | fEMCEcore2ESD = recoParam.fEMCEcore2ESD; | |
93 | fEMCSubtractPedestals = recoParam.fEMCSubtractPedestals; | |
94 | fEMCUnfold = recoParam.fEMCUnfold; | |
71994f35 | 95 | fEMCEnergyCorrectionOn = recoParam.fEMCEnergyCorrectionOn; |
7e88424f | 96 | fEMCDecoderVersion = recoParam.fEMCDecoderVersion; |
0428f331 | 97 | fGlobalAltroOffset = recoParam.fGlobalAltroOffset; |
7e88424f | 98 | fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold; |
99 | fCPVLocMaxCut = recoParam.fCPVLocMaxCut; | |
100 | fCPVMinE = recoParam.fCPVMinE; | |
101 | fCPVW0 = recoParam.fCPVW0; | |
102 | fCPVUnfold = recoParam.fCPVUnfold; | |
58f66025 | 103 | } |
104 | ||
105 | return *this; | |
106 | } | |
7e88424f | 107 | |
0428f331 | 108 | //----------------------------------------------------------------------------- |
332c745b | 109 | void AliPHOSRecoParam::Print(Option_t * /*option*/) const |
0428f331 | 110 | { |
111 | AliDebug(2,Form("PHOS reconstruction parameters:\n" | |
112 | "\tEMCClusteringThreshold = %f\n" | |
113 | "\tEMCLocMaxCut = %f\n" | |
114 | "\tEMCMinE = %f\n" | |
115 | "\tEMCW0 = %f\n" | |
116 | "\tEMCSampleQualityCut = %f\n" | |
117 | "\tEMCEcoreRadius = %f\n" | |
118 | "\tEMCEcore2ESD = %d\n" | |
119 | "\tEMCSubtractPedestals = %d\n" | |
120 | "\tEMCUnfold = %d\n" | |
71994f35 | 121 | "\tEMCEnergyCorrectionOn = %d\n" |
0428f331 | 122 | "\tEMCDecoderVersion = \"%s\"\n" |
123 | "\tGlobalAltroOffset = %d", | |
124 | fEMCClusteringThreshold, | |
125 | fEMCLocMaxCut, | |
126 | fEMCMinE, | |
127 | fEMCW0, | |
128 | fEMCSampleQualityCut, | |
129 | fEMCEcoreRadius, | |
130 | fEMCEcore2ESD, | |
131 | fEMCSubtractPedestals, | |
132 | fEMCUnfold, | |
71994f35 | 133 | fEMCEnergyCorrectionOn, |
0428f331 | 134 | fEMCDecoderVersion.Data(), |
135 | fGlobalAltroOffset)); | |
136 | ||
137 | } | |
138 | ||
7e88424f | 139 | //----------------------------------------------------------------------------- |
140 | AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters() | |
141 | { | |
142 | //Default parameters for the reconstruction | |
143 | ||
144 | AliPHOSRecoParam* params = new AliPHOSRecoParam(); | |
145 | return params; | |
146 | } | |
147 | ||
148 | //----------------------------------------------------------------------------- | |
149 | const TObjArray* AliPHOSRecoParam::GetMappings() | |
150 | { | |
151 | //Returns array of AliAltroMappings for RCU0..RCU3. | |
152 | //If not found, read it from OCDB. | |
153 | ||
154 | //Quick check as follows: | |
155 | // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); | |
156 | // root [1] AliCDBManager::Instance()->SetRun(1); | |
157 | // root [2] TObjArray* maps = AliPHOSRecoParam::GetMappings(); | |
158 | // root [3] maps->Print(); | |
159 | ||
160 | if(fgkMaps) return fgkMaps; | |
161 | ||
162 | AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping"); | |
163 | if(entry) | |
164 | fgkMaps = (TObjArray*)entry->GetObject(); | |
165 | ||
166 | return fgkMaps; | |
167 | ||
168 | } |