diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.cxx b/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.cxx index 08da67487aebe7440c4d0a584bf71393b9ece434..f2fc907f9707f5d03045480faaf70939f79b7308 100644 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.cxx @@ -18,6 +18,9 @@ TrigComboHypoTool::TrigComboHypoTool(const std::string& type, StatusCode TrigComboHypoTool::initialize() { ATH_MSG_DEBUG("AcceptAll = " << m_acceptAll ); + ATH_MSG_DEBUG("Variable = " << m_varTag ); + ATH_MSG_DEBUG("UseCut min = " << m_useMin ); + ATH_MSG_DEBUG("UseCut max = " << m_useMax ); ATH_MSG_DEBUG("varCut min = " << m_varMin ); ATH_MSG_DEBUG("varCut max = " << m_varMax ); ATH_MSG_DEBUG("LegA = " << m_legA ); @@ -36,6 +39,11 @@ StatusCode TrigComboHypoTool::initialize() ATH_MSG_ERROR("Index for legB not set! legB = "<<m_legB); return StatusCode::FAILURE; } + if ((!m_useMin) && (!m_useMax)){ + ATH_MSG_ERROR("Trying to configure the Tool without setting UseMin and UseMax!"); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Initialization completed successfully"); @@ -84,7 +92,7 @@ bool TrigComboHypoTool::executeAlg(std::vector<LegDecision> &combination) const float value(-9999.); //should we make a switch? (if this list of observables is used only here probably not...) - std::array<std::string, 2> valid_varTags = {"dR","mass"}; + std::array<std::string, 2> valid_varTags = {"dR","invm"}; if(m_varTag == valid_varTags[0]) { value = hlv1.DeltaR(hlv2); }else if (m_varTag == valid_varTags[1]){ @@ -98,14 +106,31 @@ bool TrigComboHypoTool::executeAlg(std::vector<LegDecision> &combination) const ATH_MSG_DEBUG("Found a combination with " << varOfProcessed); - if (varOfProcessed < m_varMin || varOfProcessed > m_varMax){ - ATH_MSG_DEBUG("Combination failed var cut: "<< m_varTag <<"= "<< varOfProcessed << " not in [" << m_varMin << "," << m_varMax << "]"); - pass=false; - }else{ - varOfAccepted = value; - ATH_MSG_DEBUG( m_varTag <<"= "<< varOfAccepted << " is within [" <<m_varMin<< "," << m_varMax << "] This selection passed! "); + if (m_useMin && m_useMax){ + if (varOfProcessed < m_varMin || varOfProcessed > m_varMax){ + ATH_MSG_DEBUG("Combination failed var cut: "<< m_varTag <<"= "<< varOfProcessed << " not in [" << m_varMin << "," << m_varMax << "]"); + pass=false; + }else{ + varOfAccepted = value; + ATH_MSG_DEBUG( m_varTag <<"= "<< varOfAccepted << " is within [" <<m_varMin<< "," << m_varMax << "] This selection passed! "); + } + }else if (m_useMin){ + if (varOfProcessed < m_varMin ){ + ATH_MSG_DEBUG("Combination failed var cut: "<< m_varTag <<"= "<< varOfProcessed << " not > " << m_varMin); + pass=false; + }else{ + varOfAccepted = value; + ATH_MSG_DEBUG( m_varTag <<"= "<< varOfAccepted << " < " <<m_varMin << " This selection passed! "); + } + }else if (m_useMax){ + if (varOfProcessed > m_varMax){ + ATH_MSG_DEBUG("Combination failed var cut: "<< m_varTag <<"= "<< varOfProcessed << " not < " << m_varMax); + pass=false; + }else{ + varOfAccepted = value; + ATH_MSG_DEBUG( m_varTag <<"= "<< varOfAccepted << " > " << m_varMax << " This selection passed! "); + } } - return pass; } diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.h b/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.h index 66b5535bde58a3cba02d54f7f4e93266c220ae42..937ca54f9c668a441782bcfeff932ba4451faf9e 100644 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.h +++ b/Trigger/TrigHypothesis/TrigHypoCommonTools/src/TrigComboHypoTool.h @@ -46,14 +46,16 @@ class TrigComboHypoTool: public ComboHypoToolBase { // flags Gaudi::Property< bool > m_acceptAll {this, "AcceptAll", false, "Ignore selection" }; Gaudi::Property<std::string> m_varTag {this, "Variable" , "", "Variable to cut on"}; + Gaudi::Property< bool > m_useMin {this, "UseMin" , false, "Apply min_cut" }; + Gaudi::Property< bool > m_useMax {this, "UseMax" , false, "Apply max_cut" }; //legs Gaudi::Property<int> m_legA {this, "LegA" , -1, "First Leg"}; Gaudi::Property<int> m_legB {this, "LegB" , -1, "Second Leg"}; // cuts - Gaudi::Property<float> m_varMin {this,"LowerCut", 0.3, "Lower cut for legs pair"}; - Gaudi::Property<float> m_varMax {this,"UpperCut", 10.0, "Upper cut for legs pair"}; + Gaudi::Property<float> m_varMin {this,"LowerCut", -9999., "Lower cut for legs pair"}; + Gaudi::Property<float> m_varMax {this,"UpperCut", -9999., "Upper cut for legs pair"}; // monitoring ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "", "Monitoring tool" }; diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref index 2f3fbf74f95966fef0c0dd37f070a256de31299b..c038af233a749a40c2ecd5d765780e6b672175be 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref @@ -968,7 +968,7 @@ HLT_e17_lhloose_mu14_L1EM15VH_MU10: 6: 2 7: 2 8: 2 -HLT_e17_lhmedium_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1EM15VHI_2TAU12IM_4J12: +HLT_e17_lhmedium_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRAB_L1EM15VHI_2TAU12IM_4J12: eventCount: 2 stepCounts: 0: 3 @@ -1128,7 +1128,7 @@ HLT_e24_lhmedium_g25_medium_L12EM20VH: eventCount: 0 stepFeatures: 0: 3 -HLT_e24_lhmedium_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1EM22VHI: +HLT_e24_lhmedium_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRAB_L1EM22VHI: eventCount: 3 stepCounts: 0: 5 @@ -3161,7 +3161,7 @@ HLT_mu14_L1MU10: 1: 8 2: 8 3: 8 -HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU10_TAU12IM_3J12: +HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRAB_L1MU10_TAU12IM_3J12: eventCount: 1 stepCounts: 0: 6 @@ -3185,7 +3185,7 @@ HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU10_TAU12I 7: 1 8: 1 9: 1 -HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU10_TAU20IM: +HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_03dRAB_L1MU10_TAU20IM: eventCount: 1 stepCounts: 0: 5 @@ -3247,7 +3247,7 @@ HLT_mu20_2mu4noL1_L1MU20: 3: 7 4: 2 5: 2 -HLT_mu20_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU20: +HLT_mu20_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRAB_L1MU20: eventCount: 3 stepCounts: 0: 7 @@ -4334,30 +4334,30 @@ HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM: 2: 8 3: 8 4: 4 -HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1TAU20IM_2TAU12IM_4J12p0ETA25: +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I-J25: eventCount: 0 stepCounts: - 0: 5 - 1: 2 + 0: 6 + 1: 3 2: 2 3: 2 stepFeatures: - 0: 25 - 1: 14 - 2: 8 + 0: 29 + 1: 18 + 2: 10 3: 8 4: 2 -HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRleg000leg00130_L1DR-TAU20ITAU12I-J25: +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM_4J12p0ETA25: eventCount: 0 stepCounts: - 0: 6 - 1: 3 + 0: 5 + 1: 2 2: 2 3: 2 stepFeatures: - 0: 29 - 1: 18 - 2: 10 + 0: 25 + 1: 14 + 2: 8 3: 8 4: 2 HLT_tau35_perf_track_L1TAU12IM: @@ -4475,14 +4475,14 @@ HLT_tau60_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1TAU40_2T 0: 12 1: 7 2: 2 -HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRleg000leg00130_L1TAU60_DR-TAU20ITAU12I: +HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB30_L1TAU60_DR-TAU20ITAU12I: eventCount: 0 stepCounts: 0: 2 stepFeatures: 0: 11 1: 3 -HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1TAU60_2TAU40: +HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRAB_L1TAU60_2TAU40: eventCount: 0 stepCounts: 0: 2 diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref index d786796f6a69385dfeaf076ed2981ec0c2b356e1..3331b1978c5c7c17a7a5e5db9de03e6972aabd15 100644 --- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref +++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref @@ -601,7 +601,7 @@ HLT_e14_lhtight_noringer_e4_etcut_Jpsiee_L1JPSI-1M5-EM12: 0: 47 HLT_e17_lhloose_mu14_L1EM15VH_MU10: eventCount: 0 -HLT_e17_lhmedium_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1EM15VHI_2TAU12IM_4J12: +HLT_e17_lhmedium_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRAB_L1EM15VHI_2TAU12IM_4J12: eventCount: 0 HLT_e17_lhmedium_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1EM15VHI_2TAU12IM_XE35: eventCount: 0 @@ -629,7 +629,7 @@ HLT_e24_lhmedium_2g12_loose_L1EM20VH_3EM10VH: eventCount: 0 HLT_e24_lhmedium_g25_medium_L12EM20VH: eventCount: 0 -HLT_e24_lhmedium_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1EM22VHI: +HLT_e24_lhmedium_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRAB_L1EM22VHI: eventCount: 0 HLT_e24_lhmedium_mu8noL1_L1EM22VHI: eventCount: 0 @@ -1837,11 +1837,11 @@ HLT_mu14_L1MU10: stepFeatures: 0: 1 1: 1 -HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU10_TAU12IM_3J12: +HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRAB_L1MU10_TAU12IM_3J12: eventCount: 0 stepFeatures: 0: 1 -HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU10_TAU20IM: +HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_03dRAB_L1MU10_TAU20IM: eventCount: 0 stepFeatures: 0: 1 @@ -1857,7 +1857,7 @@ HLT_mu20_2mu4noL1_L1MU20: stepFeatures: 0: 1 1: 1 -HLT_mu20_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU20: +HLT_mu20_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRAB_L1MU20: eventCount: 0 stepFeatures: 0: 1 @@ -2774,14 +2774,14 @@ HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM: 2: 2 3: 2 4: 1 -HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1TAU20IM_2TAU12IM_4J12p0ETA25: +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I-J25: eventCount: 0 stepCounts: 0: 1 stepFeatures: 0: 8 1: 2 -HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRleg000leg00130_L1DR-TAU20ITAU12I-J25: +HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM_4J12p0ETA25: eventCount: 0 stepCounts: 0: 1 @@ -2898,11 +2898,11 @@ HLT_tau60_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1TAU40_2T eventCount: 0 stepFeatures: 0: 4 -HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRleg000leg00130_L1TAU60_DR-TAU20ITAU12I: +HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB30_L1TAU60_DR-TAU20ITAU12I: eventCount: 0 stepFeatures: 0: 4 -HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1TAU60_2TAU40: +HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRAB_L1TAU60_2TAU40: eventCount: 0 HLT_timeburner_L1All: eventCount: 0 diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Combined/GenerateCombinedChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Combined/GenerateCombinedChainDefs.py index e48672810e319a27eaf05ee5e63f10c4a05900ce..baad1fd2a9c65668a7bf4a73366bf62917eb4991 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Combined/GenerateCombinedChainDefs.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Combined/GenerateCombinedChainDefs.py @@ -25,14 +25,14 @@ def addTopoInfo(theChainConfig, chainDict, listOfChainDefs, lengthOfChainConfigs comboTools = [] for topoInfo in theTopoInfo: - if "dR" in topoInfo: # I think we don't need this anymore, - # because TrigComboHypoToolFromDict checks - # if the observable is present in the dict of the allowed ones - log.debug("[addTopoInfo] topoInfo being added is %s", topoInfo) - comboTools += [TrigComboHypoToolFromDict] - else: - log.error("[addTopoInfo] does not yet know what to do with topo %s",theTopoInfo) - raise Exception("[addTopoInfo] cannot proceed, exiting.") + # if "dR" in topoInfo : # I think we don't need this anymore, + # # because TrigComboHypoToolFromDict checks + # # if the observable is present in the dict of the allowed ones + log.debug("[addTopoInfo] topoInfo being added is %s", topoInfo) + comboTools += [TrigComboHypoToolFromDict] + # else: + # log.error("[addTopoInfo] does not yet know what to do with topo %s",theTopoInfo) + # raise Exception("[addTopoInfo] cannot proceed, exiting.") for comboTool in comboTools: theChainConfig.steps[-1].addComboHypoTools(comboTool) @@ -55,63 +55,94 @@ def TrigComboHypoToolFromDict(chainDict): #here we need to decompress the name to get: variable_name, min, max log.debug("[TrigComboHypoToolFromDict] new combo hypo name: %s, topoInfo = %s", name, topoInfo) - #get the min and max values - import re - legs = re.findall("leg"+r"\d{3}", topoInfo) - if len(legs)!=2: - log.error("[TrigComboHypoToolFromDict] N_legs = %d", len(legs)) - raise Exception("[TrigComboHypoToolFromDict] Number of legs is different from 2") - #now extract the legIDs - legA = int(re.findall(r"\d+", legs[0])[0]) - legB = int(re.findall(r"\d+", legs[1])[0]) - - #now remove the legs from the chain name - l_name = topoInfo - for l in legs: - l_name = l_name.replace(l, '') - #get the cut values - limits = re.findall(r"\d+", l_name) - if len(limits)!=2: - log.error("[TrigComboHypoToolFromDict] unable to get min and max values. N_limits = %d", len(limits)) - raise Exception("[TrigComboHypoToolFromDict] cannot set limits") - cut_min = float(limits[0])/10. - cut_max = float(limits[1])/10. - allowed_obs = { 'dR' : { 'hist_nbins' : 50, 'hist_min' : 0., 'hist_max' : 5. }, - 'mass' : { + 'invm' : { 'hist_nbins' : 100, 'hist_min' : 0., 'hist_max' : 1000. } } - var_to_use = 'undef' - for v in allowed_obs: - if v in topoInfo: - if var_to_use == 'undef': - var_to_use = v - else: - log.error("[TrigComboHypoToolFromDict] attempt to use multiple observables: %s, %s", var_to_use, v) - raise Exception("[TrigComboHypoToolFromDict] attempt to use multiple observables.") - if var_to_use == 'undef': - log.error("[TrigComboHypoToolFromDict] didn't find any observable to use in chainName: %s", name) - raise Exception("[TrigComboHypoToolFromDict] missing observable tag in the chainName") - #we probably need a sequence of if to set up properly the histograms for the different cases? + import re + # get the variable + obs_to_use = [] + for obs in allowed_obs.keys(): + if obs in topoInfo: + obs_to_use.append(obs) + if len(obs_to_use)!=1: + log.error("[TrigComboHypoToolFromDict] N of vars found in he hypo name = %d in chain name %s", len(obs_to_use), name) + raise Exception("[TrigComboHypoToolFromDict] N of vars found in the hypo name is different from 1") + + #get the limits + l_min = re.findall(r"\d+"+obs_to_use[0], topoInfo) + if len(l_min)==1: + l_min[0] = l_min[0].replace(obs_to_use[0],"") + cut_min = float(l_min[0])/10. + if len(l_min)>1: + log.error("[TrigComboHypoToolFromDict] unable to get min value: N min = %d, l_min = %d", len(l_min), l_min) + raise Exception("[TrigComboHypoToolFromDict] cannot set min value") + + if len(l_min)==1:#remove the min value from the string name + l_max = re.findall(r"\d+", topoInfo.replace(l_min[0],"")) + else:#no min value was found + l_max = re.findall(r"\d+", topoInfo) + if len(l_max)>1: + log.error("[TrigComboHypoToolFromDict] unable to get max value: N max = %d, l_max = %d", len(l_max), l_max) + raise Exception("[TrigComboHypoToolFromDict] cannot set max value") + if len(l_max)==1: + cut_max = float(l_max[0])/10. + + #get the legs + l_names = topoInfo.replace(obs_to_use[0], "") + if len(l_min)>0: + l_names = l_names.replace(l_min[0], "") + if len(l_max)>0: + l_names = l_names.replace(l_max[0], "") + + if len(l_names)!=2: + log.error("[TrigComboHypoToolFromDict] N_legs = %d, legs_name = %s", len(l_names), l_names) + raise Exception("[TrigComboHypoToolFromDict] Number of legs is different from 2") + + legIndexes="ABCDEF" + legA = -1 + legB = -1 + for i in range(len(legIndexes)): + if legIndexes[i] == l_names[0]: + legA = i + elif legIndexes[i] == l_names[1]: + legB = i + if legA<0 or legB<0: + log.error("[TrigComboHypoToolFromDict] Didn't find leg indexes in %s", l_names) + raise Exception("[TrigComboHypoToolFromDict] Didn't find leg indexes") + monTool = GenericMonitoringTool("MonTool_"+name) - monTool.Histograms = [defineHistogram(var_to_use+'OfAccepted', type='TH1F', path='EXPERT', title=var_to_use+" in accepted combinations [MeV]", xbins=allowed_obs[var_to_use]['hist_nbins'], xmin=allowed_obs[var_to_use]['hist_min'], xmax=allowed_obs[var_to_use]['hist_max'])] - monTool.Histograms = [defineHistogram(var_to_use+'OfProcessed', type='TH1F', path='EXPERT', title=var_to_use+" in accepted combinations [MeV]", xbins=allowed_obs[var_to_use]['hist_nbins'], xmin=allowed_obs[var_to_use]['hist_min'], xmax=allowed_obs[var_to_use]['hist_max'])] + monTool.Histograms = [defineHistogram(obs_to_use[0]+'OfAccepted', type='TH1F', path='EXPERT', title=obs_to_use[0]+" in accepted combinations [MeV]", xbins=allowed_obs[obs_to_use[0]]['hist_nbins'], xmin=allowed_obs[obs_to_use[0]]['hist_min'], xmax=allowed_obs[obs_to_use[0]]['hist_max'])] + monTool.Histograms = [defineHistogram(obs_to_use[0]+'OfProcessed', type='TH1F', path='EXPERT', title=obs_to_use[0]+" in accepted combinations [MeV]", xbins=allowed_obs[obs_to_use[0]]['hist_nbins'], xmin=allowed_obs[obs_to_use[0]]['hist_min'], xmax=allowed_obs[obs_to_use[0]]['hist_max'])] tool= TrigComboHypoTool(name) - tool.Variable = var_to_use + tool.Variable = obs_to_use[0] tool.LegA = legA tool.LegB = legB - tool.LowerCut = cut_min - tool.UpperCut = cut_max - monTool.HistPath = 'ComboHypo/'+tool.getName() #FIXME! I'm not entrely sure how to set this path + if len(l_min)==1: + tool.UseMin = True + tool.LowerCut = cut_min + if len(l_max)==1: + tool.UseMax = True + tool.UpperCut = cut_max + monTool.HistPath = 'ComboHypo/'+tool.getName() tool.MonTool = monTool + #some debug info log.debug("[TrigComboHypoToolFromDict] tool configured for hypo name: %s, topoInfo = %s", name, topoInfo) + log.debug("[TrigComboHypoToolFromDict] var = %s", obs_to_use[0]) + log.debug("[TrigComboHypoToolFromDict] legA = %d", legA) + log.debug("[TrigComboHypoToolFromDict] legB = %d", legB) + if len(l_min)==1: + log.debug("[TrigComboHypoToolFromDict] min = %d", cut_min) + if len(l_max)==1: + log.debug("[TrigComboHypoToolFromDict] max = %d", cut_max) + return tool diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 20e2ce80a08c6be742e92a48f715d33f5ce399db..f2b6e583464b61f8305bd2ca1834a1b01818bb59 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -570,12 +570,12 @@ def setupMenu(): # ATR-21797 # the following 3 chains were in serial mode in Run-2 - ChainProp(name="HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1TAU60_2TAU40", l1SeedThresholds=['TAU60','TAU40'], groups=PrimaryLegGroup+MultiTauGroup), - ChainProp(name="HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRleg000leg00130_L1TAU60_DR-TAU20ITAU12I",l1SeedThresholds=['TAU60','TAU12IM'], groups=PrimaryLegGroup+MultiTauGroup), - ChainProp(name="HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRleg000leg00130_L1DR-TAU20ITAU12I-J25", l1SeedThresholds=['TAU20IM','TAU12IM'], groups=PrimaryLegGroup+MultiTauGroup), + ChainProp(name="HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRAB_L1TAU60_2TAU40", l1SeedThresholds=['TAU60','TAU40'], groups=PrimaryLegGroup+MultiTauGroup), + ChainProp(name="HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB30_L1TAU60_DR-TAU20ITAU12I",l1SeedThresholds=['TAU60','TAU12IM'], groups=PrimaryLegGroup+MultiTauGroup), + ChainProp(name="HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I-J25", l1SeedThresholds=['TAU20IM','TAU12IM'], groups=PrimaryLegGroup+MultiTauGroup), # ATR-20450 - ChainProp(name="HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1TAU20IM_2TAU12IM_4J12p0ETA25", l1SeedThresholds=['TAU20IM','TAU12IM'], groups=PrimaryLegGroup+MultiTauGroup), + ChainProp(name="HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1TAU20IM_2TAU12IM_4J12p0ETA25", l1SeedThresholds=['TAU20IM','TAU12IM'], groups=PrimaryLegGroup+MultiTauGroup), ] TriggerFlags.BphysicsSlice.signatures = TriggerFlags.BphysicsSlice.signatures() + [ @@ -644,7 +644,7 @@ def setupMenu(): ChainProp(name='HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM24VHI', l1SeedThresholds=['EM24VHI','FSNOSEED','FSNOSEED'], stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaMuonGroup), # tau+X chains (ATR-21609) TODO: need T&P-like merging - ChainProp(name='HLT_e24_lhmedium_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU8'], stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaTauGroup), + ChainProp(name='HLT_e24_lhmedium_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRAB_L1EM22VHI', l1SeedThresholds=['EM22VHI','TAU8'], stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaTauGroup), # need to add dRtt to chain below. How do we avoid overlap between taus and jets? #ChainProp(name="HLT_tau25_mediumRNN_tracktwoMVA_tau20_mediumRNN_tracktwoMVA_j70_j50_L1MJJ-500-NFF", l1SeedThresholds=['TAU8','TAU8','J20','J20'], stream=[PhysicsStream], groups=['MultiTauGroup','MultiJetGroup']), @@ -653,11 +653,11 @@ def setupMenu(): ChainProp(name='HLT_tau60_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1TAU40_2TAU12IM_XE40', l1SeedThresholds=['TAU40','TAU12IM','XE40'], stream=[PhysicsStream], groups=PrimaryLegGroup+TauMETGroup), # ATR-22966 ChainProp(name='HLT_e17_lhmedium_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1EM15VHI_2TAU12IM_XE35', l1SeedThresholds=['EM15VHI','TAU12IM','XE35'], stream=[PhysicsStream], groups=PrimaryLegGroup+TauMETGroup), ChainProp(name='HLT_mu14_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1MU10_TAU12IM_XE35', l1SeedThresholds=['MU10','TAU12IM','XE35'], stream=[PhysicsStream], groups=PrimaryLegGroup+TauMETGroup), - ChainProp(name='HLT_e17_lhmedium_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1EM15VHI_2TAU12IM_4J12', l1SeedThresholds=['EM15VHI','TAU12IM'], stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaTauGroup), + ChainProp(name='HLT_e17_lhmedium_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRAB_L1EM15VHI_2TAU12IM_4J12', l1SeedThresholds=['EM15VHI','TAU12IM'], stream=[PhysicsStream], groups=PrimaryLegGroup+EgammaTauGroup), - ChainProp(name='HLT_mu20_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU20', l1SeedThresholds=['MU20','TAU8'], stream=[PhysicsStream], groups=PrimaryLegGroup+MuonTauGroup), - ChainProp(name='HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU10_TAU20IM', l1SeedThresholds=['MU10','TAU20IM'], stream=[PhysicsStream], groups=PrimaryLegGroup+MuonTauGroup), - ChainProp(name='HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRleg000leg001100_L1MU10_TAU12IM_3J12', l1SeedThresholds=['MU10','TAU12IM'], stream=[PhysicsStream], groups=PrimaryLegGroup+MuonTauGroup), + ChainProp(name='HLT_mu20_ivarloose_tau20_mediumRNN_tracktwoMVA_03dRAB_L1MU20', l1SeedThresholds=['MU20','TAU8'], stream=[PhysicsStream], groups=PrimaryLegGroup+MuonTauGroup), + ChainProp(name='HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_03dRAB_L1MU10_TAU20IM', l1SeedThresholds=['MU10','TAU20IM'], stream=[PhysicsStream], groups=PrimaryLegGroup+MuonTauGroup), + ChainProp(name='HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRAB_L1MU10_TAU12IM_3J12', l1SeedThresholds=['MU10','TAU12IM'], stream=[PhysicsStream], groups=PrimaryLegGroup+MuonTauGroup), # photon + multijets (ATR-22594) ChainProp(name='HLT_g85_tight_3j50_L1EM22VHI',l1SeedThresholds=['EM22VHI','FSNOSEED'],stream=[PhysicsStream], groups=EgammaJetGroup), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index 6630dc5b044194dbb94e5f62f9160cdb4a3b50d3..b6540db151a1411bd9dcb5ecb05d19ea1d224607 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -956,7 +956,7 @@ UnconventionalTrackingChainParts_Default = { #========================================================== # Combined Chains #========================================================== -AllowedTopos_comb = ['03dRleg000leg001100','03dRleg000leg00130'] +AllowedTopos_comb = ['03dRAB','03dRAB30'] # ---- Combined Dictionary of all allowed Values ---- CombinedChainParts = deepcopy(PhotonChainParts) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py index 0504ebfc32a5d5e2543b43104141f65eecceab84..01a4febdfc3e76f32caa64adda5c52d5ceabda07 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py @@ -124,7 +124,7 @@ class StructuredChainNames(MenuVerification): sig_type_pattern = re.compile( r"\d*[egj]?({})\d+s?".format(signature_types)) def items_in_order(part): - part = part.replace("leg","p") #if we leave the word leg, the findall(..) function will find a 'g' + #part = part.replace("leg","p") #if we leave the word leg, the findall(..) function will find a 'g' indices = [self._signature_type_order.index(x) for x in sig_type_pattern.findall(part)] rr = indices == sorted(indices)