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"
25 #include "AliPHOSRecoParam.h"
27 ClassImp(AliPHOSRecoParam)
29 TObjArray* AliPHOSRecoParam::fgkMaps =0; //ALTRO mappings
31 //-----------------------------------------------------------------------------
32 AliPHOSRecoParam::AliPHOSRecoParam() :
33 AliDetectorRecoParam(),
34 fEMCClusteringThreshold(0.2),
38 fEMCSampleQualityCut(1.),
40 fEMCEcore2ESD(kFALSE),
41 fEMCSubtractPedestals(kTRUE),
43 fEMCDecoderVersion(""),
44 fCPVClusteringThreshold(0.0),
50 //Default constructor.
53 //-----------------------------------------------------------------------------
54 AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ):
55 AliDetectorRecoParam(),
56 fEMCClusteringThreshold(0.2),
60 fEMCSampleQualityCut(1.),
62 fEMCEcore2ESD(kFALSE),
63 fEMCSubtractPedestals(kTRUE),
65 fEMCDecoderVersion(""),
66 fCPVClusteringThreshold(0.0),
75 //-----------------------------------------------------------------------------
76 AliPHOSRecoParam& AliPHOSRecoParam::operator = (const AliPHOSRecoParam& recoParam)
78 //Assignment operator.
80 if(this != &recoParam) {
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;
101 //-----------------------------------------------------------------------------
102 AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters()
104 //Default parameters for the reconstruction
106 AliPHOSRecoParam* params = new AliPHOSRecoParam();
110 //-----------------------------------------------------------------------------
111 const TObjArray* AliPHOSRecoParam::GetMappings()
113 //Returns array of AliAltroMappings for RCU0..RCU3.
114 //If not found, read it from OCDB.
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();
122 if(fgkMaps) return fgkMaps;
124 AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
126 fgkMaps = (TObjArray*)entry->GetObject();