ATLAS Offline Software
PlotTest.py
Go to the documentation of this file.
1 
9 
10 # plot pt of electrons.
11 # $x denotes an element of "Class#Key", if "Class#Key" is a collection
12 plot ("ElectronContainer#ElectronCollection","$x.pt()")
13 
14 # plot et of MissingET.
15 # $x denotes "Class#Key" itself, if "Class#Key" is not a vector-like class
16 plot ("MissingET#MET_Calib","$x.sumet()")
17 
18 # apply a selection criteria.
19 # Class#Key can be used in a criteria
20 plot ("ElectronContainer#ElectronCollection","$x.pt()","MissingET#MET_Calib.sumet()>100*GeV")
21 
22 # Class#Key can be used in a parameter as well
23 plot ("ElectronContainer#ElectronCollection","$x.px()+MissingET#MET_Calib.etx()")
24 
25 # access constituent object using element-link and back-navigation.
26 # egamma is retrieved from ESD and then is evaluated.
27 # Note! Currently the back-navigation cannot be used after EventSelector
28 # reaches the end of input. So set nEvent to a value less than
29 # the number of event in the input.
30 # This should be fixed in the future
31 plot ("ElectronContainer#ElectronCollection","$x.eg().e()","$x.track().pt()>10*GeV", 4)
32 
33 # arithmetic/boolean operators and math-functions can be used
34 # in the "parameter" and "criteria"
35 plot ("ElectronContainer#ElectronCollection","sqrt($x.px()**2 + $x.py()**2)","$x.pz()<10*GeV and CTP_Decision#CTP_Decision.isAccepted()==True")