Set energy 0 in a sum

I am not sure I understand what you would like to get exactly. I just showed the working syntax. Now you should use and set the cut in the appropriate way to perform the selection you need.

Hi @couet, I mean:
If plot whitout cut3sub and cut3sub2 conditions I get 1899 events.
Plotting with cut3sub and cut3sub2 conditions I get only 12 events.

I need that ROOT doesn’t delete the events but sets energy=0 for all not fullfilling events. Then I must have 1899 events, not just 12…
By using your code I get only 12 events…

That’s the principle of a a selection. When you apply cuts you get less events.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

I see you open an other post. with the question 'is there a way to do what i need to"… can you be more clear ?