Geant4-11
Public Member Functions | Private Member Functions | Private Attributes
G4LENDUsedTarget Class Reference

#include <G4LENDUsedTarget.hh>

Public Member Functions

void AllowAny ()
 
void AllowNat ()
 
 G4LENDUsedTarget (G4ParticleDefinition *pd, G4String Evaluation, G4int iZ, G4int iA, G4int iM=0)
 
G4int GetActualA ()
 
G4String GetActualEvaluation ()
 
G4int GetActualM ()
 
G4int GetActualZ ()
 
G4GIDI_targetGetTarget ()
 
G4int GetWantedA ()
 
G4String GetWantedEvaluation ()
 
G4int GetWantedM ()
 
G4int GetWantedZ ()
 
 ~G4LENDUsedTarget ()
 

Private Member Functions

void searchTarget ()
 

Private Attributes

G4int actual_A
 
G4String actual_Evaluation
 
G4int actual_M
 
G4int actual_Z
 
G4bool allow_anything
 
G4bool allow_nat
 
G4int max_A
 
G4int max_M
 
G4int max_Z
 
G4int min_A
 
G4int min_M
 
G4int min_Z
 
G4ParticleDefinitionproj
 
G4GIDI_targettarget
 
G4int wanted_A
 
G4String wanted_Evaluation
 
G4int wanted_M
 
G4int wanted_Z
 

Detailed Description

Definition at line 46 of file G4LENDUsedTarget.hh.

Constructor & Destructor Documentation

◆ G4LENDUsedTarget()

G4LENDUsedTarget::G4LENDUsedTarget ( G4ParticleDefinition pd,
G4String  Evaluation,
G4int  iZ,
G4int  iA,
G4int  iM = 0 
)
inline

Definition at line 51 of file G4LENDUsedTarget.hh.

52 : allow_nat ( false )
53 , allow_anything ( false )
54 , min_Z ( 0 )
55 , max_Z ( 113 )
56 , min_A ( 1 )
57 , max_A ( 278 )
58 , min_M ( 0 )
59 , max_M ( 10 )
60 {
61
62 proj = pd;
63
64 wanted_Z = iZ;
65 wanted_A = iA;
66 wanted_M = iM;
67 wanted_Evaluation = Evaluation;
68
69 actual_Z = -1;
70 actual_A = -1;
71 actual_M = -1;
72 actual_Evaluation = "na";
73
75 }
G4ParticleDefinition * proj

References actual_A, actual_Evaluation, actual_M, actual_Z, proj, searchTarget(), wanted_A, wanted_Evaluation, wanted_M, and wanted_Z.

◆ ~G4LENDUsedTarget()

G4LENDUsedTarget::~G4LENDUsedTarget ( )
inline

Definition at line 77 of file G4LENDUsedTarget.hh.

77{;};

Member Function Documentation

◆ AllowAny()

void G4LENDUsedTarget::AllowAny ( )
inline

◆ AllowNat()

void G4LENDUsedTarget::AllowNat ( )
inline

Definition at line 79 of file G4LENDUsedTarget.hh.

80 {
81 allow_nat = true;
83 };

References allow_nat, and searchTarget().

Referenced by G4LENDCrossSection::create_used_target_map(), and G4LENDModel::create_used_target_map().

◆ GetActualA()

G4int G4LENDUsedTarget::GetActualA ( )
inline

Definition at line 96 of file G4LENDUsedTarget.hh.

96{ return actual_A; };

References actual_A.

◆ GetActualEvaluation()

G4String G4LENDUsedTarget::GetActualEvaluation ( )
inline

Definition at line 100 of file G4LENDUsedTarget.hh.

100{ return actual_Evaluation; };

References actual_Evaluation.

◆ GetActualM()

G4int G4LENDUsedTarget::GetActualM ( )
inline

Definition at line 97 of file G4LENDUsedTarget.hh.

97{ return actual_M; };

References actual_M.

◆ GetActualZ()

G4int G4LENDUsedTarget::GetActualZ ( )
inline

Definition at line 95 of file G4LENDUsedTarget.hh.

95{ return actual_Z; };

References actual_Z.

◆ GetTarget()

G4GIDI_target * G4LENDUsedTarget::GetTarget ( void  )
inline

Definition at line 102 of file G4LENDUsedTarget.hh.

102{ return target; };
G4GIDI_target * target

References target.

◆ GetWantedA()

G4int G4LENDUsedTarget::GetWantedA ( )
inline

Definition at line 92 of file G4LENDUsedTarget.hh.

92{ return wanted_A; };

References wanted_A.

◆ GetWantedEvaluation()

G4String G4LENDUsedTarget::GetWantedEvaluation ( )
inline

Definition at line 99 of file G4LENDUsedTarget.hh.

99{ return wanted_Evaluation; };

References wanted_Evaluation.

◆ GetWantedM()

G4int G4LENDUsedTarget::GetWantedM ( )
inline

Definition at line 93 of file G4LENDUsedTarget.hh.

93{ return wanted_M; };

References wanted_M.

◆ GetWantedZ()

G4int G4LENDUsedTarget::GetWantedZ ( )
inline

Definition at line 91 of file G4LENDUsedTarget.hh.

91{ return wanted_Z; };

References wanted_Z.

◆ searchTarget()

void G4LENDUsedTarget::searchTarget ( )
private

Definition at line 43 of file G4LENDUsedTarget.cc.

44{
45
47
48 target = NULL;
50
51 if ( target != NULL )
52 {
57
58 return;
59 }
60
61 if ( allow_nat == true || allow_anything == true )
62 {
63 target = lend_manager->GetLENDTarget( proj , wanted_Evaluation , wanted_Z , 0 , wanted_M );
64 if ( target != NULL )
65 {
67 actual_A = 0;
70
71 return;
72 }
73 }
74
75 G4int iZ;
76 G4int iA;
77 G4int iM;
78
79 if ( allow_anything == true )
80 {
81
82 // Loop Z
83 G4int dZ = 0;
84 G4int pZ = 1;
85 while ( dZ < max_Z - min_Z ) // Loop checking, 11.06.2015, T. Koi
86 {
87 iZ = wanted_Z + pZ*dZ;
88
89 // Loop A
90 G4int dA = 0;
91 G4int pA = 1;
92 while ( dA < max_A - min_A ) // Loop checking, 11.06.2015, T. Koi
93 {
94 iA = wanted_A + pA*dA;
95
96 // Loop M
97 G4int pM = 1;
98 G4int dM = 0;
99 while ( dM < max_M - min_M ) // Loop checking, 11.06.2015, T. Koi
100 {
101
102 iM = wanted_M + pM*dM;
103
104 if ( iZ < min_Z ) iZ = min_Z;
105 if ( iA < min_A ) iA = 0;
106 if ( iM < min_M ) iM = min_M;
107
108 if ( iZ > max_Z ) iZ = max_Z;
109 if ( iA > max_A ) iA = max_A;
110 if ( iM > max_M ) iM = max_M;
111
112 //Loop Evaluations choice the first available
113
114 if ( lend_manager->IsLENDTargetAvailable( proj , iZ , iA , iM ).size() > 0 )
115 {
116 //Choice the first available
117 actual_Evaluation = lend_manager->IsLENDTargetAvailable( proj , iZ , iA , iM ).front();
118
119 actual_Z = iZ;
120 actual_A = iA;
121 actual_M = iM;
122 target = lend_manager->GetLENDTarget( proj , actual_Evaluation , iZ , iA , iM );
123 return;
124 }
125
126 if ( pM > 0 )
127 pM = -1;
128 else
129 dM++;
130 }
131
132 if ( pA > 0 )
133 pA = -1;
134 else
135 dA++;
136 }
137
138 if ( pZ > 0 )
139 pZ = -1;
140 else
141 dZ++;
142 }
143
144 }
145
146}
static const G4double dM
int G4int
Definition: G4Types.hh:85
std::vector< G4String > IsLENDTargetAvailable(G4ParticleDefinition *, G4int iZ, G4int iA, G4int iM=0)
G4GIDI_target * GetLENDTarget(G4ParticleDefinition *, G4String, G4int iZ, G4int iA, G4int iM=0)
static G4LENDManager * GetInstance()

References actual_A, actual_Evaluation, actual_M, actual_Z, allow_anything, allow_nat, dM, G4LENDManager::GetInstance(), G4LENDManager::GetLENDTarget(), G4LENDManager::IsLENDTargetAvailable(), max_A, max_M, max_Z, min_A, min_M, min_Z, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::pM, proj, target, wanted_A, wanted_Evaluation, wanted_M, and wanted_Z.

Referenced by AllowAny(), AllowNat(), and G4LENDUsedTarget().

Field Documentation

◆ actual_A

G4int G4LENDUsedTarget::actual_A
private

Definition at line 122 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetActualA(), and searchTarget().

◆ actual_Evaluation

G4String G4LENDUsedTarget::actual_Evaluation
private

Definition at line 124 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetActualEvaluation(), and searchTarget().

◆ actual_M

G4int G4LENDUsedTarget::actual_M
private

Definition at line 123 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetActualM(), and searchTarget().

◆ actual_Z

G4int G4LENDUsedTarget::actual_Z
private

Definition at line 121 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetActualZ(), and searchTarget().

◆ allow_anything

G4bool G4LENDUsedTarget::allow_anything
private

Definition at line 117 of file G4LENDUsedTarget.hh.

Referenced by AllowAny(), and searchTarget().

◆ allow_nat

G4bool G4LENDUsedTarget::allow_nat
private

Definition at line 116 of file G4LENDUsedTarget.hh.

Referenced by AllowNat(), and searchTarget().

◆ max_A

G4int G4LENDUsedTarget::max_A
private

Definition at line 129 of file G4LENDUsedTarget.hh.

Referenced by searchTarget().

◆ max_M

G4int G4LENDUsedTarget::max_M
private

Definition at line 131 of file G4LENDUsedTarget.hh.

Referenced by searchTarget().

◆ max_Z

G4int G4LENDUsedTarget::max_Z
private

Definition at line 127 of file G4LENDUsedTarget.hh.

Referenced by searchTarget().

◆ min_A

G4int G4LENDUsedTarget::min_A
private

Definition at line 128 of file G4LENDUsedTarget.hh.

Referenced by searchTarget().

◆ min_M

G4int G4LENDUsedTarget::min_M
private

Definition at line 130 of file G4LENDUsedTarget.hh.

Referenced by searchTarget().

◆ min_Z

G4int G4LENDUsedTarget::min_Z
private

Definition at line 126 of file G4LENDUsedTarget.hh.

Referenced by searchTarget().

◆ proj

G4ParticleDefinition* G4LENDUsedTarget::proj
private

Definition at line 108 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), and searchTarget().

◆ target

G4GIDI_target* G4LENDUsedTarget::target
private

Definition at line 119 of file G4LENDUsedTarget.hh.

Referenced by GetTarget(), and searchTarget().

◆ wanted_A

G4int G4LENDUsedTarget::wanted_A
private

Definition at line 111 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetWantedA(), and searchTarget().

◆ wanted_Evaluation

G4String G4LENDUsedTarget::wanted_Evaluation
private

Definition at line 114 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetWantedEvaluation(), and searchTarget().

◆ wanted_M

G4int G4LENDUsedTarget::wanted_M
private

Definition at line 112 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetWantedM(), and searchTarget().

◆ wanted_Z

G4int G4LENDUsedTarget::wanted_Z
private

Definition at line 110 of file G4LENDUsedTarget.hh.

Referenced by G4LENDUsedTarget(), GetWantedZ(), and searchTarget().


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