Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ErrorPropagationNavigator.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// G4ErrorPropagationNavigator
27//
28// Class Description:
29//
30// Class for performing double navigation in the detector geometry and
31// on the target surface for error propagation. It overloads ComputeStep()
32// and ComputeSafety() methods.
33
34// Author: Pedro Arce (CIEMAT), September 2004
35// --------------------------------------------------------------------
36#ifndef G4ErrorPropagationNavigator_hh
37#define G4ErrorPropagationNavigator_hh 1
38
39#include "G4Navigator.hh"
40#include "G4ThreeVector.hh"
41
42/**
43 * @brief G4ErrorPropagationNavigator is a class for performing double
44 * navigation in the detector geometry and on the target surface for error
45 * propagation. It overloads ComputeStep() and ComputeSafety() methods.
46 */
47
49{
50 public:
51
52 /**
53 * Constructor and Destructor.
54 */
56 ~G4ErrorPropagationNavigator() override = default;
57
58 /**
59 * Calls the navigation in the detector geometry and then checks
60 * if the distance to surface is smaller than the proposed step.
61 * @param[in] pGlobalPoint The point in global coordinates system.
62 * @param[in] pDirection The normalised vector direction.
63 * @param[in] pCurrentProposedStepLength Current proposed step length.
64 * @param[in,out] newSafety New safety.
65 * @returns Length from current point to next boundary surface along
66 * @p pDirection.
67 */
68 G4double ComputeStep (const G4ThreeVector& pGlobalPoint,
69 const G4ThreeVector& pDirection,
70 const G4double pCurrentProposedStepLength,
71 G4double &pNewSafety) override;
72
73 /**
74 * Calls the navigation in the detector geometry and then checks
75 * if the distance to surface is smaller than the proposed safety.
76 * @param[in] globalpoint The point in global coordinates system.
77 * The point must be within the current volume.
78 * @param[in] pProposedMaxLength The proposed maximum length is used
79 * to avoid volume safety calculations.
80 * @param[in] keepState Flag to instruct keeping the state (default true)
81 * to ensure minimum side effects from the call.
82 * @returns Length from current point to closest boundary surface.
83 * The value returned is usually an underestimate.
84 */
85 G4double ComputeSafety(const G4ThreeVector& globalpoint,
86 const G4double pProposedMaxLength = DBL_MAX,
87 const G4bool keepState = true) override;
88
89 /**
90 * Returns Exit Surface Normal and validity too. Can only be called if
91 * the Navigator's last Step has crossed a volume geometrical boundary.
92 * Normal points out of the volume exited and/or into the volume entered.
93 * @param[in] point Point in global coordinates system to compare to.
94 * @param[in,out] valid Flag indicating if normal is valid.
95 * @returns A Exit Surface Normal vector and validity too.
96 */
98 G4bool* valid) override;
99
100 /**
101 * Computes the isotropic safety for 'Target'.
102 * @param[in] pGlobalpoint Point in global coordinates system.
103 * @returns The isotropic safety value.
104 */
105 G4double TargetSafetyFromPoint( const G4ThreeVector& pGlobalpoint );
106};
107
108#endif
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
~G4ErrorPropagationNavigator() override=default
G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety) override
G4double TargetSafetyFromPoint(const G4ThreeVector &pGlobalpoint)
G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid) override
G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true) override
#define DBL_MAX
Definition templates.hh:62