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 // This class contains the PHOS EMC reconstruction parameters.
19 // To get default parameters from any place of your code, use:
20 // AliPHOSRecoParam* defPar = AliPHOSRecoParamEmc::GetEmcDefaultParameters();
21 // Float_t cluth = defPar->GetClusteringThreshold();
24 // --- ROOT header files ---
25 #include "TObjArray.h"
27 #include "AliCDBManager.h"
28 #include "AliCDBEntry.h"
30 // --- AliRoot header files ---
31 #include "AliPHOSRecoParamEmc.h"
33 ClassImp(AliPHOSRecoParamEmc)
35 TObjArray* AliPHOSRecoParamEmc::fgkMaps =0; //ALTRO mappings
37 //-----------------------------------------------------------------------------
38 AliPHOSRecoParamEmc::AliPHOSRecoParamEmc() : AliPHOSRecoParam()
40 //Default constructor.
42 SetClusteringThreshold(0.2);
48 //-----------------------------------------------------------------------------
49 AliPHOSRecoParam* AliPHOSRecoParamEmc::GetEmcDefaultParameters()
51 //Default parameters for the reconstruction in EMC.
53 AliPHOSRecoParam* params = new AliPHOSRecoParamEmc();
57 //-----------------------------------------------------------------------------
58 const TObjArray* AliPHOSRecoParamEmc::GetMappings()
60 //Returns array of AliAltroMappings for RCU0..RCU3.
61 //If not found, read it from OCDB.
63 //Quick check as follows:
64 // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
65 // root [1] AliCDBManager::Instance()->SetRun(1);
66 // root [2] TObjArray* maps = AliPHOSRecoParamEmc::GetMappings();
67 // root [3] maps->Print();
69 if(fgkMaps) return fgkMaps;
71 AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
73 fgkMaps = (TObjArray*)entry->GetObject();