]>
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" | |
58f66025 | 25 | #include "AliPHOSRecoParam.h" |
26 | ||
27 | ClassImp(AliPHOSRecoParam) | |
28 | ||
7e88424f | 29 | TObjArray* AliPHOSRecoParam::fgkMaps =0; //ALTRO mappings |
30 | ||
58f66025 | 31 | //----------------------------------------------------------------------------- |
75b88769 | 32 | AliPHOSRecoParam::AliPHOSRecoParam() : |
cf4e2a86 | 33 | AliDetectorRecoParam(), |
7e88424f | 34 | fEMCClusteringThreshold(0.2), |
35 | fEMCLocMaxCut(0.03), | |
36 | fEMCMinE(0.01), | |
37 | fEMCW0(4.5), | |
38 | fEMCSampleQualityCut(1.), | |
39 | fEMCEcoreRadius(3.), | |
40 | fEMCEcore2ESD(kFALSE), | |
41 | fEMCSubtractPedestals(kTRUE), | |
42 | fEMCUnfold(kTRUE), | |
43 | fEMCDecoderVersion(""), | |
44 | fCPVClusteringThreshold(0.0), | |
45 | fCPVLocMaxCut(0.03), | |
46 | fCPVMinE(0.0), | |
47 | fCPVW0(4.0), | |
48 | fCPVUnfold(kTRUE) | |
58f66025 | 49 | { |
50 | //Default constructor. | |
51 | } | |
52 | ||
53 | //----------------------------------------------------------------------------- | |
308fb942 | 54 | AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ): |
cf4e2a86 | 55 | AliDetectorRecoParam(), |
7e88424f | 56 | fEMCClusteringThreshold(0.2), |
57 | fEMCLocMaxCut(0.03), | |
58 | fEMCMinE(0.01), | |
59 | fEMCW0(4.5), | |
60 | fEMCSampleQualityCut(1.), | |
61 | fEMCEcoreRadius(3.), | |
62 | fEMCEcore2ESD(kFALSE), | |
63 | fEMCSubtractPedestals(kTRUE), | |
64 | fEMCUnfold(kTRUE), | |
65 | fEMCDecoderVersion(""), | |
66 | fCPVClusteringThreshold(0.0), | |
67 | fCPVLocMaxCut(0.03), | |
68 | fCPVMinE(0.0), | |
69 | fCPVW0(4.0), | |
70 | fCPVUnfold(kTRUE) | |
58f66025 | 71 | { |
72 | //Copy constructor. | |
73 | } | |
74 | ||
75 | //----------------------------------------------------------------------------- | |
76 | AliPHOSRecoParam& AliPHOSRecoParam::operator = (const AliPHOSRecoParam& recoParam) | |
77 | { | |
78 | //Assignment operator. | |
79 | ||
80 | if(this != &recoParam) { | |
7e88424f | 81 | fEMCClusteringThreshold = recoParam.fEMCClusteringThreshold; |
82 | fEMCLocMaxCut = recoParam.fEMCLocMaxCut; | |
83 | fEMCMinE = recoParam.fEMCMinE; | |
84 | fEMCW0 = recoParam.fEMCW0; | |
85 | fEMCSampleQualityCut = recoParam.fEMCSampleQualityCut; | |
86 | fEMCEcoreRadius = recoParam.fEMCEcoreRadius; | |
87 | fEMCEcore2ESD = recoParam.fEMCEcore2ESD; | |
88 | fEMCSubtractPedestals = recoParam.fEMCSubtractPedestals; | |
89 | fEMCUnfold = recoParam.fEMCUnfold; | |
90 | fEMCDecoderVersion = recoParam.fEMCDecoderVersion; | |
91 | fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold; | |
92 | fCPVLocMaxCut = recoParam.fCPVLocMaxCut; | |
93 | fCPVMinE = recoParam.fCPVMinE; | |
94 | fCPVW0 = recoParam.fCPVW0; | |
95 | fCPVUnfold = recoParam.fCPVUnfold; | |
58f66025 | 96 | } |
97 | ||
98 | return *this; | |
99 | } | |
7e88424f | 100 | |
101 | //----------------------------------------------------------------------------- | |
102 | AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters() | |
103 | { | |
104 | //Default parameters for the reconstruction | |
105 | ||
106 | AliPHOSRecoParam* params = new AliPHOSRecoParam(); | |
107 | return params; | |
108 | } | |
109 | ||
110 | //----------------------------------------------------------------------------- | |
111 | const TObjArray* AliPHOSRecoParam::GetMappings() | |
112 | { | |
113 | //Returns array of AliAltroMappings for RCU0..RCU3. | |
114 | //If not found, read it from OCDB. | |
115 | ||
116 | //Quick check as follows: | |
117 | // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); | |
118 | // root [1] AliCDBManager::Instance()->SetRun(1); | |
119 | // root [2] TObjArray* maps = AliPHOSRecoParam::GetMappings(); | |
120 | // root [3] maps->Print(); | |
121 | ||
122 | if(fgkMaps) return fgkMaps; | |
123 | ||
124 | AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping"); | |
125 | if(entry) | |
126 | fgkMaps = (TObjArray*)entry->GetObject(); | |
127 | ||
128 | return fgkMaps; | |
129 | ||
130 | } |