Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This add a requirement of a minimal X-ray intensity to a bucket of events called "on". Should the Selection "on" not exist yet, it will be created. 
You can then specify "applyCutsuseFilter=<selectionName>" for both plotVar and plotScan and only events passing the requirements will be used. This is illustrated here:
Code Block
SDana In [10]: ana.addCut('lightStatus/xray',0.5,1.5,'on') 
SDana In [11]: ana.addCut('lightStatus/laser',0.5,1.5,'on')
SDana In [12]: ana.addCut('ipm2/sum',0.05,10.,'on') 
SDana In [13]: ana.addCut('tt/FLTPOSFWHM',90.,120.,'on') 
SDana In [14]: ana.printCuts('on')
Cut 0: 0.500000 < lightStatus/xray < 1.500000
Cut 1: 0.500000 < lightStatus/laser < 1.500000
Cut 2: 0.050000 < ipm2/sum < 10.000000
Cut 3: 90.000000 < tt/FLTPOSFWHM < 120.000000 
SDana In [15]: fig = plt.figure(figsize=(8,5)) 
SDana In [16]: pos = ana.plotVar('ipm3/sum',fig=fig)
plot tt/FLTPOS from 0 to 722.58 
SDana In [17]: posCut = ana.plotVar('ipm3/sum',fig=fig,applyCutsuseFilter='on')
plot tt/FLTPOS from 291.069 to 505.09