|
ATLAS Offline Software
|
Go to the documentation of this file.
26 const std::string&
name, ISvcLocator* loc )
71 return StatusCode::SUCCESS;
81 ATH_MSG_DEBUG(
"Retrieved " << tracks->size() <<
" tracks..." );
104 std::vector<const xAOD::TrackParticle*> tracks_vector(tracks->begin(), tracks->end());
105 for (
const auto&
track : tracks_vector ) {
117 dec_vertex_index(*
track) = truth ? acc_vertex_index(*truth) : -2;
118 dec_muon_origin_label(*
track) = -2;
124 for (
const auto muon : *muons ) {
130 unsigned int muTruthOrigin = 0;
135 auto track_link =
muon->inDetTrackParticleLink();
136 if ( !track_link.isValid() ) {
continue; }
137 auto track = *track_link;
141 if ( !truth ) {
continue; }
146 if ( abs(truth->pdgId()) != 13 ) {
162 muTruthOrigin =
it->second;
166 ATH_MSG_ERROR(
"Muon truth origin not found in the map: " <<
static_cast<int>(muTruthOriginType));
167 return StatusCode::FAILURE;
172 dec_muon_origin_label(*
track) = muTruthOrigin;
175 return StatusCode::SUCCESS;
This file contains "getter" functions used for accessing tagger inputs from the EDM.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackContainerKey
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
WDHK m_dec_parent_barcode
ToolHandle< CP::IClassificationTool > m_truthLeptonTool
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::unordered_map< Truth::Type, unsigned int > m_muTruthMap
RDHK m_acc_parent_barcode
bool isFromDfromB(int origin)
from B-->D decay chain
An algorithm that can be simultaneously executed in multiple threads.
Handle class for reading a decoration on an object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
ToolHandle< InDet::InDetTrackTruthOriginTool > m_trackTruthOriginTool
Handle class for adding a decoration to an object.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
constexpr int UNDEFINED_ID
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
TrackTruthDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
WDHK m_dec_muon_origin_label
virtual StatusCode execute(const EventContext &) const override
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int getExclusiveOrigin(int origin)
Handle class for reading a decoration on an object.
virtual StatusCode initialize() override
size_type size() const noexcept
Returns the number of elements in the collection.
Type
truth classification type enum