]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSRecoParam.cxx
Added possibility to choose cluster time gate
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecoParam.cxx
CommitLineData
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
28ClassImp(AliPHOSRecoParam)
29
7e88424f 30TObjArray* AliPHOSRecoParam::fgkMaps =0; //ALTRO mappings
31
58f66025 32//-----------------------------------------------------------------------------
75b88769 33AliPHOSRecoParam::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.),
67637327 41 fTimeGateAmpThresh(10.),
42 fTimeGateLow(1.e-6),
43 fTimeGateHigh(1.e-6),
7e88424f 44 fEMCEcoreRadius(3.),
45 fEMCEcore2ESD(kFALSE),
46 fEMCSubtractPedestals(kTRUE),
47 fEMCUnfold(kTRUE),
71994f35 48 fEMCEnergyCorrectionOn(kTRUE),
379c5c09 49 fEMCFitterVersion(""),
0428f331 50 fGlobalAltroOffset(0),
f78c9781 51 fGlobalAltroThreshold(0),
7e88424f 52 fCPVClusteringThreshold(0.0),
53 fCPVLocMaxCut(0.03),
54 fCPVMinE(0.0),
55 fCPVW0(4.0),
56 fCPVUnfold(kTRUE)
58f66025 57{
58 //Default constructor.
59}
60
61//-----------------------------------------------------------------------------
308fb942 62AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ):
cf4e2a86 63 AliDetectorRecoParam(),
7e88424f 64 fEMCClusteringThreshold(0.2),
65 fEMCLocMaxCut(0.03),
12dd7f10 66 fEMCRawDigitThreshold(2),
67 fEMCMinE(0.012),
7e88424f 68 fEMCW0(4.5),
69 fEMCSampleQualityCut(1.),
67637327 70 fTimeGateAmpThresh(10.),
71 fTimeGateLow(1.e-6),
72 fTimeGateHigh(1.e-6),
7e88424f 73 fEMCEcoreRadius(3.),
74 fEMCEcore2ESD(kFALSE),
75 fEMCSubtractPedestals(kTRUE),
76 fEMCUnfold(kTRUE),
71994f35 77 fEMCEnergyCorrectionOn(kTRUE),
379c5c09 78 fEMCFitterVersion(""),
0428f331 79 fGlobalAltroOffset(0),
f78c9781 80 fGlobalAltroThreshold(0),
7e88424f 81 fCPVClusteringThreshold(0.0),
82 fCPVLocMaxCut(0.03),
83 fCPVMinE(0.0),
84 fCPVW0(4.0),
85 fCPVUnfold(kTRUE)
58f66025 86{
87 //Copy constructor.
88}
89
90//-----------------------------------------------------------------------------
91AliPHOSRecoParam& AliPHOSRecoParam::operator = (const AliPHOSRecoParam& recoParam)
92{
93 //Assignment operator.
94
95 if(this != &recoParam) {
7e88424f 96 fEMCClusteringThreshold = recoParam.fEMCClusteringThreshold;
97 fEMCLocMaxCut = recoParam.fEMCLocMaxCut;
12dd7f10 98 fEMCRawDigitThreshold = recoParam.fEMCRawDigitThreshold;
7e88424f 99 fEMCMinE = recoParam.fEMCMinE;
100 fEMCW0 = recoParam.fEMCW0;
101 fEMCSampleQualityCut = recoParam.fEMCSampleQualityCut;
67637327 102 fTimeGateAmpThresh = recoParam.fTimeGateAmpThresh ;
103 fTimeGateLow = recoParam.fTimeGateLow ;
104 fTimeGateHigh = recoParam.fTimeGateHigh ;
7e88424f 105 fEMCEcoreRadius = recoParam.fEMCEcoreRadius;
106 fEMCEcore2ESD = recoParam.fEMCEcore2ESD;
107 fEMCSubtractPedestals = recoParam.fEMCSubtractPedestals;
108 fEMCUnfold = recoParam.fEMCUnfold;
71994f35 109 fEMCEnergyCorrectionOn = recoParam.fEMCEnergyCorrectionOn;
379c5c09 110 fEMCFitterVersion = recoParam.fEMCFitterVersion;
0428f331 111 fGlobalAltroOffset = recoParam.fGlobalAltroOffset;
f78c9781 112 fGlobalAltroThreshold = recoParam.fGlobalAltroThreshold;
7e88424f 113 fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold;
114 fCPVLocMaxCut = recoParam.fCPVLocMaxCut;
115 fCPVMinE = recoParam.fCPVMinE;
116 fCPVW0 = recoParam.fCPVW0;
117 fCPVUnfold = recoParam.fCPVUnfold;
58f66025 118 }
119
120 return *this;
121}
7e88424f 122
0428f331 123//-----------------------------------------------------------------------------
332c745b 124void AliPHOSRecoParam::Print(Option_t * /*option*/) const
0428f331 125{
126 AliDebug(2,Form("PHOS reconstruction parameters:\n"
127 "\tEMCClusteringThreshold = %f\n"
128 "\tEMCLocMaxCut = %f\n"
12dd7f10 129 "\tEMCRawDigitThreshold = %f\n"
0428f331 130 "\tEMCMinE = %f\n"
131 "\tEMCW0 = %f\n"
132 "\tEMCSampleQualityCut = %f\n"
133 "\tEMCEcoreRadius = %f\n"
134 "\tEMCEcore2ESD = %d\n"
135 "\tEMCSubtractPedestals = %d\n"
136 "\tEMCUnfold = %d\n"
71994f35 137 "\tEMCEnergyCorrectionOn = %d\n"
379c5c09 138 "\tEMCFitterVersion = \"%s\"\n"
a675b8d6 139 "\tGlobalAltroOffset = %d\n"
f78c9781 140 "\tGlobalAltroThreshold = %d",
0428f331 141 fEMCClusteringThreshold,
142 fEMCLocMaxCut,
12dd7f10 143 fEMCRawDigitThreshold,
0428f331 144 fEMCMinE,
145 fEMCW0,
146 fEMCSampleQualityCut,
147 fEMCEcoreRadius,
148 fEMCEcore2ESD,
149 fEMCSubtractPedestals,
150 fEMCUnfold,
71994f35 151 fEMCEnergyCorrectionOn,
379c5c09 152 fEMCFitterVersion.Data(),
f78c9781 153 fGlobalAltroOffset,
154 fGlobalAltroThreshold));
0428f331 155
156}
157
7e88424f 158//-----------------------------------------------------------------------------
159AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters()
160{
161 //Default parameters for the reconstruction
162
163 AliPHOSRecoParam* params = new AliPHOSRecoParam();
164 return params;
165}
166
167//-----------------------------------------------------------------------------
168const TObjArray* AliPHOSRecoParam::GetMappings()
169{
170 //Returns array of AliAltroMappings for RCU0..RCU3.
171 //If not found, read it from OCDB.
172
173 //Quick check as follows:
162637e4 174 // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
7e88424f 175 // root [1] AliCDBManager::Instance()->SetRun(1);
176 // root [2] TObjArray* maps = AliPHOSRecoParam::GetMappings();
177 // root [3] maps->Print();
178
179 if(fgkMaps) return fgkMaps;
180
181 AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
182 if(entry)
183 fgkMaps = (TObjArray*)entry->GetObject();
184
185 return fgkMaps;
186
187}