Geant4-11
Public Member Functions | Data Fields
G4GIDI_target Class Reference

#include <G4GIDI_target.hh>

Public Member Functions

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

Data Fields

int * captureIndices
 
int * elasticIndices
 
std::string equalProbableBinSampleMethod
 
int * fissionIndices
 
double mass
 
std::string name
 
int nCaptureIndices
 
int nElasticIndices
 
int nFissionIndices
 
int nOthersIndices
 
int * othersIndices
 
int projectilesPOPID
 
GIDI::statusMessageReporting smr
 
std::string sourceFilename
 
GIDI::MCGIDI_targettarget
 

Detailed Description

Definition at line 58 of file G4GIDI_target.hh.

Constructor & Destructor Documentation

◆ G4GIDI_target() [1/2]

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)

References init().

◆ G4GIDI_target() [2/2]

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}

References init().

◆ ~G4GIDI_target()

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}
MCGIDI_target * MCGIDI_target_free(statusMessageReporting *smr, MCGIDI_target *target)
GIDI::statusMessageReporting smr
GIDI::MCGIDI_target * target
int * elasticIndices
void * smr_freeMemory(void **p)
void smr_release(statusMessageReporting *smr)

References elasticIndices, MCGIDI_target_free(), smr, smr_freeMemory(), smr_release(), and target.

Member Function Documentation

◆ getA()

int G4GIDI_target::getA ( void  )

Definition at line 158 of file G4GIDI_target.cc.

158 {
159
160 return( target->targetPOP->A );
161}

References target.

◆ getCaptureCrossSectionAtE()

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)

References captureIndices, nCaptureIndices, and sumChannelCrossSectionAtE().

Referenced by G4LENDCaptureCrossSection::getLENDCrossSection().

◆ getCaptureFinalState()

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}
std::vector< G4GIDI_Product > * getFinalState(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)

References captureIndices, getFinalState(), and nCaptureIndices.

Referenced by G4LENDCapture::ApplyYourself().

◆ getChannelIDs()

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}
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex(MCGIDI_target_heated *target, int index)
int MCGIDI_target_numberOfReactions(statusMessageReporting *smr, MCGIDI_target *target)
char const * outputChannelStr
Definition: MCGIDI.h:419

References MCGIDI_target_heated_getReactionAtIndex(), MCGIDI_target_numberOfReactions(), CLHEP::detail::n, MCGIDI_reaction_s::outputChannelStr, smr, and target.

◆ getChannelsID()

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}
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex_smr(statusMessageReporting *smr, MCGIDI_target_heated *target, int index)
void smr_print(statusMessageReporting *smr, int clear)

References MCGIDI_target_heated_getReactionAtIndex_smr(), MCGIDI_reaction_s::outputChannelStr, smr, smr_print(), and target.

◆ getElasticCrossSectionAtE()

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}

References elasticIndices, nElasticIndices, and sumChannelCrossSectionAtE().

Referenced by G4LENDElasticCrossSection::getLENDCrossSection().

◆ getElasticFinalState()

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}
int MCGIDI_product_sampleMu(statusMessageReporting *smr, MCGIDI_product *product, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
@ MCGIDI_quantityLookupMode_pointwise
Definition: MCGIDI.h:78
MCGIDI_product * MCGIDI_outputChannel_getProductAtIndex(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, int i)
double(* rng)(void *)
Definition: MCGIDI.h:258
MCGIDI_outputChannel outputChannel
Definition: MCGIDI.h:428

References elasticIndices, MCGIDI_decaySamplingInfo_s::isVelocity, MCGIDI_outputChannel_getProductAtIndex(), MCGIDI_product_sampleMu(), MCGIDI_quantityLookupMode_pointwise, MCGIDI_target_heated_getReactionAtIndex_smr(), MCGIDI_decaySamplingInfo_s::mu, MCGIDI_reaction_s::outputChannel, projectilesPOPID, MCGIDI_decaySamplingInfo_s::rng, MCGIDI_decaySamplingInfo_s::rngState, MCGIDI_quantitiesLookupModes::setCrossSectionMode(), MCGIDI_quantitiesLookupModes::setProjectileEnergy(), MCGIDI_quantitiesLookupModes::setTemperature(), smr, smr_print(), and target.

Referenced by G4LENDElastic::ApplyYourself(), and G4LENDModel::ApplyYourself().

◆ getEnergyGridAtTIndex()

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

◆ getEqualProbableBinSampleMethod()

string G4GIDI_target::getEqualProbableBinSampleMethod ( void  )

Definition at line 193 of file G4GIDI_target.cc.

193 {
194
196}
std::string equalProbableBinSampleMethod

References equalProbableBinSampleMethod.

◆ getFilename()

string * G4GIDI_target::getFilename ( void  )

Definition at line 147 of file G4GIDI_target.cc.

147{ return( &sourceFilename ); }
std::string sourceFilename

References sourceFilename.

◆ getFinalState()

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}
int MCGIDI_target_heated_sampleIndexReactionProductsAtE(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo, MCGIDI_sampledProductsDatas *productData)
int MCGIDI_sampledProducts_initialize(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, int incrementSize)
int MCGIDI_sampledProducts_release(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas)
int sampleChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
int smr_isOk(statusMessageReporting *smr)
MCGIDI_sampledProductsData * products
Definition: MCGIDI.h:294

References MCGIDI_POP_s::A, MCGIDI_sampledProductsData_s::birthTimeSec, MCGIDI_decaySamplingInfo_s::isVelocity, MCGIDI_sampledProductsData_s::kineticEnergy, MCGIDI_POP_s::m, MCGIDI_quantityLookupMode_pointwise, MCGIDI_sampledProducts_initialize(), MCGIDI_sampledProducts_release(), MCGIDI_target_heated_sampleIndexReactionProductsAtE(), CLHEP::detail::n, MCGIDI_sampledProductsData_s::pop, MCGIDI_sampledProductsDatas_s::products, projectilesPOPID, MCGIDI_sampledProductsData_s::px_vx, MCGIDI_sampledProductsData_s::py_vy, MCGIDI_sampledProductsData_s::pz_vz, MCGIDI_decaySamplingInfo_s::rng, MCGIDI_decaySamplingInfo_s::rngState, sampleChannelCrossSectionAtE(), MCGIDI_quantitiesLookupModes::setCrossSectionMode(), MCGIDI_quantitiesLookupModes::setProjectileEnergy(), MCGIDI_quantitiesLookupModes::setTemperature(), smr, smr_isOk(), smr_print(), target, and MCGIDI_POP_s::Z.

Referenced by getCaptureFinalState(), getFissionFinalState(), and getOthersFinalState().

◆ getFissionCrossSectionAtE()

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}
int * fissionIndices

References fissionIndices, nFissionIndices, and sumChannelCrossSectionAtE().

Referenced by G4LENDFissionCrossSection::getLENDCrossSection().

◆ getFissionFinalState()

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}

References fissionIndices, getFinalState(), and nFissionIndices.

Referenced by G4LENDFission::ApplyYourself().

◆ getM()

int G4GIDI_target::getM ( void  )

Definition at line 165 of file G4GIDI_target.cc.

165 {
166
167 return( target->targetPOP->m );
168}

References target.

◆ getMass()

double G4GIDI_target::getMass ( void  )

Definition at line 172 of file G4GIDI_target.cc.

172 {
173
174 return( mass );
175}

References mass.

◆ getName()

string * G4GIDI_target::getName ( void  )

Definition at line 143 of file G4GIDI_target.cc.

143{ return( &name ); }
std::string name

References name.

◆ getNumberOfChannels()

int G4GIDI_target::getNumberOfChannels ( void  )

Definition at line 214 of file G4GIDI_target.cc.

214 {
215
217}

References MCGIDI_target_numberOfReactions(), smr, and target.

◆ getNumberOfProductionChannels()

int G4GIDI_target::getNumberOfProductionChannels ( void  )

Definition at line 221 of file G4GIDI_target.cc.

221 {
222
224}
int MCGIDI_target_numberOfProductionReactions(statusMessageReporting *smr, MCGIDI_target *target)

References MCGIDI_target_numberOfProductionReactions(), smr, and target.

◆ getOthersCrossSectionAtE()

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}

References nOthersIndices, othersIndices, and sumChannelCrossSectionAtE().

Referenced by G4LENDInelasticCrossSection::getLENDCrossSection().

◆ getOthersFinalState()

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}

References getFinalState(), nOthersIndices, and othersIndices.

Referenced by G4LENDInelastic::ApplyYourself().

◆ getProductionChannelIDs()

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

Definition at line 257 of file G4GIDI_target.cc.

257 {
258
259 return( NULL );
260}

◆ getReactionsDomain()

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}
int MCGIDI_target_heated_getReactionsDomain(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, double *EMin, double *EMax)

References MCGIDI_target_heated_getReactionsDomain(), smr, and target.

◆ getReactionsThreshold()

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}
double MCGIDI_target_heated_getReactionsThreshold(statusMessageReporting *smr, MCGIDI_target_heated *target, int index)

References MCGIDI_target_heated_getReactionsThreshold(), smr, and target.

◆ getTemperatures()

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}
int MCGIDI_target_getTemperatures(statusMessageReporting *smr, MCGIDI_target *target, double *temperatures)

References MCGIDI_target_getTemperatures(), smr, and target.

◆ getTotalCrossSectionAtE()

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}
double MCGIDI_target_getTotalCrossSectionAtTAndE(statusMessageReporting *smr, MCGIDI_target *target, MCGIDI_quantitiesLookupModes &modes, bool sampling)

References MCGIDI_quantityLookupMode_pointwise, MCGIDI_target_getTotalCrossSectionAtTAndE(), projectilesPOPID, MCGIDI_quantitiesLookupModes::setCrossSectionMode(), MCGIDI_quantitiesLookupModes::setProjectileEnergy(), MCGIDI_quantitiesLookupModes::setTemperature(), and target.

◆ getZ()

int G4GIDI_target::getZ ( void  )

Definition at line 151 of file G4GIDI_target.cc.

151 {
152
153 return( target->targetPOP->Z );
154}

References target.

◆ init()

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 );
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 }
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
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;
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++;
117 }
118#if 0
119printf( "elastic %d: ", nElasticIndices );
120for( i = 0; i < nElasticIndices; i++ ) printf( " %d", elasticIndices[i] );
121printf( "\ncapture %d: ", nCaptureIndices );
122for( i = 0; i < nCaptureIndices; i++ ) printf( " %d", captureIndices[i] );
123printf( "\nfission %d: ", nFissionIndices );
124for( i = 0; i < nFissionIndices; i++ ) printf( " %d", fissionIndices[i] );
125printf( "\nothers %d: ", nOthersIndices );
126for( i = 0; i < nOthersIndices; i++ ) printf( " %d", othersIndices[i] );
127printf( "\n" );
128#endif
129 }
130}
double G4GIDI_targetMass(const char *targetSymbol)
Definition: G4GIDI_mass.cc:875
MCGIDI_target * MCGIDI_target_newRead(statusMessageReporting *smr, const char *fileName)
int MCGIDI_reaction_getENDF_MTNumber(MCGIDI_reaction *reaction)
int smr_initialize(statusMessageReporting *smr, enum smr_status verbosity, int append)
@ smr_status_Ok
#define smr_malloc2(smr, size, zero, forItem)

References captureIndices, elasticIndices, equalProbableBinSampleMethod, fissionIndices, G4GIDI_targetMass(), mass, MCGIDI_reaction_getENDF_MTNumber(), MCGIDI_target_heated_getReactionAtIndex(), MCGIDI_target_newRead(), MCGIDI_target_numberOfReactions(), CLHEP::detail::n, name, nCaptureIndices, nElasticIndices, nFissionIndices, nOthersIndices, othersIndices, projectilesPOPID, smr, smr_initialize(), smr_isOk(), smr_malloc2, smr_print(), smr_status_Ok, sourceFilename, and target.

Referenced by demo.App::__init__(), testem0.App::__init__(), Lesson1.App::__init__(), ExN03.App::__init__(), and G4GIDI_target().

◆ readTemperature()

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}
int MCGIDI_target_readHeatedTarget(statusMessageReporting *smr, MCGIDI_target *target, int index)

References MCGIDI_target_readHeatedTarget(), smr, and target.

◆ sampleChannelCrossSectionAtE()

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}
double MCGIDI_target_getIndexReactionCrossSectionAtE(statusMessageReporting *smr, MCGIDI_target *target, int index, MCGIDI_quantitiesLookupModes &modes, bool sampling)

References MCGIDI_quantityLookupMode_pointwise, MCGIDI_target_getIndexReactionCrossSectionAtE(), projectilesPOPID, MCGIDI_quantitiesLookupModes::setCrossSectionMode(), MCGIDI_quantitiesLookupModes::setProjectileEnergy(), MCGIDI_quantitiesLookupModes::setTemperature(), smr, sumChannelCrossSectionAtE(), and target.

Referenced by getFinalState().

◆ setEqualProbableBinSampleMethod()

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}

References equalProbableBinSampleMethod.

◆ sumChannelCrossSectionAtE()

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}

References MCGIDI_quantityLookupMode_pointwise, MCGIDI_target_getIndexReactionCrossSectionAtE(), projectilesPOPID, MCGIDI_quantitiesLookupModes::setCrossSectionMode(), MCGIDI_quantitiesLookupModes::setProjectileEnergy(), MCGIDI_quantitiesLookupModes::setTemperature(), smr, and target.

Referenced by getCaptureCrossSectionAtE(), getElasticCrossSectionAtE(), getFissionCrossSectionAtE(), getOthersCrossSectionAtE(), and sampleChannelCrossSectionAtE().

Field Documentation

◆ captureIndices

int * G4GIDI_target::captureIndices

Definition at line 64 of file G4GIDI_target.hh.

Referenced by getCaptureCrossSectionAtE(), getCaptureFinalState(), and init().

◆ elasticIndices

int* G4GIDI_target::elasticIndices

◆ equalProbableBinSampleMethod

std::string G4GIDI_target::equalProbableBinSampleMethod

◆ fissionIndices

int * G4GIDI_target::fissionIndices

Definition at line 64 of file G4GIDI_target.hh.

Referenced by getFissionCrossSectionAtE(), getFissionFinalState(), and init().

◆ mass

double G4GIDI_target::mass

Definition at line 71 of file G4GIDI_target.hh.

Referenced by getMass(), and init().

◆ name

std::string G4GIDI_target::name

◆ nCaptureIndices

int G4GIDI_target::nCaptureIndices

Definition at line 63 of file G4GIDI_target.hh.

Referenced by getCaptureCrossSectionAtE(), getCaptureFinalState(), and init().

◆ nElasticIndices

int G4GIDI_target::nElasticIndices

Definition at line 63 of file G4GIDI_target.hh.

Referenced by getElasticCrossSectionAtE(), and init().

◆ nFissionIndices

int G4GIDI_target::nFissionIndices

Definition at line 63 of file G4GIDI_target.hh.

Referenced by getFissionCrossSectionAtE(), getFissionFinalState(), and init().

◆ nOthersIndices

int G4GIDI_target::nOthersIndices

Definition at line 63 of file G4GIDI_target.hh.

Referenced by getOthersCrossSectionAtE(), getOthersFinalState(), and init().

◆ othersIndices

int * G4GIDI_target::othersIndices

Definition at line 64 of file G4GIDI_target.hh.

Referenced by getOthersCrossSectionAtE(), getOthersFinalState(), and init().

◆ projectilesPOPID

int G4GIDI_target::projectilesPOPID

◆ smr

GIDI::statusMessageReporting G4GIDI_target::smr

◆ sourceFilename

std::string G4GIDI_target::sourceFilename

Definition at line 70 of file G4GIDI_target.hh.

Referenced by getFilename(), and init().

◆ target

GIDI::MCGIDI_target* G4GIDI_target::target

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