Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4GIDI_target Class Reference

#include <G4GIDI_target.hh>

Collaboration diagram for G4GIDI_target:

Public Member Functions

void init (const char *fileName)
 
 G4GIDI_target (const char *fileName)
 
 G4GIDI_target (std::string const &fileName)
 
 ~G4GIDI_target ()
 
std::string * getName (void)
 
std::string * getFilename (void)
 
int getZ (void)
 
int getA (void)
 
int getM (void)
 
double getMass (void)
 
int getTemperatures (double *temperatures)
 
int readTemperature (int index)
 
std::string getEqualProbableBinSampleMethod (void)
 
int setEqualProbableBinSampleMethod (std::string method)
 
int getNumberOfChannels (void)
 
int getNumberOfProductionChannels (void)
 
channelID getChannelsID (int channelIndex)
 
std::vector< channelID > * getChannelIDs (void)
 
std::vector< channelID > * getProductionChannelIDs (void)
 
std::vector< double > * getEnergyGridAtTIndex (int index)
 
double getTotalCrossSectionAtE (double e_in, double temperature)
 
double getElasticCrossSectionAtE (double e_in, double temperature)
 
double getCaptureCrossSectionAtE (double e_in, double temperature)
 
double getFissionCrossSectionAtE (double e_in, double temperature)
 
double getOthersCrossSectionAtE (double e_in, double temperature)
 
double sumChannelCrossSectionAtE (int nIndices, int *indices, double e_in, double temperature)
 
int sampleChannelCrossSectionAtE (int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
 
double getElasticFinalState (double e_in, double temperature, double(*rng)(void *), void *rngState)
 
std::vector< G4GIDI_Product > * getCaptureFinalState (double e_in, double temperature, double(*rng)(void *), void *rngState)
 
std::vector< G4GIDI_Product > * getFissionFinalState (double e_in, double temperature, double(*rng)(void *), void *rngState)
 
std::vector< G4GIDI_Product > * getOthersFinalState (double e_in, double temperature, double(*rng)(void *), void *rngState)
 
std::vector< G4GIDI_Product > * getFinalState (int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
 
double getReactionsThreshold (int index)
 
double getReactionsDomain (int index, double *EMin, double *EMax)
 

Public Attributes

std::string equalProbableBinSampleMethod
 
int nElasticIndices
 
int nCaptureIndices
 
int nFissionIndices
 
int nOthersIndices
 
intelasticIndices
 
intcaptureIndices
 
intfissionIndices
 
intothersIndices
 
GIDI::statusMessageReporting smr
 
int projectilesPOPID
 
std::string name
 
std::string sourceFilename
 
double mass
 
GIDI::MCGIDI_targettarget
 

Detailed Description

Definition at line 58 of file G4GIDI_target.hh.

Constructor & Destructor Documentation

G4GIDI_target::G4GIDI_target ( const char *  fileName)

Definition at line 44 of file G4GIDI_target.cc.

44  {
45 
46  init( fileName );
47 }
void init(const char *fileName)
G4GIDI_target::G4GIDI_target ( std::string const &  fileName)

Definition at line 51 of file G4GIDI_target.cc.

51  {
52 
53  init( fileName.c_str( ) );
54 }
void init(const char *fileName)
G4GIDI_target::~G4GIDI_target ( )

Definition at line 134 of file G4GIDI_target.cc.

134  {
135 
137  smr_freeMemory( (void **) &elasticIndices );
138  smr_release( &smr );
139 }
GIDI::statusMessageReporting smr
void smr_release(statusMessageReporting *smr)
const XML_Char * target
Definition: expat.h:268
MCGIDI_target * MCGIDI_target_free(statusMessageReporting *smr, MCGIDI_target *target)
void * smr_freeMemory(void **p)
int * elasticIndices

Here is the call graph for this function:

Member Function Documentation

int G4GIDI_target::getA ( void  )

Definition at line 158 of file G4GIDI_target.cc.

158  {
159 
160  return( target->targetPOP->A );
161 }
const XML_Char * target
Definition: expat.h:268
double G4GIDI_target::getCaptureCrossSectionAtE ( double  e_in,
double  temperature 
)

Definition at line 284 of file G4GIDI_target.cc.

284  {
285 
286  return( sumChannelCrossSectionAtE( nCaptureIndices, captureIndices, e_in, temperature ) );
287 }
int * captureIndices
double sumChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature)
vector< G4GIDI_Product > * G4GIDI_target::getCaptureFinalState ( double  e_in,
double  temperature,
double(*)(void *)  rng,
void rngState 
)

Definition at line 371 of file G4GIDI_target.cc.

371  {
372 
373  return( getFinalState( nCaptureIndices, captureIndices, e_in, temperature, rng, rngState ) );
374 }
int * captureIndices
std::vector< G4GIDI_Product > * getFinalState(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)

Here is the caller graph for this function:

vector< channelID > * G4GIDI_target::getChannelIDs ( void  )

Definition at line 241 of file G4GIDI_target.cc.

241  {
242 
244  MCGIDI_reaction *reaction;
245  vector<channelID> *listOfChannels;
246 
247  listOfChannels = new vector<channelID>( n );
248  for( i = 0; i < n; i++ ) {
249  reaction = MCGIDI_target_heated_getReactionAtIndex( target->baseHeatedTarget, i );
250  (*listOfChannels)[i] = reaction->outputChannelStr;
251  }
252  return( listOfChannels );
253 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
char const * outputChannelStr
Definition: MCGIDI.h:419
int MCGIDI_target_numberOfReactions(statusMessageReporting *smr, MCGIDI_target *target)
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex(MCGIDI_target_heated *target, int index)

Here is the call graph for this function:

channelID G4GIDI_target::getChannelsID ( int  channelIndex)

Definition at line 228 of file G4GIDI_target.cc.

228  {
229 
230  MCGIDI_reaction *reaction;
231 
232  if( ( reaction = MCGIDI_target_heated_getReactionAtIndex_smr( &smr, target->baseHeatedTarget, channelIndex ) ) == NULL ) {
233  smr_print( &smr, 1 );
234  throw 1;
235  }
236  return( string( reaction->outputChannelStr ) ); /* Only works because channelID is defined to be string. */
237 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
char const * outputChannelStr
Definition: MCGIDI.h:419
void smr_print(statusMessageReporting *smr, int clear)
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex_smr(statusMessageReporting *smr, MCGIDI_target_heated *target, int index)

Here is the call graph for this function:

double G4GIDI_target::getElasticCrossSectionAtE ( double  e_in,
double  temperature 
)

Definition at line 277 of file G4GIDI_target.cc.

277  {
278 
279  return( sumChannelCrossSectionAtE( nElasticIndices, elasticIndices, e_in, temperature ) );
280 }
double sumChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature)
int * elasticIndices
double G4GIDI_target::getElasticFinalState ( double  e_in,
double  temperature,
double(*)(void *)  rng,
void rngState 
)

Definition at line 342 of file G4GIDI_target.cc.

342  {
343 
344  MCGIDI_decaySamplingInfo decaySamplingInfo;
346  MCGIDI_product *product;
348 
349  if( ( product = MCGIDI_outputChannel_getProductAtIndex( &smr, &(reaction->outputChannel), 0 ) ) == NULL ) {
350  smr_print( &smr, 1 );
351  throw 1;
352  }
353 
354  mode.setProjectileEnergy( e_in );
355  mode.setCrossSectionMode( MCGIDI_quantityLookupMode_pointwise );
356  mode.setTemperature( temperature );
357 
358  decaySamplingInfo.isVelocity = 0;
359  decaySamplingInfo.rng = rng;
360  decaySamplingInfo.rngState = rngState;
361  if( MCGIDI_product_sampleMu( &smr, product, mode, &decaySamplingInfo ) ) {
362  smr_print( &smr, 1 );
363  throw 1;
364  }
365 
366  return( decaySamplingInfo.mu );
367 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
MCGIDI_outputChannel outputChannel
Definition: MCGIDI.h:428
int MCGIDI_product_sampleMu(statusMessageReporting *smr, MCGIDI_product *product, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
void smr_print(statusMessageReporting *smr, int clear)
MCGIDI_product * MCGIDI_outputChannel_getProductAtIndex(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, int i)
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex_smr(statusMessageReporting *smr, MCGIDI_target_heated *target, int index)
int * elasticIndices
double(* rng)(void *)
Definition: MCGIDI.h:258

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector<double>* G4GIDI_target::getEnergyGridAtTIndex ( int  index)
string G4GIDI_target::getEqualProbableBinSampleMethod ( void  )

Definition at line 193 of file G4GIDI_target.cc.

193  {
194 
196 }
std::string equalProbableBinSampleMethod
string * G4GIDI_target::getFilename ( void  )

Definition at line 147 of file G4GIDI_target.cc.

147 { return( &sourceFilename ); }
std::string sourceFilename
vector< G4GIDI_Product > * G4GIDI_target::getFinalState ( int  nIndices,
int indices,
double  e_in,
double  temperature,
double(*)(void *)  rng,
void rngState 
)

Definition at line 392 of file G4GIDI_target.cc.

393  {
394 
395  int index = 0, i, n;
396  vector<G4GIDI_Product> *products = NULL;
397  MCGIDI_decaySamplingInfo decaySamplingInfo;
398  MCGIDI_sampledProductsDatas sampledProductsDatas;
399  MCGIDI_sampledProductsData *productData;
401 
402  decaySamplingInfo.isVelocity = 0;
403  decaySamplingInfo.rng = rng;
404  decaySamplingInfo.rngState = rngState;
405 
406  if( nIndices == 0 ) {
407  return( NULL ); }
408  else {
409  if( nIndices == 1 ) {
410  index = indices[0]; }
411  else {
412  index = sampleChannelCrossSectionAtE( nIndices, indices, e_in, temperature, rng, rngState );
413  }
414  }
415 
416  MCGIDI_sampledProducts_initialize( &smr, &sampledProductsDatas, 1000 );
417  if( !smr_isOk( &smr ) ) {
418  smr_print( &smr, 1 );
419  throw 1;
420  }
421 
422  mode.setProjectileEnergy( e_in );
423  mode.setCrossSectionMode( MCGIDI_quantityLookupMode_pointwise );
424  mode.setTemperature( temperature );
425 
426  n = MCGIDI_target_heated_sampleIndexReactionProductsAtE( &smr, target->baseHeatedTarget, index, mode,
427  &decaySamplingInfo, &sampledProductsDatas );
428  if( !smr_isOk( &smr ) ) {
429  smr_print( &smr, 1 );
430  throw 1;
431  }
432  if( n > 0 ) {
433  if( ( products = new vector<G4GIDI_Product>( n ) ) != NULL ) {
434  for( i = 0; i < n; i++ ) {
435  productData = &(sampledProductsDatas.products[i]);
436  (*products)[i].A = productData->pop->A;
437  (*products)[i].Z = productData->pop->Z;
438  (*products)[i].m = productData->pop->m;
439  (*products)[i].kineticEnergy = productData->kineticEnergy;
440  (*products)[i].px = productData->px_vx;
441  (*products)[i].py = productData->py_vy;
442  (*products)[i].pz = productData->pz_vz;
443  (*products)[i].birthTimeSec = productData->birthTimeSec;
444  }
445  }
446  }
447  MCGIDI_sampledProducts_release( &smr, &sampledProductsDatas );
448 
449  return( products );
450 }
GIDI::statusMessageReporting smr
int MCGIDI_target_heated_sampleIndexReactionProductsAtE(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo, MCGIDI_sampledProductsDatas *productData)
MCGIDI_sampledProductsData * products
Definition: MCGIDI.h:294
const XML_Char * target
Definition: expat.h:268
int sampleChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
int MCGIDI_sampledProducts_initialize(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, int incrementSize)
void smr_print(statusMessageReporting *smr, int clear)
int smr_isOk(statusMessageReporting *smr)
int MCGIDI_sampledProducts_release(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas)
double(* rng)(void *)
Definition: MCGIDI.h:258

Here is the call graph for this function:

double G4GIDI_target::getFissionCrossSectionAtE ( double  e_in,
double  temperature 
)

Definition at line 291 of file G4GIDI_target.cc.

291  {
292 
293  return( sumChannelCrossSectionAtE( nFissionIndices, fissionIndices, e_in, temperature ) );
294 }
double sumChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature)
int * fissionIndices
vector< G4GIDI_Product > * G4GIDI_target::getFissionFinalState ( double  e_in,
double  temperature,
double(*)(void *)  rng,
void rngState 
)

Definition at line 378 of file G4GIDI_target.cc.

378  {
379 
380  return( getFinalState( nFissionIndices, fissionIndices, e_in, temperature, rng, rngState ) );
381 }
std::vector< G4GIDI_Product > * getFinalState(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
int * fissionIndices

Here is the caller graph for this function:

int G4GIDI_target::getM ( void  )

Definition at line 165 of file G4GIDI_target.cc.

165  {
166 
167  return( target->targetPOP->m );
168 }
const XML_Char * target
Definition: expat.h:268
double G4GIDI_target::getMass ( void  )

Definition at line 172 of file G4GIDI_target.cc.

172  {
173 
174  return( mass );
175 }
string * G4GIDI_target::getName ( void  )

Definition at line 143 of file G4GIDI_target.cc.

143 { return( &name ); }
const XML_Char * name
Definition: expat.h:151
int G4GIDI_target::getNumberOfChannels ( void  )

Definition at line 214 of file G4GIDI_target.cc.

214  {
215 
217 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
int MCGIDI_target_numberOfReactions(statusMessageReporting *smr, MCGIDI_target *target)

Here is the call graph for this function:

int G4GIDI_target::getNumberOfProductionChannels ( void  )

Definition at line 221 of file G4GIDI_target.cc.

221  {
222 
224 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
int MCGIDI_target_numberOfProductionReactions(statusMessageReporting *smr, MCGIDI_target *target)

Here is the call graph for this function:

double G4GIDI_target::getOthersCrossSectionAtE ( double  e_in,
double  temperature 
)

Definition at line 298 of file G4GIDI_target.cc.

298  {
299 
300  return( sumChannelCrossSectionAtE( nOthersIndices, othersIndices, e_in, temperature ) );
301 }
double sumChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature)
vector< G4GIDI_Product > * G4GIDI_target::getOthersFinalState ( double  e_in,
double  temperature,
double(*)(void *)  rng,
void rngState 
)

Definition at line 385 of file G4GIDI_target.cc.

385  {
386 
387  return( getFinalState( nOthersIndices, othersIndices, e_in, temperature, rng, rngState ) );
388 }
std::vector< G4GIDI_Product > * getFinalState(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)

Here is the caller graph for this function:

vector< channelID > * G4GIDI_target::getProductionChannelIDs ( void  )

Definition at line 257 of file G4GIDI_target.cc.

257  {
258 
259  return( NULL );
260 }
double G4GIDI_target::getReactionsDomain ( int  index,
double *  EMin,
double *  EMax 
)

Definition at line 461 of file G4GIDI_target.cc.

461  {
462 
463  return( MCGIDI_target_heated_getReactionsDomain( &smr, target->baseHeatedTarget, index, EMin, EMax ) );
464 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
int MCGIDI_target_heated_getReactionsDomain(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, double *EMin, double *EMax)

Here is the call graph for this function:

double G4GIDI_target::getReactionsThreshold ( int  index)

Definition at line 454 of file G4GIDI_target.cc.

454  {
455 
456  return( MCGIDI_target_heated_getReactionsThreshold( &smr, target->baseHeatedTarget, index ) );
457 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
double MCGIDI_target_heated_getReactionsThreshold(statusMessageReporting *smr, MCGIDI_target_heated *target, int index)

Here is the call graph for this function:

int G4GIDI_target::getTemperatures ( double *  temperatures)

Definition at line 179 of file G4GIDI_target.cc.

179  {
180 
181  return( MCGIDI_target_getTemperatures( &smr, target, temperatures ) );
182 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
int MCGIDI_target_getTemperatures(statusMessageReporting *smr, MCGIDI_target *target, double *temperatures)

Here is the call graph for this function:

double G4GIDI_target::getTotalCrossSectionAtE ( double  e_in,
double  temperature 
)

Definition at line 264 of file G4GIDI_target.cc.

264  {
265 
267 
268  mode.setProjectileEnergy( e_in );
269  mode.setCrossSectionMode( MCGIDI_quantityLookupMode_pointwise );
270  mode.setTemperature( temperature );
271 
272  return( MCGIDI_target_getTotalCrossSectionAtTAndE( NULL, target, mode, true ) );
273 }
const XML_Char * target
Definition: expat.h:268
double MCGIDI_target_getTotalCrossSectionAtTAndE(statusMessageReporting *smr, MCGIDI_target *target, MCGIDI_quantitiesLookupModes &modes, bool sampling)

Here is the call graph for this function:

int G4GIDI_target::getZ ( void  )

Definition at line 151 of file G4GIDI_target.cc.

151  {
152 
153  return( target->targetPOP->Z );
154 }
const XML_Char * target
Definition: expat.h:268
void G4GIDI_target::init ( const char *  fileName)

Definition at line 58 of file G4GIDI_target.cc.

58  {
59 
60  int i, j, n, *p, *q, ir;
61  MCGIDI_reaction *reaction;
62 
64  sourceFilename = fileName;
65  target = MCGIDI_target_newRead( &smr, fileName );
66  if( !smr_isOk( &smr ) ) {
67  smr_print( &smr, 1 );
68  throw 1;
69  }
70  projectilesPOPID = target->projectilePOP->globalPoPsIndex;
71  name = target->targetPOP->name;
72  mass = G4GIDI_targetMass( target->targetPOP->name );
73  equalProbableBinSampleMethod = "constant";
74  elasticIndices = NULL;
76 
77  if( ( n = MCGIDI_target_numberOfReactions( &smr, target ) ) > 0 ) {
78  if( ( p = elasticIndices = (int *) smr_malloc2( &smr, n * sizeof( double ), 1, "elasticIndices" ) ) == NULL ) {
79  smr_print( &smr, 1 );
80  throw 1;
81  }
82  for( i = 0; i < n; i++ ) { /* Find elastic channel(s). */
83  reaction = MCGIDI_target_heated_getReactionAtIndex( target->baseHeatedTarget, i );
84  if( MCGIDI_reaction_getENDF_MTNumber( reaction ) == 2 ) {
85  *(p++) = i;
87  }
88  }
89  captureIndices = p;
90  for( i = 0; i < n; i++ ) { /* Find capture channel(s). */
91  reaction = MCGIDI_target_heated_getReactionAtIndex( target->baseHeatedTarget, i );
92  if( MCGIDI_reaction_getENDF_MTNumber( reaction ) == 102 ) {
93  *(p++) = i;
95  }
96  }
97 
98  fissionIndices = p;
99  for( i = 0; i < n; i++ ) { /* Find fission channel(s). */
100  reaction = MCGIDI_target_heated_getReactionAtIndex( target->baseHeatedTarget, i );
101  ir = MCGIDI_reaction_getENDF_MTNumber( reaction );
102  if( ( ir != 18 ) && ( ir != 19 ) && ( ir != 20 ) && ( ir != 21 ) && ( ir != 38 ) ) continue;
103  *(p++) = i;
104  nFissionIndices++;
105  }
106  othersIndices = p;
107  for( i = 0; i < n; i++ ) { /* Find other channel(s). */
108  for( j = 0, q = elasticIndices; j < nElasticIndices; j++, q++ ) if( *q == i ) break;
109  if( j < nElasticIndices ) continue;
110  for( j = 0, q = captureIndices; j < nCaptureIndices; j++, q++ ) if( *q == i ) break;
111  if( j < nCaptureIndices ) continue;
112  for( j = 0, q = fissionIndices; j < nFissionIndices; j++, q++ ) if( *q == i ) break;
113  if( j < nFissionIndices ) continue;
114  *p = i;
115  p++;
116  nOthersIndices++;
117  }
118 #if 0
119 printf( "elastic %d: ", nElasticIndices );
120 for( i = 0; i < nElasticIndices; i++ ) printf( " %d", elasticIndices[i] );
121 printf( "\ncapture %d: ", nCaptureIndices );
122 for( i = 0; i < nCaptureIndices; i++ ) printf( " %d", captureIndices[i] );
123 printf( "\nfission %d: ", nFissionIndices );
124 for( i = 0; i < nFissionIndices; i++ ) printf( " %d", fissionIndices[i] );
125 printf( "\nothers %d: ", nOthersIndices );
126 for( i = 0; i < nOthersIndices; i++ ) printf( " %d", othersIndices[i] );
127 printf( "\n" );
128 #endif
129  }
130 }
GIDI::statusMessageReporting smr
const XML_Char * name
Definition: expat.h:151
int * captureIndices
const XML_Char * target
Definition: expat.h:268
std::string equalProbableBinSampleMethod
const char * p
Definition: xmltok.h:285
std::string sourceFilename
double G4GIDI_targetMass(const char *targetSymbol)
Definition: G4GIDI_mass.cc:875
void smr_print(statusMessageReporting *smr, int clear)
MCGIDI_target * MCGIDI_target_newRead(statusMessageReporting *smr, const char *fileName)
int MCGIDI_target_numberOfReactions(statusMessageReporting *smr, MCGIDI_target *target)
#define smr_malloc2(smr, size, zero, forItem)
int smr_isOk(statusMessageReporting *smr)
int MCGIDI_reaction_getENDF_MTNumber(MCGIDI_reaction *reaction)
int * elasticIndices
int smr_initialize(statusMessageReporting *smr, enum smr_status verbosity, int append)
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex(MCGIDI_target_heated *target, int index)
int * fissionIndices

Here is the call graph for this function:

int G4GIDI_target::readTemperature ( int  index)

Definition at line 186 of file G4GIDI_target.cc.

186  {
187 
188  return( MCGIDI_target_readHeatedTarget( &smr, target, index ) );
189 }
GIDI::statusMessageReporting smr
int MCGIDI_target_readHeatedTarget(statusMessageReporting *smr, MCGIDI_target *target, int index)
const XML_Char * target
Definition: expat.h:268

Here is the call graph for this function:

int G4GIDI_target::sampleChannelCrossSectionAtE ( int  nIndices,
int indices,
double  e_in,
double  temperature,
double(*)(void *)  rng,
void rngState 
)

Definition at line 322 of file G4GIDI_target.cc.

323  {
324 
325  int i;
326  double xsec = 0., rxsec = sumChannelCrossSectionAtE( nIndices, indices, e_in, temperature ) * rng( rngState );
328 
329  mode.setProjectileEnergy( e_in );
330  mode.setCrossSectionMode( MCGIDI_quantityLookupMode_pointwise );
331  mode.setTemperature( temperature );
332 
333  for( i = 0; i < nIndices - 1; i++ ) {
334  xsec += MCGIDI_target_getIndexReactionCrossSectionAtE( &smr, target, indices[i], mode, true );
335  if( xsec >= rxsec ) break;
336  }
337  return( indices[i] );
338 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
double sumChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature)
double MCGIDI_target_getIndexReactionCrossSectionAtE(statusMessageReporting *smr, MCGIDI_target *target, int index, MCGIDI_quantitiesLookupModes &modes, bool sampling)

Here is the call graph for this function:

int G4GIDI_target::setEqualProbableBinSampleMethod ( std::string  method)

Definition at line 200 of file G4GIDI_target.cc.

200  {
201 
202  if( method == "constant" ) {
203  equalProbableBinSampleMethod = "constant"; }
204  if( method == "linear" ) {
205  equalProbableBinSampleMethod = "linear"; }
206  else {
207  return( 1 );
208  }
209  return( 0 );
210 }
std::string equalProbableBinSampleMethod
double G4GIDI_target::sumChannelCrossSectionAtE ( int  nIndices,
int indices,
double  e_in,
double  temperature 
)

Definition at line 305 of file G4GIDI_target.cc.

305  {
306 
307  int i;
308  double xsec = 0.;
310 
311  mode.setProjectileEnergy( e_in );
312  mode.setCrossSectionMode( MCGIDI_quantityLookupMode_pointwise );
313  mode.setTemperature( temperature );
314 
315  for( i = 0; i < nIndices; i++ )
316  xsec += MCGIDI_target_getIndexReactionCrossSectionAtE( &smr, target, indices[i], mode, true );
317  return( xsec );
318 }
GIDI::statusMessageReporting smr
const XML_Char * target
Definition: expat.h:268
double MCGIDI_target_getIndexReactionCrossSectionAtE(statusMessageReporting *smr, MCGIDI_target *target, int index, MCGIDI_quantitiesLookupModes &modes, bool sampling)

Here is the call graph for this function:

Member Data Documentation

int * G4GIDI_target::captureIndices

Definition at line 64 of file G4GIDI_target.hh.

int* G4GIDI_target::elasticIndices

Definition at line 64 of file G4GIDI_target.hh.

std::string G4GIDI_target::equalProbableBinSampleMethod

Definition at line 62 of file G4GIDI_target.hh.

int * G4GIDI_target::fissionIndices

Definition at line 64 of file G4GIDI_target.hh.

double G4GIDI_target::mass

Definition at line 71 of file G4GIDI_target.hh.

std::string G4GIDI_target::name

Definition at line 69 of file G4GIDI_target.hh.

int G4GIDI_target::nCaptureIndices

Definition at line 63 of file G4GIDI_target.hh.

int G4GIDI_target::nElasticIndices

Definition at line 63 of file G4GIDI_target.hh.

int G4GIDI_target::nFissionIndices

Definition at line 63 of file G4GIDI_target.hh.

int G4GIDI_target::nOthersIndices

Definition at line 63 of file G4GIDI_target.hh.

int * G4GIDI_target::othersIndices

Definition at line 64 of file G4GIDI_target.hh.

int G4GIDI_target::projectilesPOPID

Definition at line 68 of file G4GIDI_target.hh.

GIDI::statusMessageReporting G4GIDI_target::smr

Definition at line 67 of file G4GIDI_target.hh.

std::string G4GIDI_target::sourceFilename

Definition at line 70 of file G4GIDI_target.hh.

GIDI::MCGIDI_target* G4GIDI_target::target

Definition at line 72 of file G4GIDI_target.hh.


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