The class AliFMDAnaParameters works similarly to the AliFMDParameters class. It is...
[u/mrichter/AliRoot.git] / FMD / analysis / AliFMDAnaParameters.h
CommitLineData
d7346eed 1#ifndef ALIFMDANAPARAMETERS_H
2#define ALIFMDANAPARAMETERS_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * Latest changes by Hans Hjersing Dalsgaard, NBI, hans.dalsgaard@cern.ch
7 *
8 * See cxx source for full Copyright notice
9 */
10//
11//The design of this class is based on the AliFMDParameters class. Its purpose
12//is to hold parameters for the analysis such as background correction and
13//fit functions.
14//
15//Author: Hans Hjersing Dalsgaard, NBI, hans.dalsgaard@cern.ch
16//
17//____________________________________________________________________
18
19#ifndef ROOT_TNamed
20# include <TNamed.h>
21#endif
22#ifndef ROOT_TArrayI
23# include <TArrayI.h>
24#endif
25#ifndef ALIFMDUSHORTMAP_H
26# include <AliFMDUShortMap.h>
27#endif
28#ifndef ALIFMDBOOLMAP_H
29# include <AliFMDBoolMap.h>
30#endif
31#include "AliCDBEntry.h"
32
33#include "TFile.h"
34#include "TObjArray.h"
35#include "TH2F.h"
36#include "TAxis.h"
37#include "TH1F.h"
38
39//____________________________________________________________________
40//
41// Singleton class to handle various parameters (not geometry) of the
42// FMD
43// Should get ata fromm Conditions DB.
44//
45
46class AliFMDAnaParameters : public TNamed
47{
48public:
49 /** Enumeration of things to initialize */
50 enum What {
51 /** Pulser gain */
52 kBackgroundCorrection = 0x1, // Background Correction
53 kEnergyDistributions = 0x2 // Energy Distributions
54 };
55
56 /** Singleton access
57 @return single to */
58 static AliFMDAnaParameters* Instance();
59
60 void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions);
61 Float_t GetVtxCutZ();
62 Int_t GetNvtxBins();
63 static const char* GetBackgroundPath() { return fgkBackgroundCorrection;}
64 static const char* GetEdistPath() { return fgkEnergyDists;}
65 TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin);
66 TH1F* GetEnergyDistribution(Int_t det, Char_t ring);
67protected:
68
69 AliFMDAnaParameters();
70
71 AliFMDAnaParameters(const AliFMDAnaParameters& o)
72 : TNamed(o),
73 fIsInit(o.fIsInit),
74 fBackgroundArray(o.fBackgroundArray)
75 {}
76 AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
77 virtual ~AliFMDAnaParameters() {}
78
79 static AliFMDAnaParameters* fgInstance; // Static singleton instance
80
81 AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ;
82 void InitBackground();
83 void InitEnergyDists();
84 TAxis* GetRefAxis();
85 TObjArray* GetBackgroundArray();
86
87 Bool_t fIsInit;
88 TObjArray* fBackgroundArray;
89 TObjArray* fEdistArray;
90 static const char* fgkBackgroundCorrection;
91 static const char* fgkEnergyDists;
92 ClassDef(AliFMDAnaParameters,0) // Manager of parameters
93};
94
95#endif
96//____________________________________________________________________
97//
98// Local Variables:
99// mode: C++
100// End:
101//
102// EOF
103//
104