1 /**************************************************************************
2 * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 // Base class for the PHOS reconstruction parameters.
19 // Do not use in the reconstruction; use derivative classes instead.
20 // Author: Boris Polichtchouk.
22 // --- AliRoot header files ---
23 #include "AliCDBManager.h"
24 #include "AliCDBEntry.h"
26 #include "AliPHOSRecoParam.h"
28 ClassImp(AliPHOSRecoParam)
30 TObjArray* AliPHOSRecoParam::fgkMaps =0; //ALTRO mappings
32 //-----------------------------------------------------------------------------
33 AliPHOSRecoParam::AliPHOSRecoParam() :
34 AliDetectorRecoParam(),
35 fEMCClusteringThreshold(0.2),
37 fEMCRawDigitThreshold(2),
40 fEMCSampleQualityCut(1.),
41 fTimeGateAmpThresh(10.),
45 fEMCEcore2ESD(kFALSE),
46 fEMCSubtractPedestals(kTRUE),
48 fEMCEnergyCorrectionOn(kTRUE),
49 fEMCFitterVersion(""),
50 fGlobalAltroOffset(0),
51 fGlobalAltroThreshold(0),
52 fCPVClusteringThreshold(0.0),
58 //Default constructor.
61 //-----------------------------------------------------------------------------
62 AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ):
63 AliDetectorRecoParam(),
64 fEMCClusteringThreshold(0.2),
66 fEMCRawDigitThreshold(2),
69 fEMCSampleQualityCut(1.),
70 fTimeGateAmpThresh(10.),
74 fEMCEcore2ESD(kFALSE),
75 fEMCSubtractPedestals(kTRUE),
77 fEMCEnergyCorrectionOn(kTRUE),
78 fEMCFitterVersion(""),
79 fGlobalAltroOffset(0),
80 fGlobalAltroThreshold(0),
81 fCPVClusteringThreshold(0.0),
90 //-----------------------------------------------------------------------------
91 AliPHOSRecoParam& AliPHOSRecoParam::operator = (const AliPHOSRecoParam& recoParam)
93 //Assignment operator.
95 if(this != &recoParam) {
96 fEMCClusteringThreshold = recoParam.fEMCClusteringThreshold;
97 fEMCLocMaxCut = recoParam.fEMCLocMaxCut;
98 fEMCRawDigitThreshold = recoParam.fEMCRawDigitThreshold;
99 fEMCMinE = recoParam.fEMCMinE;
100 fEMCW0 = recoParam.fEMCW0;
101 fEMCSampleQualityCut = recoParam.fEMCSampleQualityCut;
102 fTimeGateAmpThresh = recoParam.fTimeGateAmpThresh ;
103 fTimeGateLow = recoParam.fTimeGateLow ;
104 fTimeGateHigh = recoParam.fTimeGateHigh ;
105 fEMCEcoreRadius = recoParam.fEMCEcoreRadius;
106 fEMCEcore2ESD = recoParam.fEMCEcore2ESD;
107 fEMCSubtractPedestals = recoParam.fEMCSubtractPedestals;
108 fEMCUnfold = recoParam.fEMCUnfold;
109 fEMCEnergyCorrectionOn = recoParam.fEMCEnergyCorrectionOn;
110 fEMCFitterVersion = recoParam.fEMCFitterVersion;
111 fGlobalAltroOffset = recoParam.fGlobalAltroOffset;
112 fGlobalAltroThreshold = recoParam.fGlobalAltroThreshold;
113 fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold;
114 fCPVLocMaxCut = recoParam.fCPVLocMaxCut;
115 fCPVMinE = recoParam.fCPVMinE;
116 fCPVW0 = recoParam.fCPVW0;
117 fCPVUnfold = recoParam.fCPVUnfold;
123 //-----------------------------------------------------------------------------
124 void AliPHOSRecoParam::Print(Option_t * /*option*/) const
126 AliDebug(2,Form("PHOS reconstruction parameters:\n"
127 "\tEMCClusteringThreshold = %f\n"
128 "\tEMCLocMaxCut = %f\n"
129 "\tEMCRawDigitThreshold = %f\n"
132 "\tEMCSampleQualityCut = %f\n"
133 "\tEMCEcoreRadius = %f\n"
134 "\tEMCEcore2ESD = %d\n"
135 "\tEMCSubtractPedestals = %d\n"
137 "\tEMCEnergyCorrectionOn = %d\n"
138 "\tEMCFitterVersion = \"%s\"\n"
139 "\tGlobalAltroOffset = %d\n"
140 "\tGlobalAltroThreshold = %d",
141 fEMCClusteringThreshold,
143 fEMCRawDigitThreshold,
146 fEMCSampleQualityCut,
149 fEMCSubtractPedestals,
151 fEMCEnergyCorrectionOn,
152 fEMCFitterVersion.Data(),
154 fGlobalAltroThreshold));
158 //-----------------------------------------------------------------------------
159 AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters()
161 //Default parameters for the reconstruction
163 AliPHOSRecoParam* params = new AliPHOSRecoParam();
167 //-----------------------------------------------------------------------------
168 const TObjArray* AliPHOSRecoParam::GetMappings()
170 //Returns array of AliAltroMappings for RCU0..RCU3.
171 //If not found, read it from OCDB.
173 //Quick check as follows:
174 // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
175 // root [1] AliCDBManager::Instance()->SetRun(1);
176 // root [2] TObjArray* maps = AliPHOSRecoParam::GetMappings();
177 // root [3] maps->Print();
179 if(fgkMaps) return fgkMaps;
181 AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
183 fgkMaps = (TObjArray*)entry->GetObject();