From 42516b6eb0d6375999a4ea3e30793843a4b7bdab Mon Sep 17 00:00:00 2001 From: lintao <lintao51@gmail.com> Date: Sun, 10 Nov 2019 23:11:33 +0800 Subject: [PATCH] WIP: add the debug info. --- Examples/options/tut_detsim.py | 8 ++++++++ Generator/src/GtGunTool.cpp | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/Examples/options/tut_detsim.py b/Examples/options/tut_detsim.py index 9f9b0e76..2ecb5e3f 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 f9d7da9c..a8f65da3 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); -- GitLab