The source project of this merge request has been removed.
Add option for GtGunTool that can generate with costheta/sintheta distribution
Add 2 options 'UseCostheta' & 'UseSintheta' for GtGunTool, now GtGunTool can generate with costheta/sintheta distribution.
here is an example:
gun = GtGunTool("GtGunTool")
gun.Particles = ["mu-"]
gun.EnergyMins = [10] # GeV
gun.EnergyMaxs = [10.] # GeV
gun.UseCostheta = True
gun.ThetaMins = [-1]
gun.ThetaMaxs = [1]
gun.PhiMins = [0] # deg
gun.PhiMaxs = [360] # deg
'UseCostheta' & 'UseSintheta' are set to False by default. Only when 'UseCostheta' or 'UseSintheta' are manully set to True, 'ThetaMins' & 'ThetaMins' indicate the range of costheta/sintheta. Note that 'UseCostheta' & 'UseSintheta' cannot be set to true at the same time.
We simulated 50000 events with the options shows above, here is the distribution of MXParticle.momentum.z: