Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 51 of file G4CellScoreComposer.hh.

Constructor & Destructor Documentation

G4CellScoreComposer::G4CellScoreComposer ( )

Definition at line 39 of file G4CellScoreComposer.cc.

39  :
40  fSCScoreValues()
41 {}
G4CellScoreComposer::~G4CellScoreComposer ( )

Definition at line 43 of file G4CellScoreComposer.cc.

44 {}

Member Function Documentation

void G4CellScoreComposer::EstimatorCalculation ( const G4Step step)

Definition at line 46 of file G4CellScoreComposer.cc.

References FatalException, G4CellScoreValues::fSumSL, G4CellScoreValues::fSumSLW, G4CellScoreValues::fSumSLW_v, G4CellScoreValues::fSumSLWE, G4CellScoreValues::fSumSLWE_v, G4Exception(), G4StepPoint::GetKineticEnergy(), G4Step::GetPreStepPoint(), G4Step::GetStepLength(), G4StepPoint::GetVelocity(), G4StepPoint::GetWeight(), and test::v.

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

Definition at line 83 of file G4CellScoreComposer.cc.

References G4CellScoreValues::fAverageTrackWeight, G4CellScoreValues::fFluxWeightedEnergy, G4CellScoreValues::fNumberWeightedEnergy, G4CellScoreValues::fSumSL, G4CellScoreValues::fSumSLW, G4CellScoreValues::fSumSLW_v, G4CellScoreValues::fSumSLWE, and G4CellScoreValues::fSumSLWE_v.

Referenced by operator<<().

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

Definition at line 72 of file G4CellScoreComposer.cc.

References G4CellScoreValues::fSumPopulation.

72  {
73  fSCScoreValues.fSumPopulation++;
74 }
void G4CellScoreComposer::SetCollisionWeight ( G4double  weight)

Definition at line 76 of file G4CellScoreComposer.cc.

References G4CellScoreValues::fSumCollisions, and G4CellScoreValues::fSumCollisionsWeight.

76  {
77  fSCScoreValues.fSumCollisions++;
78  fSCScoreValues.fSumCollisionsWeight+=weight;
79 }
void G4CellScoreComposer::SetImportnace ( G4double  importance)

Definition at line 98 of file G4CellScoreComposer.cc.

References G4CellScoreValues::fImportance.

98  {
99  fSCScoreValues.fImportance = importance;
100 }
void G4CellScoreComposer::TrackEnters ( )

Definition at line 69 of file G4CellScoreComposer.cc.

References G4CellScoreValues::fSumTracksEntering.

69  {
70  fSCScoreValues.fSumTracksEntering++;
71 }

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