]>
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" | |
b64db9b1 | 40 | #include "AliFMDAnaCalibEventSelectionEfficiency.h" |
78f6f750 | 41 | #include <TVector2.h> |
42 | #include <TString.h> | |
9f55be54 | 43 | //#include "AliPWG0Helper.h" |
b64db9b1 | 44 | class AliESDEvent; |
d7346eed | 45 | |
cfe59e45 | 46 | /** |
47 | * @ingroup FMD_ana | |
48 | */ | |
d7346eed | 49 | class AliFMDAnaParameters : public TNamed |
50 | { | |
51 | public: | |
52 | /** Enumeration of things to initialize */ | |
53 | enum What { | |
54 | /** Pulser gain */ | |
b64db9b1 | 55 | kBackgroundCorrection = 0x1, // Background Correction |
56 | kEnergyDistributions = 0x2, // Energy Distributions | |
57 | kEventSelectionEfficiency = 0x4 // Event Selection Efficiency | |
d7346eed | 58 | }; |
59 | ||
9f55be54 | 60 | enum Trigger { kMB1 = 0, kMB2, kSPDFASTOR }; |
61 | ||
d7346eed | 62 | /** Singleton access |
63 | @return single to */ | |
64 | static AliFMDAnaParameters* Instance(); | |
65 | ||
b64db9b1 | 66 | void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions|kEventSelectionEfficiency); |
d7346eed | 67 | Float_t GetVtxCutZ(); |
68 | Int_t GetNvtxBins(); | |
5754671c | 69 | Int_t GetNetaBins(); |
70 | Float_t GetEtaMin(); | |
71 | Float_t GetEtaMax(); | |
72 | Float_t GetMPV(Int_t det, Char_t ring, Float_t eta); | |
73 | Float_t GetSigma(Int_t det, Char_t ring, Float_t eta); | |
74 | Float_t Get2MIPWeight(Int_t det, Char_t ring, Float_t eta); | |
75 | Float_t Get3MIPWeight(Int_t det, Char_t ring, Float_t eta); | |
d05586f1 | 76 | //static const char* GetBackgroundPath() { return fgkBackgroundCorrection;} |
77 | // static const char* GetEdistPath() { return fgkEnergyDists;} | |
78 | static const char* GetBackgroundID() { return fgkBackgroundID;} | |
79 | static const char* GetEdistID() { return fgkEnergyDistributionID;} | |
b64db9b1 | 80 | static const char* GetEventSelectionEffID() { return fgkEventSelectionEffID;} |
d7346eed | 81 | TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin); |
4fb49e43 | 82 | TH1F* GetDoubleHitCorrection(Int_t det, Char_t ring); |
b64db9b1 | 83 | |
84 | Float_t GetEventSelectionEfficiency(Int_t vtxbin); | |
d05586f1 | 85 | Float_t GetPhiFromSector(UShort_t det, Char_t ring, UShort_t sec) const; |
86 | Float_t GetEtaFromStrip(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip, Float_t zvtx) const; | |
78f6f750 | 87 | Float_t GetStripLength(Char_t ring, UShort_t strip) ; |
88 | Float_t GetBaseStripLength(Char_t ring, UShort_t strip) ; | |
d05586f1 | 89 | Float_t GetMaxR(Char_t ring) const; |
90 | Float_t GetMinR(Char_t ring) const; | |
78f6f750 | 91 | void SetBackgroundPath(const Char_t* bgpath) {fBackgroundPath.Form(bgpath);} |
92 | void SetEnergyPath(const Char_t* epath) {fEnergyPath.Form(epath);} | |
b64db9b1 | 93 | void SetProcessPrimary(Bool_t prim=kTRUE) {fProcessPrimary = prim;} |
94 | void SetProcessHits(Bool_t hits=kTRUE) {fProcessHits = hits;} | |
95 | Bool_t GetProcessPrimary() {return fProcessPrimary;} | |
96 | Bool_t GetProcessHits() {return fProcessHits;} | |
97 | void GetVertex(AliESDEvent* esd, Double_t* vertexXYZ); | |
9f55be54 | 98 | void SetTriggerDefinition(Trigger trigger) {fTrigger = trigger;} |
6f76f8b1 | 99 | Trigger GetTriggerDefinition() {return fTrigger;} |
b64db9b1 | 100 | Bool_t IsEventTriggered(AliESDEvent* esd); |
d7346eed | 101 | protected: |
102 | ||
103 | AliFMDAnaParameters(); | |
104 | ||
105 | AliFMDAnaParameters(const AliFMDAnaParameters& o) | |
106 | : TNamed(o), | |
107 | fIsInit(o.fIsInit), | |
46807b30 | 108 | fBackground(o.fBackground), |
41bad769 | 109 | fEnergyDistribution(o.fEnergyDistribution), |
b64db9b1 | 110 | fEventSelectionEfficiency(o.fEventSelectionEfficiency), |
41bad769 | 111 | fCorner1(o.fCorner1), |
112 | fCorner2(o.fCorner2), | |
113 | fEnergyPath(o.fEnergyPath), | |
b64db9b1 | 114 | fBackgroundPath(o.fBackgroundPath), |
9f55be54 | 115 | fEventSelectionEffPath(o.fEventSelectionEffPath), |
b64db9b1 | 116 | fProcessPrimary(o.fProcessPrimary), |
117 | fProcessHits(o.fProcessHits), | |
118 | fTrigger(o.fTrigger) | |
d7346eed | 119 | {} |
120 | AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; } | |
121 | virtual ~AliFMDAnaParameters() {} | |
122 | ||
123 | static AliFMDAnaParameters* fgInstance; // Static singleton instance | |
124 | ||
78f6f750 | 125 | // AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ; |
d7346eed | 126 | void InitBackground(); |
127 | void InitEnergyDists(); | |
b64db9b1 | 128 | void InitEventSelectionEff(); |
129 | ||
5754671c | 130 | TH1F* GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta); |
d7346eed | 131 | TObjArray* GetBackgroundArray(); |
132 | ||
8dc823cc | 133 | TAxis* GetRefAxis(); |
78f6f750 | 134 | void SetCorners(Char_t ring) ; |
8dc823cc | 135 | |
d7346eed | 136 | Bool_t fIsInit; |
46807b30 | 137 | //TObjArray* fBackgroundArray; |
138 | // TObjArray* fEdistArray; | |
b64db9b1 | 139 | AliFMDAnaCalibBackgroundCorrection* fBackground; |
140 | AliFMDAnaCalibEnergyDistribution* fEnergyDistribution; | |
141 | AliFMDAnaCalibEventSelectionEfficiency* fEventSelectionEfficiency; | |
142 | ||
d05586f1 | 143 | //static const char* fgkBackgroundCorrection; |
144 | //static const char* fgkEnergyDists; | |
145 | static const char* fgkBackgroundID; | |
146 | static const char* fgkEnergyDistributionID ; | |
b64db9b1 | 147 | static const char* fgkEventSelectionEffID ; |
148 | ||
78f6f750 | 149 | TVector2 fCorner1; |
150 | TVector2 fCorner2; | |
b64db9b1 | 151 | TString fEnergyPath; |
152 | TString fBackgroundPath; | |
153 | TString fEventSelectionEffPath; | |
154 | Bool_t fProcessPrimary; | |
155 | Bool_t fProcessHits; | |
9f55be54 | 156 | Trigger fTrigger; |
157 | ||
d7346eed | 158 | ClassDef(AliFMDAnaParameters,0) // Manager of parameters |
159 | }; | |
160 | ||
161 | #endif | |
162 | //____________________________________________________________________ | |
163 | // | |
164 | // Local Variables: | |
165 | // mode: C++ | |
166 | // End: | |
167 | // | |
168 | // EOF | |
169 | // | |
170 |