Message: Simple way to print XSections when using G4NeutronHP package? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Simple way to print XSections when using G4NeutronHP package? 

Forum: Hadronic Processes
Date: 11 Mar, 2009
From: Franciole Marinho <Franciole Marinho>

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:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 3 3
Add message: (add)

1 Idea: Re: Simple way to print XSections when using G4NeutronHP package?   (Vladimir Ivanchenko - 02 Apr, 2009)
 Add Message Add Message
to: "Simple way to print XSections when using G4NeutronHP package?"

 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 ]