Message: Tracking neutrons for G4ConvergenceTester Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Tracking neutrons for G4ConvergenceTester 

Forum: Event and Track Management
Date: 07 Jul, 2015
From: Abe Handler <Abe Handler>

I am new to Geant4. I am using a modified version of extending example Hadr06. I am simulating a d-d reaction and I would like to pass the energy values of each generated neutron (that leaves the target) to the class, G4ConvergenceTester.

I've been looking at the B1Con example to see how they implement the ConvergenceTester, however I would like to pass different information to that class.

I know I need to pass a double value to the AddScore() function. The output functions ShowHistory() and ShowResults() are in the EndOfAction in the file.

The file has code that determines only the outgoing particles...

 // keep only outgoing particle
 G4StepStatus status = track->GetStep()->GetPostStepPoint()->GetStepStatus();
 if (status != fWorldBoundary) return; 

 const G4ParticleDefinition* particle = track->GetParticleDefinition();
 G4String name   = particle->GetParticleName();
 G4double energy = track->GetKineticEnergy();

This has the energy values of the neutrons I'm interested in. Is it possible to include the AddScore() function here? Or do I need to include all the G4ConvergenceTester information in one file such as

I'm confused on how to go about acquiring the neutron energy from particles that leave the target if I need to generate this in a different file such as

Any help would be greatly appreciated. Abe

 Add Message Add Message
to: "Tracking neutrons for G4ConvergenceTester"

 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 ]