ATLAS Offline Software
|
Base class for tools which cut on properties of multi-object or multi-leg chains. User should derive from this class and implement the executeAlg function. This will be called once per combination of objects in the event which reach the ComboHypo alg which hosts this tool. More...
#include <ComboHypoToolBase.h>
Inherits extends< AthAlgTool, IComboHypoTool >.
Inherited by DebugComboHypoTool, DeltaRRoIComboHypoTool, DisplacedJetRankComboHypoTool, TrigAFPDijetComboHypoTool, TrigBmumuxComboHypoTool, TrigComboHypoTool, TrigEgammaTopoHypoTool, TrigMultiTrkComboHypoTool, TrigMuonEFIdtpInvMassHypoTool, and TrigMuonEFInvMassHypoTool.
Public Member Functions | |
ComboHypoToolBase (const std::string &type, const std::string &name, const IInterface *parent) | |
virtual StatusCode | decide (Combo::LegDecisionsMap &passingLegs, const EventContext &) const override |
retrieves the decisions associated to this decId, make their combinations and apply the algorithm More... | |
virtual HLT::Identifier | decisionId () const |
retrieves this ComboHypoTool's chain's decision ID More... | |
StatusCode | setLegMultiplicity (const Combo::MultiplicityReqMap &multiplicityRequiredMap) |
Sets the number of legs and the multiplicity required on each leg. More... | |
const std::vector< int > & | legMultiplicity () const |
Gets the number of legs and the multiplicity required on each leg. More... | |
HLT::Identifier | legDecisionId (size_t i) const |
Retrieves this ComboHypoTool's chain's decision ID for a given leg. More... | |
const std::vector< HLT::Identifier > & | legDecisionIds () const |
Retrieves this ComboHypoTool's chain's decision IDs for all legs. More... | |
virtual StatusCode | decideOnSingleObject (TrigCompositeUtils::Decision *, const std::vector< const TrigCompositeUtils::DecisionIDContainer * > &) const |
Alternate method called by BPhysics ComboHypoAlgs instead of the base method decide(...). More... | |
Protected Member Functions | |
virtual bool | executeAlg (const std::vector< Combo::LegDecision > &combination) const |
Only a dummy implementation exists in ComboHypoToolBase. More... | |
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. More... | |
void | updateLegDecisionsMap (const std::vector< std::vector< Combo::LegDecision >> &passing_comb, Combo::LegDecisionsMap &passingLegs) const |
For when the tool accepts some/all combinations. More... | |
void | eraseFromLegDecisionsMap (Combo::LegDecisionsMap &passingLegs) const |
For when the tool rejects all combinations. More... | |
StatusCode | printDebugInformation (const Combo::LegDecisionsMap &passingLegs) const |
Print the output of the tool, after having removed failed Decision Objects. More... | |
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 Attributes | |
HLT::Identifier | m_decisionId |
The DecisionID of the chain, obtained from the Tool's name. More... | |
std::vector< HLT::Identifier > | m_legDecisionIds |
The DecisionIDs of the individual legs, derived from both m_decisionId and m_legMultiplicities. More... | |
std::vector< int > | m_legMultiplicities |
The number of legs, and the required multiplicity on each leg. More... | |
Base class for tools which cut on properties of multi-object or multi-leg chains. User should derive from this class and implement the executeAlg function. This will be called once per combination of objects in the event which reach the ComboHypo alg which hosts this tool.
Definition at line 26 of file ComboHypoToolBase.h.
ComboHypoToolBase::ComboHypoToolBase | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Definition at line 10 of file ComboHypoToolBase.cxx.
|
overridevirtual |
retrieves the decisions associated to this decId, make their combinations and apply the algorithm
[in] | LegDecisionsMap | that lists all the passing decisions, to be updated by the tool depending on the outcome of executeAlg |
[in] | Event | Context, currently unused |
Reimplemented in DisplacedJetRankComboHypoTool.
Definition at line 48 of file ComboHypoToolBase.cxx.
|
virtual |
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 TrigMultiTrkComboHypoTool, and TrigBmumuxComboHypoTool.
Definition at line 284 of file ComboHypoToolBase.cxx.
|
inlinevirtual |
retrieves this ComboHypoTool's chain's decision ID
Definition at line 41 of file ComboHypoToolBase.h.
|
protected |
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.
|
protectedvirtual |
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 TrigEgammaTopoHypoTool, TrigAFPDijetComboHypoTool, DebugComboHypoTool, DeltaRRoIComboHypoTool, TrigMuonEFIdtpInvMassHypoTool, TrigMuonEFInvMassHypoTool, TrigMultiTrkComboHypoTool, and TrigBmumuxComboHypoTool.
Definition at line 279 of file ComboHypoToolBase.cxx.
|
inline |
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.
|
inline |
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.
|
inline |
Gets the number of legs and the multiplicity required on each leg.
Definition at line 54 of file ComboHypoToolBase.h.
|
protected |
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.
|
protected |
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.
StatusCode ComboHypoToolBase::setLegMultiplicity | ( | const Combo::MultiplicityReqMap & | multiplicityRequiredMap | ) |
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.
|
protected |
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.
|
protected |
Definition at line 109 of file ComboHypoToolBase.h.
|
protected |
Definition at line 106 of file ComboHypoToolBase.h.
|
private |
The DecisionID of the chain, obtained from the Tool's name.
Definition at line 122 of file ComboHypoToolBase.h.
|
protected |
Definition at line 115 of file ComboHypoToolBase.h.
|
private |
The DecisionIDs of the individual legs, derived from both m_decisionId and m_legMultiplicities.
Definition at line 123 of file ComboHypoToolBase.h.
|
private |
The number of legs, and the required multiplicity on each leg.
Definition at line 124 of file ComboHypoToolBase.h.
|
protected |
Definition at line 112 of file ComboHypoToolBase.h.