]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis/AliFMDAnaParameters.h
Moving the FMD analysis to PWG2
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis / AliFMDAnaParameters.h
CommitLineData
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 45class AliESDEvent;
d7346eed 46
cfe59e45 47/**
48 * @ingroup FMD_ana
49 */
d7346eed 50class AliFMDAnaParameters : public TNamed
51{
52public:
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
93d093c0 62 enum Trigger { kMB1 = 0, kMB2, kSPDFASTOR, kTEST_NOCTP };
9f55be54 63
0b0a4ae5 64 enum Energy { k900 , k10000, k14000 };
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;}
108 Bool_t GetProcessPrimary() {return fProcessPrimary;}
109 Bool_t GetProcessHits() {return fProcessHits;}
110 void GetVertex(AliESDEvent* esd, Double_t* vertexXYZ);
9f55be54 111 void SetTriggerDefinition(Trigger trigger) {fTrigger = trigger;}
6f76f8b1 112 Trigger GetTriggerDefinition() {return fTrigger;}
b64db9b1 113 Bool_t IsEventTriggered(AliESDEvent* esd);
0b0a4ae5 114 void SetEnergy(Energy energy) {fEnergy = energy;}
67a2b706 115 void SetMagField(MagField magfield) {fMagField = magfield;}
0b0a4ae5 116 char* GetPath(const char* species);
7e2bf482 117
118
d7346eed 119protected:
120
121 AliFMDAnaParameters();
122
123 AliFMDAnaParameters(const AliFMDAnaParameters& o)
124 : TNamed(o),
125 fIsInit(o.fIsInit),
46807b30 126 fBackground(o.fBackground),
41bad769 127 fEnergyDistribution(o.fEnergyDistribution),
b64db9b1 128 fEventSelectionEfficiency(o.fEventSelectionEfficiency),
7e2bf482 129 fSharingEfficiency(o.fSharingEfficiency),
41bad769 130 fCorner1(o.fCorner1),
131 fCorner2(o.fCorner2),
132 fEnergyPath(o.fEnergyPath),
b64db9b1 133 fBackgroundPath(o.fBackgroundPath),
9f55be54 134 fEventSelectionEffPath(o.fEventSelectionEffPath),
7e2bf482 135 fSharingEffPath(o.fSharingEffPath),
b64db9b1 136 fProcessPrimary(o.fProcessPrimary),
137 fProcessHits(o.fProcessHits),
0b0a4ae5 138 fTrigger(o.fTrigger),
67a2b706 139 fEnergy(o.fEnergy),
01622a51 140 fMagField(o.fMagField),
141 fSpecies(o.fSpecies)
d7346eed 142 {}
143 AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
144 virtual ~AliFMDAnaParameters() {}
145
146 static AliFMDAnaParameters* fgInstance; // Static singleton instance
147
78f6f750 148 // AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ;
d7346eed 149 void InitBackground();
150 void InitEnergyDists();
b64db9b1 151 void InitEventSelectionEff();
7e2bf482 152 void InitSharingEff();
b64db9b1 153
5754671c 154 TH1F* GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta);
d7346eed 155 TObjArray* GetBackgroundArray();
156
8dc823cc 157 TAxis* GetRefAxis();
78f6f750 158 void SetCorners(Char_t ring) ;
8dc823cc 159
d7346eed 160 Bool_t fIsInit;
46807b30 161 //TObjArray* fBackgroundArray;
162 // TObjArray* fEdistArray;
b64db9b1 163 AliFMDAnaCalibBackgroundCorrection* fBackground;
164 AliFMDAnaCalibEnergyDistribution* fEnergyDistribution;
165 AliFMDAnaCalibEventSelectionEfficiency* fEventSelectionEfficiency;
7e2bf482 166 AliFMDAnaCalibSharingEfficiency* fSharingEfficiency;
d05586f1 167 //static const char* fgkBackgroundCorrection;
168 //static const char* fgkEnergyDists;
169 static const char* fgkBackgroundID;
170 static const char* fgkEnergyDistributionID ;
b64db9b1 171 static const char* fgkEventSelectionEffID ;
7e2bf482 172 static const char* fgkSharingEffID ;
b64db9b1 173
78f6f750 174 TVector2 fCorner1;
175 TVector2 fCorner2;
b64db9b1 176 TString fEnergyPath;
177 TString fBackgroundPath;
178 TString fEventSelectionEffPath;
7e2bf482 179 TString fSharingEffPath;
b64db9b1 180 Bool_t fProcessPrimary;
181 Bool_t fProcessHits;
9f55be54 182 Trigger fTrigger;
0b0a4ae5 183 Energy fEnergy;
67a2b706 184 MagField fMagField;
01622a51 185 Species fSpecies;
9f55be54 186
d7346eed 187 ClassDef(AliFMDAnaParameters,0) // Manager of parameters
188};
189
190#endif
191//____________________________________________________________________
192//
193// Local Variables:
194// mode: C++
195// End:
196//
197// EOF
198//
199