00001 #ifndef PtEtaCollection_h 00002 #define PtEtaCollection_h 00003 00004 #include <iostream> 00005 00006 template <class T> 00007 class PtEtaCollection 00008 { 00009 00010 public: 00011 00012 PtEtaCollection(); 00013 00014 PtEtaCollection(unsigned int PtBins, 00015 unsigned int EtaBins, 00016 double PtArray[], 00017 double EtaArray[], 00018 T* PayloadArray, 00019 T DefaultPayload); 00020 00021 00022 virtual ~PtEtaCollection(); 00023 00024 virtual void Initialize(unsigned int PtBins, 00025 unsigned int EtaBins, 00026 double PtArray[], 00027 double EtaArray[], 00028 T* PayloadArray, 00029 T DefaultPayload); 00030 00031 void Set(double pt, double eta, T Payload); 00032 T Get(double pt, double eta); 00033 00034 unsigned int GetPtBins() { return m_PtBins; } 00035 unsigned int GetEtaBins() { return m_EtaBins; } 00036 unsigned int GetPayloadBins() { return m_PtBins*m_EtaBins; } 00037 double* GetPtArray() { return m_PtArray; } 00038 double* GetEtaArray() { return m_EtaArray; } 00039 T* GetPayloadArray() { return m_PayloadArray; } 00040 00041 protected: 00042 00043 unsigned int m_PtBins; 00044 unsigned int m_EtaBins; 00045 double* m_PtArray; 00046 double* m_EtaArray; 00047 T* m_PayloadArray; 00048 T m_DefaultPayload; 00049 00050 int PtBin (double Pt); 00051 int EtaBin(double Eta); 00052 00053 }; 00054 00055 #include "PtEtaCollection.icc" 00056 00057 #endif