Message: Set track energy to take into account quenching factor Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Set track energy to take into account quenching factor 

Forum: Event and Track Management
Date: Mar 20, 07:37
From: Alexis Brosssard <Alexis Brosssard>

Hello,

I work on simulation of neutron on neon target. I would like to include the quenching factor in my simulation. After a hadElastic interaction of a neutron with a neon nucleus, I need to modify the energy of the neon nucleus with a given formula.

I first tried in stacking action with:

G4double EnergyQuenched = 0.1784*std::pow( track->GetKineticEnergy() + 1.103 , 0.245 );

track->SetKineticEnergy(EnergyQuenched);

And I get this error:

error: no matching function for call to G4Track::SetKineticEnergy(G4double&) const

I tried in tracking action with the same two lines and got the same error.

I finally tried in stepping action with:

G4double EnergyQuenched = 0.1784*std::pow( step->GetPreStepPoint()->GetKineticEnergy() + 1.103 , 0.245 );

step->GetPreStepPoint()->SetKineticEnergy(EnergyQuenched);

It first seems to work, using the two following lines before and after the modification print two different energies with the correct values.

cout << " Pre Point Before " << step->GetPreStepPoint()->GetKineticEnergy() << endl;

cout << " Pre Point After " << step->GetPreStepPoint()->GetKineticEnergy() << endl;

But, when I finally sum the energy deposited by the different steps induced by the neon nuclei, I recovered the initial energy before the modification and not the quenched one.

So my question is, how can modify the energy of a particle when it is created? Where and when should I use SetKineticEnergy().

Best,

Alexis

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Disagree: Re: Set track energy to take into account quenching factor   (Vladimir Ivanchenko - Apr 06, 06:38)
 Add Message Add Message
to: "Set track energy to take into account quenching factor"

 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 ]