26 m_userParticleIndex( -1 ),
27 m_isCompleteParticle( false ),
29 m_excitationEnergy( 0.0 ),
31 m_initialStateIndex( -1 ),
32 m_multiplicity( nullptr ),
33 m_distribution( nullptr ),
34 m_outputChannel( nullptr ) {
48 m_ID( a_product->particle( ).
ID( ).c_str( ) ),
51 m_userParticleIndex( -1 ),
52 m_label( a_product->
label( ).c_str( ) ),
54 m_mass( a_product->particle( ).
mass(
"MeV/c**2" ) ),
56 m_twoBodyOrder( a_setupInfo.m_twoBodyOrder ),
57 m_initialStateIndex( -1 ),
58 m_multiplicity(
Functions::parseMultiplicityFunction1d( a_setupInfo, a_settings, a_product->
multiplicity( ) ) ),
59 m_distribution( nullptr ),
60 m_outputChannel( nullptr ) {
68 if( output_channel !=
nullptr ) m_outputChannel =
new OutputChannel( output_channel, a_setupInfo, a_settings, a_particles );
84 m_ID( a_ID.c_str( ) ),
87 m_userParticleIndex( -1 ),
88 m_label( a_label.c_str( ) ),
90 m_excitationEnergy( 0.0 ),
92 m_initialStateIndex( -1 ),
93 m_multiplicity( nullptr ),
94 m_distribution( nullptr ),
95 m_outputChannel( nullptr ) {
104 delete m_multiplicity;
107 if( m_distribution !=
nullptr ) type = m_distribution->type( );
155 delete m_outputChannel;
167 if( m_index == a_particleIndex ) m_userParticleIndex = a_userParticleIndex;
168#ifdef MCGIDI_USE_OUTPUT_CHANNEL
169 if( m_outputChannel !=
nullptr ) m_outputChannel->setUserParticleIndex( a_particleIndex, a_userParticleIndex );
182 if( m_intid == a_particleIntid ) m_userParticleIndex = a_userParticleIndex;
183#ifdef MCGIDI_USE_OUTPUT_CHANNEL
184 if( m_outputChannel !=
nullptr ) m_outputChannel->setUserParticleIndexViaIntid( a_particleIntid, a_userParticleIndex );
196 m_distribution->setModelDBRC_data( a_modelDBRC_data );
209#ifdef MCGIDI_USE_OUTPUT_CHANNEL
210 if( m_outputChannel !=
nullptr )
return( m_outputChannel->finalQ( a_x1 ) );
212 return( m_excitationEnergy );
223#ifdef MCGIDI_USE_OUTPUT_CHANNEL
224 if( m_outputChannel !=
nullptr )
return( m_outputChannel->hasFission( ) );
241 double multiplicity1 = 0.0;
243 if( a_index == m_index ) {
244 if( ( m_multiplicity->domainMin( ) <= a_projectileEnergy ) && ( m_multiplicity->domainMax( ) >= a_projectileEnergy ) )
245 multiplicity1 += m_multiplicity->evaluate( a_projectileEnergy );
247#ifdef MCGIDI_USE_OUTPUT_CHANNEL
248 if( m_outputChannel !=
nullptr ) multiplicity1 += m_outputChannel->productAverageMultiplicity( a_index, a_projectileEnergy );
251 return( multiplicity1 );
266 double multiplicity1 = 0.0;
268 if( a_intid == m_intid ) {
269 if( ( m_multiplicity->domainMin( ) <= a_projectileEnergy ) && ( m_multiplicity->domainMax( ) >= a_projectileEnergy ) )
270 multiplicity1 += m_multiplicity->evaluate( a_projectileEnergy );
272#ifdef MCGIDI_USE_OUTPUT_CHANNEL
273 if( m_outputChannel !=
nullptr ) multiplicity1 += m_outputChannel->productAverageMultiplicityViaIntid( a_intid, a_projectileEnergy );
276 return( multiplicity1 );
299 switch( m_twoBodyOrder ) {
329#ifdef MCGIDI_USE_OUTPUT_CHANNEL
330 bool haveChannel = m_outputChannel !=
nullptr;
345 m_outputChannel->serialize( a_buffer, a_mode );
#define DATA_MEMBER_STRING(member, buf, mode)
#define DATA_MEMBER_CAST(member, buf, mode, someType)
#define DATA_MEMBER_DOUBLE(member, buf, mode)
#define DATA_MEMBER_INT( member, buf, mode)
OutputChannel * outputChannel() const
Component & distribution()
LUPI_HOST_DEVICE void incrementPlacement(std::size_t a_delta)
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE Product()
LUPI_HOST_DEVICE bool isCompleteParticle() const
LUPI_HOST_DEVICE ~Product()
LUPI_HOST_DEVICE double productAverageMultiplicity(int a_index, double a_projectileEnergy) const
LUPI_HOST_DEVICE double productAverageMultiplicityViaIntid(int a_intid, double a_projectileEnergy) const
LUPI_HOST String const & ID() const
LUPI_HOST void setModelDBRC_data(Sampling::Upscatter::ModelDBRC_data *a_modelDBRC_data)
LUPI_HOST_DEVICE TwoBodyOrder twoBodyOrder() const
LUPI_HOST_DEVICE Functions::Function1d const * multiplicity() const
LUPI_HOST_DEVICE double finalQ(double a_x1) const
LUPI_HOST_DEVICE double excitationEnergy() const
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE bool hasFission() const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double mass() const
LUPI_HOST_DEVICE String label() const
LUPI_HOST bool wantTerrellPromptNeutronDistribution() const
@ coherentPhotoAtomicScattering
@ incoherentPhotoAtomicScattering
@ incoherentPhotoAtomicScatteringElectron
@ incoherentBoundToFreePhotoAtomicScattering
LUPI_HOST Distribution * parseGIDI(GIDI::Suite const &a_distribution, SetupInfo &a_setupInfo, Transporting::MC const &a_settings)
Simple C++ string class, useful as replacement for std::string if this cannot be used,...
LUPI_HOST_DEVICE Distributions::Distribution * serializeDistribution(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Distributions::Distribution *a_distribution)
LUPI_HOST int MCGIDI_popsIntid(PoPI::Database const &a_pops, std::string const &a_ID)
LUPI_HOST int MCGIDI_popsIndex(PoPI::Database const &a_pops, std::string const &a_ID)
LUPI_HOST_DEVICE Functions::Function1d * serializeFunction1d(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Functions::Function1d *a_function1d)
static int constexpr neutron