Message: Re: Define different theta distributions depending on particle's position Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Define different theta distributions depending on particle's position 

Forum: Particles
Re: None Define different theta distributions depending on particle's position
Date: Jan 11, 02:49
From: michel maire <michel maire>

On Thu, 10 Jan 2019 17:03:15 GMT, Nicolas78 wrote:
> Dear all,
> 
> I'm trying to use different theta angle distributions depending on the
> particle's position.
> 
> Before, when I only needed a single theta distribution, I usually used
> the following method with GPS:
> /gps/ang/type user
> /gps/hist/type theta
> /gps/hist/point 0.0266667 0.003523
> /gps/hist/point 0.08 0.010229
> /gps/hist/point 0.133333 0.0168419
> /gps/hist/point 0.186667 0.0226432
> etc.
> 
> But now I'm trying to make a dependence between theta and particle's
> position.
> 
> For example, let's say that the theta distribution varies with the z
> position.
> I would like to set a theta histogram for several z positions e.g.
> z=1*mm, another histogram for z=2*mm, etc.
> 
> I've tried to use the G4SPSAngDistribution class in the
> PrimaryGeneratorAction with something like:
>     G4SPSAngDistribution*
> angDist=ParticleGun->GetCurrentSource()->GetAngDist();
>     angDist->SetAngDistType("user");
> 
> But I didn't manage to find a solution.
> 
> Could anyone help me ?
> 
> Thanks in advance.
> 

 I do not know if you can solve your problem with GPS, but you can sample one or several distributions directly with simple ParticleGun.
 see examples/extended/eventgenerator/particleGun : case 2

 Add Message Add Message
to: "Re: Define different theta distributions depending on particle's position"

 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 ]