![]() |
|
|
Generated: 8 Jan 2009 |
00001 #--Initialize ------------------------------------------------ 00002 execfile('../options/AnalysisInit.py') 00003 #------------------------------------------------------------- 00004 00005 #------------------------------------------------------------- 00006 def electron(c): 00007 #------------------------------------------------------------- 00008 if c : return 1 00009 return 0 00010 00011 #------------------------------------------------------------- 00012 def initialize(): 00013 #------------------------------------------------------------- 00014 global h0, h1, h2 00015 try: 00016 h0 = his.histo('h0') 00017 h1 = his.histo('h1') 00018 h2 = his.histo('h2') 00019 except: 00020 h0 = his.book('h0', 'Histogram 1D for random tests', 35, -10., 10.) 00021 h1 = his.book('h1', 'Histogram 1D for tests', 20, 0., 40.) 00022 h2 = his.book('h2', 'Histogram 2D for test2', 20, 0., 40., 20, 0., 10.) 00023 00024 #------------------------------------------------------------- 00025 def execute(): 00026 #------------------------------------------------------------- 00027 global cands 00028 cands = evt['Anal/AxParticleCandidates'] 00029 00030 electrons = select(cands,electron) 00031 print 'MyTracks collection contains ' + `len(tks)` + ' tracks and ' + `len(electrons)` + ' electrons' 00032 00033 00034 #-------End of declarative part----------------------------------------------------- 00035 00036 #g.run(10) 00037 #excel.plot(h1) 00038 00039 g.run(1) 00040 sel = evt['Phys/PhysSel'] 00041 sel.decayIsInMCTree('B0PP') 00042 00043 00044 00045 00046