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.
52 class AliFMDAnaParameters : public TNamed
55 /** Enumeration of things to initialize */
58 kBackgroundCorrection = 0x1, // Background Correction
59 kEnergyDistributions = 0x2 // Energy Distributions
64 static AliFMDAnaParameters* Instance();
66 void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions);
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 TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin);
81 TH1F* GetDoubleHitCorrection(Int_t det, Char_t ring);
82 Float_t GetPhiFromSector(UShort_t det, Char_t ring, UShort_t sec) const;
83 Float_t GetEtaFromStrip(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip, Float_t zvtx) const;
84 Float_t GetStripLength(Char_t ring, UShort_t strip) ;
85 Float_t GetBaseStripLength(Char_t ring, UShort_t strip) ;
86 Float_t GetMaxR(Char_t ring) const;
87 Float_t GetMinR(Char_t ring) const;
88 void SetBackgroundPath(const Char_t* bgpath) {fBackgroundPath.Form(bgpath);}
89 void SetEnergyPath(const Char_t* epath) {fEnergyPath.Form(epath);}
94 AliFMDAnaParameters();
96 AliFMDAnaParameters(const AliFMDAnaParameters& o)
99 fBackground(o.fBackground),
100 fEnergyDistribution(o.fEnergyDistribution),
101 fCorner1(o.fCorner1),
102 fCorner2(o.fCorner2),
103 fEnergyPath(o.fEnergyPath),
104 fBackgroundPath(o.fBackgroundPath)
106 AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
107 virtual ~AliFMDAnaParameters() {}
109 static AliFMDAnaParameters* fgInstance; // Static singleton instance
111 // AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ;
112 void InitBackground();
113 void InitEnergyDists();
114 TH1F* GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta);
115 TObjArray* GetBackgroundArray();
118 void SetCorners(Char_t ring) ;
121 //TObjArray* fBackgroundArray;
122 // TObjArray* fEdistArray;
123 AliFMDAnaCalibBackgroundCorrection* fBackground;
124 AliFMDAnaCalibEnergyDistribution* fEnergyDistribution;
125 //static const char* fgkBackgroundCorrection;
126 //static const char* fgkEnergyDists;
127 static const char* fgkBackgroundID;
128 static const char* fgkEnergyDistributionID ;
132 TString fBackgroundPath;
134 ClassDef(AliFMDAnaParameters,0) // Manager of parameters
138 //____________________________________________________________________