Message: Re: ParticleGun Set energy spectrum Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: ParticleGun Set energy spectrum 

Forum: Particles
Re: None ParticleGun Set energy spectrum
Date: 25 Mar, 2016
From: michel maire <michel maire>

On Fri, 25 Mar 2016 13:33:51 GMT, Nicolas78 wrote:
> Hi everyone,
> 
> I'd like to know how to set an energy spectrum without using GPS(for
> some reasons) but with the particleGun. Indeed, I have a data file with
> the energy distribution and I want to implement it in my
> primarygeneratoraction. I've tried the example
> eventgenerator/particlegun/run2.mac but it doesn't give a complete
> spectrum (it's not doing the interpolation like in GPS/inter/Lin).

   Yes, it does.
   As written in PrimaryGeneratorAction2, it performs  linear interpolations between the 16 values of the function.
  What you see is the binning effect of the histo (you can refine it ...)

> 
> To recap, is it possible to do the following GPS commands with
> particleGun ? /gps/ene/type Arb /gps/hist/type arb /gps/hist/file ...
> /gps/hist/inter Lin
> 
> Thanks in advance,
> 
> Nicolas
> 

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

1 None: Re: ParticleGun Set energy spectrum   (Nicolas78 - 25 Mar, 2016)
 Add Message Add Message
to: "Re: ParticleGun Set energy spectrum"

 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 ]