![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
21 m_bTagTool(
"Analysis::BTagTool",this),
22 m_bTagSecVtxTool(
"Analysis::BTagSecVertexing",this)
69 return StatusCode::FAILURE;
77 return StatusCode::FAILURE;
85 return StatusCode::SUCCESS;
92 if (!h_JetCollectionName.
isValid()) {
94 return StatusCode::FAILURE;
97 if (h_JetCollectionName->
empty()) {
107 std::optional<SG::ReadDecorHandle<xAOD::JetContainer, std::vector<ElementLink< xAOD::IParticleContainer> > > >
113 h_IncomingMuons =
tmp;
135 ATH_CHECK( h_BTaggingCollectionName.
record(std::make_unique<xAOD::BTaggingContainer>(),
136 std::make_unique<xAOD::BTaggingAuxContainer>()) );
143 if (fieldCondObj ==
nullptr) {
145 return StatusCode::FAILURE;
147 fieldCondObj->getInitializedCache (fieldCache);
150 for (
const auto *
jet : *h_JetCollectionName) {
152 h_jetBTaggingLinkName(*
jet) = linkBTagger;
154 return StatusCode::SUCCESS;
156 for (
const auto *
jet : *h_JetCollectionName.
ptr()) {
158 h_BTaggingCollectionName->
push_back(newBTagMT);
161 const std::vector<ElementLink<xAOD::IParticleContainer> >& trackLinks = h_IncomingTracks(*
jet);
163 std::vector<ElementLink<xAOD::TrackParticleContainer> > tmpTracks;
165 tmpTracks.reserve(trackLinks.size());
167 tmpTracks.emplace_back(elpart.key(), elpart.index());
169 h_OutgoingTracks(*newBTagMT) = tmpTracks;
176 std::vector<ElementLink<xAOD::MuonContainer> > tmpMuons;
178 const std::vector<ElementLink<xAOD::IParticleContainer> >& muonLinks = (*h_IncomingMuons)(*jet);
181 tmpMuons.emplace_back(elpart.key(), elpart.index());
184 h_OutgoingMuons(*newBTagMT) = tmpMuons;
192 if (SV.isFailure()) {
199 if (SV.isFailure()) {
204 for (
size_t jetIndex=0; jetIndex < h_JetCollectionName->
size() ; ++jetIndex) {
205 const xAOD::Jet * jetToTag = h_JetCollectionName->
at(jetIndex);
209 h_jetBTaggingLinkName(*jetToTag) = linkBTagger;
212 h_bTagJetLinkName(*itBTag) = linkJet;
215 return StatusCode::SUCCESS;
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::WriteHandleKey< xAOD::BTaggingContainer > m_BTaggingCollectionName
JetBTaggingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructors and destructors.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetBTaggingLinkName
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_IncomingMuons
Handle class for reading a decoration on an object.
SG::ReadHandleKey< xAOD::JetContainer > m_JetCollectionName
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
Handle class for adding a decoration to an object.
virtual StatusCode initialize() override
Main routines specific to an ATHENA algorithm.
SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_bTagJetDecorLinkName
ToolHandle< IBTagTool > m_bTagTool
bool solenoidOn() const
status of the magnets
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_OutgoingTracks
ElementLink implementation for ROOT usage.
The namespace of all packages in PhysicsAnalysis/JetTagging.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
const_pointer_type ptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_OutgoingMuons
#define ATH_MSG_WARNING(x)
BTagging_v1 BTagging
Definition of the current "BTagging version".
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
virtual StatusCode execute(const EventContext &ctx) const override final
Handle class for reading a decoration on an object.
const T * at(size_type n) const
Access an element, as an rvalue.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_IncomingTracks
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
ToolHandle< IBTagLightSecVertexing > m_bTagSecVtxTool