1 #ifndef ALIFMDANAPARAMETERS_H
2 #define ALIFMDANAPARAMETERS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Latest changes by Hans Hjersing Dalsgaard, NBI, hans.dalsgaard@cern.ch
8 * See cxx source for full Copyright notice
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
15 //Author: Hans Hjersing Dalsgaard, NBI, hans.dalsgaard@cern.ch
17 //____________________________________________________________________
25 #ifndef ALIFMDUSHORTMAP_H
26 # include <AliFMDUShortMap.h>
28 #ifndef ALIFMDBOOLMAP_H
29 # include <AliFMDBoolMap.h>
31 #include "AliCDBEntry.h"
34 #include "TObjArray.h"
38 #include "AliFMDAnaCalibBackgroundCorrection.h"
39 #include "AliFMDAnaCalibEnergyDistribution.h"
40 #include "AliFMDAnaCalibEventSelectionEfficiency.h"
43 //#include "AliPWG0Helper.h"
49 class AliFMDAnaParameters : public TNamed
52 /** Enumeration of things to initialize */
55 kBackgroundCorrection = 0x1, // Background Correction
56 kEnergyDistributions = 0x2, // Energy Distributions
57 kEventSelectionEfficiency = 0x4 // Event Selection Efficiency
60 enum Trigger { kMB1 = 0, kMB2, kSPDFASTOR };
64 static AliFMDAnaParameters* Instance();
66 void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions|kEventSelectionEfficiency);
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);
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;}
80 static const char* GetEventSelectionEffID() { return fgkEventSelectionEffID;}
81 TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin);
82 TH1F* GetDoubleHitCorrection(Int_t det, Char_t ring);
84 Float_t GetEventSelectionEfficiency(Int_t vtxbin);
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;
87 Float_t GetStripLength(Char_t ring, UShort_t strip) ;
88 Float_t GetBaseStripLength(Char_t ring, UShort_t strip) ;
89 Float_t GetMaxR(Char_t ring) const;
90 Float_t GetMinR(Char_t ring) const;
91 void SetBackgroundPath(const Char_t* bgpath) {fBackgroundPath.Form(bgpath);}
92 void SetEnergyPath(const Char_t* epath) {fEnergyPath.Form(epath);}
93 void SetEventSelectionPath(const Char_t* evpath) {fEventSelectionEffPath.Form(evpath);}
94 void SetProcessPrimary(Bool_t prim=kTRUE) {fProcessPrimary = prim;}
95 void SetProcessHits(Bool_t hits=kTRUE) {fProcessHits = hits;}
96 Bool_t GetProcessPrimary() {return fProcessPrimary;}
97 Bool_t GetProcessHits() {return fProcessHits;}
98 void GetVertex(AliESDEvent* esd, Double_t* vertexXYZ);
99 void SetTriggerDefinition(Trigger trigger) {fTrigger = trigger;}
100 Trigger GetTriggerDefinition() {return fTrigger;}
101 Bool_t IsEventTriggered(AliESDEvent* esd);
104 AliFMDAnaParameters();
106 AliFMDAnaParameters(const AliFMDAnaParameters& o)
109 fBackground(o.fBackground),
110 fEnergyDistribution(o.fEnergyDistribution),
111 fEventSelectionEfficiency(o.fEventSelectionEfficiency),
112 fCorner1(o.fCorner1),
113 fCorner2(o.fCorner2),
114 fEnergyPath(o.fEnergyPath),
115 fBackgroundPath(o.fBackgroundPath),
116 fEventSelectionEffPath(o.fEventSelectionEffPath),
117 fProcessPrimary(o.fProcessPrimary),
118 fProcessHits(o.fProcessHits),
121 AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
122 virtual ~AliFMDAnaParameters() {}
124 static AliFMDAnaParameters* fgInstance; // Static singleton instance
126 // AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ;
127 void InitBackground();
128 void InitEnergyDists();
129 void InitEventSelectionEff();
131 TH1F* GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta);
132 TObjArray* GetBackgroundArray();
135 void SetCorners(Char_t ring) ;
138 //TObjArray* fBackgroundArray;
139 // TObjArray* fEdistArray;
140 AliFMDAnaCalibBackgroundCorrection* fBackground;
141 AliFMDAnaCalibEnergyDistribution* fEnergyDistribution;
142 AliFMDAnaCalibEventSelectionEfficiency* fEventSelectionEfficiency;
144 //static const char* fgkBackgroundCorrection;
145 //static const char* fgkEnergyDists;
146 static const char* fgkBackgroundID;
147 static const char* fgkEnergyDistributionID ;
148 static const char* fgkEventSelectionEffID ;
153 TString fBackgroundPath;
154 TString fEventSelectionEffPath;
155 Bool_t fProcessPrimary;
159 ClassDef(AliFMDAnaParameters,0) // Manager of parameters
163 //____________________________________________________________________