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