diff --git a/Phys/B2KShh/job/selection.py b/Phys/B2KShh/job/selection.py index 71a40db..5097133 100644 --- a/Phys/B2KShh/job/selection.py +++ b/Phys/B2KShh/job/selection.py @@ -9,11 +9,31 @@ source_path = '/disk/data3/lhcb/elena/B2KShh/ntuples/jobs/' target_path = '/disk/data3/lhcb/elena/B2KShh/ntuples/sel/' + +end2011 = 106014 # fill 2354 +endjune = 119892 # fill 2772 + sel_strings = { - 'L0' : '(L0HadronDecision_TOS || L0Global_TIS)', - 'HLT1' : 'Hlt1TrackAllL0Decision_TOS', + 'L0' : '(L0HadronDecision_TOS || L0Global_TIS)', + 'HLT1' : 'Hlt1TrackAllL0Decision_TOS', + '2011' : '(runNumber <= %s)' % end2011, + 'HLT2-2011' : '((Hlt2Topo2BodyBBDTDecision_TOS || Hlt2Topo3BodyBBDTDecision_TOS || Hlt2Topo4BodyBBDTDecision_TOS) || (Hlt2Topo2BodySimpleDecision_TOS || Hlt2Topo3BodySimpleDecision_TOS || Hlt2Topo4BodySimpleDecision_TOS))', + '2012pre-june' : '(runNumber > %s && runNumber <= %s)' % (end2011, endjune), + '2012post-june': '(runNumber > %s)' % endjune, + 'HLT2-2012' : '(Hlt2Topo2BodyBBDTDecision_TOS || Hlt2Topo3BodyBBDTDecision_TOS || Hlt2Topo4BodyBBDTDecision_TOS)', } +sel_strings['Trigger'] = ' && '.join([sel_strings['L0'], sel_strings['HLT1'], sel_strings['HLT2-2011']]) +sel_strings['Trigger'] += ' && ' +if 'MC_2011' in source: + sel_strings['Trigger'] += sel_strings['HLT2-2011'] +elif 'MC_2012' in source: + sel_strings['Trigger'] += sel_strings['HLT2-2012'] +elif not 'MC' in source: + pass +else: + raise Exception('DANGER: problem with file name parsing and trigger conditions!') + def getall(d, basepath="/"): "Generator function to recurse into a ROOT file/dir and yield (path, obj) pairs"