def make_higgs_postprocessor( analysis_name, plot_types=["TurnOn1", "TurnOn2", "EffEta", "EffPhi"], object_types=["Mu", "Ele", "Photon", "MET", "PFMET", "PFTau", "Jet"], extra_str_templates=[]): postprocessor = hltHiggsPostProcessor.clone() postprocessor.subDirs = ["HLT/Higgs/" + analysis_name] efficiency_strings = [ ] # List of plots to look for. This is quite a bit larger than the number of plots that will be made. efficiency_summary_string = "EffSummaryPaths_" + analysis_name + "_gen ' Efficiency of paths used in " + analysis_name + " ; trigger path ' SummaryPaths_" + analysis_name + "_gen_passingHLT SummaryPaths_" + analysis_name + "_gen" efficiency_strings.append(efficiency_summary_string) efficiency_strings.append( efficiency_summary_string.replace("Generated", "Reconstructed").replace( "Gen", "Reco").replace("gen", "rec")) for plot_type in plot_types: for object_type in object_types: for trigger in [ x.replace("_v", "") for x in _config.__getattribute__( analysis_name).hltPathsToCheck ]: this_efficiency_string = make_efficiency_string( object_type, plot_type, trigger) efficiency_strings.append(this_efficiency_string) efficiency_strings.append( this_efficiency_string.replace( "Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec")) for str_template in extra_str_templates: this_extra_string = str_template.replace( "@ANALYSIS@", analysis_name).replace("@TRIGGER@", trigger) efficiency_strings.append(this_extra_string) efficiency_strings.append( this_extra_string.replace("Generated", "Reconstructed").replace( "Gen", "Reco").replace( "gen", "rec")) postprocessor.efficiencyProfile = efficiency_strings return postprocessor
def make_higgs_postprocessor(analysis_name, plot_types=["TurnOn1", "TurnOn2", "EffEta", "EffPhi"], object_types=["Mu","Ele","Photon","MET","PFMET","PFTau","Jet"], extra_str_templates=[]): postprocessor = hltHiggsPostProcessor.clone() postprocessor.subDirs = ["HLT/Higgs/" + analysis_name] efficiency_strings = [] # List of plots to look for. This is quite a bit larger than the number of plots that will be made. efficiency_summary_string = "EffSummaryPaths_" + analysis_name + "_gen ' Efficiency of paths used in " + analysis_name + " ; trigger path ' SummaryPaths_" + analysis_name + "_gen_passingHLT SummaryPaths_" + analysis_name + "_gen" efficiency_strings.append(efficiency_summary_string) efficiency_strings.append(efficiency_summary_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec")) for plot_type in plot_types: for object_type in object_types: for trigger in [x.replace("_v", "") for x in _config.__getattribute__(analysis_name).hltPathsToCheck]: this_efficiency_string = make_efficiency_string(object_type, plot_type, trigger) efficiency_strings.append(this_efficiency_string) efficiency_strings.append(this_efficiency_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec")) for str_template in extra_str_templates: this_extra_string = str_template.replace("@ANALYSIS@", analysis_name).replace("@TRIGGER@", trigger) efficiency_strings.append(this_extra_string) efficiency_strings.append(this_extra_string.replace("Generated", "Reconstructed").replace("Gen", "Reco").replace("gen", "rec")) postprocessor.efficiencyProfile = efficiency_strings return postprocessor
strings.extend(reco_strings) plot_types = ["TurnOn1", "TurnOn2", "EffEta", "EffPhi"] #--- IMPORTANT: Update this collection whenever you introduce a new object # in the code (from EVTColContainer::getTypeString) obj_types = ["Mu","Ele","Photon","MET","PFTau"] #--- IMPORTANT: Trigger are extracted from the hltHiggsValidator_cfi.py module triggers = [ ] efficiency_strings = [] # Extract the triggers used in the hltHiggsValidator from HLTriggerOffline.Higgs.hltHiggsValidator_cfi import hltHiggsValidator as config triggers = set([]) for an in config.analysis: s = config.__getattribute__(an) vstr = s.__getattribute__("hltPathsToCheck") map(lambda x: triggers.add(x.replace("_v","")),vstr) triggers = list(triggers) #------------------------------------------------------------ # Generating the list with all the efficiencies for type in plot_types: for obj in obj_types: for trig in triggers: efficiency_strings.append(efficiency_string(obj,type,trig)) add_reco_strings(efficiency_strings) hltHiggsPostHTauNu = hltHiggsPostProcessor.clone() hltHiggsPostHTauNu.subDirs = ['HLT/Higgs/Htaunu']
return reco_strings plot_types = ["TurnOn1", "TurnOn2", "EffEta", "EffPhi"] #--- IMPORTANT: Update this collection whenever you introduce a new object # in the code (from EVTColContainer::getTypeString) obj_types = ["Mu", "Ele", "Photon", "MET", "PFMET", "PFTau", "Jet"] #--- IMPORTANT: Trigger are extracted from the hltHiggsValidator_cfi.py module triggers = [] efficiency_strings = [] # Extract the triggers used in the hltHiggsValidator from HLTriggerOffline.Higgs.hltHiggsValidator_cfi import hltHiggsValidator as _config triggers = set([]) for an in _config.analysis: s = _config.__getattribute__(an) vstr = s.__getattribute__("hltPathsToCheck") map(lambda x: triggers.add(x.replace("_v", "")), vstr) triggers = list(triggers) #------------------------------------------------------------ # Generating the list with all the efficiencies for type in plot_types: for obj in obj_types: for trig in triggers: efficiency_strings.append(efficiency_string(obj, type, trig)) #add the summary plots for an in _config.analysis: efficiency_strings.append("EffSummaryPaths_" + an + "_gen ' Efficiency of paths used in " + an +
return reco_strings plot_types = ["TurnOn1", "TurnOn2", "EffEta", "EffPhi"] #--- IMPORTANT: Update this collection whenever you introduce a new object # in the code (from EVTColContainer::getTypeString) obj_types = ["Mu","Ele","Photon","MET","PFMET","PFTau","Jet"] #--- IMPORTANT: Trigger are extracted from the hltHiggsValidator_cfi.py module triggers = [] efficiency_strings = [] # Extract the triggers used in the hltHiggsValidator from HLTriggerOffline.Higgs.hltHiggsValidator_cfi import hltHiggsValidator as _config triggers = set([]) for an in _config.analysis: s = _config.__getattribute__(an) vstr = s.__getattribute__("hltPathsToCheck") map(lambda x: triggers.add(x.replace("_v","")),vstr) triggers = list(triggers) #------------------------------------------------------------ # Generating the list with all the efficiencies for type in plot_types: for obj in obj_types: for trig in triggers: efficiency_strings.append(efficiency_string(obj,type,trig)) #add the summary plots efficiency_summary_strings = []
return reco_strings plot_types = ["TurnOn1", "TurnOn2", "EffEta", "EffPhi"] #--- IMPORTANT: Update this collection whenever you introduce a new object # in the code (from EVTColContainer::getTypeString) obj_types = ["Mu", "Ele", "Photon", "MET", "PFMET", "PFTau", "Jet"] #--- IMPORTANT: Trigger are extracted from the hltHiggsValidator_cfi.py module triggers = [] efficiency_strings = [] # Extract the triggers used in the hltHiggsValidator from HLTriggerOffline.Higgs.hltHiggsValidator_cfi import hltHiggsValidator as _config triggers = set([]) for an in _config.analysis: s = _config.__getattribute__(an) vstr = s.__getattribute__("hltPathsToCheck") map(lambda x: triggers.add(x.replace("_v", "")), vstr) triggers = list(triggers) #------------------------------------------------------------ # Generating the list with all the efficiencies for type in plot_types: for obj in obj_types: for trig in triggers: efficiency_strings.append(efficiency_string(obj, type, trig)) #add the summary plots for an in _config.analysis: efficiency_strings.append("EffSummaryPaths_" + an +