]>
Commit | Line | Data |
---|---|---|
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" | |
b82e76e0 | 38 | #include "AliFMDAnaCalibBackgroundCorrection.h" |
39 | #include "AliFMDAnaCalibEnergyDistribution.h" | |
d7346eed | 40 | //____________________________________________________________________ |
41 | // | |
42 | // Singleton class to handle various parameters (not geometry) of the | |
43 | // FMD | |
44 | // Should get ata fromm Conditions DB. | |
45 | // | |
46 | ||
47 | class AliFMDAnaParameters : public TNamed | |
48 | { | |
49 | public: | |
50 | /** Enumeration of things to initialize */ | |
51 | enum What { | |
52 | /** Pulser gain */ | |
53 | kBackgroundCorrection = 0x1, // Background Correction | |
54 | kEnergyDistributions = 0x2 // Energy Distributions | |
55 | }; | |
56 | ||
57 | /** Singleton access | |
58 | @return single to */ | |
59 | static AliFMDAnaParameters* Instance(); | |
60 | ||
61 | void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions); | |
62 | Float_t GetVtxCutZ(); | |
63 | Int_t GetNvtxBins(); | |
8dc823cc | 64 | Float_t GetMPV(Int_t det, Char_t ring); |
65 | Float_t GetSigma(Int_t det, Char_t ring); | |
d7346eed | 66 | static const char* GetBackgroundPath() { return fgkBackgroundCorrection;} |
67 | static const char* GetEdistPath() { return fgkEnergyDists;} | |
68 | TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin); | |
8dc823cc | 69 | |
d7346eed | 70 | protected: |
71 | ||
72 | AliFMDAnaParameters(); | |
73 | ||
74 | AliFMDAnaParameters(const AliFMDAnaParameters& o) | |
75 | : TNamed(o), | |
76 | fIsInit(o.fIsInit), | |
46807b30 | 77 | fBackground(o.fBackground), |
78 | fEnergyDistribution(o.fEnergyDistribution) | |
79 | // fBackgroundArray(o.fBackgroundArray), | |
80 | //fEdistArray(o.fEdistArray) | |
d7346eed | 81 | {} |
82 | AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; } | |
83 | virtual ~AliFMDAnaParameters() {} | |
84 | ||
85 | static AliFMDAnaParameters* fgInstance; // Static singleton instance | |
86 | ||
87 | AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ; | |
88 | void InitBackground(); | |
89 | void InitEnergyDists(); | |
8dc823cc | 90 | TH1F* GetEnergyDistribution(Int_t det, Char_t ring); |
d7346eed | 91 | TObjArray* GetBackgroundArray(); |
92 | ||
8dc823cc | 93 | TAxis* GetRefAxis(); |
94 | ||
95 | ||
d7346eed | 96 | Bool_t fIsInit; |
46807b30 | 97 | //TObjArray* fBackgroundArray; |
98 | // TObjArray* fEdistArray; | |
b82e76e0 | 99 | AliFMDAnaCalibBackgroundCorrection* fBackground; |
100 | AliFMDAnaCalibEnergyDistribution* fEnergyDistribution; | |
d7346eed | 101 | static const char* fgkBackgroundCorrection; |
102 | static const char* fgkEnergyDists; | |
103 | ClassDef(AliFMDAnaParameters,0) // Manager of parameters | |
104 | }; | |
105 | ||
106 | #endif | |
107 | //____________________________________________________________________ | |
108 | // | |
109 | // Local Variables: | |
110 | // mode: C++ | |
111 | // End: | |
112 | // | |
113 | // EOF | |
114 | // | |
115 |