| Message: Simple way to print XSections when using G4NeutronHP package? | Not Logged In (login) |
|
Hi,
I was wondering if there is a way to plot cross sections as function of energy for neutron capture process. I want to use some calculations to cross check with my results obtained with the simulation. I tried the following in my physics list:
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if( particle->GetParticleName() == "neutron" ) {
// elastic and inelastic scattering stuff ...
//Hadron capture stuff
G4HadronCaptureProcess* NeutronCapture = new G4HadronCaptureProcess();
G4NeutronHPCaptureData* HPCaptureData = new G4NeutronHPCaptureData();
G4NeutronHPorLCapture* NeutronCapModel = new G4NeutronHPorLCapture(); NeutronCapture->AddDataSet(NeutronCapModel->GiveXSectionDataSet());
NeutronCapture->AddDataSet(HPCaptureData); NeutronCapture->RegisterMe(NeutronCapModel);
pmanager->AddDiscreteProcess(NeutronCapture);
G4Element* Gold =
new G4Element("Gold","Au", 79.,196.97*g/mole);
G4ThreeVector t3_vec = G4ThreeVector(0.0, 0.0, 1.0*eV);
G4DynamicParticle* my_part = new G4DynamicParticle(particle,t3_vec);
double csec = (NeutronCapModel->GiveXSectionDataSet())->GetCrossSection(my_part,Gold,27.0);
...more stuff
}
}
but I keep getting segmentation as it crashes at the line:
G4Element* Gold =
new G4Element("Gold","Au", 79.,196.97*g/mole);
Don't know why it does not allow me to have the G4Element object in the physics list. So... any other suggestions? cheers, Franciole PS I would like to do the same with the other HP processes too. :-)
|
| Inline Depth: | Outline Depth: | Add message: |
|
to: |