Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

GLG4HitPMT Class Reference

GLG4HitPMT stores information about a PMT that detected one or more photoelectrons. More...

#include <GLG4HitPMT.hh>

List of all members.

Public Member Functions

 GLG4HitPMT (int ID)
void Clear ()
 clear out AND DELETE HitPhotons that were detected, resetting this HitPMT to have no HitPhotons
void DetectPhoton (GLG4HitPhoton *)
 Add HitPhoton, or try to merge with another HitPhoton when number of HitPhotons is bigger than kApproxMaxIndividualHitPhotonsPerPMT.
void SortTimeAscending ()
 sort HitPhotons so earliest are first
int GetID () const
int GetEntries () const
GLG4HitPhotonGetPhoton (int i) const
void Print (std::ostream &, bool fullDetailsMode=false)
 print out HitPhotons.

Static Public Attributes

const size_t kApproxMaxIndividualHitPhotonsPerPMT = 100
 controls when to start trying to merge HitPhotons
const double kMergeTime = 1.0
 hit merging window in ns


Detailed Description

GLG4HitPMT stores information about a PMT that detected one or more photoelectrons.

The general contract for GLG4HitPMT is as follows:

This is almost the same "general contract" that was implemented for KLG4sim's KLHitPMT by O. Tajima and G. Horton-Smith, but the code was rewritten for GLG4sim in December 2004.

Author:
Glenn Horton-Smith


Member Function Documentation

void GLG4HitPMT::DetectPhoton GLG4HitPhoton new_photon  ) 
 

Add HitPhoton, or try to merge with another HitPhoton when number of HitPhotons is bigger than kApproxMaxIndividualHitPhotonsPerPMT.

If number of HitPhotons stored is less than kApproxMaxIndividualHitPhotonsPerPMT, just add it to the list.

If number of HitPhotons stored is greater than or equal to kApproxMaxIndividualHitPhotonsPerPMT, sort the vector, then find the HitPhoton that immediately preceeds it in sorted vector. If this HitPhoton's time is within kMergeTime of the preceeding HitPhoton, then add this HitPhoton's count to that closest preceeding HitPhoton. Otherwise, look at following HitPhoton and merge with it if time is is within kMergeTime. Otherwise, insert a new HitPhoton, allowing the size of the vector to grow beyond kApproxMaxIndividualHitPhotonsPerPMT.

The time of "merged HitPhotons" is set to the time of the earliest HitPhoton in the merged set, because of the importance of the leading edge in the electronics and the analysis. Due to the smallness of kMergeTime (1 ns), the effect is expected to be small.

Note that GLG4HitPMT immediately "owns" any HitPhoton passed to DetectPhoton, and can delete the HitPhoton object at will. In particular, the GLG4HitPhoton pointed to by the new_photon argument is deleted if merging with an existing HitPhoton occurs.

Parameters:
new_photon New HitPhoton to add (or merge).


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 13:31:46 2007 for GLG4sim by  doxygen 1.3.9.1