#include <AstroHit.hh>


Public Member Functions | |
| AstroHit (G4int slice) | |
| ~AstroHit () | |
| void * | operator new (size_t) |
| void | operator delete (void *aHit) |
| void | addE (double e) |
| void | accumulateProton (G4double eKin) |
| G4double | GetEnergy () const |
| G4double | GetProtonTotalEkin () const |
| G4double | GetProtonMeanEkin () const |
| G4int | GetNbProton () const |
| G4int | GetSlice () const |
Private Attributes | |
| const G4int | m_slice |
| G4double | m_e |
| G4double | m_eKproton |
| G4int | m_nbProton |
Definition at line 13 of file AstroHit.hh.
| AstroHit::AstroHit | ( | G4int | slice | ) |
Definition at line 6 of file AstroHit.cc.
00007 : m_slice(slice) // <<-- note BTW this is the only way to initialize a "const" member 00008 { 00009 m_e = 0.0; 00010 m_eKproton = 0.0; 00011 m_nbProton = 0; 00012 }
| AstroHit::~AstroHit | ( | ) |
| void * AstroHit::operator new | ( | size_t | ) | [inline] |
Definition at line 44 of file AstroHit.hh.
00045 { 00046 void *aHit; 00047 aHit = (void *) AstroHitAllocator.MallocSingle(); 00048 return aHit; 00049 }
| void AstroHit::operator delete | ( | void * | aHit | ) | [inline] |
Definition at line 50 of file AstroHit.hh.
00051 { 00052 AstroHitAllocator.FreeSingle((AstroHit*) aHit); 00053 }
| void AstroHit::addE | ( | double | e | ) | [inline] |
Definition at line 25 of file AstroHit.hh.
Referenced by SensitiveDetector::ProcessHits().
00025 {m_e += e;}
| void AstroHit::accumulateProton | ( | G4double | eKin | ) | [inline] |
Definition at line 26 of file AstroHit.hh.
Referenced by SensitiveDetector::ProcessHits().
00026 {m_eKproton += eKin, m_nbProton++;}
| G4double AstroHit::GetEnergy | ( | ) | const [inline] |
Definition at line 27 of file AstroHit.hh.
Referenced by EventAction::EndOfEventAction().
00027 {return m_e ;}
| G4double AstroHit::GetProtonTotalEkin | ( | ) | const [inline] |
Definition at line 28 of file AstroHit.hh.
Referenced by EventAction::EndOfEventAction().
00028 {return m_eKproton ;}
| G4double AstroHit::GetProtonMeanEkin | ( | ) | const [inline] |
Definition at line 29 of file AstroHit.hh.
Referenced by EventAction::EndOfEventAction().
00029 {G4double mean(-1.); if (m_nbProton>0) mean = m_eKproton / m_nbProton; return mean;}
| G4int AstroHit::GetNbProton | ( | ) | const [inline] |
Definition at line 30 of file AstroHit.hh.
Referenced by EventAction::EndOfEventAction().
00030 {return m_nbProton ;}
| G4int AstroHit::GetSlice | ( | ) | const [inline] |
Definition at line 31 of file AstroHit.hh.
Referenced by EventAction::EndOfEventAction().
00031 {return m_slice;}
const G4int AstroHit::m_slice [private] |
G4double AstroHit::m_e [private] |
G4double AstroHit::m_eKproton [private] |
Definition at line 36 of file AstroHit.hh.
Referenced by accumulateProton(), AstroHit(), GetProtonMeanEkin(), and GetProtonTotalEkin().
G4int AstroHit::m_nbProton [private] |
Definition at line 37 of file AstroHit.hh.
Referenced by accumulateProton(), AstroHit(), GetNbProton(), and GetProtonMeanEkin().
1.5.7.1