ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HadrontherapyRBEAccumulable Class Reference

Accumulable of RBE-related data (that must be thread-local). More...

#include <geant4/tree/geant4-10.6-release/examples/advanced/hadrontherapy/include/HadrontherapyRBEAccumulable.hh>

+ Inheritance diagram for HadrontherapyRBEAccumulable:
+ Collaboration diagram for HadrontherapyRBEAccumulable:

Public Types

using array_type = std::valarray< G4double >
 

Public Member Functions

 HadrontherapyRBEAccumulable ()
 
 HadrontherapyRBEAccumulable (const HadrontherapyRBEAccumulable &other)=default
 
void Merge (const G4VAccumulable &rhs) override
 
void Reset () override
 
void Accumulate (G4double E, G4double energyDeposit, G4double dX, G4int Z, G4int i, G4int j, G4int k)
 
const array_type GetEnergyDeposit () const
 
const array_type GetAlphaNumerator () const
 
const array_type GetBetaNumerator () const
 
const array_type GetDenominator () const
 
G4int GetVerboseLevel () const
 
- Public Member Functions inherited from G4VAccumulable
 G4VAccumulable (const G4String &name="")
 
 G4VAccumulable (const G4VAccumulable &rhs)
 
virtual ~G4VAccumulable ()
 
G4VAccumulableoperator= (const G4VAccumulable &rhs)
 
G4String GetName () const
 

Private Member Functions

G4int GetIndex (G4int i, G4int j, G4int k) const
 Helper function to get the 1D index in the 3D array.
 
void Initialize ()
 

Private Attributes

G4bool fInitialized { false }
 
array_type fAlphaNumerator
 
array_type fBetaNumerator
 
array_type fDenominator
 
array_type fEnergyDeposit
 
size_t fVoxelsAlongX
 
size_t fVoxelsAlongY
 
size_t fVoxelsAlongZ
 
size_t fVoxels
 

Additional Inherited Members

- Protected Attributes inherited from G4VAccumulable
G4String fName
 

Detailed Description

Accumulable of RBE-related data (that must be thread-local).

It keeps the sum of alpha and beta numerators/denominator, as well as energy deposits. The class is closely tied with the singleton HadrontherapyRBE that is used both to calculate alphas and betas, and also to store results.

This is implemented as a customized G4VAccumulable with non-scalar data.

Note
There are two levels of merging (accumulation): 1) From more threads in one run (G4VAccumulable merging is applied) 2) (Optional) inter-run merging of data (implemented in HadrontherapyRBE).
std::valarray is used (instead of C arrays or std::vectors) to accumulate data for its logical simplicity.

Definition at line 51 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 51 of file HadrontherapyRBEAccumulable.hh

Member Typedef Documentation

Definition at line 65 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 65 of file HadrontherapyRBEAccumulable.hh

Constructor & Destructor Documentation

HadrontherapyRBEAccumulable::HadrontherapyRBEAccumulable ( )

Definition at line 34 of file HadrontherapyRBEAccumulable.cc.

View newest version in sPHENIX GitHub at line 34 of file HadrontherapyRBEAccumulable.cc

HadrontherapyRBEAccumulable::HadrontherapyRBEAccumulable ( const HadrontherapyRBEAccumulable other)
default

Member Function Documentation

void HadrontherapyRBEAccumulable::Accumulate ( G4double  E,
G4double  energyDeposit,
G4double  dX,
G4int  Z,
G4int  i,
G4int  j,
G4int  k 
)

Definition at line 72 of file HadrontherapyRBEAccumulable.cc.

View newest version in sPHENIX GitHub at line 72 of file HadrontherapyRBEAccumulable.cc

References fAlphaNumerator, FatalException, fBetaNumerator, fDenominator, fEnergyDeposit, fInitialized, G4cout, G4endl, G4Exception(), HadrontherapyRBE::GetHitAlphaAndBeta(), GetIndex(), HadrontherapyRBE::GetInstance(), GetVerboseLevel(), and n.

+ Here is the call graph for this function:

const array_type HadrontherapyRBEAccumulable::GetAlphaNumerator ( ) const
inline

Definition at line 69 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 69 of file HadrontherapyRBEAccumulable.hh

References fAlphaNumerator.

Referenced by HadrontherapyRunAction::EndOfRunAction().

+ Here is the caller graph for this function:

const array_type HadrontherapyRBEAccumulable::GetBetaNumerator ( ) const
inline

Definition at line 70 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 70 of file HadrontherapyRBEAccumulable.hh

References fBetaNumerator.

Referenced by HadrontherapyRunAction::EndOfRunAction().

+ Here is the caller graph for this function:

const array_type HadrontherapyRBEAccumulable::GetDenominator ( ) const
inline

Definition at line 71 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 71 of file HadrontherapyRBEAccumulable.hh

References fDenominator.

Referenced by HadrontherapyRunAction::EndOfRunAction().

+ Here is the caller graph for this function:

const HadrontherapyRBEAccumulable::array_type HadrontherapyRBEAccumulable::GetEnergyDeposit ( ) const

Definition at line 98 of file HadrontherapyRBEAccumulable.cc.

View newest version in sPHENIX GitHub at line 98 of file HadrontherapyRBEAccumulable.cc

References fEnergyDeposit.

Referenced by HadrontherapyRunAction::EndOfRunAction().

+ Here is the caller graph for this function:

G4int HadrontherapyRBEAccumulable::GetIndex ( G4int  i,
G4int  j,
G4int  k 
) const
inlineprivate

Helper function to get the 1D index in the 3D array.

Definition at line 78 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 78 of file HadrontherapyRBEAccumulable.hh

References fVoxelsAlongY, fVoxelsAlongZ, and k.

Referenced by Accumulate().

+ Here is the caller graph for this function:

G4int HadrontherapyRBEAccumulable::GetVerboseLevel ( ) const

Definition at line 103 of file HadrontherapyRBEAccumulable.cc.

View newest version in sPHENIX GitHub at line 103 of file HadrontherapyRBEAccumulable.cc

References HadrontherapyRBE::GetInstance(), and HadrontherapyRBE::GetVerboseLevel().

Referenced by Accumulate(), Initialize(), Merge(), and Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void HadrontherapyRBEAccumulable::Initialize ( )
private

Definition at line 108 of file HadrontherapyRBEAccumulable.cc.

View newest version in sPHENIX GitHub at line 108 of file HadrontherapyRBEAccumulable.cc

References fAlphaNumerator, fBetaNumerator, fDenominator, fEnergyDeposit, fInitialized, fVoxels, fVoxelsAlongX, fVoxelsAlongY, fVoxelsAlongZ, G4cout, G4endl, HadrontherapyRBE::GetInstance(), and GetVerboseLevel().

Referenced by Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void HadrontherapyRBEAccumulable::Merge ( const G4VAccumulable rhs)
overridevirtual

Implements G4VAccumulable.

Definition at line 40 of file HadrontherapyRBEAccumulable.cc.

View newest version in sPHENIX GitHub at line 40 of file HadrontherapyRBEAccumulable.cc

References fAlphaNumerator, fBetaNumerator, fDenominator, fEnergyDeposit, G4cout, G4endl, and GetVerboseLevel().

+ Here is the call graph for this function:

void HadrontherapyRBEAccumulable::Reset ( )
overridevirtual

Implements G4VAccumulable.

Definition at line 53 of file HadrontherapyRBEAccumulable.cc.

View newest version in sPHENIX GitHub at line 53 of file HadrontherapyRBEAccumulable.cc

References fAlphaNumerator, fBetaNumerator, fDenominator, fEnergyDeposit, fInitialized, G4cout, G4endl, GetVerboseLevel(), and Initialize().

+ Here is the call graph for this function:

Member Data Documentation

array_type HadrontherapyRBEAccumulable::fAlphaNumerator
private

Definition at line 84 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 84 of file HadrontherapyRBEAccumulable.hh

Referenced by Accumulate(), GetAlphaNumerator(), Initialize(), Merge(), and Reset().

array_type HadrontherapyRBEAccumulable::fBetaNumerator
private

Definition at line 85 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 85 of file HadrontherapyRBEAccumulable.hh

Referenced by Accumulate(), GetBetaNumerator(), Initialize(), Merge(), and Reset().

array_type HadrontherapyRBEAccumulable::fDenominator
private

Definition at line 86 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 86 of file HadrontherapyRBEAccumulable.hh

Referenced by Accumulate(), GetDenominator(), Initialize(), Merge(), and Reset().

array_type HadrontherapyRBEAccumulable::fEnergyDeposit
private

Definition at line 87 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 87 of file HadrontherapyRBEAccumulable.hh

Referenced by Accumulate(), GetEnergyDeposit(), Initialize(), Merge(), and Reset().

G4bool HadrontherapyRBEAccumulable::fInitialized { false }
private

Definition at line 82 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 82 of file HadrontherapyRBEAccumulable.hh

Referenced by Accumulate(), Initialize(), and Reset().

size_t HadrontherapyRBEAccumulable::fVoxels
private

Definition at line 95 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 95 of file HadrontherapyRBEAccumulable.hh

Referenced by Initialize().

size_t HadrontherapyRBEAccumulable::fVoxelsAlongX
private

Definition at line 91 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 91 of file HadrontherapyRBEAccumulable.hh

Referenced by Initialize().

size_t HadrontherapyRBEAccumulable::fVoxelsAlongY
private

Definition at line 92 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 92 of file HadrontherapyRBEAccumulable.hh

Referenced by GetIndex(), and Initialize().

size_t HadrontherapyRBEAccumulable::fVoxelsAlongZ
private

Definition at line 93 of file HadrontherapyRBEAccumulable.hh.

View newest version in sPHENIX GitHub at line 93 of file HadrontherapyRBEAccumulable.hh

Referenced by GetIndex(), and Initialize().


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