00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00016
00017 #ifndef LIPMT_H
00018 #define LIPMT_H
00019
00020 #include <vector>
00021 #include <string>
00022
00023 #include "TH2F.h"
00024 #include "TObject.h"
00025
00026 #include "LISummary/LILookup.h"
00027
00028 class LIPmt : public TObject
00029 {
00030
00031 public:
00032
00033 LIPmt();
00034 LIPmt(Int_t numPixels,Int_t numPixelSpots);
00035 ~LIPmt();
00036
00037
00038 void AddMultiPoint(Int_t pixel,Int_t pixelSpot,Double_t gain);
00039 void Initialise(Int_t numPixels,Int_t numPixelSpots);
00040 void SetPoint(Int_t pixel,Int_t pixelSpot,Double_t gain);
00041
00042
00043 void FillGainsHisto(TH1F* hGainAvDet) const;
00044 Double_t GetAvPmtGain() const;
00045 const std::vector<Double_t>& GetGains() const;
00046 Double_t GetGain(Int_t pixel,Int_t pixelSpot=-1) const;
00047 std::vector<Int_t> GetNearestNeighbours(Int_t pixel) const;
00048 Double_t GetNearestNeighboursAvGain(Int_t pixel) const;
00049 Int_t GetNearestNeighboursNum(Int_t pixel) const;
00050 Double_t GetPixelGain(Int_t pixel) const;
00051 Int_t GetPixelNum(Int_t pixel) const;
00052 Int_t GetPmtNum() const {return fGainsNum;}
00053 TH2F* GetPmtFaceMap(string sTitle="hPmtFaceMap") const;
00054 Bool_t IsEmpty() const;
00055 void Print(Option_t* option="") const;
00056 void PrintNearestNeighbours() const;
00057
00058 private:
00059
00060
00061 void InitialiseVariables(Int_t numPixels,Int_t numPixelSpots);
00062
00063
00064
00065
00066
00067 std::vector<Int_t> fCounter;
00068 std::vector<Double_t> fGains;
00069 Double_t fGainsSum;
00070 Int_t fGainsNum;
00071 Bool_t fInitialised;
00072 LILookup lookup;
00073 Int_t fNumPixels;
00074 Int_t fNumPixelSpots;
00075
00076
00077
00078 std::vector<Double_t> fPixelGainsSum;
00079 std::vector<Int_t> fPixelGainsNum;
00080 std::string fS;
00081
00082 ClassDef(LIPmt,0);
00083 };
00084
00085 #endif //LIPMT_H