00001 #ifndef LZFLUK_HH
00002 #define LZFLUK_HH
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include <map>
00014 #include <vector>
00015 #include <iostream>
00016 #include <fstream>
00017 #include "Rtypes.h"
00018 #include <cmath>
00019
00020 class TFile;
00021 class TH2F;
00022 class TH2D;
00023
00024 class Registry;
00025
00026 class LZfluk {
00027
00028 public:
00029
00030 LZfluk();
00031 virtual ~LZfluk();
00032
00033 void Config(const Registry ®);
00034
00035 void Init();
00036
00038 void SetParameters(std::vector<double> par) {fPar=par; RecalculateWeights();};
00039 const std::vector<double>& GetParameters() {return fPar;};
00040
00042 double GetWeight(int ptype, double pt, double pz);
00043 double CalcWeight(int ptype, double pt, double pz);
00044
00045
00046 double GetMeanPT(int ptype) {return fMeanPT[GetParticleEnum(ptype)];};
00047 double GetReweightedMeanPT(int ptype) {return fWeightedMeanPT[GetParticleEnum(ptype)];};
00048
00052 double GetPTshift(int ptype, double pz_low=0.,double pz_up=120.);
00053
00056 double GetNFrac(int ptype, double pz_low=0., double pz_up=120., double pt_low=0., double pt_up=1.);
00057
00058 TH2F* GetReweightedPTXF(int ptype) {return fWeightedPTXF[GetParticleEnum(ptype)];};
00059 TH2F* GetPTXF(int ptype) {return fPTXF[GetParticleEnum(ptype)];};
00060 TH2D* GetWeightHistogram(int ptype) {return fWeightHist[GetParticleEnum(ptype)];};
00061
00063 inline void UseParameterization(const char *which){
00064 std::string temp=which;
00065 if (temp=="SKZP") whichParameterization=0;
00066 else whichParameterization=1;
00067 };
00068
00069 private:
00070 typedef enum EParticleType
00071 {
00072 kPiPlus = 8,
00073 kPiMinus = 9,
00074 kKPlus = 11,
00075 kKMinus = 12,
00076 kK0L = 10,
00077 kUnknown = 0
00078 } ParticleType_t;
00079
00080 std::string GetParticleName(LZfluk::ParticleType_t ptype);
00081 LZfluk::ParticleType_t GetParticleEnum(int ptype);
00082 void RecalculateWeights();
00083
00084 int whichParameterization;
00085
00086 std::vector<double> fPar;
00087 std::vector<ParticleType_t> fPlist;
00088
00089 std::map<LZfluk::ParticleType_t, TH2F* > fPTXF;
00090 std::map<LZfluk::ParticleType_t, TH2F* > fWeightedPTXF;
00091 std::map<LZfluk::ParticleType_t, TH2D* > fWeightHist;
00092 std::map<LZfluk::ParticleType_t, double > fMeanPT;
00093 std::map<LZfluk::ParticleType_t, double > fN;
00094 std::map<LZfluk::ParticleType_t, double > fNWeighted;
00095 std::map<LZfluk::ParticleType_t, double > fWeightedMeanPT;
00096 std::map<LZfluk::ParticleType_t, int > fNBinsY,fNBinsX;
00097
00098
00099
00100 bool fWghtFromHist;
00101
00102 ClassDef(LZfluk,0)
00103 };
00104
00105 #endif