]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSRecoParamEmc.cxx
Macro for checking the serial & bin number of the mounted manus
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecoParamEmc.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// 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();
22// ...
23
b3006690 24// --- ROOT header files ---
25#include "TObjArray.h"
26#include "TString.h"
27#include "AliCDBManager.h"
28#include "AliCDBEntry.h"
29
58f66025 30// --- AliRoot header files ---
31#include "AliPHOSRecoParamEmc.h"
32
33ClassImp(AliPHOSRecoParamEmc)
34
b3006690 35TObjArray* AliPHOSRecoParamEmc::fgkMaps =0; //ALTRO mappings
36
58f66025 37//-----------------------------------------------------------------------------
38AliPHOSRecoParamEmc::AliPHOSRecoParamEmc() : AliPHOSRecoParam()
39{
40 //Default constructor.
41
42 SetClusteringThreshold(0.2);
43 SetLocalMaxCut(0.03);
44 SetMinE(0.01);
45 SetLogWeight(4.5);
46}
47
48//-----------------------------------------------------------------------------
49AliPHOSRecoParam* AliPHOSRecoParamEmc::GetEmcDefaultParameters()
50{
51 //Default parameters for the reconstruction in EMC.
52
53 AliPHOSRecoParam* params = new AliPHOSRecoParamEmc();
54 return params;
55}
b3006690 56
57//-----------------------------------------------------------------------------
58const TObjArray* AliPHOSRecoParamEmc::GetMappings()
59{
60 //Returns array of AliAltroMappings for RCU0..RCU3.
61 //If not found, read it from OCDB.
62
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();
68
69 if(fgkMaps) return fgkMaps;
70
71 AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
72 if(entry)
73 fgkMaps = (TObjArray*)entry->GetObject();
74
75 return fgkMaps;
76
77}