Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
B4c::CalorHit Class Reference
basic » B4 » B4c

Calorimeter hit class. More...

#include <Doxymodules_basic.h>

Inheritance diagram for B4c::CalorHit:
G4VHit

Public Member Functions

 CalorHit ()=default
 
 CalorHit (const CalorHit &)=default
 
 ~CalorHit () override=default
 
CalorHitoperator= (const CalorHit &)=default
 
G4bool operator== (const CalorHit &) const
 
void * operator new (size_t)
 
void operator delete (void *)
 
void Draw () override
 
void Print () override
 
void Add (G4double de, G4double dl)
 
G4double GetEdep () const
 
G4double GetTrackLength () const
 

Private Attributes

G4double fEdep = 0.
 Energy deposit in the sensitive volume.
 
G4double fTrackLength = 0.
 Track length in the sensitive volume.
 

Detailed Description

Calorimeter hit class.

It defines data members to store the the energy deposit and track lengths of charged particles in a selected volume:

Definition at line 157 of file Doxymodules_basic.h.

Constructor & Destructor Documentation

◆ CalorHit() [1/2]

B4c::CalorHit::CalorHit ( )
default

◆ CalorHit() [2/2]

B4c::CalorHit::CalorHit ( const CalorHit )
default

◆ ~CalorHit()

B4c::CalorHit::~CalorHit ( )
overridedefault

Member Function Documentation

◆ operator=()

CalorHit & B4c::CalorHit::operator= ( const CalorHit )
default

◆ operator==()

G4bool B4c::CalorHit::operator== ( const CalorHit right) const

Definition at line 46 of file CalorHit.cc.

47{
48 return ( this == &right ) ? true : false;
49}

◆ operator new()

void * B4c::CalorHit::operator new ( size_t  )
inline

Definition at line 86 of file CalorHit.hh.

87{
88 if (!CalorHitAllocator) {
90 }
91 void *hit;
92 hit = (void *) CalorHitAllocator->MallocSingle();
93 return hit;
94}
G4ThreadLocal G4Allocator< CalorHit > * CalorHitAllocator
Definition CalorHit.cc:42

◆ operator delete()

void B4c::CalorHit::operator delete ( void *  hit)
inline

Definition at line 96 of file CalorHit.hh.

97{
98 if (!CalorHitAllocator) {
100 }
101 CalorHitAllocator->FreeSingle((CalorHit*) hit);
102}
CalorHit()=default

◆ Draw()

void B4c::CalorHit::Draw ( )
inlineoverride

Definition at line 63 of file CalorHit.hh.

63{}

◆ Print()

void B4c::CalorHit::Print ( )
override

Definition at line 53 of file CalorHit.cc.

54{
55 G4cout
56 << "Edep: "
57 << std::setw(7) << G4BestUnit(fEdep,"Energy")
58 << " track length: "
59 << std::setw(7) << G4BestUnit( fTrackLength,"Length")
60 << G4endl;
61}
G4double fEdep
Energy deposit in the sensitive volume.
Definition CalorHit.hh:74
G4double fTrackLength
Track length in the sensitive volume.
Definition CalorHit.hh:75

◆ Add()

void B4c::CalorHit::Add ( G4double  de,
G4double  dl 
)
inline

Definition at line 104 of file CalorHit.hh.

104 {
105 fEdep += de;
106 fTrackLength += dl;
107}

◆ GetEdep()

G4double B4c::CalorHit::GetEdep ( ) const
inline

Definition at line 109 of file CalorHit.hh.

109 {
110 return fEdep;
111}

◆ GetTrackLength()

G4double B4c::CalorHit::GetTrackLength ( ) const
inline

Definition at line 113 of file CalorHit.hh.

113 {
114 return fTrackLength;
115}

Member Data Documentation

◆ fEdep

G4double B4c::CalorHit::fEdep = 0.
private

Energy deposit in the sensitive volume.

Definition at line 74 of file CalorHit.hh.

◆ fTrackLength

G4double B4c::CalorHit::fTrackLength = 0.
private

Track length in the sensitive volume.

Definition at line 75 of file CalorHit.hh.


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

Applications | User Support | Publications | Collaboration