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

#include <G4CellScoreComposer.hh>

Public Member Functions

 G4CellScoreComposer ()
 
 ~G4CellScoreComposer ()
 
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.

Constructor & Destructor Documentation

◆ G4CellScoreComposer()

G4CellScoreComposer::G4CellScoreComposer ( )

Definition at line 38 of file G4CellScoreComposer.cc.

38 :
39 fSCScoreValues()
40{}

◆ ~G4CellScoreComposer()

G4CellScoreComposer::~G4CellScoreComposer ( )

Definition at line 42 of file G4CellScoreComposer.cc.

43{}

Member Function Documentation

◆ EstimatorCalculation()

void G4CellScoreComposer::EstimatorCalculation ( const G4Step step)

Definition at line 45 of file G4CellScoreComposer.cc.

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

◆ GetStandardCellScoreValues()

const G4CellScoreValues & G4CellScoreComposer::GetStandardCellScoreValues ( ) const

Definition at line 80 of file G4CellScoreComposer.cc.

81 {
82 if (fSCScoreValues.fSumSLW > 0.) {
83 //divide by SumSLW or SumSLW_v ?
84 fSCScoreValues.fNumberWeightedEnergy =
85 fSCScoreValues.fSumSLWE_v / fSCScoreValues.fSumSLW_v;
86
87 fSCScoreValues.fFluxWeightedEnergy =
88 fSCScoreValues.fSumSLWE / fSCScoreValues.fSumSLW;
89
90 fSCScoreValues.fAverageTrackWeight =
91 fSCScoreValues.fSumSLW / fSCScoreValues.fSumSL;
92 }
93 return fSCScoreValues;
94}
G4double fNumberWeightedEnergy

Referenced by operator<<().

◆ NewTrackPopedUp()

void G4CellScoreComposer::NewTrackPopedUp ( )

Definition at line 70 of file G4CellScoreComposer.cc.

70 {
71 fSCScoreValues.fSumPopulation++;
72}

◆ SetCollisionWeight()

void G4CellScoreComposer::SetCollisionWeight ( G4double  weight)

Definition at line 74 of file G4CellScoreComposer.cc.

74 {
75 fSCScoreValues.fSumCollisions++;
76 fSCScoreValues.fSumCollisionsWeight+=weight;
77}

◆ SetImportnace()

void G4CellScoreComposer::SetImportnace ( G4double  importance)

Definition at line 96 of file G4CellScoreComposer.cc.

96 {
97 fSCScoreValues.fImportance = importance;
98}

◆ TrackEnters()

void G4CellScoreComposer::TrackEnters ( )

Definition at line 67 of file G4CellScoreComposer.cc.

67 {
68 fSCScoreValues.fSumTracksEntering++;
69}

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