Project

General

Profile

Feature #1152

Query Re: applying cuts through xboa

Added by Carlisle, Timothy over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
08 October 2012
Due date:
% Done:

100%

Estimated time:

Description

Hi Chris,

I'm trying to exclude an outlying particle at all virtual planes in order to calculate a sensible emittance. Using code lifted from xboa Example 3, I'm cutting on y using:

bunch_list[ 100].cut({'y':-300.}, operator.le)
bunch_list[ 100].cut({'y':300.}, operator.ge)

which works fine at one plane (as shown by running the plotter on the data file (both attached)). But using:

bunch_list[ 100 ].cut({'y':-300.}, operator.le, global_cut=True)
bunch_list[ 100].cut({'y':300.}, operator.ge, global_cut=True)

removes all the events, rather than simply applying to cut to all the planes...

What am I doing wrong?

Thanks,

Tim


Files

Plot.py (4.13 KB) Plot.py Carlisle, Timothy, 08 October 2012 14:24
Sim_4mm_1MeVc_108mu_1e-08nsec_IV_LH2i__RUNTEST_.root (998 KB) Sim_4mm_1MeVc_108mu_1e-08nsec_IV_LH2i__RUNTEST_.root Carlisle, Timothy, 08 October 2012 14:24
Sim_10mm_20MeVc_50mu_1e-08nsec_IV_LH2i__cutTest2_.root (469 KB) Sim_10mm_20MeVc_50mu_1e-08nsec_IV_LH2i__cutTest2_.root Carlisle, Timothy, 07 December 2012 12:34
Test_Cuts.py (1.7 KB) Test_Cuts.py Carlisle, Timothy, 07 December 2012 12:34

Also available in: Atom PDF