Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VBiasingInteractionLaw.hh
이 파일의 문서화 페이지로 가기
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 //
27 // $Id: $
28 //
29 // --------------------------------------------------------------------
30 // GEANT 4 class header file
31 //
32 // Class Description:
33 //
34 // An abstract class to model interaction laws, not necessarily.
35 // exponential ones.
36 // These laws, p(l), are caraterized by their:
37 // - non-interaction probability over l:
38 // P_NI(l) = 1 - integral(0,l) p(s) ds
39 // - effective cross-section at l:
40 // sigma_eff(l) = p(l)/P_NI(l) (several forms exist)
41 // If several laws compete, the resulting net law has:
42 // - an non-interaction probability over a lenght l which
43 // is the product of the individual non-interaction probabilities.
44 // - an effective cross-section which is the
45 // sum on the individual effective cross-sections.
46 //
47 // ----------------G4VBiasingInteractionLaw ----------------
48 //
49 // Author: M.Verderi (LLR), November 2013
50 // - 05/11/13 : First Implementation
51 // --------------------------------------------------------------------
52 
53 
54 #ifndef G4VBiasingInteractionLaw_hh
55 #define G4VBiasingInteractionLaw_hh 1
56 
57 #include "globals.hh"
58 #include <vector>
59 
61 
63 public:
66 
67 public:
68  const G4String& GetName() const { return fName; }
69 
70  // ----------------------------
71  // -- Interface to sub-classes:
72  // ----------------------------
73 protected:
74  // -- Sample the distribution for point like interaction (PostStep ones)
75  virtual G4double SampleInteractionLength() = 0;
76 public:
77  // -- Compute non-interaction probability and effective cross-section:
78  // -- (probability of interaction over dl = effective_cross-section* dl)
79  virtual G4double ComputeNonInteractionProbabilityAt(G4double length) const = 0;
80  virtual G4double ComputeEffectiveCrossSectionAt(G4double length) const = 0;
81 protected:
82  // -- Convenience method, used in many daughters classes :
83  // -- update the distribution for a made step of truePathLength size:
84  virtual G4double UpdateInteractionLengthForStep(G4double /* truePathLength */) { return DBL_MAX; }
85 public:
86  // -- Methods to deal with singularities : null cross sections or infinite ones.
87  // -- In such cases, weight can not always be computed.
88  // -- Tells if this interaction law has singularities:
89  virtual G4bool IsSingular() const {return false;}
90  // -- method interrogated only in case interaction law is IsSingular() == true:
91  virtual G4bool IsEffectiveCrossSectionInfinite() const {return false;}
92 
93 
94  // -----------------------------------------
95  // -- public interface to protected methods:
96  // -----------------------------------------
97 public:
99  {
102  }
104  {
107  }
109 
110 
111 private:
114 };
115 
116 #endif
virtual G4double ComputeNonInteractionProbabilityAt(G4double length) const =0
const XML_Char * name
Definition: expat.h:151
virtual G4double SampleInteractionLength()=0
virtual G4double ComputeEffectiveCrossSectionAt(G4double length) const =0
G4double GetSampledInteractionLength() const
const G4String & GetName() const
virtual G4bool IsEffectiveCrossSectionInfinite() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
virtual G4bool IsSingular() const
virtual G4double UpdateInteractionLengthForStep(G4double)
#define DBL_MAX
Definition: templates.hh:83
G4double UpdateForStep(G4double truePathLength)