Re: PAnyDistribution Add Multiple equation [message #14024 is a reply to message #14022] |
Sun, 30 September 2012 19:09 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to previous message](/theme/gsi/images/down.png) |
Ingo Froehlich
Messages: 167 Registered: March 2004 Location: IKF - Frankfurt
|
first-grade participant |
From: *dip.t-dialin.net
|
|
This does not work for 2 reasons: you use "beam2", which is an object, so what you practically do is to test on the existence of the particle object, and therefore the first "if" always returns true. And also, the if-statements are excluding each other: if the first condition is true, the second one will always give a negative result, and thus the last part will never be executed.
I'm not sure which observable you want to use (kinetic energy?), therefore I also cannot judge if the boost is really what you want do. I can only provide you the following template:
decay->AddEquation("beam2 = _parent->GetBeam(); if (beam2->KE() < 4.6) _f = exp( 6.9*t1 );");
decay->AddEquation("if (beam2->KE() >= 4.6) _f = exp( 8.9*t1 );");
--
Ingo Froehlich
IKF - University of Frankfurt
069-798-47027, FAX: -47024
|
|
|