![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/StatusCode.h"
24 const std::string&
name,
25 const IInterface*
parent) :
38 return StatusCode::SUCCESS;
42 return StatusCode::SUCCESS;
53 ATH_CHECK( h_outBTagInfo.
record (std::make_unique<xAOD::BTaggingContainer>(),
54 std::make_unique<xAOD::BTaggingAuxContainer>() ) );
66 for (
const auto previousDecision : *previousDecisions)
68 std::vector<LinkInfo<xAOD::BTaggingContainer>> btagDecisionInfoLinks = TrigCompositeUtils::findLinks<xAOD::BTaggingContainer>(previousDecision,
"btag", TrigDefs::lastFeatureOfType);
69 if (btagDecisionInfoLinks.size() == 0 ){
70 ATH_MSG_DEBUG(
"Skipping decision with no b-tag information.");
73 if (btagDecisionInfoLinks.size() > 1 ){
74 ATH_MSG_ERROR(
"More than one BTagging element found for this decision!");
75 return StatusCode::FAILURE;
78 for (
auto btagLinkInfo: btagDecisionInfoLinks){
84 if (getBJet.
isAvailable(*btag) && getBJet(*btag).isValid()) {
85 bjet = *(getBJet(*btag));
87 else return StatusCode::FAILURE;
91 for (
auto jet: jets_to_btag ){
95 if (
jet->eta() !=
bjet->eta())
ATH_MSG_WARNING(
"Found matching jet for b-jet but their eta values differ (jet eta "<<
jet->eta()<<
", b-jet eta "<<
bjet->eta()<<
". Were these jets properly matched?");
98 h_outBTagInfo->
push_back(copied_bTagInfo);
99 *copied_bTagInfo = *bTagInfo;
102 h_bTagJetLinkName(*h_outBTagInfo->
back()) = jetEL;
110 return StatusCode::SUCCESS;
AthConfigFlags bjet(AthConfigFlags flags, str instanceName, str recoMode)
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Helper class to provide constant type-safe access to aux data.
bool isValid() const
Test to see if the link can be dereferenced.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
#define CHECK(...)
Evaluate an expression and check for errors.
const ElementLink< IParticleContainer > & getOriginalObjectLink(const IParticle ©)
This function should be used instead of xAOD::getOriginalObject when we want to use the "original obj...
const T * back() const
Access the last element in the collection as an rvalue.
ElementLink implementation for ROOT usage.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
BTagging_v1 BTagging
Definition of the current "BTagging version".
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.