Geant4  10.02.p03
G4LENDUsedTarget Class Reference

#include <G4LENDUsedTarget.hh>

Collaboration diagram for G4LENDUsedTarget:

Public Member Functions

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

Private Member Functions

void searchTarget ()
 

Private Attributes

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

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 
74  searchTarget();
75  }
G4ParticleDefinition * proj
Here is the call graph for this function:

◆ ~G4LENDUsedTarget()

G4LENDUsedTarget::~G4LENDUsedTarget ( )
inline

Definition at line 77 of file G4LENDUsedTarget.hh.

77 {;};

Member Function Documentation

◆ AllowAny()

void G4LENDUsedTarget::AllowAny ( )
inline

Definition at line 85 of file G4LENDUsedTarget.hh.

86  {
87  allow_anything = true;
88  searchTarget();
89  };
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AllowNat()

void G4LENDUsedTarget::AllowNat ( )
inline

Definition at line 79 of file G4LENDUsedTarget.hh.

80  {
81  allow_nat = true;
82  searchTarget();
83  };
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetActualA()

G4int G4LENDUsedTarget::GetActualA ( )
inline

Definition at line 96 of file G4LENDUsedTarget.hh.

96 { return actual_A; };

◆ GetActualEvaluation()

G4String G4LENDUsedTarget::GetActualEvaluation ( )
inline

Definition at line 100 of file G4LENDUsedTarget.hh.

100 { return actual_Evaluation; };

◆ GetActualM()

G4int G4LENDUsedTarget::GetActualM ( )
inline

Definition at line 97 of file G4LENDUsedTarget.hh.

97 { return actual_M; };

◆ GetActualZ()

G4int G4LENDUsedTarget::GetActualZ ( )
inline

Definition at line 95 of file G4LENDUsedTarget.hh.

95 { return actual_Z; };

◆ GetTarget()

G4GIDI_target* G4LENDUsedTarget::GetTarget ( void  )
inline

Definition at line 102 of file G4LENDUsedTarget.hh.

102 { return target; };
G4GIDI_target * target
Here is the call graph for this function:

◆ GetWantedA()

G4int G4LENDUsedTarget::GetWantedA ( )
inline

Definition at line 92 of file G4LENDUsedTarget.hh.

92 { return wanted_A; };

◆ GetWantedEvaluation()

G4String G4LENDUsedTarget::GetWantedEvaluation ( )
inline

Definition at line 99 of file G4LENDUsedTarget.hh.

99 { return wanted_Evaluation; };

◆ GetWantedM()

G4int G4LENDUsedTarget::GetWantedM ( )
inline

Definition at line 93 of file G4LENDUsedTarget.hh.

93 { return wanted_M; };

◆ GetWantedZ()

G4int G4LENDUsedTarget::GetWantedZ ( )
inline

Definition at line 91 of file G4LENDUsedTarget.hh.

91 { return wanted_Z; };

◆ searchTarget()

void G4LENDUsedTarget::searchTarget ( )
private

Definition at line 43 of file G4LENDUsedTarget.cc.

44 {
45 
46  G4LENDManager* lend_manager = G4LENDManager::GetInstance();
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:78
G4GIDI_target * target
G4GIDI_target * GetLENDTarget(G4ParticleDefinition *, G4String, G4int iZ, G4int iA, G4int iM=0)
std::vector< G4String > IsLENDTargetAvailable(G4ParticleDefinition *, G4int iZ, G4int iA, G4int iM=0)
static G4LENDManager * GetInstance()
G4ParticleDefinition * proj
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ actual_A

G4int G4LENDUsedTarget::actual_A
private

Definition at line 122 of file G4LENDUsedTarget.hh.

◆ actual_Evaluation

G4String G4LENDUsedTarget::actual_Evaluation
private

Definition at line 124 of file G4LENDUsedTarget.hh.

◆ actual_M

G4int G4LENDUsedTarget::actual_M
private

Definition at line 123 of file G4LENDUsedTarget.hh.

◆ actual_Z

G4int G4LENDUsedTarget::actual_Z
private

Definition at line 121 of file G4LENDUsedTarget.hh.

◆ allow_anything

G4bool G4LENDUsedTarget::allow_anything
private

Definition at line 117 of file G4LENDUsedTarget.hh.

◆ allow_nat

G4bool G4LENDUsedTarget::allow_nat
private

Definition at line 116 of file G4LENDUsedTarget.hh.

◆ max_A

G4int G4LENDUsedTarget::max_A
private

Definition at line 129 of file G4LENDUsedTarget.hh.

◆ max_M

G4int G4LENDUsedTarget::max_M
private

Definition at line 131 of file G4LENDUsedTarget.hh.

◆ max_Z

G4int G4LENDUsedTarget::max_Z
private

Definition at line 127 of file G4LENDUsedTarget.hh.

◆ min_A

G4int G4LENDUsedTarget::min_A
private

Definition at line 128 of file G4LENDUsedTarget.hh.

◆ min_M

G4int G4LENDUsedTarget::min_M
private

Definition at line 130 of file G4LENDUsedTarget.hh.

◆ min_Z

G4int G4LENDUsedTarget::min_Z
private

Definition at line 126 of file G4LENDUsedTarget.hh.

◆ proj

G4ParticleDefinition* G4LENDUsedTarget::proj
private

Definition at line 108 of file G4LENDUsedTarget.hh.

◆ target

G4GIDI_target* G4LENDUsedTarget::target
private

Definition at line 119 of file G4LENDUsedTarget.hh.

◆ wanted_A

G4int G4LENDUsedTarget::wanted_A
private

Definition at line 111 of file G4LENDUsedTarget.hh.

◆ wanted_Evaluation

G4String G4LENDUsedTarget::wanted_Evaluation
private

Definition at line 114 of file G4LENDUsedTarget.hh.

◆ wanted_M

G4int G4LENDUsedTarget::wanted_M
private

Definition at line 112 of file G4LENDUsedTarget.hh.

◆ wanted_Z

G4int G4LENDUsedTarget::wanted_Z
private

Definition at line 110 of file G4LENDUsedTarget.hh.


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