diff --git a/Examples/options/tut_detsim.py b/Examples/options/tut_detsim.py index 9f9b0e766006c6ff345683ee4c68fa80871f3532..2ecb5e3f6ea15ba4ce0dd5b6f8e37b33c102c1c2 100644 --- a/Examples/options/tut_detsim.py +++ b/Examples/options/tut_detsim.py @@ -59,6 +59,14 @@ from Configurables import HepMCRdr from Configurables import GenPrinter # gun = GtGunTool("GtGunTool") +# gun.Particles = ["pi+"] +# gun.Energies = [100.] # GeV + +# gun.ThetaMins = [] # rad; 45deg +# gun.ThetaMaxs = [] # rad; 45deg + +# gun.PhiMins = [] # rad; 0deg +# gun.PhiMaxs = [] # rad; 360deg stdheprdr = StdHepRdr("StdHepRdr") stdheprdr.Input = "/cefs/data/stdhep/CEPC250/2fermions/E250.Pbhabha.e0.p0.whizard195/bhabha.e0.p0.00001.stdhep" diff --git a/Generator/src/GtGunTool.cpp b/Generator/src/GtGunTool.cpp index f9d7da9cb9f132384b34e846309fb7c9616d14d0..a8f65da3863f1622f63997fef74ebc77c36c4a05 100644 --- a/Generator/src/GtGunTool.cpp +++ b/Generator/src/GtGunTool.cpp @@ -87,6 +87,7 @@ GtGunTool::mutate(MyHepMC::GenEvent& event) { mcp.setSimulatorStatus(1); // mcp.setCharge(); mcp.setTime(0.0); + mcp.setMass(mass); // mcp.setVertex(); // mcp.setEndpoint(); @@ -123,6 +124,11 @@ GtGunTool::mutate(MyHepMC::GenEvent& event) { info() << "phi is fixed: " << phimin << endmsg; } } + + debug() << "Direction: " + << " cos(theta): " << costheta + << " phi: " << phi + << endmsg; double px = p*sintheta*cos(phi); double py = p*sintheta*sin(phi);