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"
42 //____________________________________________________________________
44 // Singleton class to handle various parameters (not geometry) of the
46 // Should get ata fromm Conditions DB.
49 class AliFMDAnaParameters : public TNamed
52 /** Enumeration of things to initialize */
55 kBackgroundCorrection = 0x1, // Background Correction
56 kEnergyDistributions = 0x2 // Energy Distributions
61 static AliFMDAnaParameters* Instance();
63 void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions);
69 Float_t GetMPV(Int_t det, Char_t ring, Float_t eta);
70 Float_t GetSigma(Int_t det, Char_t ring, Float_t eta);
71 Float_t Get2MIPWeight(Int_t det, Char_t ring, Float_t eta);
72 Float_t Get3MIPWeight(Int_t det, Char_t ring, Float_t eta);
73 static const char* GetBackgroundPath() { return fgkBackgroundCorrection;}
74 static const char* GetEdistPath() { return fgkEnergyDists;}
75 TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin);
76 TH1F* GetDoubleHitCorrection(Int_t det, Char_t ring);
77 Float_t GetPhiFromSector(UShort_t det, Char_t ring, UShort_t sec);
78 Float_t GetEtaFromStrip(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip, Float_t zvtx);
79 Float_t GetStripLength(Char_t ring, UShort_t strip) ;
80 Float_t GetBaseStripLength(Char_t ring, UShort_t strip) ;
81 Float_t GetMaxR(Char_t ring) ;
82 Float_t GetMinR(Char_t ring) ;
83 void SetBackgroundPath(const Char_t* bgpath) {fBackgroundPath.Form(bgpath);}
84 void SetEnergyPath(const Char_t* epath) {fEnergyPath.Form(epath);}
86 static const char* fkBackgroundID;
87 static const char* fkEnergyDistributionID ;
90 AliFMDAnaParameters();
92 AliFMDAnaParameters(const AliFMDAnaParameters& o)
95 fBackground(o.fBackground),
96 fEnergyDistribution(o.fEnergyDistribution)
97 // fBackgroundArray(o.fBackgroundArray),
98 //fEdistArray(o.fEdistArray)
100 AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
101 virtual ~AliFMDAnaParameters() {}
103 static AliFMDAnaParameters* fgInstance; // Static singleton instance
105 // AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ;
106 void InitBackground();
107 void InitEnergyDists();
108 TH1F* GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta);
109 TObjArray* GetBackgroundArray();
112 void SetCorners(Char_t ring) ;
115 //TObjArray* fBackgroundArray;
116 // TObjArray* fEdistArray;
117 AliFMDAnaCalibBackgroundCorrection* fBackground;
118 AliFMDAnaCalibEnergyDistribution* fEnergyDistribution;
119 static const char* fgkBackgroundCorrection;
120 static const char* fgkEnergyDists;
125 TString fBackgroundPath;
127 ClassDef(AliFMDAnaParameters,0) // Manager of parameters
131 //____________________________________________________________________