Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

LIPmt.h

Go to the documentation of this file.
00001 
00002 
00003 // Program name: LIPmt.h                        
00004 //                                                                     
00005 // Package: LISummary                                         
00006 //                                                                    
00007 // Coded by Jeff Hartnell Nov/2003          
00008 //                                                                    
00009 // Purpose: An object to store the means and gains of every
00010 //          pixel spot in a pmt as well as the average gain for a 
00011 //          particular pixel. It can also be used to calculate
00012 //          the average gain for each pixel spot.
00013 //                                                                    
00014 // Contact: jeffrey.hartnell@physics.ox.ac.uk                         
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   //methods that do modify the object's state  
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   //methods that don't modify the object's state
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   //methods that do modify the object's state  
00061   void InitialiseVariables(Int_t numPixels,Int_t numPixelSpots);
00062 
00063   //methods that don't modify the object's state  
00064   //none
00065 
00066   //data members
00067   std::vector<Int_t> fCounter;//holds all the pixel spot gains
00068   std::vector<Double_t> fGains;//holds all the pixel spot gains
00069   Double_t fGainsSum;//this is a sum of all the gains added to the pmt
00070   Int_t fGainsNum;//this is the number of gains added to the pmt 
00071   Bool_t fInitialised;//stores whether pmt was initialised
00072   LILookup lookup;//to lookup LI info
00073   Int_t fNumPixels;//number of pixels on this pmt
00074   Int_t fNumPixelSpots;//number of pixel spots on this pmt
00075 
00076   //these pixelGains are used to calculate the average gain for a 
00077   //pixel when there are more than one spot 
00078   std::vector<Double_t> fPixelGainsSum;//sum of the gain on a pixel
00079   std::vector<Int_t> fPixelGainsNum;//number of gains added to pixel
00080   std::string fS;//general purpose string
00081 
00082   ClassDef(LIPmt,0);
00083 };
00084 
00085 #endif //LIPMT_H

Generated on Mon Feb 15 11:06:52 2010 for loon by  doxygen 1.3.9.1