]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/analysis/AliFMDAnaParameters.h
No more Isajet
[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();
8dc823cc 63 Float_t GetMPV(Int_t det, Char_t ring);
64 Float_t GetSigma(Int_t det, Char_t ring);
d7346eed 65 static const char* GetBackgroundPath() { return fgkBackgroundCorrection;}
66 static const char* GetEdistPath() { return fgkEnergyDists;}
67 TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin);
8dc823cc 68
d7346eed 69protected:
70
71 AliFMDAnaParameters();
72
73 AliFMDAnaParameters(const AliFMDAnaParameters& o)
74 : TNamed(o),
75 fIsInit(o.fIsInit),
8dc823cc 76 fBackgroundArray(o.fBackgroundArray),
77 fEdistArray(o.fEdistArray)
d7346eed 78 {}
79 AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
80 virtual ~AliFMDAnaParameters() {}
81
82 static AliFMDAnaParameters* fgInstance; // Static singleton instance
83
84 AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ;
85 void InitBackground();
86 void InitEnergyDists();
8dc823cc 87 TH1F* GetEnergyDistribution(Int_t det, Char_t ring);
d7346eed 88 TObjArray* GetBackgroundArray();
89
8dc823cc 90 TAxis* GetRefAxis();
91
92
d7346eed 93 Bool_t fIsInit;
94 TObjArray* fBackgroundArray;
95 TObjArray* fEdistArray;
96 static const char* fgkBackgroundCorrection;
97 static const char* fgkEnergyDists;
98 ClassDef(AliFMDAnaParameters,0) // Manager of parameters
99};
100
101#endif
102//____________________________________________________________________
103//
104// Local Variables:
105// mode: C++
106// End:
107//
108// EOF
109//
110