Message: Re: Total Energy Deposition Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Total Energy Deposition 

Forum: Hadronic Processes
Re: Question Total Energy Deposition (Aliyu Bala)
Date: Mar 14, 09:02
From: michel maire <michel maire>

On Thu, 14 Mar 2019 12:21:45 GMT, Aliyu Bala wrote:
> Hi Geant4 experts,
> 
> I'm new to geant4 and need help with problem getting the total energy
> deposited in my detector.
> 
> I have a thermal neutron interacting with Li6 to produce an alpha and a
> triton. In my steppingAction I have the below instruction:
> 
>  if (currentVolumeName == "NeutronDetector1")
>    {
>      eDep2 = step->GetTotalEnergyDeposit();
>      if (eDep2 > 0.)
>      {
>        eventAction->AddEdepInStep2(eDep2);
>      }
>    }
> 
> I fill my histogram in EventAction as shown below:
> 
> void EventAction::AddEdepInStep2(G4double eDep2) 
>   {
>   TotalEnergyDeposit2+=eDep2;
>   analysisManager->FillH1(1,eDep2);
>   }
> 
> I got two peaks corresponding to the alpha and triton respectively. I
> was actually expecting a single peak corresponding to the Q-value of the
> reaction, but am getting two peaks. What have done wrong please?
> 
> Thank you Aliyu
> 

 You must plot not eDep2, but TotalEnergyDeposit2; and only at EndOfEventAction.
 See example Hadr06

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

1 None: Re: Total Energy Deposition   (Aliyu Bala - Mar 15, 03:56)
 Add Message Add Message
to: "Re: Total Energy Deposition"

 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 ]