#81 closed defect (fixed)
cuts seem not to work properly in WHIZARD 2
Reported by: | Juergen Reuter | Owned by: | kilian |
---|---|---|---|
Priority: | P1 | Milestone: | |
Component: | core | Version: | 2.0.0alpha |
Severity: | blocker | Keywords: | cuts |
Cc: |
Description (last modified by )
all M < -10 GeV [incoming e1:E1, A]
and
all M2 < -(10 GeV)^2 [incoming e1:E1, A]
yield for the process e1, E1 -> e2, E2, A
completely different results!!!
It seems that WHIZARD is not correctly parsing the input:
-(10 GeV)^2
seems to be understood as -10 GeV^2
.
In trying to emulate the standard cuts (cf. Ticket#82) for this process as in W1, I do not get the same result as with W1.
Change History (5)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:3 Changed 14 years ago by
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This file now yields the desired result, i.e., two identical runs:
process eea = e1, E1 -> e2, E2, A compile sqrts = 500 GeV iterations = 3:10000, 3:10000 integrate (eea) { cuts = all M < -10 GeV [incoming e1:E1, A] and all M > 10 GeV [e2:E2, A] seed = 0 } integrate (eea) { cuts = all M2 < - (10 GeV)^2 [incoming e1:E1, A] and all M2 > 100 GeV^2 [e2:E2, A] seed = 0 }
In Changeset [1289], the handling of minus signs in expressions was fixed. I also added the possibility to build (constant) powers of physical units (integer or fractional, positive or negative).
Note: See
TracTickets for help on using
tickets.
Well, it is more subtle. The following are equivalent:
Note the special unit
GeV2
These following three are also equivalent to each other, but different to the above, i.e., the sign is absorbed:
The minus sign has a higher precedence than the power. This holds regardless whether the number with unit is in parantheses. The problem lies in the fact that the minus sign is not tokenized together with the number, but it is a separate syntax element.
The unit is currently treated as part of the number (so
1 GeV
andx * 1 GeV
are ok, butx GeV
is not, neither isx * GeV
).A possible extension of the syntax that resolves part of this is to apply a power such as
GeV^2
directly to the unit, instead of the number times unit. This would remove the need for extra units likeGeV2
. I did introduceifb
meaningfb^-1
; we could allow the latter and removeifb
, or should it rather befb^(-1)
?