84 init( fileName.c_str( ) );
109 for( i = 0; i < n; i++ ) {
111 if( channel->
ENDL_C == 10 ) {
117 for( i = 0; i < n; i++ ) {
119 if( channel->
ENDL_C == 46 ) {
126 for( i = 0; i < n; i++ ) {
128 if( channel->
fission != NULL ) {
134 for( i = 0; i < n; i++ ) {
169 return(
target->targetID->Z );
176 return(
target->targetID->A );
183 return(
target->targetID->m );
218 if( method ==
"constant" ) {
220 if( method ==
"linear" ) {
261 vector<channelID> *listOfChannels;
263 listOfChannels =
new vector<channelID>( n );
264 for( i = 0; i < n; i++ ) (*listOfChannels)[i].ID = channels[i]->
outputChannel;
265 return( listOfChannels );
274 vector<double> *energyGrid;
275 vector<double>::iterator iter;
278 if( n < 0 )
return( NULL );
279 energyGrid =
new vector<double>( n );
280 for( i = 0, iter = energyGrid->begin( ); i < n; i++, iter++ ) *iter = dEnergyGrid[i];
281 return( energyGrid );
326 for( i = 0; i < nIndices; i++ )
334 double (*rng)(
void * ),
void *rngState ) {
339 for( i = 0; i < nIndices - 1; i++ ) {
341 if( xsec >= rxsec )
break;
343 return( indices[i] );
355 decaySamplingInfo.
e_in = e_in;
359 decaySamplingInfo.
rng = rng;
360 decaySamplingInfo.
rngState = rngState;
364 return( decaySamplingInfo.
mu );
390vector<G4GIDI_Product> *
G4GIDI_target::getFinalState(
int nIndices,
int *indices,
double e_in,
double temperature,
double (*rng)(
void * ),
void *rngState ) {
392#define nProductsMax 50
394 vector<G4GIDI_Product> *products = NULL;
398 decaySamplingInfo.
e_in = e_in;
402 decaySamplingInfo.
rng = rng;
403 decaySamplingInfo.
rngState = rngState;
405 if( nIndices == 0 ) {
408 if( nIndices == 1 ) {
409 index = indices[0]; }
416 if( ( products =
new vector<G4GIDI_Product>( n ) ) != NULL ) {
417 for( i = 0; i < n; i++ ) {
418 productData = &(productDatas[i]);
423 (*products)[i].px = productData->
px_vx;
424 (*products)[i].py = productData->
py_vy;
425 (*products)[i].pz = productData->
pz_vz;
double G4GIDI_targetMass(const char *targetSymbol)
std::vector< G4GIDI_Product > * getOthersFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
std::string equalProbableBinSampleMethod
double getFissionCrossSectionAtE(double e_in, double temperature)
GIDI::statusMessageReporting smr
std::vector< G4GIDI_Product > * getFissionFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
std::string sourceFilename
double getElasticFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
double getCaptureCrossSectionAtE(double e_in, double temperature)
double getOthersCrossSectionAtE(double e_in, double temperature)
int readTemperature(int index)
GIDI::tpia_target * target
std::string * getName(void)
std::vector< channelID > * getChannelIDs2(GIDI::tpia_channel **channels, int n)
double getTotalCrossSectionAtE(double e_in, double temperature)
int sampleChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
G4GIDI_target(const char *fileName)
int getNumberOfProductionChannels(void)
std::vector< channelID > * getChannelIDs(void)
std::vector< G4GIDI_Product > * getFinalState(int nIndices, int *indices, double e_in, double temperature, double(*rng)(void *), void *rngState)
double getElasticCrossSectionAtE(double e_in, double temperature)
std::string getEqualProbableBinSampleMethod(void)
std::vector< double > * getEnergyGridAtTIndex(int index)
int setEqualProbableBinSampleMethod(std::string method)
int getTemperatures(double *temperatures)
std::vector< G4GIDI_Product > * getCaptureFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
std::string * getFilename(void)
int getNumberOfChannels(void)
void init(const char *fileName)
std::vector< channelID > * getProductionChannelIDs(void)
double sumChannelCrossSectionAtE(int nIndices, int *indices, double e_in, double temperature)
int smr_initialize(statusMessageReporting *smr)
void smr_print(statusMessageReporting *smr, FILE *f, int clear)
int smr_release(statusMessageReporting *smr)
int smr_isOk(statusMessageReporting *smr)
tpia_decayChannel decayChannel
tpia_samplingMethods * samplingMethods
tpia_particle * productID
#define tpia_referenceFrame_lab
tpia_product * tpia_decayChannel_getFirstProduct(tpia_decayChannel *decayChannel)
int tpia_target_getTemperatures(statusMessageReporting *smr, tpia_target *target, double *temperatures)
tpia_target * tpia_target_createRead(statusMessageReporting *smr, const char *fileName)
int tpia_target_numberOfProductionChannels(statusMessageReporting *smr, tpia_target *target)
double tpia_target_getIndexChannelCrossSectionAtE(statusMessageReporting *smr, tpia_target *target, int index, double T, xData_Int iEg, double e_in, int crossSectionType)
double tpia_misc_drng(double(*rng)(void *), void *rngState)
tpia_channel * tpia_target_heated_getChannelAtIndex_smr(statusMessageReporting *smr, tpia_target_heated *target, int index)
int tpia_target_numberOfChannels(statusMessageReporting *smr, tpia_target *target)
tpia_target * tpia_target_free(statusMessageReporting *smr, tpia_target *target)
int tpia_target_readHeatedTarget(statusMessageReporting *smr, tpia_target *target, int index, int checkElememtsForAccess)
xData_Int tpia_target_getEnergyGridAtTIndex(statusMessageReporting *smr, tpia_target *target, int index, double **energyGrid)
tpia_channel * tpia_target_heated_getChannelAtIndex(tpia_target_heated *target, int index)
int tpia_frame_setColumn(statusMessageReporting *smr, tpia_data_frame *frame, int column, int value)
#define tpia_crossSectionType_pointwise
int tpia_angular_SampleMu(statusMessageReporting *smr, tpia_angular *angular, tpia_decaySamplingInfo *decaySamplingInfo)
int tpia_target_heated_sampleIndexChannelProductsAtE(statusMessageReporting *smr, tpia_target_heated *target, int index, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
double tpia_target_getTotalCrossSectionAtTAndE(statusMessageReporting *smr, tpia_target *target, double T, xData_Int iEg, double e_in, int crossSectionType)
void * xData_free(statusMessageReporting *smr, void *p)
#define xData_malloc2(smr, size, zero, forItem)