26 ATH_MSG_INFO(
"Successfully initialized using the following configuration -- SAF: "
31 return StatusCode::SUCCESS;
36 unsigned int counter{0};
38 if (!readHandle.isValid()) {
40 return StatusCode::FAILURE;
48 return StatusCode::FAILURE;
60 return StatusCode::FAILURE;
66 return StatusCode::FAILURE;
81 return StatusCode::SUCCESS;
90 if (!link.isValid()) {
93 }
else if (*link != tp) {
94 ATH_MSG_WARNING(
"Dereferenced Link not equal to TrackParticle, skipping track ");
100 if (
msgLvl(MSG::VERBOSE)) {
105 ATH_MSG_VERBOSE(
" Truth particle: pdgId " << truth_part->
pdgId() <<
" type " << truthTypeAcc(*tp) <<
" origin "
106 << truthOriginAcc(*tp) <<
" pt " << truth_part->
pt() <<
" eta "
107 << truth_part->
eta() <<
" phi " << truth_part->
phi());
112 cache.candidate = std::make_unique<InDetCandidate>(link);
113 cache.candidate->setSiliconAssociated(output_cache.
flagAsSAF);
114 cache.useHitSectors =
false;
117 (
m_extendBulk && !cache.candidate->isSiliconAssociated()));
123 return StatusCode::SUCCESS;
136 if (currentTrackSelector && !currentTrackSelector->
decision(*tp)) {
144 ATH_MSG_DEBUG(what <<
" InDet TrackParticle: pt " << tp->
pt() <<
" eta " << tp->
eta() <<
" phi " << tp->
phi() <<
" Pixel "
152 return static_cast<int>(val);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Helper class to provide constant type-safe access to aux data.
bool msgLvl(const MSG::Level lvl) const
An algorithm that can be simultaneously executed in multiple threads.
size_type size() const noexcept
Returns the number of elements in the collection.
ElementLink implementation for ROOT usage.
Gaudi::Property< bool > m_requireExtension
Reject muon candidates without a muon system extension – only effective if the candidate shall actual...
Gaudi::Property< float > m_extThreshold
Minimum pt threshold of the IdCandidate to be extrapolated through the spectrometer.
SG::ReadHandleKey< CaloExtensionCollection > m_caloFwdExtensionLocation
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_indetTrackParticleLocation
Gaudi::Property< bool > m_extendBulk
Shall ordinary ID tracks be equiped with a muon system extension used by MuGirl later.
Gaudi::Property< bool > m_extendSAF
Shall SAF tracks be equiped with a muon system extension used by MuGirl later.
StatusCode initialize() override
SG::WriteHandleKey< InDetCandidateCollection > m_candidateCollectionName
ToolHandle< Muon::IMuonSystemExtensionTool > m_muonSystemExtensionTool
void printTrackParticleInfo(const xAOD::TrackParticle *const tp, const std::string &what) const
MuonCombinedInDetCandidateAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_doSiliconForwardMuons
ToolHandle< Trk::ITrackSelectorTool > m_trackSelector
ToolHandle< Trk::ITrackSelectorTool > m_forwardTrackSelector
int getCount(const xAOD::TrackParticle &tp, xAOD::SummaryType type) const
StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_indetForwardTrackParticleLocation
StatusCode create(const EventContext &ctx, InDetCandidateCache &output_cache) const
bool isValidTrackParticle(const Trk::ITrackSelectorTool *currentTrackSelector, const xAOD::TrackParticle *const tp) const
SG::ReadHandleKeyArray< CaloExtensionCollection > m_caloExtensionLocation
Helper class to provide constant type-safe access to aux data.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .).
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
int pdgId() const
PDG ID code.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any).
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.
SummaryType
Enumerates the different types of information stored in Summary.
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
const CaloExtensionCollection * extensionContainer
Cache of the CaloExtensions.
bool flagAsSAF
Flag the candidates as sillicion forward associated.
std::unique_ptr< InDetCandidateCollection > outputContainer
Output container for the StoreGate.
const Trk::ITrackSelectorTool * trackSelector
Corresponding track selector.
const xAOD::TrackParticleContainer * inDetContainer
Track particle container.