]>
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" |
7e2bf482 | 41 | #include "AliFMDAnaCalibSharingEfficiency.h" |
78f6f750 | 42 | #include <TVector2.h> |
43 | #include <TString.h> | |
9f55be54 | 44 | //#include "AliPWG0Helper.h" |
b64db9b1 | 45 | class AliESDEvent; |
d7346eed | 46 | |
cfe59e45 | 47 | /** |
48 | * @ingroup FMD_ana | |
49 | */ | |
d7346eed | 50 | class AliFMDAnaParameters : public TNamed |
51 | { | |
52 | public: | |
53 | /** Enumeration of things to initialize */ | |
54 | enum What { | |
55 | /** Pulser gain */ | |
b64db9b1 | 56 | kBackgroundCorrection = 0x1, // Background Correction |
57 | kEnergyDistributions = 0x2, // Energy Distributions | |
7e2bf482 | 58 | kEventSelectionEfficiency = 0x4, // Event Selection Efficiency |
59 | kSharingEfficiency = 0x8 // Sharing algorithm efficiency | |
d7346eed | 60 | }; |
61 | ||
50a0adf8 | 62 | enum Trigger { kMB1 = 0, kMB2, kSPDFASTOR, kNOCTP }; |
9f55be54 | 63 | |
d8dec33d | 64 | enum Energy { k900 , k10000, k14000 , k7000}; |
0b0a4ae5 | 65 | |
67a2b706 | 66 | enum MagField {k0G, k5G}; |
67 | ||
01622a51 | 68 | enum Species {kPP, kPbPb}; |
69 | ||
d7346eed | 70 | /** Singleton access |
71 | @return single to */ | |
72 | static AliFMDAnaParameters* Instance(); | |
73 | ||
7e2bf482 | 74 | void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions|kEventSelectionEfficiency|kSharingEfficiency); |
d7346eed | 75 | Float_t GetVtxCutZ(); |
76 | Int_t GetNvtxBins(); | |
5754671c | 77 | Int_t GetNetaBins(); |
78 | Float_t GetEtaMin(); | |
79 | Float_t GetEtaMax(); | |
80 | Float_t GetMPV(Int_t det, Char_t ring, Float_t eta); | |
81 | Float_t GetSigma(Int_t det, Char_t ring, Float_t eta); | |
82 | Float_t Get2MIPWeight(Int_t det, Char_t ring, Float_t eta); | |
83 | Float_t Get3MIPWeight(Int_t det, Char_t ring, Float_t eta); | |
d05586f1 | 84 | //static const char* GetBackgroundPath() { return fgkBackgroundCorrection;} |
85 | // static const char* GetEdistPath() { return fgkEnergyDists;} | |
86 | static const char* GetBackgroundID() { return fgkBackgroundID;} | |
87 | static const char* GetEdistID() { return fgkEnergyDistributionID;} | |
b64db9b1 | 88 | static const char* GetEventSelectionEffID() { return fgkEventSelectionEffID;} |
7e2bf482 | 89 | static const char* GetSharingEffID() { return fgkSharingEffID;} |
d7346eed | 90 | TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin); |
4fb49e43 | 91 | TH1F* GetDoubleHitCorrection(Int_t det, Char_t ring); |
b64db9b1 | 92 | |
7e2bf482 | 93 | TH1F* GetSharingEfficiency(Int_t det, Char_t ring, Int_t vtxbin); |
25f47050 | 94 | TH1F* GetSharingEfficiencyTrVtx(Int_t det, Char_t ring, Int_t vtxbin); |
7e2bf482 | 95 | Float_t GetEventSelectionEfficiency(Int_t vtxbin); |
96 | Float_t GetPhiFromSector(UShort_t det, Char_t ring, UShort_t sec) const; | |
97 | Float_t GetEtaFromStrip(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip, Float_t zvtx) const; | |
78f6f750 | 98 | Float_t GetStripLength(Char_t ring, UShort_t strip) ; |
99 | Float_t GetBaseStripLength(Char_t ring, UShort_t strip) ; | |
d05586f1 | 100 | Float_t GetMaxR(Char_t ring) const; |
101 | Float_t GetMinR(Char_t ring) const; | |
78f6f750 | 102 | void SetBackgroundPath(const Char_t* bgpath) {fBackgroundPath.Form(bgpath);} |
103 | void SetEnergyPath(const Char_t* epath) {fEnergyPath.Form(epath);} | |
b033f0b1 | 104 | void SetEventSelectionPath(const Char_t* evpath) {fEventSelectionEffPath.Form(evpath);} |
7e2bf482 | 105 | void SetSharingEfficiencyPath(const Char_t* sharpath) {fSharingEffPath.Form(sharpath);} |
b64db9b1 | 106 | void SetProcessPrimary(Bool_t prim=kTRUE) {fProcessPrimary = prim;} |
107 | void SetProcessHits(Bool_t hits=kTRUE) {fProcessHits = hits;} | |
50a0adf8 | 108 | Bool_t GetProcessPrimary() const {return fProcessPrimary;} |
109 | Bool_t GetProcessHits() const {return fProcessHits;} | |
b64db9b1 | 110 | void GetVertex(AliESDEvent* esd, Double_t* vertexXYZ); |
9f55be54 | 111 | void SetTriggerDefinition(Trigger trigger) {fTrigger = trigger;} |
50a0adf8 | 112 | Trigger GetTriggerDefinition() const {return fTrigger;} |
113 | Bool_t IsEventTriggered(AliESDEvent* esd) const; | |
0b0a4ae5 | 114 | void SetEnergy(Energy energy) {fEnergy = energy;} |
67a2b706 | 115 | void SetMagField(MagField magfield) {fMagField = magfield;} |
0b0a4ae5 | 116 | char* GetPath(const char* species); |
f6b21230 | 117 | void SetCollisionSystem(Species collsystem) {fSpecies = collsystem;} |
118 | void PrintStatus(); | |
119 | ||
d7346eed | 120 | protected: |
121 | ||
122 | AliFMDAnaParameters(); | |
123 | ||
124 | AliFMDAnaParameters(const AliFMDAnaParameters& o) | |
125 | : TNamed(o), | |
126 | fIsInit(o.fIsInit), | |
46807b30 | 127 | fBackground(o.fBackground), |
41bad769 | 128 | fEnergyDistribution(o.fEnergyDistribution), |
b64db9b1 | 129 | fEventSelectionEfficiency(o.fEventSelectionEfficiency), |
7e2bf482 | 130 | fSharingEfficiency(o.fSharingEfficiency), |
41bad769 | 131 | fCorner1(o.fCorner1), |
132 | fCorner2(o.fCorner2), | |
133 | fEnergyPath(o.fEnergyPath), | |
b64db9b1 | 134 | fBackgroundPath(o.fBackgroundPath), |
9f55be54 | 135 | fEventSelectionEffPath(o.fEventSelectionEffPath), |
7e2bf482 | 136 | fSharingEffPath(o.fSharingEffPath), |
b64db9b1 | 137 | fProcessPrimary(o.fProcessPrimary), |
138 | fProcessHits(o.fProcessHits), | |
0b0a4ae5 | 139 | fTrigger(o.fTrigger), |
67a2b706 | 140 | fEnergy(o.fEnergy), |
01622a51 | 141 | fMagField(o.fMagField), |
142 | fSpecies(o.fSpecies) | |
d7346eed | 143 | {} |
144 | AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; } | |
145 | virtual ~AliFMDAnaParameters() {} | |
146 | ||
147 | static AliFMDAnaParameters* fgInstance; // Static singleton instance | |
148 | ||
78f6f750 | 149 | // AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ; |
d7346eed | 150 | void InitBackground(); |
151 | void InitEnergyDists(); | |
b64db9b1 | 152 | void InitEventSelectionEff(); |
7e2bf482 | 153 | void InitSharingEff(); |
b64db9b1 | 154 | |
5754671c | 155 | TH1F* GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta); |
d7346eed | 156 | TObjArray* GetBackgroundArray(); |
157 | ||
8dc823cc | 158 | TAxis* GetRefAxis(); |
78f6f750 | 159 | void SetCorners(Char_t ring) ; |
8dc823cc | 160 | |
50a0adf8 | 161 | Bool_t fIsInit; //Have we been init ? |
46807b30 | 162 | //TObjArray* fBackgroundArray; |
163 | // TObjArray* fEdistArray; | |
50a0adf8 | 164 | AliFMDAnaCalibBackgroundCorrection* fBackground; |
b64db9b1 | 165 | AliFMDAnaCalibEnergyDistribution* fEnergyDistribution; |
166 | AliFMDAnaCalibEventSelectionEfficiency* fEventSelectionEfficiency; | |
7e2bf482 | 167 | AliFMDAnaCalibSharingEfficiency* fSharingEfficiency; |
d05586f1 | 168 | //static const char* fgkBackgroundCorrection; |
169 | //static const char* fgkEnergyDists; | |
170 | static const char* fgkBackgroundID; | |
171 | static const char* fgkEnergyDistributionID ; | |
b64db9b1 | 172 | static const char* fgkEventSelectionEffID ; |
7e2bf482 | 173 | static const char* fgkSharingEffID ; |
b64db9b1 | 174 | |
50a0adf8 | 175 | TVector2 fCorner1; //First corner of hybrid |
176 | TVector2 fCorner2; //Second corner of hybrid | |
177 | TString fEnergyPath; //Path of energy calib | |
178 | TString fBackgroundPath; //Path of BG correction | |
179 | TString fEventSelectionEffPath; //Path of event selection eff | |
180 | TString fSharingEffPath; //Path of sharing eff | |
181 | Bool_t fProcessPrimary; //Do we process primary ? | |
182 | Bool_t fProcessHits; //Do we process hits ? | |
183 | Trigger fTrigger; //Which trigger are we using ? | |
184 | Energy fEnergy; // CM energy | |
185 | MagField fMagField; //Magnetic field | |
186 | Species fSpecies; //PbPb or pp ? | |
9f55be54 | 187 | |
d7346eed | 188 | ClassDef(AliFMDAnaParameters,0) // Manager of parameters |
189 | }; | |
190 | ||
191 | #endif | |
192 | //____________________________________________________________________ | |
193 | // | |
194 | // Local Variables: | |
195 | // mode: C++ | |
196 | // End: | |
197 | // | |
198 | // EOF | |
199 | // | |
200 |