|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "AthLinks/ElementLink.h"
23 declareInterface<ITrigMuonEFInfoToMuonCnvTool>(
this);
35 else ATH_MSG_INFO(
"Will not make links to EF ID xAOD track particles");
38 return StatusCode::SUCCESS;
53 const int nmuin = muoncontainer.
size();
57 if( !infotrk->hasExtrapolatedTrack() && !infotrk->hasCombinedTrack() ){
58 ATH_MSG_WARNING(
"TrigMuonEFInfoTrack has no extrapolated or combined track, will not be converted to xAOD");
67 if(infotrk->hasExtrapolatedTrack()) {
70 if(extrapParticleContainer) extrapParticleContainer->
push_back( extrapTrackPart );
74 if(
sc.isFailure())
return sc;
77 if(extrapParticleContainer) {
79 muon->setTrackParticleLink( xAOD::Muon::MuonSpectrometerTrackParticle, link );
83 muon->setP4(extraptrk->
pt(),extraptrk->
eta(),extraptrk->
phi());
87 muon->setMuonType(xAOD::Muon::MuonStandAlone);
90 if(!extrapParticleContainer)
delete extraptrk;
94 if(infotrk->hasCombinedTrack()) {
97 if(combParticleContainer) combParticleContainer->
push_back( combinedTrackPart );
101 if(
sc.isFailure())
return sc;
104 if(combParticleContainer) {
106 muon->setTrackParticleLink( xAOD::Muon::CombinedTrackParticle, link );
110 muon->setP4(combtrk->
pt(),combtrk->
eta(),combtrk->
phi());
137 else ATH_MSG_WARNING(
"Created an invalid element link to ID xAOD track particle");
139 }
else ATH_MSG_WARNING(
"TrigMuonEFCbTrack with invalid element link to ID track - cannot create link for xAOD muon");
143 if(!combParticleContainer)
delete combinedTrackPart;
149 ATH_MSG_DEBUG(
"Conversion finished, n(muons) added to xAOD container = " << muoncontainer.
size()-nmuin);
151 return StatusCode::SUCCESS;
161 for(
const auto *efinfo : efinfocont) {
163 if(
sc.isFailure())
return sc;
166 return StatusCode::SUCCESS;
175 if( std::abs(eftrack.
p()) <
p ) {
176 ATH_MSG_WARNING(
"TrigMuonEFTrack has p close to zero = " << eftrack.
p() <<
"set to " <<
p);
178 p = std::abs(eftrack.
p());
180 const double qoverp =
charge /
p;
197 return StatusCode::SUCCESS;
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Scalar theta() const
theta method
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
const ElementLink< Rec::TrackParticleContainer > & getIDTrackParticleLink() const
#define ATH_MSG_VERBOSE(x)
bool isValid() const
Test to see if the link can be dereferenced.
const ID_type & dataID() const
Get the key that we reference, as a string.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by string key and index.
virtual double p() const
momentum magnitude
virtual double eta() const
pseudo rapidity
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual double phi() const
get phi data member
Muon_v1 Muon
Reference the current persistent version:
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
void makePrivateStore()
Create a new (empty) private store for this object.
#define ATH_MSG_WARNING(x)
index_type index() const
Get the index of the element inside of its container.
const TrigMuonEFInfoTrackContainer * TrackContainer() const
Class describing a TrackParticle.
static const int MuonTypeEFMuon
void setParametersOrigin(float x, float y, float z)
Set the origin for the parameters.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual double pt() const
transverse momentum
virtual double tanTh() const
tan theta