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),
39 fEMCSampleQualityCut(1.),
41 fEMCEcore2ESD(kFALSE),
42 fEMCSubtractPedestals(kTRUE),
44 fEMCDecoderVersion(""),
45 fGlobalAltroOffset(0),
46 fCPVClusteringThreshold(0.0),
52 //Default constructor.
55 //-----------------------------------------------------------------------------
56 AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ):
57 AliDetectorRecoParam(),
58 fEMCClusteringThreshold(0.2),
62 fEMCSampleQualityCut(1.),
64 fEMCEcore2ESD(kFALSE),
65 fEMCSubtractPedestals(kTRUE),
67 fEMCDecoderVersion(""),
68 fGlobalAltroOffset(0),
69 fCPVClusteringThreshold(0.0),
78 //-----------------------------------------------------------------------------
79 AliPHOSRecoParam& AliPHOSRecoParam::operator = (const AliPHOSRecoParam& recoParam)
81 //Assignment operator.
83 if(this != &recoParam) {
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;
94 fGlobalAltroOffset = recoParam.fGlobalAltroOffset;
95 fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold;
96 fCPVLocMaxCut = recoParam.fCPVLocMaxCut;
97 fCPVMinE = recoParam.fCPVMinE;
98 fCPVW0 = recoParam.fCPVW0;
99 fCPVUnfold = recoParam.fCPVUnfold;
105 //-----------------------------------------------------------------------------
106 void AliPHOSRecoParam::Print(Option_t *option) const
108 AliDebug(2,Form("PHOS reconstruction parameters:\n"
109 "\tEMCClusteringThreshold = %f\n"
110 "\tEMCLocMaxCut = %f\n"
113 "\tEMCSampleQualityCut = %f\n"
114 "\tEMCEcoreRadius = %f\n"
115 "\tEMCEcore2ESD = %d\n"
116 "\tEMCSubtractPedestals = %d\n"
118 "\tEMCDecoderVersion = \"%s\"\n"
119 "\tGlobalAltroOffset = %d",
120 fEMCClusteringThreshold,
124 fEMCSampleQualityCut,
127 fEMCSubtractPedestals,
129 fEMCDecoderVersion.Data(),
130 fGlobalAltroOffset));
134 //-----------------------------------------------------------------------------
135 AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters()
137 //Default parameters for the reconstruction
139 AliPHOSRecoParam* params = new AliPHOSRecoParam();
143 //-----------------------------------------------------------------------------
144 const TObjArray* AliPHOSRecoParam::GetMappings()
146 //Returns array of AliAltroMappings for RCU0..RCU3.
147 //If not found, read it from OCDB.
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();
155 if(fgkMaps) return fgkMaps;
157 AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
159 fgkMaps = (TObjArray*)entry->GetObject();