Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AdjointAlongStepWeightCorrection.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// $Id$
27//
28/////////////////////////////////////////////////////////////////////////////////
29// Class: G4AdjointAlongStepWeightCorrection
30// Author: L. Desorgher
31// Organisation: SpaceIT GmbH
32// Contract: ESA contract 21435/08/NL/AT
33// Customer: ESA/ESTEC
34/////////////////////////////////////////////////////////////////////////////////
35//
36// CHANGE HISTORY
37// --------------
38// ChangeHistory:
39// 10 May 2007 creation by L. Desorgher
40// October 2009 implementation of the mode where the total adjoint and forward cross sections are equivalent. L. Desorgher
41//
42//-------------------------------------------------------------
43// Documentation:
44// Continuous processes acting on adjoint particles to correct continuously their weight during the adjoint reverse tracking.
45// Thi process is needed whene the adjoint cross section are not scaled such that the total adjoint cross section match the total forward cross section.
46// By default the mode where the total adjoint cross section is equal to the total forward cross section is used an therefore this along step weight
47// correction factor is 1.
48// However in some cases (some energy ranges) the total forward cross section or the total adjoint cross section can be null, in this case the along step
49// weight correction is neede and is given by exp(-(Sigma_tot_adj-Sigma_tot_fwd).dx)
50//
51//
52//
53
54
55#ifndef G4AdjointAlongStepWeightCorrection_h
56#define G4AdjointAlongStepWeightCorrection_h 1
57
59#include "globals.hh"
60#include "G4Material.hh"
62#include "G4Track.hh"
63#include "G4ParticleChange.hh"
64
65class G4Step;
67
68
69
71{
72public:
73
74 G4AdjointAlongStepWeightCorrection(const G4String& name = "ContinuousWeightCorrection",
76
78
79
80protected:
81 virtual G4double GetContinuousStepLimit(const G4Track& track,
82 G4double previousStepSize,
83 G4double currentMinimumStep,
84 G4double& currentSafety);
85
86
87 //------------------------------------------------------------------------
88 // Generic methods common to all processes
89 //------------------------------------------------------------------------
90public:
91
93
95
97
98
99private:
100
101 void DefineMaterial(const G4MaterialCutsCouple* couple);
102
103
104
107
108
109
110protected:
111
113
114
115private:
116
117 const G4Material* currentMaterial;
118 const G4MaterialCutsCouple* currentCouple;
119 size_t currentMaterialIndex;
120 G4double preStepKinEnergy;
121
122};
123
124inline void G4AdjointAlongStepWeightCorrection::DefineMaterial(
125 const G4MaterialCutsCouple* couple)
126{
127 if(couple != currentCouple) {
128 currentCouple = couple;
129 currentMaterial = couple->GetMaterial();
130 currentMaterialIndex = couple->GetIndex();
131
132 }
133}
134
135
136
137#endif
G4ProcessType
@ fElectromagnetic
double G4double
Definition: G4Types.hh:64
void BuildPhysicsTable(const G4ParticleDefinition &)
void PreparePhysicsTable(const G4ParticleDefinition &)
virtual G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety)
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
const G4Material * GetMaterial() const
Definition: G4Step.hh:78