10#ifndef MCGIDI_sampling_hpp_included
11#define MCGIDI_sampling_hpp_included 1
106 double (*m_generator)(
void * );
141 friend ProtareSingle;
145 friend GRIN_inelastic;
148 bool m_wantVelocity = true ;
150 bool m_dataInTargetFrame =
false;
151 double m_modelTemperature = 0.0;
152 double m_modelEnergy = 0.0;
157 double m_temperature = 0.0;
158 double m_energy = 0.0;
248 template <
typename RNG,
typename PUSHBACK>
249 LUPI_HOST_DEVICE void add(
double a_projectileEnergy,
int a_productIntid,
int a_productIndex,
int a_userProductIndex,
double a_productMass,
Input &a_input,
250 RNG && a_rng, PUSHBACK && push_back,
bool isPhoton );
260#define MCGIDI_CUDACC_numberOfProducts 1000
262class StdVectorProductHandler :
public ProductHandler {
275 if( m_size < MCGIDI_CUDACC_numberOfProducts ) {
276 m_products[m_size] = a_product;
287 std::vector<Product> m_products;
315 m_products.reserve( a_size );
G4double B(G4double temperature)
LUPI_HOST_DEVICE DomainHash()
LUPI_HOST_DEVICE double domainMin() const
LUPI_HOST_DEVICE double u_domainMin() const
LUPI_HOST_DEVICE double inverse_du() const
LUPI_HOST_DEVICE double u_domainMax() const
LUPI_HOST void print(bool a_printValues) const
LUPI_HOST_DEVICE double domainMax() const
LUPI_HOST_DEVICE std::size_t index(double a_domain) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE std::size_t bins() const
LUPI_HOST_DEVICE Vector< std::size_t > map(Vector< double > const &a_domainValues) const
LUPI_HOST_DEVICE ClientCodeRNGData(double(*a_generator)(void *), void *a_state)
LUPI_HOST_DEVICE double dRng()
LUPI_HOST_DEVICE ClientRandomNumberGenerator(double(*a_generator)(void *), void *a_state)
LUPI_HOST_DEVICE double Double()
LUPI_HOST_DEVICE void * rngState()
LUPI_HOST_DEVICE void * state()
LUPI_HOST_DEVICE double(*)(void *) generator()
LUPI_HOST_DEVICE double(*)(void *) rng()
LUPI_HOST_DEVICE void push_back(Product &a_product)
LUPI_HOST_DEVICE MCGIDIVectorProductHandler(std::size_t a_size=20)
LUPI_HOST_DEVICE Vector< Product > const & products() const
LUPI_HOST_DEVICE std::size_t size()
LUPI_HOST_DEVICE ~MCGIDIVectorProductHandler()
LUPI_HOST_DEVICE void clear()
LUPI_HOST_DEVICE Product const & operator[](std::size_t a_index) const
LUPI_HOST_DEVICE ~ProductHandler()
LUPI_HOST_DEVICE ProductHandler()
LUPI_HOST_DEVICE void add(double a_projectileEnergy, int a_productIntid, int a_productIndex, int a_userProductIndex, double a_productMass, Input &a_input, RNG &&a_rng, PUSHBACK &&push_back, bool isPhoton)
int m_delayedNeutronIndex
SampledType m_sampledType
int m_numberOfDBRC_rejections
double m_delayedNeutronDecayRate
LUPI_HOST_DEVICE void clear()
LUPI_HOST_DEVICE Product & operator[](std::size_t a_index)
LUPI_HOST_DEVICE std::vector< Product > & products()
LUPI_HOST_DEVICE ~StdVectorProductHandler()
LUPI_HOST_DEVICE void push_back(Product &a_product)
LUPI_HOST_DEVICE std::size_t size()
LUPI_HOST_DEVICE StdVectorProductHandler()
LUPI_HOST_DEVICE double crossSectionMax(double a_energy, double a_targetThermalSpeed)
Vector< std::size_t > m_hashIndices
MCGIDI::DomainHash m_domainHash
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double targetThermalSpeed(double a_temperature)
LUPI_HOST_DEVICE double evaluate(double a_energy)
Vector< double > m_energies
LUPI_HOST_DEVICE ~ModelDBRC_data()
Vector< double > m_crossSections
LUPI_HOST_DEVICE ModelDBRC_data()
LUPI_HOST_DEVICE ModelDBRC_data * serializeModelDBRC_data(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, ModelDBRC_data *a_modelDBRC_data)
LUPI_HOST_DEVICE std::size_t evaluationForHashIndex(std::size_t a_hashIndex, Vector< std::size_t > const &a_hashIndices, double a_energy, Vector< double > const &a_energies, double *a_energyFraction)
Simple C++ string class, useful as replacement for std::string if this cannot be used,...