Geant4-11
G4AdjointSteppingAction.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// G4AdjointSteppingAction
27//
28// Class description:
29//
30// Stepping action used in the adjoint simulation.
31// It is responsible to stop the adjoint tracking phase when:
32// a) The adjoint track reaches the external surface.
33// b) The being tracked adjoint dynamic particle get an energy higher than
34// the maximum energy of the external source.
35// c) The adjoint track enters the volume delimited by the adjoint source.
36// In the case a) the info (energy,weight,...) of the adjoint dynamic particle
37// associated to the track when crossing the external source is registered and
38// in the next event a forward primary is generated.
39// In the other cases b) and c) the next generated fwd particle is killed
40// before being tracked and the next tracking of an adjoint particle is
41// started directly.
42
43// Author: L. Desorgher, SpaceIT GmbH
44// Contract: ESA contract 21435/08/NL/AT
45// Customer: ESA/ESTEC
46// History:
47// - 15/01/2007 L.Desorgher, created.
48// - 04/11/2009 L.Desorgher, added possibility to use user stepping action.
49// - 20/11/2009 L.Desorgher, corrected stop of adjoint particles tracking
50// when reentering the adjoint source.
51//---------------------------------------------------------------------
52#ifndef G4AdjointSteppingAction_hh
53#define G4AdjointSteppingAction_hh 1
54
56#include "globals.hh"
57#include "G4ThreeVector.hh"
58
61
63{
64 public:
65
68
69 void UserSteppingAction(const G4Step*);
70
72 { ext_sourceEMax = Emax; }
73 inline void SetStartEvent(G4bool aBool)
74 { start_event = aBool; }
78 { return last_momentum; }
80 { return last_pos; }
82 { return last_ekin; }
84 { return last_weight; }
85 inline void SetPrimWeight(G4double weight)
86 { prim_weight = weight; }
88 { return last_part_def; }
90 { theUserAdjointSteppingAction = anAction; }
92 { theUserFwdSteppingAction = anAction; }
93 inline void SetAdjointTrackingMode(G4bool aBool)
94 { is_adjoint_tracking_mode = aBool; }
99
100 private:
101
104
112
118};
119
120#endif
static const G4double Emax
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
void SetAdjointTrackingMode(G4bool aBool)
G4UserSteppingAction * theUserFwdSteppingAction
G4AdjointCrossSurfChecker * theG4AdjointCrossSurfChecker
G4ParticleDefinition * last_part_def
G4ParticleDefinition * GetLastPartDef()
void SetUserForwardSteppingAction(G4UserSteppingAction *anAction)
void SetAdjointGeantinoTrackingMode(G4bool aBool)
void SetExtSourceEMax(G4double Emax)
void UserSteppingAction(const G4Step *)
void SetUserAdjointSteppingAction(G4UserSteppingAction *anAction)
void SetPrimWeight(G4double weight)
G4UserSteppingAction * theUserAdjointSteppingAction
Definition: G4Step.hh:62