whizard is hosted by Hepforge, IPPP Durham

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#431 closed feature_request (fixed)

Implement nullary observables

Reported by: sschmidt Owned by: kilian
Priority: P2 Milestone:
Component: core Version: 2.0.5
Severity: minor Keywords:
Cc:

Description

Up to now, all observables are unary or binary. Implementing nullary observables can be useful in two ways:

  1. to provide event-wide observables, the most prominent being shat in hadron collisions. (This could also be implemented using a subevent-ary observable, #430)Implementing cuts on shat is very tedious. Take the process
    g g -> b b bbar bbar
    

as an example.

  1. to provide bookkeeping information, for example the process name, making input-files like
    process p1 = <some signal process>
    process p2 = <some background process>
    
    analysis = record signal_dist ( ... [select if Process == p1])
          and background_dist ( ... [select if Process == p2])
    
    simulate(p1,p2)
    

The latter could also be achieved by using different simulate commands and doing the analysis separately. Implementing the first would make some things very much easier.

Change History (11)

comment:1 Changed 13 years ago by Juergen Reuter

Priority: P3P1
Severity: normalmajor

This is a SINDARIN construct that needs to be documented etc. and affects directly the way the user steers WHIZARD. This should be done very quickly....

comment:2 Changed 13 years ago by kilian

Severity: majornormal
Status: newassigned

I'm implementing user-defined event-shape functions (cf. #429). Event shapes are not uniquely defined, so I haven't yet implemented them natively in Sindarin. We should discuss further.

comment:3 Changed 13 years ago by kilian

Severity: normalminor

Oops, the last comment should go to #430.

Regarding 'nullary' observables (in fact, just variables that vary event by event), there are already some: event_index, sqme, ...

It looks like sqrts is not among them. It can be computed as

   eval M [collect [particle]]

but I might add it to the list nevertheless. The process name could be included, when available.

comment:4 Changed 12 years ago by Juergen Reuter

Milestone: v2.0.6v2.0.7

comment:5 Changed 12 years ago by Juergen Reuter

Milestone: v2.1.0v2.0.7

comment:6 Changed 12 years ago by kilian

Priority: P1P3

As said above, there is a list of 'nullary' observables (actually event-specific variables), since some time already. Here they are:

event_index, process_index, process_num_id event_weight, event_excess_weight, event_sqme, event_sqme_ref,

I'd like to know what you would like to have in addition ...?

So far, I do S&P's and rate this down somewhat ...

comment:7 in reply to:  description Changed 12 years ago by sschmidt

For the two problems mentioned in the initial post:

  1. A cut on shat can be defined using the
    eval M [collect [particle]]
    

construct. I don't know if the average user will figure that out (Dirk, Juergen and I didn't). To me it seems reasonable to add a "shat" observable to make it easier.

  1. Separating signal from background events can be achieved using a construct like
    analysis = if process_index == 1 then
            record signal_distribution ( ... )
            endif; if process_index == 2 then
            record background_distribution ( ... )
            endif;
    

However process_index is not mentioned in the manual.

So I'd find it desirable to do:

  • implement "shat" to make cutting on shat easier
  • mention in the manual that the event_vars can be used during simulation
  • maybe implement another event_vars member like process_name that gives the name assigned in the process declaration to make the selection more readable:
    process signal = ... => ...
    process background = ... => ...
    ...
    analysis = if process_name == "signal" then
            record signal_distribution ( ... )
            endif; if process_name == "background" then
            record background_distribution ( ... )
            endif;
    

comment:8 Changed 12 years ago by Juergen Reuter

Milestone: v2.0.7v2.0.8

comment:9 Changed 12 years ago by Juergen Reuter

Priority: P3P2

Along the lines of #430...

comment:10 Changed 12 years ago by kilian

Resolution: fixed
Status: assignedclosed

done in r3760. The variables available in cut and analysis expressions are documented in the updated manual.

Since some of the variables have to be stored in the raw event files, I had to extend the raw event file format. This is reflected in a file format version that is checked when reading. For a compatibility mode, one may use $event_file_version.

comment:11 Changed 12 years ago by Juergen Reuter

Milestone: v2.0.8

Milestone v2.0.8 deleted

Note: See TracTickets for help on using tickets.