Message: Error in Implimentation of Thermal neutron crossection in Geant4 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Error in Implimentation of Thermal neutron crossection in Geant4 

Forum: Hadronic Processes
Date: Apr 09, 14:23
From: Sanchit Sharma <Sanchit Sharma>

I am trying to do my simulation with QGSP_BERT_HP physics list. My aim is to use this physics list along with the S(a,b) thermal crossection. As per the instructions above:

1) My Material definition is :

  a = 15.999 * g/mole;
  G4Element* elO = new G4Element(name="Oxygen", symbol="O",z= 8., a);
  G4Element* TSH = new G4Element( "TS_H_of_Water" , "h_water" , 1.0 , 1.0079*g/mole );
  G4Material* H2O_TS = new G4Material( "Water_TS" , density = 1.0 * g/cm3 , ncomponents = 2 );
  H2O_TS -> AddElement(TSH,2);
  H2O_TS -> AddElement(elO,1);

2) My Physics is :

#include "G4HadronicInteractionRegistry.hh"
#include "G4HadronicProcess.hh"
#include "G4HadronicProcessStore.hh"
#include "G4HadronicProcessType.hh"
#include "G4Neutron.hh"
#include "G4NeutronHPThermalScattering.hh"
#include "G4NeutronHPThermalScatteringData.hh"
#include <assert.h>
#include <G4SystemOfUnits.hh>
#include <PhysicsList.hh>

void PhysicsList::ConstructProcess() {
  G4VModularPhysicsList::ConstructProcess();    // Construct reference physics first

  // Get the elastic scattering process for neutrons
  G4ParticleDefinition* nPD = G4Neutron::Definition();
  G4HadronicProcess* nElastic = G4HadronicProcessStore::Instance()->FindProcess(nPD, fHadronElastic);
  assert(nElastic != 0);

  // Get the "regular" HP elastic scattering model, exclude thermal scattering region
  G4HadronicInteraction* nElasticHP = G4HadronicInteractionRegistry::Instance()->FindModel("NeutronHPElastic");
  assert(nElasticHP != 0);

  // Attach HP thermal scattering model and data files to process
  nElastic->RegisterMe(new G4NeutronHPThermalScattering);
  nElastic->AddDataSet(new G4NeutronHPThermalScatteringData);

3. My PhysicsList.hh is:


#include <G4VModularPhysicsList.hh>
#include <QGSP_BIC_HP.hh>
class PhysicsList : public QGSP_BIC_HP
  PhysicsList(G4int verbose=1): QGSP_BIC_HP(verbose){;}
  virtual ~PhysicsList() {;}
  virtual void ConstructProcess();

The application compiles properly but upon execution it gives Segmentation Fault. Can you please help me with a solution.



 Add Message Add Message
to: "Error in Implimentation of Thermal neutron crossection in Geant4"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]