whizard is hosted by Hepforge, IPPP Durham

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#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 kilian)

  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 Juergen Reuter

Description: modified (diff)

comment:2 Changed 14 years ago by kilian

Description: modified (diff)
Status: newassigned

comment:3 Changed 14 years ago by kilian

Well, it is more subtle. The following are equivalent:

  all M < - 10 GeV [incoming e1:E1, A]
  all M2 < -((10 GeV)^2) [incoming e1:E1, A]
  all M2 < -(10 GeV^2) [incoming e1:E1, A]
  all M2 < -(100 GeV2) [incoming e1:E1, A]
  all M2 < -100 GeV2 [incoming e1:E1, A]

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:

  all M2 < -(10 GeV)^2 [incoming e1:E1, A]
  all M2 < (-10 GeV)^2 [incoming e1:E1, A]
  all M2 < -10 GeV^2 [incoming e1:E1, A]

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 and x * 1 GeV are ok, but x GeV is not, neither is x * 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 like GeV2. I did introduce ifb meaning fb^-1; we could allow the latter and remove ifb, or should it rather be fb^(-1)?

comment:4 Changed 14 years ago by kilian

Resolution: fixed
Status: assignedclosed

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).

comment:5 Changed 14 years ago by Juergen Reuter

Milestone: v2.0-beta

Milestone v2.0-beta deleted

Note: See TracTickets for help on using tickets.