Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <TrackParametersKVU.h>
the code used in this implementation is kindly stolen from: atlasoff:: ISF/ISF_Core/ISF_Tools
- Author
- James Catmore -at- cern.ch
Definition at line 57 of file TrackParametersKVU.h.
◆ TrackParametersKVU()
DerivationFramework::TrackParametersKVU::TrackParametersKVU |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TrackParametersKVU()
virtual DerivationFramework::TrackParametersKVU::~TrackParametersKVU |
( |
| ) |
|
|
virtualdefault |
◆ addBranches()
StatusCode DerivationFramework::TrackParametersKVU::addBranches |
( |
| ) |
const |
|
overridevirtual |
Check that the current event passes this filter.
Definition at line 62 of file TrackParameterKVU.cxx.
64 const EventContext& ctx = Gaudi::Hive::currentContext();
71 if(tracks->size() !=0) {
81 for (
const auto track : *tracks) {
85 std::unique_ptr<
AmgSymMatrix(5)> updateTrackCov =
nullptr;
86 float updatephi = -999;
87 float updatetheta = -999;
88 float updated0 = -999;
89 float updatez0 = -999;
90 float updateqOverP = -999;
91 float updateChi2 = -999;
92 bool usedPrimaryVertex =
false;
93 std::vector<float>
vec;
95 std::unique_ptr<const Trk::TrackParameters> trackParams =
nullptr;
101 if (vxContainer.isValid()) {
106 auto vtxSurface = std::make_unique<Trk::PerigeeSurface>(vtxPos);
107 trackParams =
m_extrapolator->extrapolate(ctx,*tPerigee,*vtxSurface);
108 std::unique_ptr<const Trk::ImpactParametersAndSigma> iPandSigma =
nullptr;
109 iPandSigma =
m_IPEstimator->estimate(trackParams.get(), vtx);
110 if(sqrt(iPandSigma->
IPd0*iPandSigma->
IPd0+iPandSigma->
IPz0*iPandSigma->
IPz0) < minIP){
111 minIP = sqrt(iPandSigma->
IPd0*iPandSigma->
IPd0+iPandSigma->
IPz0*iPandSigma->
IPz0);
114 ATH_MSG_VERBOSE(
"n vtx pos(x, y, z) IPd0 IPz0 : " << nVtx <<
" " << vtx->position().x() <<
" "<< vtx->position().y() <<
" "<< vtx->position().z() <<
" " << iPandSigma->
IPd0 <<
" " << iPandSigma->
IPz0);
121 return StatusCode::FAILURE;
132 auto recVtx = std::make_unique<xAOD::Vertex>();
133 recVtx->makePrivateStore(*closestVertex);
134 auto surface = std::make_unique<const Trk::PerigeeSurface>(globPos);
135 trackParams =
m_extrapolator->extrapolate(ctx,*tPerigee,*surface);
136 auto linearTrack = std::make_unique<Trk::VxTrackAtVertex>(0.,
nullptr,
nullptr, trackParams.get(),
nullptr);
140 ATH_MSG_VERBOSE(
"Updating linearized track parameters after vertex fit. Track weight = " << linearTrack->weight());
142 ATH_MSG_VERBOSE (
"track info after vertex track updator !"<<*linearTrack );
143 if(linearTrack->perigeeAtVertex()) {
145 updateqOverP = linearTrack->perigeeAtVertex()->parameters()[
Trk::qOverP];
146 updated0 = linearTrack->perigeeAtVertex()->parameters()[
Trk::d0];
147 updatez0 = linearTrack->perigeeAtVertex()->parameters()[
Trk::z0];
148 updatephi = linearTrack->perigeeAtVertex()->parameters()[
Trk::phi0];
149 updatetheta = linearTrack->perigeeAtVertex()->parameters()[
Trk::theta];
151 updateTrackCov = std::make_unique<AmgSymMatrix(5)>(*linearTrack->perigeeAtVertex()->covariance());
152 updateChi2 = linearTrack->trackQuality().chiSquared();
160 decoratorKVUqOverP(*
track) = updateqOverP;
161 decoratorKVUd0(*
track) = updated0;
162 decoratorKVUz0(*
track) = updatez0;
163 decoratorKVUphi(*
track) = updatephi;
164 decoratorKVUtheta(*
track) = updatetheta;
165 decoratorKVUChi2(*
track) = updateChi2;
166 decoratorKVUusedPV(*
track) = usedPrimaryVertex;
179 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::TrackParametersKVU::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 22 of file TrackParameterKVU.cxx.
26 ATH_MSG_ERROR(
"No selection variables for the TrackParametersKVU tool!");
27 return StatusCode::FAILURE;
57 ATH_MSG_DEBUG(
"Successfully retrived the TrackParametersKVU tool" );
58 return StatusCode::SUCCESS;
◆ m_extrapolator
Initial value:{
this, "TrackExtrapolator", "Trk::Extrapolator/AtlasExtrapolator"}
Definition at line 96 of file TrackParametersKVU.h.
◆ m_IPEstimator
Initial value:{
this, "IPEstimator", "Trk::TrackToVertexIPEstimator/TrackToVertexIPEstimator"}
Definition at line 100 of file TrackParametersKVU.h.
◆ m_KVUChi2Key
◆ m_KVUCovMatKey
◆ m_KVUd0Key
◆ m_KVUphiKey
◆ m_KVUqOverPKey
◆ m_KVUthetaKey
◆ m_KVUusedPVKey
◆ m_KVUz0Key
◆ m_LinearizedTrackFactory
Initial value:{
this, "LinearizedTrackFactory", "Trk::FullLinearizedTrackFactory/FullLinearizedTrackFactory"}
Definition at line 98 of file TrackParametersKVU.h.
◆ m_sgName
StringProperty DerivationFramework::TrackParametersKVU::m_sgName {this, "DecorationPrefix", "", "decoration prefix"} |
|
private |
◆ m_trackContainerKey
Initial value:{
this, "TrackParticleContainerName", "InDetDisappearingTrackParticles"}
Definition at line 73 of file TrackParametersKVU.h.
◆ m_vertexContainerKey
Initial value:{
this, "VertexContainerName", "PrimaryVertices"}
Definition at line 75 of file TrackParametersKVU.h.
◆ m_vertexTrackUpdator
Initial value:{
this, "VertexTrackUpdator", "Trk::KalmanVertexTrackUpdator"}
Definition at line 94 of file TrackParametersKVU.h.
The documentation for this class was generated from the following files:
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
void compress(const AmgSymMatrix(N) &covMatrix, std::vector< float > &vec)
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
const Amg::Vector3D & position() const
Returns the 3-pos.
std::vector< size_t > vec
ToolHandle< Trk::IVertexTrackUpdator > m_vertexTrackUpdator
#define ATH_MSG_VERBOSE(x)
ToolHandle< Trk::IExtrapolator > m_extrapolator
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUqOverPKey
VxType::VertexType vertexType() const
The type of the vertex.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUthetaKey
#define AmgSymMatrix(dim)
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUChi2Key
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUCovMatKey
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUphiKey
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.
Eigen::Matrix< double, 3, 1 > Vector3D
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUz0Key
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
float chiSquared() const
Returns the of the vertex fit as float.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class describing a Vertex.
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUd0Key
ToolHandle< Trk::ITrackToVertexIPEstimator > m_IPEstimator
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_KVUusedPVKey