|
ATLAS Offline Software
|
Go to the documentation of this file.
20 const std::string&
name, ISvcLocator* loc )
63 return StatusCode::SUCCESS;
92 decor_lepton_id(*
track) = 0;
93 decor_muon_quality(*
track) = -1;
94 decor_muon_qOverPratio(*
track) = -99.;
95 decor_muon_momentumBalanceSignificance(*
track) = -99.;
96 decor_muon_scatteringNeighbourSignificance(*
track) = -99.;
105 if ( !
track ) {
continue; }
109 if (!LH_selection) {
continue; }
117 for (
const auto muon : *muons ) {
123 auto track_link =
muon->inDetTrackParticleLink();
124 if ( !track_link.isValid() ) {
continue; }
125 auto track = *track_link;
128 auto ms_track_link =
muon->extrapolatedMuonSpectrometerTrackParticleLink();
129 if ( !ms_track_link.isValid() ) {
continue; }
130 auto ms_track = *ms_track_link;
132 float momBalSig = 0.;
133 float scatNeighSig = 0.;
138 decor_lepton_id(*
track) = -13 *
muon->charge();
140 decor_muon_qOverPratio(*
track) =
track->qOverP() / ms_track->qOverP();
141 decor_muon_momentumBalanceSignificance(*
track) = momBalSig;
142 decor_muon_scatteringNeighbourSignificance(*
track) = scatNeighSig;
145 return StatusCode::SUCCESS;
TrackLeptonDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
This file contains "getter" functions used for accessing tagger inputs from the EDM.
@ scatteringNeighbourSignificance
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
const std::string & key() const
Return the StoreGate ID for the referenced object.
ToolHandle< IAsgElectronLikelihoodTool > m_electronID_tool
An algorithm that can be simultaneously executed in multiple threads.
@ momentumBalanceSignificance
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_muon_qOverPratio
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
Handle class for adding a decoration to an object.
ToolHandle< CP::IMuonSelectionTool > m_muonID_tool
#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?
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_muon_momentumBalanceSignificance
virtual StatusCode execute(const EventContext &) const override
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_muon_scatteringNeighbourSignificance
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackContainerKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode initialize() override
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.
Handle class for reading a decoration on an object.
Class describing a TrackParticle.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_lepton_id
size_type size() const noexcept
Returns the number of elements in the collection.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_muon_quality