#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:
- 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.
- 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 14 years ago by
Priority: | P3 → P1 |
---|---|
Severity: | normal → major |
comment:2 Changed 13 years ago by
Severity: | major → normal |
---|---|
Status: | new → assigned |
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
Severity: | normal → minor |
---|
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 13 years ago by
Milestone: | v2.0.6 → v2.0.7 |
---|
comment:5 Changed 13 years ago by
Milestone: | v2.1.0 → v2.0.7 |
---|
comment:6 Changed 13 years ago by
Priority: | P1 → P3 |
---|
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 Changed 13 years ago by
For the two problems mentioned in the initial post:
- 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.
- 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 13 years ago by
Milestone: | v2.0.7 → v2.0.8 |
---|
comment:10 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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
.
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....