Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4CellScoreComposer Class Reference

#include <G4CellScoreComposer.hh>

Public Member Functions

void EstimatorCalculation (const G4Step &step)
 
void TrackEnters ()
 
void NewTrackPopedUp ()
 
void SetCollisionWeight (G4double weight)
 
void SetImportnace (G4double importance)
 
const G4CellScoreValuesGetStandardCellScoreValues () const
 

Detailed Description

Definition at line 50 of file G4CellScoreComposer.hh.

Member Function Documentation

◆ EstimatorCalculation()

void G4CellScoreComposer::EstimatorCalculation ( const G4Step & step)

Definition at line 39 of file G4CellScoreComposer.cc.

40{
41 G4StepPoint* p = aStep.GetPreStepPoint();
42 if (p == nullptr) {
43 G4Exception("G4CellScoreComposer::EstimatorCalculation", "Det0191", FatalException,
44 " no pointer to pre PreStepPoint!");
45 }
46 G4double sl = aStep.GetStepLength();
47 G4double slw = sl * p->GetWeight();
48 G4double slwe = slw * p->GetKineticEnergy();
49
50 G4double v = p->GetVelocity();
51 if (! (v > 0.)) {
52 v = 10e-9;
53 }
54
55 fSCScoreValues.fSumSL += sl;
56 fSCScoreValues.fSumSLW += slw;
57 fSCScoreValues.fSumSLW_v += slw / v;
58 fSCScoreValues.fSumSLWE += slwe;
59 fSCScoreValues.fSumSLWE_v += slwe / v;
60}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
double G4double
Definition G4Types.hh:83
G4double GetVelocity() const
G4double GetKineticEnergy() const
G4double GetWeight() const

◆ GetStandardCellScoreValues()

const G4CellScoreValues & G4CellScoreComposer::GetStandardCellScoreValues ( ) const

Definition at line 70 of file G4CellScoreComposer.cc.

71{
72 if (fSCScoreValues.fSumSLW > 0.) {
73 // divide by SumSLW or SumSLW_v ?
74 fSCScoreValues.fNumberWeightedEnergy = fSCScoreValues.fSumSLWE_v / fSCScoreValues.fSumSLW_v;
75
76 fSCScoreValues.fFluxWeightedEnergy = fSCScoreValues.fSumSLWE / fSCScoreValues.fSumSLW;
77
78 fSCScoreValues.fAverageTrackWeight = fSCScoreValues.fSumSLW / fSCScoreValues.fSumSL;
79 }
80 return fSCScoreValues;
81}

◆ NewTrackPopedUp()

void G4CellScoreComposer::NewTrackPopedUp ( )

Definition at line 62 of file G4CellScoreComposer.cc.

62{ fSCScoreValues.fSumPopulation++; }

◆ SetCollisionWeight()

void G4CellScoreComposer::SetCollisionWeight ( G4double weight)

Definition at line 64 of file G4CellScoreComposer.cc.

65{
66 fSCScoreValues.fSumCollisions++;
67 fSCScoreValues.fSumCollisionsWeight += weight;
68}

◆ SetImportnace()

void G4CellScoreComposer::SetImportnace ( G4double importance)

Definition at line 83 of file G4CellScoreComposer.cc.

84{
85 fSCScoreValues.fImportance = importance;
86}

◆ TrackEnters()

void G4CellScoreComposer::TrackEnters ( )

Definition at line 61 of file G4CellScoreComposer.cc.

61{ fSCScoreValues.fSumTracksEntering++; }

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