|
ATLAS Offline Software
|
Go to the documentation of this file.
46 double phi = trk.
phi();
56 const Eigen::Matrix2d& vtxCov) {
63 double phi = trk.
phi();
67 double vertexComponent = vtxJacobian.transpose()*vtxCov*vtxJacobian;
69 return std::sqrt(trackComponent + vertexComponent);
77 Eigen::Matrix2d vtxCov = vtx.covariancePosition().block<2,2>(0,0);
84 Eigen::Matrix2d bsCov;
93 bsCov(0, 1) =
evt.beamPosSigmaXY();
94 bsCov(1, 0) =
evt.beamPosSigmaXY();
105 Eigen::Matrix2d trkCov;
111 Eigen::Vector2d trkJacobian(
114 double trackComponent = trkJacobian.transpose()*trkCov*trkJacobian;
119 return std::sqrt(trackComponent + vertexComponent);
124 double vxZCov = vtx.covariancePosition()(
Pmt::z,
Pmt::z);
133 const std::string&
name, ISvcLocator* loc )
174 "Accessors for beamspot:" <<
186 return StatusCode::SUCCESS;
203 return StatusCode::FAILURE;
237 float d0_sigma2 = trk->definingParametersCovMatrixDiagVec().at(
Pmt::d0);
243 float full_d0_sigma = std::sqrt(d0_sigma2 + bs_d0_sigma2);
244 ATH_MSG_DEBUG(
"track d0Uncertainty: " << std::sqrt(d0_sigma2));
245 ATH_MSG_DEBUG(
"beamspot d0Uncertainty: " << std::sqrt(bs_d0_sigma2));
248 decor_d0_sigma(*trk) = full_d0_sigma;
268 auto trkp4 = trk->p4();
272 "track_displacement (x,y,z)= ("
273 << position.x() <<
", " << position.y() <<
", " << position.z()
276 "track_momentum (x,y,z)= ("
280 std::vector<float> out_vec_pos(
281 position.data(), position.data() + position.size());
282 std::vector<float> out_vec_mom(
285 decor_track_pos (*trk) = out_vec_pos;
286 decor_track_mom (*trk) = out_vec_mom;
290 decor_invalid(*trk) = 0;
293 return StatusCode::SUCCESS;
297 return StatusCode::SUCCESS;
302 if ( vertexCollection.
size() == 0 ) {
315 return vertexCollection.front();
SG::ReadDecorHandleKey< xAOD::EventInfo > m_beam_cov_xy
SG::ReadHandleKey< xAOD::VertexContainer > m_VertexContainerKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_beam_sigma_x
Gaudi::Property< std::string > m_prefix
This file contains "getter" functions used for accessing tagger inputs from the EDM.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_track_pos
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
float z0() const
Returns the parameter.
double getSigmaZ0SinTheta(const xAOD::TrackParticle &trk, double vxZCov)
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_d0_sigma
float d0() const
Returns the parameter.
double d0UncertaintyBeamSpot2(double track_phi0, double beam_sigma_x, double beam_sigma_y, double beam_sigma_xy)
calculate the squared d0 uncertainty component due to the size of the beam spot.
virtual StatusCode finalize() override
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_invalid
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Eigen::Vector3d getPosition(const xAOD::TrackParticle &trk)
const xAOD::Vertex * getPrimaryVertex(const xAOD::VertexContainer &) const
SG::ReadDecorHandleKey< xAOD::EventInfo > m_beam_sigma_y
Handle class for reading a decoration on an object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_z0_sigma
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
double getSigmaD0(const xAOD::TrackParticle &trk, const Eigen::Matrix2d &vtxCov)
SG::ReadDecorHandleKey< xAOD::EventInfo > m_beam_sigma_z
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_track_mom
#define CHECK(...)
Evaluate an expression and check for errors.
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 bool isValid() override final
Can the handle be successfully dereferenced?
virtual StatusCode initialize() override
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
Eigen::Matrix< double, 3, 1 > Vector3D
Class describing the basic event information.
const std::vector< float > & definingParametersCovMatrixDiagVec() const
Returns the diagonal elements of the defining parameters covariance matrix.
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.
double getSigmaD0WithRespectToBeamspot(const xAOD::TrackParticle &trk, const xAOD::EventInfo &evt)
Handle class for reading a decoration on an object.
PoorMansIpAugmenterAlg(const std::string &name, ISvcLocator *pSvcLocator)
Class describing a TrackParticle.
float theta() const
Returns the parameter, which has range 0 to .
size_type size() const noexcept
Returns the number of elements in the collection.
virtual StatusCode execute(const EventContext &) const override
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)