38 return StatusCode::SUCCESS;
47 return StatusCode::SUCCESS;
58 xaod->setStore(
aux );
63 Analysis::MuonContainer::const_iterator itr = aod->
begin();
64 Analysis::MuonContainer::const_iterator end = aod->
end();
65 for( ; itr != end; ++itr ) {
71 muon->setP4((*itr)->pt(),(*itr)->eta(),(*itr)->phi());
74 muon->setAuthor(
static_cast<xAOD::Muon_v1::Author
>((*itr)->author()));
75 muon->setAllAuthors( (*itr)->allAuthors());
78 if ((*itr)->isCombinedMuon())
79 muon->setMuonType(xAOD::Muon::Combined);
80 else if ((*itr)->isStandAloneMuon())
81 muon->setMuonType(xAOD::Muon::MuonStandAlone);
82 else if ((*itr)->isSegmentTaggedMuon())
83 muon->setMuonType(xAOD::Muon::SegmentTagged);
84 else if ((*itr)->isCaloMuonId())
85 muon->setMuonType(xAOD::Muon::CaloTagged);
86 else if ((*itr)->isSiliconAssociatedForwardMuon())
87 muon->setMuonType(xAOD::Muon::SiliconAssociatedForwardMuon);
92 xAOD::Muon::Quality tightness;
93 if ((*itr)->isTight()) {
94 tightness=xAOD::Muon::Tight;
95 }
else if ((*itr)->isMedium()) {
96 tightness=xAOD::Muon::Medium;
98 tightness=xAOD::Muon::Loose;
100 muon->setQuality( tightness );
112 ATH_MSG_VERBOSE(
" xAOD Muon pt " << muon->pt() <<
" eta " << muon->eta() <<
" phi " << muon->phi());
113 ATH_MSG_VERBOSE(
" author " << muon->author() <<
" type " << muon->muonType()
114 <<
" links CB " << muon->combinedTrackParticleLink().isValid()
115 <<
" ID " << muon->inDetTrackParticleLink().isValid()
116 <<
" MS " << muon->muonSpectrometerTrackParticleLink().isValid()
117 <<
" Primary " << muon->primaryTrackParticleLink().isValid()
124 return StatusCode::SUCCESS;
154 float parameter =
static_cast<float>(
result);
181 float isolation =
static_cast<float>(aodmuon.
parameter(aodParameter));
213 std::string destname = name;
214 if (destname.empty())
215 destname = oldLink.
dataID();
217 ATH_MSG_VERBOSE(
"MuonCnvAlg::getNewLink - Old link is "<<(oldLink.
isValid()?
"VALID":
"INVALID")<<
" with SGKey = "<<oldLink.
dataID()<<
" & index = "<<oldLink.
index()
218 <<
" and new link is "<<(newLink.
isValid()?
"VALID":
"INVALID")<<
" with SGKey = "<<newLink.
dataID()<<
" & index = "<<newLink.
index());
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
definition of StoreGate container holding a vector of Analysis::Muon
The ATLAS Muon object - see doxygen, physics workbookd and the Muon Combined Performance WG's pages f...
const Rec::TrackParticle * track() const
return the primary track of this muon
const ElementLink< Rec::TrackParticleContainer > & muonExtrapTrackLink() const
Access to the smart pointer to the muon track extrapolated to the vertex.
const ElementLink< Rec::TrackParticleContainer > & inDetTrackLink() const
Access to the smart pointer to inner detector track.
double parameter(MuonParameters::ParamDef x) const
get a parameter for this Muon - isolation energy in some cone for example
const ElementLink< Rec::TrackParticleContainer > & combinedTrackLink() const
Access to the smart pointer to the muon combined track.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ElementLink implementation for ROOT usage.
const ID_type & dataID() const
Get the key that we reference, as a string.
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by string key and index.
index_type index() const
Get the index of the element inside of its container.
bool isValid() const
Test to see if the link can be dereferenced.
const TrackSummary * trackSummary() const
accessor function for TrackSummary.
MuonCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular algorithm constructor.
std::string m_aodContainerName
The key of the input CaloClusterContainer.
void setLinks(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon) const
static void checkAndSetIsolation(MuonParameters::ParamDef aodParameter, xAOD::Iso::IsolationType xaodParameter, const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
virtual StatusCode execute()
Function executing the algorithm.
void setMuonHitContent(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
static void setIsolations(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
std::string m_cbTrackParticles
Location/Key for combined fit xAOD::TrackParticles.
std::string m_xaodContainerName
The key for the output xAOD::CaloClusterContainer.
static void setParameters(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
virtual StatusCode initialize()
Function initialising the algorithm.
ToolHandle< xAOD::IMuonDressingTool > m_muonDressingTool
std::string m_inDetTrackParticles
Location/Key for xAOD::TrackParticles from ID.
ElementLink< xAOD::TrackParticleContainer > getNewLink(const ElementLink< Rec::TrackParticleContainer > &oldLink, const std::string &name) const
std::string m_saTrackParticles
Location/Key for MS SA (extrap to beamline) xAOD::TrackParticles.
static void checkAndSetParameter(MuonParameters::ParamDef aodParameter, xAOD::Muon::ParamDef xaodParameter, const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
const ElementLink< TrackParticleContainer > & combinedTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
const ElementLink< TrackParticleContainer > & inDetTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
void setTrackParticleLink(TrackParticleType type, const ElementLink< TrackParticleContainer > &link)
Set method for TrackParticle links.
void setParameter(float value, const ParamDef parameter)
Set method for parameter values.
void setIsolation(float value, const Iso::IsolationType information)
Set method for Isolation values.
MuonType muonType() const
const ElementLink< TrackParticleContainer > & muonSpectrometerTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
const ElementLink< TrackParticleContainer > & primaryTrackParticleLink() const
ParamDef
Enum for parameter indexes.
@ spectrometerFieldIntegral
Discriminators and further variables.
@ innAngle
common MuGirl and MuTag parameters
@ scatteringNeighbourSignificance
@ scatteringCurvatureSignificance
@ segmentDeltaEta
MuTag parameters.
@ momentumBalanceSignificance
IsolationType
Overall enumeration for isolation types in xAOD files.
@ etcone20
Calorimeter isolation.
@ ptcone20
Track isolation.
Muon_v1 Muon
Reference the current persistent version:
MuonAuxContainer_v5 MuonAuxContainer
Definition of the current Muon auxiliary container.
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".