ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCGIDI_product.cc File Reference
#include <string.h>
#include <cmath>
#include "MCGIDI.h"
#include "MCGIDI_misc.h"
#include "MCGIDI_fromTOM.h"
+ Include dependency graph for MCGIDI_product.cc:

Go to the source code of this file.

Classes

struct  polynomialCallbackArgs_s
 

Typedefs

typedef struct
polynomialCallbackArgs_s 
polynomialCallbackArgs
 

Functions

static int MCGIDI_product_parsePiecewiseMultiplicity (statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_product *product)
 
static ptwXYPointsMCGIDI_product_parsePolynomialMultiplicity (statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_product *product)
 
static int MCGIDI_product_parseWeightedReferenceMultiplicityFromTOM (statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_product *product, ptwXYPoints **multiplicityVsEnergy, ptwXYPoints **norms)
 
static double MCGIDI_product_evaluatePolynomial (double x, polynomialCallbackArgs *args)
 
MCGIDI_productMCGIDI_product_new (statusMessageReporting *smr)
 
int MCGIDI_product_initialize (statusMessageReporting *, MCGIDI_product *product)
 
MCGIDI_productMCGIDI_product_free (statusMessageReporting *smr, MCGIDI_product *product)
 
int MCGIDI_product_release (statusMessageReporting *smr, MCGIDI_product *product)
 
int MCGIDI_product_parseFromTOM (statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_outputChannel *outputChannel, MCGIDI_POPs *pops, MCGIDI_product *product, int *delayedNeutronIndex)
 
int MCGIDI_product_getDomain (statusMessageReporting *smr, MCGIDI_product *product, double *EMin, double *EMax)
 
int MCGIDI_product_setTwoBodyMasses (statusMessageReporting *smr, MCGIDI_product *product, double projectileMass_MeV, double targetMass_MeV, double productMass_MeV, double residualMass_MeV)
 
double MCGIDI_product_getMass_MeV (statusMessageReporting *, MCGIDI_product *product)
 
MCGIDI_target_heatedMCGIDI_product_getTargetHeated (statusMessageReporting *smr, MCGIDI_product *product)
 
double MCGIDI_product_getProjectileMass_MeV (statusMessageReporting *smr, MCGIDI_product *product)
 
double MCGIDI_product_getTargetMass_MeV (statusMessageReporting *smr, MCGIDI_product *product)
 
int MCGIDI_product_sampleMultiplicity (statusMessageReporting *, MCGIDI_product *product, double e_in, double r)
 
int MCGIDI_product_sampleMu (statusMessageReporting *smr, MCGIDI_product *product, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
 
int MCGIDI_sampledProducts_initialize (statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, int incrementSize)
 
int MCGIDI_sampledProducts_release (statusMessageReporting *, MCGIDI_sampledProductsDatas *sampledProductsDatas)
 
int MCGIDI_sampledProducts_remalloc (statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas)
 
int MCGIDI_sampledProducts_addProduct (statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, MCGIDI_sampledProductsData *sampledProductsData)
 
int MCGIDI_sampledProducts_number (MCGIDI_sampledProductsDatas *sampledProductsDatas)
 
MCGIDI_sampledProductsDataMCGIDI_sampledProducts_getProductAtIndex (MCGIDI_sampledProductsDatas *sampledProductsDatas, int index)
 

Typedef Documentation

Function Documentation

static double MCGIDI_product_evaluatePolynomial ( double  x,
polynomialCallbackArgs args 
)
static

Definition at line 241 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 241 of file MCGIDI_product.cc

References polynomialCallbackArgs_s::coefficients, polynomialCallbackArgs_s::energyFactor, and polynomialCallbackArgs_s::length.

Referenced by MCGIDI_product_parsePolynomialMultiplicity().

+ Here is the caller graph for this function:

MCGIDI_product* MCGIDI_product_free ( statusMessageReporting smr,
MCGIDI_product product 
)

Definition at line 51 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 51 of file MCGIDI_product.cc

References MCGIDI_product_release(), and smr_freeMemory().

Referenced by MCGIDI_product_new().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_product_getDomain ( statusMessageReporting smr,
MCGIDI_product product,
double *  EMin,
double *  EMax 
)

Definition at line 282 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 282 of file MCGIDI_product.cc

References MCGIDI_outputChannel_getDomain(), and MCGIDI_product_s::outputChannel.

Referenced by MCGIDI_outputChannel_getDomain(), and MCGIDI_product_parsePolynomialMultiplicity().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double MCGIDI_product_getMass_MeV ( statusMessageReporting ,
MCGIDI_product product 
)

Definition at line 297 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 297 of file MCGIDI_product.cc

References MCGIDI_POP_getMass_MeV(), and MCGIDI_product_s::pop.

Referenced by MCGIDI_energy_parseNBodyPhaseSpaceFromTOM(), MCGIDI_outputChannel_parseFromTOM(), and MCGIDI_outputChannel_sampleProductsAtE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double MCGIDI_product_getProjectileMass_MeV ( statusMessageReporting smr,
MCGIDI_product product 
)

Definition at line 311 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 311 of file MCGIDI_product.cc

References MCGIDI_outputChannel_getProjectileMass_MeV(), and MCGIDI_product_s::outputChannel.

Referenced by MCGIDI_energy_parseFromTOM(), and MCGIDI_outputChannel_getProjectileMass_MeV().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MCGIDI_target_heated* MCGIDI_product_getTargetHeated ( statusMessageReporting smr,
MCGIDI_product product 
)

Definition at line 304 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 304 of file MCGIDI_product.cc

References MCGIDI_outputChannel_getTargetHeated(), and MCGIDI_product_s::outputChannel.

Referenced by MCGIDI_KalbachMann_parseFromTOM(), and MCGIDI_outputChannel_getTargetHeated().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double MCGIDI_product_getTargetMass_MeV ( statusMessageReporting smr,
MCGIDI_product product 
)

Definition at line 318 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 318 of file MCGIDI_product.cc

References MCGIDI_outputChannel_getTargetMass_MeV(), and MCGIDI_product_s::outputChannel.

Referenced by MCGIDI_energy_parseFromTOM(), and MCGIDI_outputChannel_getTargetMass_MeV().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_product_initialize ( statusMessageReporting ,
MCGIDI_product product 
)

Definition at line 42 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 42 of file MCGIDI_product.cc

References MCGIDI_product_s::delayedNeutronIndex.

Referenced by MCGIDI_product_new(), MCGIDI_product_parseFromTOM(), and MCGIDI_product_release().

+ Here is the caller graph for this function:

MCGIDI_product* MCGIDI_product_new ( statusMessageReporting smr)

Definition at line 31 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 31 of file MCGIDI_product.cc

References MCGIDI_product_free(), MCGIDI_product_initialize(), and smr_malloc2.

+ Here is the call graph for this function:

int MCGIDI_product_parseFromTOM ( statusMessageReporting smr,
xDataTOM_element element,
MCGIDI_outputChannel outputChannel,
MCGIDI_POPs pops,
MCGIDI_product product,
int delayedNeutronIndex 
)

Definition at line 82 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 82 of file MCGIDI_product.cc

References MCGIDI_product_s::decayChannel, MCGIDI_product_s::delayedNeutronIndex, MCGIDI_product_s::delayedNeutronRate, e, check_license::err(), MCGIDI_product_s::label, MCGIDI_distribution_parseFromTOM(), MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf(), MCGIDI_misc_PQUStringToDoubleInUnitOf(), MCGIDI_outputChannel_parseFromTOM(), MCGIDI_POPs_findParticle(), MCGIDI_product_initialize(), MCGIDI_product_parsePiecewiseMultiplicity(), MCGIDI_product_parsePolynomialMultiplicity(), MCGIDI_product_parseWeightedReferenceMultiplicityFromTOM(), MCGIDI_product_release(), MCGIDI_product_s::multiplicity, MCGIDI_product_s::multiplicityVsEnergy, MCGIDI_POP_s::name, nfu_Okay, nfu_statusMessage(), MCGIDI_product_s::norms, MCGIDI_product_s::outputChannel, MCGIDI_product_s::pop, ptwXY_free(), ptwXY_getYMax(), ptwXY_getYMin(), ptwXY_interpolationLinLin, ptwXY_length(), ptwXY_new(), ptwXY_simpleCoalescePoints(), smr_allocateCopyString2, smr_setReportError2, smr_setReportError2p, smr_unknownID, xDataTOM_getAttributesValueInElement(), xDataTOME_convertAttributeToInteger(), and xDataTOME_getOneElementByName().

Referenced by MCGIDI_outputChannel_parseFromTOM().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int MCGIDI_product_parsePiecewiseMultiplicity ( statusMessageReporting smr,
xDataTOM_element element,
MCGIDI_product product 
)
static

Definition at line 173 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 173 of file MCGIDI_product.cc

References xDataTOM_xDataInfo_s::data, and xDataTOM_element_s::xDataInfo.

Referenced by MCGIDI_product_parseFromTOM().

+ Here is the caller graph for this function:

static ptwXYPoints * MCGIDI_product_parsePolynomialMultiplicity ( statusMessageReporting smr,
xDataTOM_element element,
MCGIDI_product product 
)
static

Definition at line 197 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 197 of file MCGIDI_product.cc

References xDataTOM_xDataInfo_s::axes, polynomialCallbackArgs_s::coefficients, dE, E, e, polynomialCallbackArgs_s::energyFactor, check_license::err(), polynomialCallbackArgs_s::length, BTOF::length, MCGIDI_misc_getUnitConversionFactor(), MCGIDI_product_evaluatePolynomial(), MCGIDI_product_getDomain(), n, nfu_statusMessage(), ptwXY_free(), ptwXY_interpolationLinLin, ptwXY_new(), ptwXY_setValueAtX(), smr_isOk(), smr_setReportError2, smr_unknownID, xDataTOM_element_s::xDataInfo, xDataTOM_axes_getUnit(), and xDataTOM_polynomial_getDataFromXDataInfo().

Referenced by MCGIDI_product_parseFromTOM().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int MCGIDI_product_parseWeightedReferenceMultiplicityFromTOM ( statusMessageReporting smr,
xDataTOM_element element,
MCGIDI_product product,
ptwXYPoints **  multiplicityVsEnergy,
ptwXYPoints **  norms 
)
static

Definition at line 254 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 254 of file MCGIDI_product.cc

References check_license::err(), MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf(), ptwXY_free(), xDataTOM_getAttributesValueInElement(), xDataTOM_getLinksElement(), and xDataTOME_getOneElementByName().

Referenced by MCGIDI_product_parseFromTOM().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_product_release ( statusMessageReporting smr,
MCGIDI_product product 
)

Definition at line 60 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 60 of file MCGIDI_product.cc

References MCGIDI_product_s::decayChannel, MCGIDI_product_s::distribution, MCGIDI_product_s::label, MCGIDI_distribution_release(), MCGIDI_outputChannel_release(), MCGIDI_product_initialize(), MCGIDI_product_s::multiplicityVsEnergy, MCGIDI_product_s::norms, MCGIDI_product_s::numberOfPiecewiseMultiplicities, MCGIDI_product_s::piecewiseMultiplicities, ptwXY_free(), and smr_freeMemory().

Referenced by MCGIDI_outputChannel_release(), MCGIDI_product_free(), and MCGIDI_product_parseFromTOM().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_product_sampleMu ( statusMessageReporting smr,
MCGIDI_product product,
MCGIDI_quantitiesLookupModes modes,
MCGIDI_decaySamplingInfo decaySamplingInfo 
)

Definition at line 348 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 348 of file MCGIDI_product.cc

References MCGIDI_distribution_s::angular, MCGIDI_product_s::distribution, MCGIDI_angular_sampleMu(), MCGIDI_distributionType_angular_e, smr_setReportError2, smr_unknownID, and MCGIDI_distribution_s::type.

Referenced by G4GIDI_target::getElasticFinalState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_product_sampleMultiplicity ( statusMessageReporting ,
MCGIDI_product product,
double  e_in,
double  r 
)

Definition at line 325 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 325 of file MCGIDI_product.cc

References int(), MCGIDI_sampling_ptwXY_getValueAtX(), MCGIDI_product_s::multiplicityVsEnergy, norm, MCGIDI_product_s::norms, MCGIDI_product_s::numberOfPiecewiseMultiplicities, MCGIDI_product_s::piecewiseMultiplicities, ptwXY_getXMax(), and y.

Referenced by MCGIDI_outputChannel_sampleProductsAtE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_product_setTwoBodyMasses ( statusMessageReporting smr,
MCGIDI_product product,
double  projectileMass_MeV,
double  targetMass_MeV,
double  productMass_MeV,
double  residualMass_MeV 
)

Definition at line 289 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 289 of file MCGIDI_product.cc

References MCGIDI_distribution_s::angular, MCGIDI_product_s::distribution, and MCGIDI_angular_setTwoBodyMasses().

Referenced by MCGIDI_outputChannel_parseFromTOM().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_sampledProducts_addProduct ( statusMessageReporting smr,
MCGIDI_sampledProductsDatas sampledProductsDatas,
MCGIDI_sampledProductsData sampledProductsData 
)

Definition at line 398 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 398 of file MCGIDI_product.cc

References MCGIDI_sampledProducts_remalloc(), MCGIDI_sampledProductsDatas_s::numberAllocated, MCGIDI_sampledProductsDatas_s::numberOfProducts, and MCGIDI_sampledProductsDatas_s::products.

Referenced by MCGIDI_outputChannel_sampleProductsAtE(), and MCGIDI_target_sampleNullReactionProductsAtE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MCGIDI_sampledProductsData* MCGIDI_sampledProducts_getProductAtIndex ( MCGIDI_sampledProductsDatas sampledProductsDatas,
int  index 
)

Definition at line 417 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 417 of file MCGIDI_product.cc

References MCGIDI_sampledProductsDatas_s::numberOfProducts, and MCGIDI_sampledProductsDatas_s::products.

int MCGIDI_sampledProducts_initialize ( statusMessageReporting smr,
MCGIDI_sampledProductsDatas sampledProductsDatas,
int  incrementSize 
)

Definition at line 362 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 362 of file MCGIDI_product.cc

References MCGIDI_sampledProductsDatas_s::incrementSize, MCGIDI_sampledProducts_remalloc(), MCGIDI_sampledProductsDatas_s::numberAllocated, MCGIDI_sampledProductsDatas_s::numberOfProducts, and MCGIDI_sampledProductsDatas_s::products.

Referenced by G4GIDI_target::getFinalState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_sampledProducts_number ( MCGIDI_sampledProductsDatas sampledProductsDatas)

Definition at line 410 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 410 of file MCGIDI_product.cc

References MCGIDI_sampledProductsDatas_s::numberOfProducts.

int MCGIDI_sampledProducts_release ( statusMessageReporting ,
MCGIDI_sampledProductsDatas sampledProductsDatas 
)

Definition at line 374 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 374 of file MCGIDI_product.cc

References MCGIDI_sampledProductsDatas_s::products, and smr_freeMemory().

Referenced by G4GIDI_target::getFinalState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_sampledProducts_remalloc ( statusMessageReporting smr,
MCGIDI_sampledProductsDatas sampledProductsDatas 
)

Definition at line 382 of file MCGIDI_product.cc.

View newest version in sPHENIX GitHub at line 382 of file MCGIDI_product.cc

References MCGIDI_sampledProductsDatas_s::incrementSize, MCGIDI_sampledProductsDatas_s::numberAllocated, MCGIDI_sampledProductsDatas_s::numberOfProducts, MCGIDI_sampledProductsDatas_s::products, and smr_realloc2.

Referenced by MCGIDI_sampledProducts_addProduct(), and MCGIDI_sampledProducts_initialize().

+ Here is the caller graph for this function: