GLG4HitPMTCollection Class Reference

Ratpac-two: GLG4HitPMTCollection Class Reference
Ratpac-two
GLG4HitPMTCollection Class Reference

#include <GLG4HitPMTCollection.hh>

Public Member Functions

void Clear ()
 
void DetectPhoton (GLG4HitPhoton *)
 
void SortTimeAscending ()
 
int GetEntries () const
 
GLG4HitPMTGetPMT (int i) const
 
GLG4HitPMTGetPMT_ByID (int id) const
 
void SetChannelStatus (const RAT::DS::ChannelStatus *_ch_status)
 
void Print (std::ostream &) const
 print out HitPMTs
 

Detailed Description

GLG4HitPMTCollection stores GLG4HitPMT objects.

The general contract for GLG4HitPMTCollection is as follows:

  • efficiently keep a bunch of GLG4HitPMTs with GLG4HitPhotons
  • provide Clear, DetectPhoton, SortTimeAscending, GetEntries, GetPMT, and Print(ostream &) functions
  • note the GLG4HitPhotons passed to DetectPhoton will become the "owned" by the GLG4HitPMTCollection and its GLG4HitPMTs, and they will take care of deletion.

This is almost the same "general contract" that was implemented for KLG4sim's KLHitPMTCollection 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 GLG4HitPMTCollection::Clear ( )

clear out AND DELETE HitPMTs (and HitPhotons) that were detected, resetting this HitPMTCollection to be empty

◆ DetectPhoton()

void GLG4HitPMTCollection::DetectPhoton ( GLG4HitPhoton new_photon)

find or make appropriate HitPMT, and DetectPhoton in that HitPMT

◆ GetEntries()

int GLG4HitPMTCollection::GetEntries ( ) const

return the number of HitPMTs in internal collection

◆ GetPMT()

GLG4HitPMT * GLG4HitPMTCollection::GetPMT ( int  i) const

return the i-th HitPMT in internal collection

◆ GetPMT_ByID()

GLG4HitPMT * GLG4HitPMTCollection::GetPMT_ByID ( int  id) const

return pointer to HitPMT with given id if in collection, or NULL if no such HitPMT is in collection


The documentation for this class was generated from the following files: