root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.54k stars 1.24k forks source link

[ROOT-5105] More / alternative cut expressions in TTreeViewer #14563

Open vepadulano opened 5 months ago

vepadulano commented 5 months ago

Feature description

From https://its.cern.ch/jira/browse/ROOT-5105

Hi,

TTreeViewer has one cut variable (the pair of scissors). I have received a users request by robin.glattauer@oeaw.ac.at about being able to define more cuts, such that they can be compared more easily.

Could this be implemented?

Cheers, Axel.

Alternatives considered

No response

Additional context

No response

ferdymercury commented 5 months ago

I don't understand this issue. One can define several cutting expressions "E" and drag them alternatively to the "Scissors" variable to compare them consecutively. If needed, using the "SAME" option for overlaying.

dpiparo commented 4 months ago

@bellenot : if @ferdymercury is right, I would be inclined to close this issue as this is an interesting one, but "clarified" (in the JIRA sense). What do you think?

bellenot commented 4 months ago

I think he's right, but let's ask @agheata, the original author of TTreeViewer

ferdymercury commented 4 months ago

I checked again.

So you can seamlessly define several "cut expressions". When doing that, it automatically changes the icon from "E" to a yello-green condition icon.

image

Then, you can either drag-drop cond1 or cond2 to the scissors. Or you can double click on the scissors, and write more complex operations such as: (~cond1) && (~cond2), or (~cond1) || !(~cond2). Parenthesis are important!!

If you draw one after the other, or call new TCanvas, you can easily compare them.

The only thing that really does not work is the option "same". So you cannot compare them on the same canvas.

So, I believe that two tasks are required here: