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