GLG4HitPMT Class Reference

Ratpac-two: GLG4HitPMT Class Reference
Ratpac-two

#include <GLG4HitPMT.hh>

Public Member Functions

 GLG4HitPMT (int ID)
 
void Clear ()
 
void DetectPhoton (GLG4HitPhoton *)
 
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

static const size_t kApproxMaxIndividualHitPhotonsPerPMT = std::numeric_limits<size_t>::max()
 
static 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:

  • remember ID and all photons that made photoelectrons in this PMT
  • provide Clear, DetectPhoton, SortTimeAscending, GetID, GetEntries, GetPhoton, and Print(ostream &) functions
  • take "ownership" of the photons registered by DetectPhoton, i.e., delete them when Clear or destrictor is called

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

◆ Clear()

void GLG4HitPMT::Clear ( )

clear out AND DELETE HitPhotons that were detected, resetting this HitPMT to have no HitPhotons

◆ DetectPhoton()

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_photonNew HitPhoton to add (or merge).

Member Data Documentation

◆ kApproxMaxIndividualHitPhotonsPerPMT

const size_t GLG4HitPMT::kApproxMaxIndividualHitPhotonsPerPMT = std::numeric_limits<size_t>::max()
static

controls when to start trying to merge HitPhotons WARNING: Set to huge number to avoid suprising people


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/core/include/RAT/GLG4HitPMT.hh
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/core/src/GLG4HitPMT.cc