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