ATLAS Offline Software
Loading...
Searching...
No Matches
Trig3VarComboHypoTool Class Reference

#include <Trig3VarComboHypoTool.h>

Inheritance diagram for Trig3VarComboHypoTool:
Collaboration diagram for Trig3VarComboHypoTool:

Classes

struct  VarInfo
 Organise info per var selection in a struct. More...

Public Types

enum  ComboHypoVars { UNDEF =-1 , MASSWISO =0 }

Public Member Functions

 Trig3VarComboHypoTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize () override
virtual HLT::Identifier decisionId () const
 retrieves this ComboHypoTool's chain's decision ID
StatusCode setLegMultiplicity (const Combo::MultiplicityReqMap &multiplicityRequiredMap)
 Sets the number of legs and the multiplicity required on each leg.
const std::vector< int > & legMultiplicity () const
 Gets the number of legs and the multiplicity required on each leg.
HLT::Identifier legDecisionId (size_t i) const
 Retrieves this ComboHypoTool's chain's decision ID for a given leg.
const std::vector< HLT::Identifier > & legDecisionIds () const
 Retrieves this ComboHypoTool's chain's decision IDs for all legs.
virtual StatusCode decideOnSingleObject (TrigCompositeUtils::Decision *, const std::vector< const TrigCompositeUtils::DecisionIDContainer * > &) const
 Alternate method called by BPhysics ComboHypoAlgs instead of the base method decide(...).

Protected Member Functions

virtual bool executeAlg (const std::vector< Combo::LegDecision > &combination, const EventContext &ctx) const
 Only a dummy implementation exists in ComboHypoToolBase.
StatusCode selectLegs (const Combo::LegDecisionsMap &IDCombMap, std::vector< std::vector< Combo::LegDecision > > &leg_decisions) const
 Creates the per-leg vectors of Decision objects starting from the initial LegDecision map, storing only those concerning this HypoTool's chain Pack the Decision objects in std::pair<DecisionID, ElementLink<Decision>> so the derived class' executeAlg function knows which leg each object is on.
void updateLegDecisionsMap (const std::vector< std::vector< Combo::LegDecision > > &passing_comb, Combo::LegDecisionsMap &passingLegs) const
 For when the tool accepts some/all combinations.
void eraseFromLegDecisionsMap (Combo::LegDecisionsMap &passingLegs) const
 For when the tool rejects all combinations.
void printDebugInformation (const Combo::LegDecisionsMap &passingLegs) const
 Print the output of the tool, after having removed failed Decision Objects.

Protected Attributes

Gaudi::Property< size_t > m_combinationsThresholdWarn
Gaudi::Property< size_t > m_combinationsThresholdBreak
Gaudi::Property< bool > m_modeOR
Gaudi::Property< bool > m_enableOverride

Private Types

using KineInfo = std::tuple<float,float,float>
 alias for convenience, will contain eta/phi/pt info
using Combination = std::vector<Combo::LegDecision>

Private Member Functions

StatusCode decide (Combo::LegDecisionsMap &passingLegs, const EventContext &) const final
 Override the ComboHypoToolBase::decide in order to optimise combination generation This is to avoid excessive combinatorics for complex multileg chains.
bool executeAlgStep (const Combination &combination, const VarInfo &, std::vector< float > &values) const
 Implementation of selection on individual variables.
float compute (const std::tuple< KineInfo, KineInfo, KineInfo > &kinetrio, ComboHypoVars var) const
 Computation of the variables from the specified kinematics.
bool fillLegDecisions_diffLeg (std::tuple< Combo::LegDecision, Combo::LegDecision, Combo::LegDecision > &legtrio, const Combination &combination, uint32_t legA, uint32_t legB, uint32_t legC) const
bool fillTrioKinematics (std::tuple< KineInfo, KineInfo, KineInfo > &kinetrio, const Combination &combination, const VarInfo &varInfo) const
bool fillKineInfo (KineInfo &kinematics, Combo::LegDecision decision, bool isMET) const

Private Attributes

Gaudi::Property< std::vector< std::string > > m_varTag_vec {this, "Variables" , {""}, "Variables to cut on"}
 Gaudi configuration hooks.
Gaudi::Property< std::vector< bool > > m_useMin_vec {this, "UseMinVec" , {false}, "Array with the apply_min_cut setting"}
Gaudi::Property< std::vector< bool > > m_useMax_vec {this, "UseMaxVec" , {false}, "Array with the apply_max_cut setting"}
Gaudi::Property< std::vector< uint32_t > > m_legA_vec {this, "LegAVec" , {0}, "Array with the first Leg ID"}
Gaudi::Property< std::vector< uint32_t > > m_legB_vec {this, "LegBVec" , {0}, "Array with the second Leg ID"}
Gaudi::Property< std::vector< uint32_t > > m_legC_vec {this, "LegCVec" , {0}, "Array with the third Leg ID"}
Gaudi::Property< std::vector< bool > > m_isLegA_MET_vec {this, "IsLegA_METVec", {false}, "Array with the first Leg MET identifier"}
Gaudi::Property< std::vector< bool > > m_isLegB_MET_vec {this, "IsLegB_METVec", {false}, "Array with the second Leg MET identifier"}
Gaudi::Property< std::vector< bool > > m_isLegC_MET_vec {this, "IsLegC_METVec", {false}, "Array with the third Leg MET identifier"}
Gaudi::Property< std::vector< float > > m_varMin_vec {this, "LowerCutVec", {FLOATDEFAULT}, "Array with the lower cut for legs pair"}
Gaudi::Property< std::vector< float > > m_varMax_vec {this, "UpperCutVec", {FLOATDEFAULT}, "Array with the upper cut for legs pair"}
ToolHandleArray< GenericMonitoringToolm_monTool_vec {this, "MonTools", {}, "Monitoring tools" }
std::vector< VarInfom_varInfo_vec
 Internal variables for more efficient config lookup.
HLT::Identifier m_decisionId
 The DecisionID of the chain, obtained from the Tool's name.
std::vector< HLT::Identifierm_legDecisionIds
 The DecisionIDs of the individual legs, derived from both m_decisionId and m_legMultiplicities.
std::vector< int > m_legMultiplicities
 The number of legs, and the required multiplicity on each leg.

Static Private Attributes

static constexpr float FLOATDEFAULT = std::numeric_limits<float>::lowest()

Detailed Description

Definition at line 17 of file Trig3VarComboHypoTool.h.

Member Typedef Documentation

◆ Combination

using Trig3VarComboHypoTool::Combination = std::vector<Combo::LegDecision>
private

Definition at line 64 of file Trig3VarComboHypoTool.h.

◆ KineInfo

using Trig3VarComboHypoTool::KineInfo = std::tuple<float,float,float>
private

alias for convenience, will contain eta/phi/pt info

Definition at line 63 of file Trig3VarComboHypoTool.h.

Member Enumeration Documentation

◆ ComboHypoVars

Constructor & Destructor Documentation

◆ Trig3VarComboHypoTool()

Trig3VarComboHypoTool::Trig3VarComboHypoTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 31 of file Trig3VarComboHypoTool.cxx.

34 : ComboHypoToolBase(type, name, parent)
35{ }
ComboHypoToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ compute()

float Trig3VarComboHypoTool::compute ( const std::tuple< KineInfo, KineInfo, KineInfo > & kinetrio,
ComboHypoVars var ) const
private

Computation of the variables from the specified kinematics.

Definition at line 496 of file Trig3VarComboHypoTool.cxx.

496 {
497 const auto& [legA_kine,legB_kine,legC_kine] = kinetrio;
498 const auto& [eta1,phi1,pt1] = legA_kine;
499 const auto& [eta2,phi2,pt2] = legB_kine;
500 const auto& [eta3,phi3,pt3] = legC_kine;
501
502 ATH_MSG_DEBUG(" Leg A has pt " << pt1*invGeV << ", eta " << eta1 << ", phi " << phi1);
503 ATH_MSG_DEBUG(" Leg B has pt " << pt2*invGeV << ", eta " << eta2 << ", phi " << phi2);
504 ATH_MSG_DEBUG(" Leg C has pt " << pt3*invGeV << ", eta " << eta3 << ", phi " << phi3);
505
506 float value{0.0f};
507 switch(var) {
509 {
510 ROOT::Math::PtEtaPhiMVector p1(pt1,eta1,phi1,0.), p2(pt2,eta2,phi2,0.);
511 value = (p1+p2).M()*invGeV; // Convert to GeV
512
513 // require legC objects are isolated from legA and legB
514 float dRAC = xAOD::P4Helpers::deltaR(eta1,phi1,eta3,phi3);
515 float dRBC = xAOD::P4Helpers::deltaR(eta2,phi2,eta3,phi3);
516
517 ATH_MSG_DEBUG(" invmAB = " << value << ", dRAC = " << dRAC << ", dRBC = " << dRBC);
518
519 if(dRAC < 0.2 || dRBC < 0.2)
520 value = -1.;
521
522 break;
523 }
524 default:
525 {
526 ATH_MSG_ERROR("Undefined variable requested -- should never happen!");
527 }
528 }
529 return value;
530}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
constexpr float invGeV
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
setEt setPhi setE277 setWeta2 eta1

◆ decide()

StatusCode Trig3VarComboHypoTool::decide ( Combo::LegDecisionsMap & passingLegs,
const EventContext &  ) const
finalprivatevirtual

Override the ComboHypoToolBase::decide in order to optimise combination generation This is to avoid excessive combinatorics for complex multileg chains.

Reimplemented from ComboHypoToolBase.

Definition at line 128 of file Trig3VarComboHypoTool.cxx.

128 {
129
130 // if no combinations passed, then exit
131 if (passingLegs.empty()) {
132 return StatusCode::SUCCESS;
133 }
134
135 ATH_MSG_DEBUG("Looking for legs from " << decisionId() << " in the map. Map contains features for " << passingLegs.size() << " legs, which may be data for many chains.");
136 for(const auto& legpair : passingLegs) {
137 ATH_MSG_DEBUG(" Leg " << legpair.first << " has " << legpair.second.size() << " features");
138 }
139
140 // select the leg decisions from the map with this ID:
141 std::vector<Combination> legDecisions;
142 ATH_CHECK(selectLegs(passingLegs, legDecisions));
143
144 // Track if we have at least 3 objects on the target legs that can be used for variable computation
145 bool hasViableLegs{true};
146 // Determine the functional leg multiplicities for combinations to generate
147 std::vector<size_t> legMultiplicityForComputation(legMultiplicity().size(),0);
148 for (const VarInfo& varInfo : m_varInfo_vec){
149 ATH_MSG_DEBUG("Var " << varInfo.varTag << " needs legs " << varInfo.legA << ", " << varInfo.legB << ", " << varInfo.legC);
150
151 // Assess the leg decisions and extract the relevant ones
152 if (passingLegs.contains(varInfo.legA) && passingLegs.contains(varInfo.legB) && passingLegs.contains(varInfo.legC)) {
153 bool goodLegA{false}, goodLegB{false}, goodLegC{false};
154 int32_t iLegA = getIndexFromLeg(varInfo.legA);
155 int32_t iLegB = getIndexFromLeg(varInfo.legB);
156 int32_t iLegC = getIndexFromLeg(varInfo.legC);
157 if ((iLegA<0) or (iLegB<0) or (iLegC<0)){
158 ATH_MSG_ERROR("Trig3VarComboHypoTool::decide: Index into array is negative");
159 return StatusCode::FAILURE;
160 }
161 goodLegA = !passingLegs[varInfo.legA].empty();
162 legMultiplicityForComputation[iLegA] = std::max<size_t>(1,legMultiplicityForComputation[iLegA]);
163 ATH_MSG_DEBUG("Leg " << varInfo.legA << " has " << passingLegs[varInfo.legA].size() << " features --> " << (goodLegA ? "pass" : "fail"));
164
165 if(varInfo.legB == varInfo.legA) {
166 ATH_MSG_ERROR("Trig3VarComboHypoTool::decide: legB has to be different from legA");
167 return StatusCode::FAILURE;
168 }
169 goodLegB = !passingLegs[varInfo.legB].empty();
170 ATH_MSG_DEBUG("Leg " << varInfo.legB << " has " << passingLegs[varInfo.legB].size() << " features --> " << (goodLegB ? "pass" : "fail"));
171 legMultiplicityForComputation[iLegB] = std::max<size_t>(1,legMultiplicityForComputation[iLegB]);
172
173 if(varInfo.legC == varInfo.legA) {
174 ATH_MSG_ERROR("Trig3VarComboHypoTool::decide: legC has to be different from legA");
175 return StatusCode::FAILURE;
176 }
177 if(varInfo.legC == varInfo.legB) {
178 ATH_MSG_ERROR("Trig3VarComboHypoTool::decide: legC has to be different from legB");
179 return StatusCode::FAILURE;
180 }
181 goodLegC = !passingLegs[varInfo.legC].empty();
182 ATH_MSG_DEBUG("Leg " << varInfo.legC << " has " << passingLegs[varInfo.legC].size() << " features --> " << (goodLegC ? "pass" : "fail"));
183 legMultiplicityForComputation[iLegC] = std::max<size_t>(1,legMultiplicityForComputation[iLegC]);
184
185 hasViableLegs &= (goodLegA && goodLegB && goodLegC);
186 if (!hasViableLegs) {
187 ATH_MSG_DEBUG("Did not find at least 3 features on the target legs to compute " << varInfo.varTag);
188 }
189 } else {
191 "Insufficient passing legs to compute " << varInfo.varTag
192 << ", intended on (" << varInfo.legA << ", " << varInfo.legB << ", " << varInfo.legC << ")"
193 );
194 hasViableLegs = false;
195 }
196
197 }
198
199 if (!hasViableLegs) {
200 ATH_MSG_DEBUG("This Trig3VarComboHypoTool cannot run in this event, this chain **REJECTS** this event.");
201 eraseFromLegDecisionsMap(passingLegs);
202 if (msgLvl(MSG::DEBUG)) printDebugInformation(passingLegs);
203 return StatusCode::SUCCESS;
204 }
205
206 // Create and initialise the combinations generator for the requirements of this chain, given the objects available in this event.
207 // Extract the features on legs not used for the decision, so they stay in the navigation
208 Combination extraLegs;
209 HLT::NestedUniqueCombinationGenerator nucg;
210 for (size_t legindex = 0; size_t legmult : legMultiplicityForComputation){
211 size_t out_of = legDecisions[legindex].size();
212 if(legmult==0) {
213 extraLegs.insert(extraLegs.end(),legDecisions[legindex].cbegin(),legDecisions[legindex].cend());
214 } else {
215 nucg.add({out_of, legmult});
216 ATH_MSG_DEBUG("For leg index " << legindex << " we will be choosing any " << legmult << " Decision Objects out of " << out_of);
217 }
218 ++legindex;
219 }
220
221 // Iterate over all variable computations
222 std::vector<Combination> passingCombinations;
223 std::vector<float> values;
224 values.reserve(m_varInfo_vec.size());
225 size_t warnings = 0, iterations = 0;
226 // Correct for the legs on which we compute with 3 features
227 auto get_index_offset = [&legMultiplicityForComputation](size_t legindex) {
228 size_t offset{0};
229 for (auto iLeg=legMultiplicityForComputation.cbegin(); iLeg!=legMultiplicityForComputation.cbegin()+legindex; ++iLeg) {
230 offset += (*iLeg)-1;
231 }
232 return offset;
233 };
234 do {
235 bool lastDecision(true);
236 const std::vector<size_t> combination = nucg();
237 ++nucg;
238 ++iterations;
239 values.clear();
240
241 // This collects all the features contributing to any variable computation
242 Combination combinationToRecord;
243 for (auto iVarInfo = m_varInfo_vec.cbegin(); iVarInfo!=m_varInfo_vec.cend() && lastDecision; ++iVarInfo){
244 // Just the features for the current variable evaluation
245 Combination combinationToCheck;
246
247 size_t legA_index{0};
248 size_t legB_index{0};
249 size_t legC_index{0};
250
251 legA_index = getIndexFromLeg(iVarInfo->legA);
252 legB_index = getIndexFromLeg(iVarInfo->legB);
253 legC_index = getIndexFromLeg(iVarInfo->legC);
254
256 "Computing " << iVarInfo->varTag << " on legs "
257 << iVarInfo->legA << " (" << legA_index << "), "
258 << iVarInfo->legB << " (" << legB_index << "), "
259 << iVarInfo->legC << " (" << legC_index << ")"
260 );
261 if(iVarInfo->legA==iVarInfo->legB) {
262 ATH_MSG_DEBUG(" legA == legB is not allowed");
263 break;
264 }
265 if(iVarInfo->legA==iVarInfo->legC) {
266 ATH_MSG_DEBUG(" legA == legC is not allowed");
267 break;
268 }
269 if(iVarInfo->legB==iVarInfo->legC) {
270 ATH_MSG_DEBUG(" legB == legC is not allowed");
271 break;
272 }
273
274 // 1 object each on 3 legs
275 Combination featureTrio = {legDecisions[legA_index][combination.at(legA_index+get_index_offset(legA_index))],
276 legDecisions[legB_index][combination.at(legB_index+get_index_offset(legB_index))],
277 legDecisions[legC_index][combination.at(legC_index+get_index_offset(legC_index))]};
278 combinationToCheck.insert(combinationToCheck.end(),featureTrio.cbegin(),featureTrio.cend());
279 combinationToRecord.insert(combinationToRecord.end(),featureTrio.cbegin(),featureTrio.cend());
280
281 try {
282 lastDecision = executeAlgStep(combinationToCheck, *iVarInfo, values);
283 ATH_MSG_DEBUG("Combination " << (iterations - 1) << " decided to be " << (lastDecision ? "passing" : "failing") << " " << iVarInfo->varTag);
284 } catch (std::exception& e) {
285 ATH_MSG_ERROR(e.what());
286 return StatusCode::FAILURE;
287 }
288
289 if ((iterations >= m_combinationsThresholdWarn && warnings == 0) or (iterations >= m_combinationsThresholdBreak)) {
290 ATH_MSG_WARNING("Have so far processed " << iterations << " combinations for " << decisionId() << " in this event, " << passingCombinations.size() << " passing.");
291 ++warnings;
292 if (iterations >= m_combinationsThresholdBreak) {
293 ATH_MSG_WARNING("Too many combinations! Breaking the loop at this point.");
294 break;
295 }
296 }
297 }
298
299 // Assess the collective decision on the combination
300 if (lastDecision) {
301 combinationToRecord.insert(combinationToRecord.end(),extraLegs.cbegin(),extraLegs.cend());
302 passingCombinations.push_back(std::move(combinationToRecord));
303 if (m_modeOR == true and m_enableOverride) {
304 break;
305 }
306 } else { // the combination failed
307 if (m_modeOR == false and m_enableOverride) {
308 break;
309 }
310 }
311
312 // Monitoring of variables for only accepted events
313 if(lastDecision && !m_monTool_vec.empty()) {
314 for (const VarInfo& varInfo : m_varInfo_vec) {
315 float value = values[varInfo.index];
316 auto varOfAccepted = Monitored::Scalar(m_varTag_vec[varInfo.index]+"OfAccepted", value );//varInfo->monToolName+"OfAccepted", value );
317 auto monitorIt = Monitored::Group (m_monTool_vec[varInfo.index], varOfAccepted);
318 ATH_MSG_VERBOSE( varInfo.varTag << " = " << value << " is in range " << varInfo.rangeStr() << ".");
319 ATH_MSG_VERBOSE("m_varTag_vec = "<< m_varTag_vec<<", values = "<<values << ", valIndex = "<< varInfo.index <<", monToolName = " << varInfo.monToolName << ", monToolVec = "<< m_monTool_vec);
320 }
321 }
322
323 } while (nucg);
324
325 if (m_modeOR) {
326
327 ATH_MSG_DEBUG("Passing " << passingCombinations.size() << " combinations out of " << iterations << ", "
328 << decisionId() << (passingCombinations.size() ? " **ACCEPTS**" : " **REJECTS**") << " this event based on OR logic.");
329
330 if (m_enableOverride) {
331 ATH_MSG_DEBUG("Note: stopped after the first successful combination due to the EnableOverride flag.");
332 }
333
334 } else { // modeAND
335
336 const bool passAll = (passingCombinations.size() == iterations);
337
338 ATH_MSG_DEBUG("Passing " << passingCombinations.size() << " combinations out of " << iterations << ", "
339 << decisionId() << (passAll ? " **ACCEPTS**" : " **REJECTS**") << " this event based on AND logic.");
340
341 if (m_enableOverride) {
342 ATH_MSG_DEBUG("Note: stopped after the first failed combination due to the EnableOverride flag.");
343 }
344
345 if (not passAll) {
346 passingCombinations.clear();
347 }
348
349 }
350
351 if (not passingCombinations.empty()) { // need partial erasure of the decsions (only those not present in any combination)
352 updateLegDecisionsMap(passingCombinations, passingLegs);
353 } else { // need complete erasure of input decisions
354 eraseFromLegDecisionsMap(passingLegs);
355 }
356
357 if (msgLvl(MSG::DEBUG)) printDebugInformation(passingLegs);
358 return StatusCode::SUCCESS;
359}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
const std::vector< int > & legMultiplicity() const
Gets the number of legs and the multiplicity required on each leg.
Gaudi::Property< bool > m_modeOR
StatusCode selectLegs(const Combo::LegDecisionsMap &IDCombMap, std::vector< std::vector< Combo::LegDecision > > &leg_decisions) const
Creates the per-leg vectors of Decision objects starting from the initial LegDecision map,...
void printDebugInformation(const Combo::LegDecisionsMap &passingLegs) const
Print the output of the tool, after having removed failed Decision Objects.
Gaudi::Property< size_t > m_combinationsThresholdWarn
void eraseFromLegDecisionsMap(Combo::LegDecisionsMap &passingLegs) const
For when the tool rejects all combinations.
Gaudi::Property< size_t > m_combinationsThresholdBreak
virtual HLT::Identifier decisionId() const
retrieves this ComboHypoTool's chain's decision ID
Gaudi::Property< bool > m_enableOverride
void updateLegDecisionsMap(const std::vector< std::vector< Combo::LegDecision > > &passing_comb, Combo::LegDecisionsMap &passingLegs) const
For when the tool accepts some/all combinations.
void add(const UniqueCombinationGenerator &gen)
Gaudi::Property< std::vector< std::string > > m_varTag_vec
Gaudi configuration hooks.
ToolHandleArray< GenericMonitoringTool > m_monTool_vec
bool executeAlgStep(const Combination &combination, const VarInfo &, std::vector< float > &values) const
Implementation of selection on individual variables.
std::vector< Combo::LegDecision > Combination
std::vector< VarInfo > m_varInfo_vec
Internal variables for more efficient config lookup.
int32_t getIndexFromLeg(const HLT::Identifier &legIdentifier)
Extract the numeric index of a leg identifier.
Organise info per var selection in a struct.

◆ decideOnSingleObject()

StatusCode ComboHypoToolBase::decideOnSingleObject ( TrigCompositeUtils::Decision * ,
const std::vector< const TrigCompositeUtils::DecisionIDContainer * > &  ) const
virtualinherited

Alternate method called by BPhysics ComboHypoAlgs instead of the base method decide(...).

This function should be considered a specialist use-case only. It must be over-ridden to do anything useful.

Reimplemented in TrigBmumuxComboHypoTool, and TrigMultiTrkComboHypoTool.

Definition at line 283 of file ComboHypoToolBase.cxx.

283 {
284 ATH_MSG_ERROR("Do not use ComboHypoToolBase on its own, inherit this class and override decideOnSingleObject.");
285 ATH_MSG_ERROR("NOTE: Only if you are also supplying your own decide(...) implimentation, or similar.");
286 ATH_MSG_ERROR("NOTE: Most uses cases should only need to override executeAlg(...).");
287 return StatusCode::FAILURE;
288}

◆ decisionId()

virtual HLT::Identifier ComboHypoToolBase::decisionId ( ) const
inlinevirtualinherited

retrieves this ComboHypoTool's chain's decision ID

Definition at line 41 of file ComboHypoToolBase.h.

41{ return m_decisionId; }
HLT::Identifier m_decisionId
The DecisionID of the chain, obtained from the Tool's name.

◆ eraseFromLegDecisionsMap()

void ComboHypoToolBase::eraseFromLegDecisionsMap ( Combo::LegDecisionsMap & passingLegs) const
protectedinherited

For when the tool rejects all combinations.

Remove all Decision Objects from all the legs of this HypoTool's chain.

Definition at line 253 of file ComboHypoToolBase.cxx.

253 {
254 for (auto& it : passingLegs) {
255 DecisionID id = it.first;
256 if (id == m_decisionId or (isLegId(id) and getIDFromLeg(id) == m_decisionId)) {
257 const size_t nDecisionObjects = it.second.size();
258 it.second.clear();
259 ATH_MSG_VERBOSE("-- Removed " << nDecisionObjects << " from " << id);
260 }
261 }
262}
unsigned int DecisionID
HLT::Identifier getIDFromLeg(const HLT::Identifier &legIdentifier)
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
bool isLegId(const HLT::Identifier &legIdentifier)
Recognise whether the chain ID is a leg ID.

◆ executeAlg()

bool ComboHypoToolBase::executeAlg ( const std::vector< Combo::LegDecision > & combination,
const EventContext & ctx ) const
protectedvirtualinherited

Only a dummy implementation exists in ComboHypoToolBase.

This should be over-ridden by a derived class. The derived class should return a boolean pass/fail for each possible combination in the event. param[in] combination A single combination of objects to be discriminated against. Vector contains the required number of objects over all legs. Use the pair.first to tell which leg a given pair.second decision object belongs to in the current combination.

Reimplemented in DebugComboHypoTool, DeltaRRoIComboHypoTool, TrigAFPDijetComboHypoTool, TrigBmumuxComboHypoTool, TrigEgammaTopoHypoTool, TrigMultiTrkComboHypoTool, TrigMuonEFIdtpInvMassHypoTool, and TrigMuonEFInvMassHypoTool.

Definition at line 278 of file ComboHypoToolBase.cxx.

278 {
279 ATH_MSG_ERROR("Do not use ComboHypoToolBase on its own, inherit this class and override executeAlg.");
280 return false;
281}

◆ executeAlgStep()

bool Trig3VarComboHypoTool::executeAlgStep ( const Combination & combination,
const VarInfo & varInfo,
std::vector< float > & values ) const
private

Implementation of selection on individual variables.

Definition at line 361 of file Trig3VarComboHypoTool.cxx.

361 {
362 ATH_MSG_DEBUG("Executing selection " << varInfo.index << " of " << m_varInfo_vec.size() << ": " << varInfo.rangeStr());
363
364 std::tuple<KineInfo,KineInfo,KineInfo> kinetrio;
365 if(!fillTrioKinematics(kinetrio, combination, varInfo)) {
366 ATH_MSG_ERROR("Failed to extract kinematics of feature trio!");
367 return false;
368 }
369
370 if(msgLvl(MSG::VERBOSE)) {
371 float etaCheck, phiCheck, ptCheck;
372 std::tie(etaCheck,phiCheck,ptCheck) = std::get<0>(kinetrio);
373 msg() << MSG::VERBOSE << " Test filled legA kinematics: pt " << ptCheck*invGeV << ", eta " << etaCheck << ", phi " << phiCheck << endmsg;
374
375 std::tie(etaCheck,phiCheck,ptCheck) = std::get<1>(kinetrio);
376 msg() << MSG::VERBOSE << " Test filled legB kinematics: pt " << ptCheck*invGeV << ", eta " << etaCheck << ", phi " << phiCheck << endmsg;
377
378 std::tie(etaCheck,phiCheck,ptCheck) = std::get<2>(kinetrio);
379 msg() << MSG::VERBOSE << " Test filled legC kinematics: pt " << ptCheck*invGeV << ", eta " << etaCheck << ", phi " << phiCheck << endmsg;
380 }
381
382 // apply the cut
383 float value = compute(kinetrio,varInfo.var);
384 if(!m_monTool_vec.empty()) {
385 auto varOfProcessed = Monitored::Scalar(m_varTag_vec[varInfo.index]+"OfProcessed" , value );
386 auto monitorIt = Monitored::Group (m_monTool_vec[varInfo.index], varOfProcessed);
387 }
388 vals.push_back(value);
389 bool pass = varInfo.test(value);
390
391 ATH_MSG_DEBUG(" Found a combination with " << value);
392 if(!pass) {
393 ATH_MSG_DEBUG(" Combination failed var cut: " << varInfo.varTag << " = " << value << " not in range " << varInfo.rangeStr());
394 }
395 return pass;
396}
#define endmsg
float compute(const std::tuple< KineInfo, KineInfo, KineInfo > &kinetrio, ComboHypoVars var) const
Computation of the variables from the specified kinematics.
bool fillTrioKinematics(std::tuple< KineInfo, KineInfo, KineInfo > &kinetrio, const Combination &combination, const VarInfo &varInfo) const
MsgStream & msg
Definition testRead.cxx:32

◆ fillKineInfo()

bool Trig3VarComboHypoTool::fillKineInfo ( Trig3VarComboHypoTool::KineInfo & kinematics,
Combo::LegDecision decision,
bool isMET ) const
private

Definition at line 469 of file Trig3VarComboHypoTool.cxx.

469 {
470 float eta, phi, pt;
471 if (isMET) {
472 auto pLink = TrigCompositeUtils::findLink<xAOD::TrigMissingETContainer>( *decision.second, featureString() ).link;
473 if (!pLink.isValid()){
474 ATH_MSG_ERROR("link for MET not valid");
475 return false;
476 }
477 ROOT::Math::XYVectorF metv((*pLink)->ex(),(*pLink)->ey());
479 phi = metv.phi();
480 pt = metv.r();
481 } else {
482 auto pLink = TrigCompositeUtils::findLink<xAOD::IParticleContainer>( *decision.second, featureString() ).link;
483 if (!pLink.isValid()){
484 ATH_MSG_ERROR("link for IParticle not valid");
485 return false;
486 }
487 eta = (*pLink)->p4().Eta();
488 phi = (*pLink)->p4().Phi();
489 pt = (*pLink)->p4().Pt();
490 }
491 ATH_MSG_VERBOSE(" Filled kinematics with pt " << pt*invGeV << ", eta " << eta << ", phi " << phi);
492 kinematics = std::make_tuple(eta,phi,pt);
493 return true;
494}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
static constexpr float FLOATDEFAULT
const std::string & featureString()
LinkInfo< T > findLink(const Decision *start, const std::string &linkName, const bool suppressMultipleLinksWarning=false)
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision obj...

◆ fillLegDecisions_diffLeg()

bool Trig3VarComboHypoTool::fillLegDecisions_diffLeg ( std::tuple< Combo::LegDecision, Combo::LegDecision, Combo::LegDecision > & legtrio,
const Combination & combination,
uint32_t legA,
uint32_t legB,
uint32_t legC ) const
private

Definition at line 405 of file Trig3VarComboHypoTool.cxx.

405 {
406 // Extract the features matching the legs
407 // We take all of them, so as to be able to check if there is any ambiguity
408 auto isLegA = [&legA](const Combo::LegDecision& d) { return testLegId3varcombo(d,legA); };
409 auto isLegB = [&legB](const Combo::LegDecision& d) { return testLegId3varcombo(d,legB); };
410 auto isLegC = [&legC](const Combo::LegDecision& d) { return testLegId3varcombo(d,legC); };
411 Combination legA_features, legB_features, legC_features;
412
413 std::copy_if(combination.begin(),combination.end(),std::back_inserter(legA_features),isLegA);
414 if(legA_features.size()!=1) {
415 ATH_MSG_ERROR(legA_features.size() << " Decision Objects supplied on leg " << legA
416 << ", must be 1 for different-leg topo selection!");
417 return false;
418 }
419
420 std::copy_if(combination.begin(),combination.end(),std::back_inserter(legB_features),isLegB);
421 if (legB_features.size()!=1) {
422 ATH_MSG_ERROR(legB_features.size() << " Decision Objects supplied on leg " << legB
423 << ", must be 1 for different-leg topo selection!");
424 return false;
425 }
426
427 std::copy_if(combination.begin(),combination.end(),std::back_inserter(legC_features),isLegC);
428 if (legC_features.size()!=1) {
429 ATH_MSG_ERROR(legB_features.size() << " Decision Objects supplied on leg " << legC
430 << ", must be 1 for different-leg topo selection!");
431 return false;
432 }
433
434 std::get<0>(legtrio) = legA_features[0];
435 std::get<1>(legtrio) = legB_features[0];
436 std::get<2>(legtrio) = legC_features[0];
437
438 return true;
439}
bool testLegId3varcombo(const Combo::LegDecision &d, uint32_t targetleg)
Test function to compare decision ID with the legs to be used in var computation.
std::pair< TrigCompositeUtils::DecisionID, ElementLink< TrigCompositeUtils::DecisionContainer > > LegDecision
LegDecision keeps a given Decision Object associated with a specific leg when being used inside a sin...

◆ fillTrioKinematics()

bool Trig3VarComboHypoTool::fillTrioKinematics ( std::tuple< KineInfo, KineInfo, KineInfo > & kinetrio,
const Combination & combination,
const VarInfo & varInfo ) const
private

Definition at line 441 of file Trig3VarComboHypoTool.cxx.

441 {
442 ATH_MSG_VERBOSE(" Decision objects available = "<< combination);
443 // Check that there are enough features
444 size_t nFeatures(combination.size());
445 if (nFeatures < 3){
446 ATH_MSG_ERROR("Number of Decision Objects passed is less than 3! Sum over decision objects on all legs = " << combination.size() );
447 return false;
448 }
449 std::tuple<Combo::LegDecision,Combo::LegDecision,Combo::LegDecision> legtrio;
450 fillLegDecisions_diffLeg(legtrio,combination,varInfo.legA,varInfo.legB,varInfo.legC);
451 ATH_MSG_VERBOSE(" Fill leg A kinematics");
452 if(!fillKineInfo(std::get<0>(kinetrio),std::get<0>(legtrio),varInfo.legA_is_MET)) {
453 ATH_MSG_ERROR("Failed to extract requisite kinematic info from leg " << varInfo.legA << "!");
454 return false;
455 }
456 ATH_MSG_VERBOSE(" Fill leg B kinematics");
457 if(!fillKineInfo(std::get<1>(kinetrio),std::get<1>(legtrio),varInfo.legB_is_MET)) {
458 ATH_MSG_ERROR("Failed to extract requisite kinematic info from leg " << varInfo.legB << "!");
459 return false;
460 }
461 ATH_MSG_VERBOSE(" Fill leg C kinematics");
462 if(!fillKineInfo(std::get<2>(kinetrio),std::get<2>(legtrio),varInfo.legC_is_MET)) {
463 ATH_MSG_ERROR("Failed to extract requisite kinematic info from leg " << varInfo.legC << "!");
464 return false;
465 }
466 return true;
467}
bool fillKineInfo(KineInfo &kinematics, Combo::LegDecision decision, bool isMET) const
bool fillLegDecisions_diffLeg(std::tuple< Combo::LegDecision, Combo::LegDecision, Combo::LegDecision > &legtrio, const Combination &combination, uint32_t legA, uint32_t legB, uint32_t legC) const

◆ initialize()

StatusCode Trig3VarComboHypoTool::initialize ( )
overridevirtual

Definition at line 61 of file Trig3VarComboHypoTool.cxx.

61 {
62 ATH_MSG_DEBUG("Variable = " << m_varTag_vec );
63 ATH_MSG_DEBUG("UseCut min = " << m_useMin_vec );
64 ATH_MSG_DEBUG("UseCut max = " << m_useMax_vec );
65 ATH_MSG_DEBUG("varCut min = " << m_varMin_vec );
66 ATH_MSG_DEBUG("varCut max = " << m_varMax_vec );
67 ATH_MSG_DEBUG("LegA = " << m_legA_vec );
68 ATH_MSG_DEBUG("LegB = " << m_legB_vec );
69 ATH_MSG_DEBUG("LegC = " << m_legC_vec );
70
71 ATH_CHECK( m_monTool_vec.retrieve() );
72
73 if (m_legA_vec.size() != m_legB_vec.size() || m_legA_vec.size() != m_legC_vec.size()) {
74 ATH_MSG_ERROR("Trying to configure the Tool with legA/legB/legC vectors of different size!");
75 return StatusCode::FAILURE;
76 }
77 if (m_useMin_vec.size() != m_useMax_vec.size()) {
78 ATH_MSG_ERROR("Trying to configure the Tool with UseMin and UseMax vectors of different size!");
79 return StatusCode::FAILURE;
80 }
81 if (m_legA_vec.size() != m_useMax_vec.size()) {
82 ATH_MSG_ERROR("Trying to configure the Tool with legA/B and UseMax/Min vectors of different size!");
83 return StatusCode::FAILURE;
84 }
85 if (m_varTag_vec.size() != m_useMax_vec.size()) {
86 ATH_MSG_ERROR("Trying to configure the Tool with varTag and UseMax/Min(LegA/B/C) vectors of different size!");
87 return StatusCode::FAILURE;
88 }
89
90 for (size_t i=0; i<m_varTag_vec.size(); ++i){
92 info.index = i;
93 if(!m_monTool_vec.empty()) {
94 info.monToolName = m_monTool_vec[i].name();
95 }
96 if (VarMap.find(m_varTag_vec[i]) == VarMap.end()){
97 ATH_MSG_ERROR("The variable is not present in the ComboHypoVars list");
98 return StatusCode::FAILURE;
99 }
100 info.varTag = (m_varTag_vec[i]);
101 info.var = VarMap.at(m_varTag_vec[i]);
102 //
103 info.useMin = m_useMin_vec[i];
104 if(info.useMin) {info.varMin=m_varMin_vec[i];}
105 info.useMax = m_useMax_vec[i];
106 if(info.useMax) {info.varMax=m_varMax_vec[i];}
107 //
108 info.legA = m_legA_vec[i];
109 info.legA_is_MET = m_isLegA_MET_vec[i];
110 info.legB = m_legB_vec[i];
111 info.legB_is_MET = m_isLegB_MET_vec[i];
112 info.legC = m_legC_vec[i];
113 info.legC_is_MET = m_isLegC_MET_vec[i];
114
115 std::string validmsg{""};
116 if(!info.validate(validmsg)) {
117 ATH_MSG_ERROR(validmsg);
118 return StatusCode::FAILURE;
119 }
120
121 m_varInfo_vec.push_back(std::move(info));
122 }
123 ATH_MSG_DEBUG("Initialization completed successfully");
124
125 return StatusCode::SUCCESS;
126}
const std::map< std::string, Trig3VarComboHypoTool::ComboHypoVars > VarMap
Gaudi::Property< std::vector< float > > m_varMax_vec
Gaudi::Property< std::vector< bool > > m_useMax_vec
Gaudi::Property< std::vector< float > > m_varMin_vec
Gaudi::Property< std::vector< uint32_t > > m_legA_vec
Gaudi::Property< std::vector< bool > > m_isLegC_MET_vec
Gaudi::Property< std::vector< uint32_t > > m_legC_vec
Gaudi::Property< std::vector< uint32_t > > m_legB_vec
Gaudi::Property< std::vector< bool > > m_isLegB_MET_vec
Gaudi::Property< std::vector< bool > > m_useMin_vec
Gaudi::Property< std::vector< bool > > m_isLegA_MET_vec

◆ legDecisionId()

HLT::Identifier ComboHypoToolBase::legDecisionId ( size_t i) const
inlineinherited

Retrieves this ComboHypoTool's chain's decision ID for a given leg.

Only populated for chains with more than one leg. For chains with one leg, use decisionId()

Definition at line 60 of file ComboHypoToolBase.h.

60{ return m_legDecisionIds.at(i); }
std::vector< HLT::Identifier > m_legDecisionIds
The DecisionIDs of the individual legs, derived from both m_decisionId and m_legMultiplicities.

◆ legDecisionIds()

const std::vector< HLT::Identifier > & ComboHypoToolBase::legDecisionIds ( ) const
inlineinherited

Retrieves this ComboHypoTool's chain's decision IDs for all legs.

Only populated for chains with more than one leg. For chains with one leg, use decisionId()

Definition at line 66 of file ComboHypoToolBase.h.

66{ return m_legDecisionIds; }

◆ legMultiplicity()

const std::vector< int > & ComboHypoToolBase::legMultiplicity ( ) const
inlineinherited

Gets the number of legs and the multiplicity required on each leg.

Definition at line 54 of file ComboHypoToolBase.h.

54{ return m_legMultiplicities; }
std::vector< int > m_legMultiplicities
The number of legs, and the required multiplicity on each leg.

◆ printDebugInformation()

void ComboHypoToolBase::printDebugInformation ( const Combo::LegDecisionsMap & passingLegs) const
protectedinherited

Print the output of the tool, after having removed failed Decision Objects.

Restricted to the ComboHypoTool's chain's legs.

Definition at line 264 of file ComboHypoToolBase.cxx.

264 {
265 ATH_MSG_DEBUG("ComboHypoToolBase: End of " << m_decisionId << ", passing elements are: ");
266 for (const auto& [id, ELV] : passingLegs) {
267 // Only print for this chain
268 if (id == m_decisionId or (isLegId(id) and m_decisionId == getIDFromLeg(id))) {
269 ATH_MSG_DEBUG("-- " << HLT::Identifier(id) << " with " << ELV.size() << " elements");
270 for (const auto& EL : ELV) {
271 ATH_MSG_DEBUG("-- -- container:" << EL.dataID() << ", index:" << EL.index());
272 }
273 }
274 }
275}
ElementLink< CVec > EL

◆ selectLegs()

StatusCode ComboHypoToolBase::selectLegs ( const Combo::LegDecisionsMap & IDCombMap,
std::vector< std::vector< Combo::LegDecision > > & leg_decisions ) const
protectedinherited

Creates the per-leg vectors of Decision objects starting from the initial LegDecision map, storing only those concerning this HypoTool's chain Pack the Decision objects in std::pair<DecisionID, ElementLink<Decision>> so the derived class' executeAlg function knows which leg each object is on.

Definition at line 172 of file ComboHypoToolBase.cxx.

173{
174 /*
175 legDecisions: nested vector like:
176 [(leg0, el0), (leg0, el1), (leg0, el2), (leg0, el3)], <-- All leg0 objects are in legDecisions[0][X]
177 [(leg1, mu0), (leg1, mu1)] <-- All leg1 objects are in legDecisions[1][X]
178 We keep the legID in the std::pair inside the inner vector as these pairs will be flattened into a single vector
179 when individual combinations of objects are passed to executeAlg, pair.first then contains the leg, with pair.second containing the Decision Object.
180 */
181
182 // Extract from IDCombMap the features for this chain. Wrap the features up in a pair along with their leg ID
183 for (size_t legIndex = 0; legIndex < m_legMultiplicities.size(); ++ legIndex) {
184
185 // If the chain has more than one leg, then we have per-leg IDs. Otherwise we just use the chain's ID
186 const HLT::Identifier& legIdentifier = (m_legMultiplicities.size() > 1 ? m_legDecisionIds.at(legIndex) : m_decisionId);
187
188 // Combo::LegDecision is a pair of <DecisionID, ElementLink<Decision>>
189 std::vector<Combo::LegDecision> decisionObjectsOnLeg;
190
191 // Find physics objects on this leg. May be zero.
192 const Combo::LegDecisionsMap::const_iterator it = IDCombMap.find(legIdentifier.numeric());
193
194 if (it != IDCombMap.end()) {
195 for (const ElementLink<DecisionContainer>& el : it->second) {
196 decisionObjectsOnLeg.emplace_back(legIdentifier, el);
197 }
198 }
199
200 legDecisions.push_back(std::move(decisionObjectsOnLeg));
201 }
202
203 if (msgLvl(MSG::DEBUG)) {
204 ATH_MSG_DEBUG("Getting " << legDecisions.size() << " legs to combine, for ID: " << decisionId());
205 size_t count = 0;
206 for (const auto& leg : legDecisions) {
207 ATH_MSG_DEBUG("Leg " << count++ << " --");
208 for (const auto& dEL : leg) {
209 ATH_MSG_DEBUG("-- " << HLT::Identifier(dEL.first) << " container:" << dEL.second.dataID() << ", index:" << dEL.second.index());
210 }
211 }
212 }
213 return StatusCode::SUCCESS;
214}
TrigCompositeUtils::DecisionID numeric() const
numeric ID
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146

◆ setLegMultiplicity()

StatusCode ComboHypoToolBase::setLegMultiplicity ( const Combo::MultiplicityReqMap & multiplicityRequiredMap)
inherited

Sets the number of legs and the multiplicity required on each leg.

This should be called when the Tool is retrieved by its parent ComboHypo alg. This also sets the leg Decision IDs at the same time param[in] multiplicityRequiredMap: Mapping of chains to required multiplicity per leg.

Definition at line 16 of file ComboHypoToolBase.cxx.

16 {
17 const std::string nameOfToolsChain = m_decisionId.name();
18 const Combo::MultiplicityReqMap::const_iterator it = multiplicityRequiredMap.find(nameOfToolsChain);
19
20 if (it == multiplicityRequiredMap.end()) {
21 ATH_MSG_ERROR("ComboHypoTool for " << m_decisionId << " could not find its required multiplcity data in the map supplied by its parent alg.");
22 return StatusCode::FAILURE;
23 }
24
25 m_legMultiplicities = it->second;
26 if (m_legMultiplicities.size() == 0) {
27 ATH_MSG_ERROR("ComboHypoTool for " << m_decisionId << " was listed in the supplied multiplicityRequiredMap, but data was not supplied for any legs.");
28 return StatusCode::FAILURE;
29 }
30
31 m_legDecisionIds.clear();
32 for (size_t i = 0; i < m_legMultiplicities.size(); ++i) {
33 if(m_legMultiplicities.at(i) < 0) {
34 ATH_MSG_ERROR("ComboHypoTool for " << m_decisionId << " has been configured with an impossible multiplicity requirement of " << m_legMultiplicities.at(i) << " on leg " << i);
35 return StatusCode::FAILURE;
36 }
37 ATH_MSG_DEBUG("ComboHypoTool for " << m_decisionId << " will require multiplicity " << m_legMultiplicities.at(i) << " on leg " << i);
38 if (m_legMultiplicities.size() > 1) { // We only have per-leg IDs when there is more than one leg
40 } else { // For one leg, just repete the chain's ID
42 }
43 }
44
45 return StatusCode::SUCCESS;
46}
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.

◆ updateLegDecisionsMap()

void ComboHypoToolBase::updateLegDecisionsMap ( const std::vector< std::vector< Combo::LegDecision > > & passing_comb,
Combo::LegDecisionsMap & passingLegs ) const
protectedinherited

For when the tool accepts some/all combinations.

Remove Decision Objects from legs of this HypoTool's chain which participated in NONE of combinations which were flagged as accepting the event.

Definition at line 216 of file ComboHypoToolBase.cxx.

216 {
217 if (msgLvl(MSG::DEBUG)) {
218 size_t count = 0;
219 for (const std::vector<Combo::LegDecision>& comb : passingComb) {
220 ATH_MSG_DEBUG("-- Passing combination " << count++ << " of " << passingComb.size());
221 for (const auto& [id, EL] : comb) {
222 ATH_MSG_DEBUG("-- -- " << HLT::Identifier(id) << " container:" << EL.dataID() << ", index:" << EL.index());
223 }
224 }
225 }
226
227 // remove combinations that didn't pass from the final map passingLegs
228 for (auto& it : passingLegs) {
229 DecisionID legId = it.first;
230 if (not(legId == m_decisionId or (isLegId(legId) and getIDFromLeg(legId) == m_decisionId))) {
231 continue; // Some other chain, ignore it to get faster execution.
232 }
233 std::vector<ElementLink<DecisionContainer>> updatedDecisionObjectsOnLeg;
234 bool update = false;
235 // Loop over all passing combinations, and all Decision Objects in each passing combination. Find Decision Objects on this leg.
236 for (const std::vector<Combo::LegDecision>& comb : passingComb) {
237 for (const auto& [id, EL] : comb) {
238 // Check that this Decision Object is on the correct leg, and that we haven't collated it already from another combination.
239 if (id == legId and std::find(updatedDecisionObjectsOnLeg.begin(), updatedDecisionObjectsOnLeg.end(), EL) == updatedDecisionObjectsOnLeg.end()) {
240 ATH_MSG_VERBOSE("Keeping on leg " << HLT::Identifier(id) << " the Decision Object container:" << EL.dataID() << ", index:" << EL.index());
241 updatedDecisionObjectsOnLeg.push_back(EL);
242 update = true;
243 }
244 }
245 }
246 // only update those concerning this tool ID
247 if (update){
248 it.second = std::move(updatedDecisionObjectsOnLeg);
249 }
250 }
251}

Member Data Documentation

◆ FLOATDEFAULT

float Trig3VarComboHypoTool::FLOATDEFAULT = std::numeric_limits<float>::lowest()
staticconstexprprivate

Definition at line 29 of file Trig3VarComboHypoTool.h.

◆ m_combinationsThresholdBreak

Gaudi::Property<size_t> ComboHypoToolBase::m_combinationsThresholdBreak
protectedinherited
Initial value:
{this, "CombinationsThresholdBreak", 10000,
"Events processing this many combinations will generate a second WARNING message, and the loop over combinations will be terminated at this point."}

Definition at line 109 of file ComboHypoToolBase.h.

109 {this, "CombinationsThresholdBreak", 10000,
110 "Events processing this many combinations will generate a second WARNING message, and the loop over combinations will be terminated at this point."};

◆ m_combinationsThresholdWarn

Gaudi::Property<size_t> ComboHypoToolBase::m_combinationsThresholdWarn
protectedinherited
Initial value:
{this, "CombinationsThresholdWarn", 1000,
"Events processing this many combinations will generate a WARNING message."}

Definition at line 106 of file ComboHypoToolBase.h.

106 {this, "CombinationsThresholdWarn", 1000,
107 "Events processing this many combinations will generate a WARNING message."};

◆ m_decisionId

HLT::Identifier ComboHypoToolBase::m_decisionId
privateinherited

The DecisionID of the chain, obtained from the Tool's name.

Definition at line 122 of file ComboHypoToolBase.h.

◆ m_enableOverride

Gaudi::Property<bool> ComboHypoToolBase::m_enableOverride
protectedinherited
Initial value:
{this, "EnableOverride", false,
"Stops processing combinations as soon as a valid combination is found in OR mode, or as soon as an invalid combination is found in AND mode. This is to save CPU."}

Definition at line 115 of file ComboHypoToolBase.h.

115 {this, "EnableOverride", false,
116 "Stops processing combinations as soon as a valid combination is found in OR mode, or as soon as an invalid combination is found in AND mode. This is to save CPU."};

◆ m_isLegA_MET_vec

Gaudi::Property<std::vector< bool > > Trig3VarComboHypoTool::m_isLegA_MET_vec {this, "IsLegA_METVec", {false}, "Array with the first Leg MET identifier"}
private

Definition at line 89 of file Trig3VarComboHypoTool.h.

89{this, "IsLegA_METVec", {false}, "Array with the first Leg MET identifier"};

◆ m_isLegB_MET_vec

Gaudi::Property<std::vector< bool > > Trig3VarComboHypoTool::m_isLegB_MET_vec {this, "IsLegB_METVec", {false}, "Array with the second Leg MET identifier"}
private

Definition at line 90 of file Trig3VarComboHypoTool.h.

90{this, "IsLegB_METVec", {false}, "Array with the second Leg MET identifier"};

◆ m_isLegC_MET_vec

Gaudi::Property<std::vector< bool > > Trig3VarComboHypoTool::m_isLegC_MET_vec {this, "IsLegC_METVec", {false}, "Array with the third Leg MET identifier"}
private

Definition at line 91 of file Trig3VarComboHypoTool.h.

91{this, "IsLegC_METVec", {false}, "Array with the third Leg MET identifier"};

◆ m_legA_vec

Gaudi::Property<std::vector<uint32_t> > Trig3VarComboHypoTool::m_legA_vec {this, "LegAVec" , {0}, "Array with the first Leg ID"}
private

Definition at line 86 of file Trig3VarComboHypoTool.h.

86{this, "LegAVec" , {0}, "Array with the first Leg ID"};

◆ m_legB_vec

Gaudi::Property<std::vector<uint32_t> > Trig3VarComboHypoTool::m_legB_vec {this, "LegBVec" , {0}, "Array with the second Leg ID"}
private

Definition at line 87 of file Trig3VarComboHypoTool.h.

87{this, "LegBVec" , {0}, "Array with the second Leg ID"};

◆ m_legC_vec

Gaudi::Property<std::vector<uint32_t> > Trig3VarComboHypoTool::m_legC_vec {this, "LegCVec" , {0}, "Array with the third Leg ID"}
private

Definition at line 88 of file Trig3VarComboHypoTool.h.

88{this, "LegCVec" , {0}, "Array with the third Leg ID"};

◆ m_legDecisionIds

std::vector<HLT::Identifier> ComboHypoToolBase::m_legDecisionIds
privateinherited

The DecisionIDs of the individual legs, derived from both m_decisionId and m_legMultiplicities.

Definition at line 123 of file ComboHypoToolBase.h.

◆ m_legMultiplicities

std::vector<int> ComboHypoToolBase::m_legMultiplicities
privateinherited

The number of legs, and the required multiplicity on each leg.

Definition at line 124 of file ComboHypoToolBase.h.

◆ m_modeOR

Gaudi::Property<bool> ComboHypoToolBase::m_modeOR
protectedinherited
Initial value:
{this, "ModeOR", true,
"Accepts based on the logical OR over all calls to executeAlg. If this flag is set to false then the logical AND is required instead."}

Definition at line 112 of file ComboHypoToolBase.h.

112 {this, "ModeOR", true,
113 "Accepts based on the logical OR over all calls to executeAlg. If this flag is set to false then the logical AND is required instead."};

◆ m_monTool_vec

ToolHandleArray<GenericMonitoringTool> Trig3VarComboHypoTool::m_monTool_vec {this, "MonTools", {}, "Monitoring tools" }
private

Definition at line 98 of file Trig3VarComboHypoTool.h.

98{this, "MonTools", {}, "Monitoring tools" };

◆ m_useMax_vec

Gaudi::Property<std::vector<bool> > Trig3VarComboHypoTool::m_useMax_vec {this, "UseMaxVec" , {false}, "Array with the apply_max_cut setting"}
private

Definition at line 83 of file Trig3VarComboHypoTool.h.

83{this, "UseMaxVec" , {false}, "Array with the apply_max_cut setting"};

◆ m_useMin_vec

Gaudi::Property<std::vector<bool> > Trig3VarComboHypoTool::m_useMin_vec {this, "UseMinVec" , {false}, "Array with the apply_min_cut setting"}
private

Definition at line 82 of file Trig3VarComboHypoTool.h.

82{this, "UseMinVec" , {false}, "Array with the apply_min_cut setting"};

◆ m_varInfo_vec

std::vector<VarInfo> Trig3VarComboHypoTool::m_varInfo_vec
private

Internal variables for more efficient config lookup.

Definition at line 101 of file Trig3VarComboHypoTool.h.

◆ m_varMax_vec

Gaudi::Property<std::vector<float> > Trig3VarComboHypoTool::m_varMax_vec {this, "UpperCutVec", {FLOATDEFAULT}, "Array with the upper cut for legs pair"}
private

Definition at line 95 of file Trig3VarComboHypoTool.h.

95{this, "UpperCutVec", {FLOATDEFAULT}, "Array with the upper cut for legs pair"};

◆ m_varMin_vec

Gaudi::Property<std::vector<float> > Trig3VarComboHypoTool::m_varMin_vec {this, "LowerCutVec", {FLOATDEFAULT}, "Array with the lower cut for legs pair"}
private

Definition at line 94 of file Trig3VarComboHypoTool.h.

94{this, "LowerCutVec", {FLOATDEFAULT}, "Array with the lower cut for legs pair"};

◆ m_varTag_vec

Gaudi::Property<std::vector<std::string> > Trig3VarComboHypoTool::m_varTag_vec {this, "Variables" , {""}, "Variables to cut on"}
private

Gaudi configuration hooks.

Definition at line 81 of file Trig3VarComboHypoTool.h.

81{this, "Variables" , {""}, "Variables to cut on"};

The documentation for this class was generated from the following files: