00001 #ifndef __GLG4HitPMT_hh__
00002 #define __GLG4HitPMT_hh__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "GLG4HitPhoton.hh"
00013 #include <vector>
00014 #include <cstddef>
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include <vector>
00034
00035 class GLG4HitPMT {
00036 public:
00037 GLG4HitPMT(int ID);
00038 ~GLG4HitPMT();
00039
00040 void Clear();
00041 void DetectPhoton(GLG4HitPhoton*);
00042 void SortTimeAscending();
00043
00044 int GetID() const { return fID; }
00045 int GetEntries() const { return fPhotons.size(); }
00046 GLG4HitPhoton* GetPhoton(int i) const { return fPhotons[i]; }
00047
00048 void Print(std::ostream &, bool fullDetailsMode=false);
00049
00050 static const size_t kApproxMaxIndividualHitPhotonsPerPMT;
00051 static const double kMergeTime;
00052
00053 private:
00054 int fID;
00055 std::vector<GLG4HitPhoton*> fPhotons;
00056 };
00057
00058
00059
00060
00061 inline bool
00062 Compare_HitPMTPtr_TimeAscending(const GLG4HitPMT *a,
00063 const GLG4HitPMT *b)
00064 {
00065
00066 if (!a || a->GetEntries()<=0)
00067 return false;
00068 if (!b || b->GetEntries()<=0)
00069 return true;
00070 return a->GetPhoton(0)->GetTime() < b->GetPhoton(0)->GetTime();
00071 }
00072
00073
00074
00075 #endif // __GLG4HitPMT_hh__