3#ifndef EDM4EIC_MutableTrack_H
4#define EDM4EIC_MutableTrack_H
12#include "edm4hep/Vector3f.h"
13#include "podio/RelationRange.h"
17#include "podio/utilities/MaybeSharedPtr.h"
21#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
22#include "nlohmann/json_fwd.hpp"
28class MutableTrajectory;
96 std::uint32_t
getNdf()
const;
99 std::int32_t
getPdg()
const;
106 void setType(std::int32_t value);
110 [[deprecated(
"use getType instead")]]
111 std::int32_t&
type();
118 [[deprecated(
"use getPosition instead")]]
126 [[deprecated(
"use getMomentum instead")]]
134 [[deprecated(
"use getPositionMomentumCovariance instead")]]
142 [[deprecated(
"use getTime instead")]]
150 [[deprecated(
"use getTimeError instead")]]
158 [[deprecated(
"use getCharge instead")]]
166 [[deprecated(
"use getChi2 instead")]]
170 void setNdf(std::uint32_t value);
174 [[deprecated(
"use getNdf instead")]]
175 std::uint32_t&
ndf();
178 void setPdg(std::int32_t value);
182 [[deprecated(
"use getPdg instead")]]
193 std::vector<edm4eic::Measurement2D>::const_iterator
measurements_end()
const;
198 std::vector<edm4eic::Track>::const_iterator
tracks_begin()
const;
199 std::vector<edm4eic::Track>::const_iterator
tracks_end()
const;
200 podio::RelationRange<edm4eic::Track>
getTracks()
const;
207 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackObj>{
nullptr}; }
224 swap(a.m_obj, b.m_obj);
229 explicit MutableTrack(podio::utils::MaybeSharedPtr<TrackObj> obj);
231 podio::utils::MaybeSharedPtr<TrackObj> m_obj{
nullptr};
234#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
235void to_json(nlohmann::json& j,
const MutableTrack& value);
Definition Measurement2D.h:36
Definition MutableTrack.h:39
void setTrajectory(const edm4eic::Trajectory &value)
Set the Trajectory of this track.
Definition MutableTrack.cc:107
~MutableTrack()=default
destructor
podio::ObjectID id() const
Definition MutableTrack.h:218
std::int32_t & pdg()
Get reference to PDG particle ID hypothesis.
Definition MutableTrack.cc:105
void setPdg(std::int32_t value)
Set the PDG particle ID hypothesis.
Definition MutableTrack.cc:103
std::int32_t getPdg() const
Access the PDG particle ID hypothesis.
Definition MutableTrack.cc:66
float & charge()
Get reference to Particle charge.
Definition MutableTrack.cc:96
friend void swap(MutableTrack &a, MutableTrack &b)
Definition MutableTrack.h:222
void setTime(float value)
Set the Track time at the vertex [ns].
Definition MutableTrack.cc:88
const edm4eic::Trajectory getTrajectory() const
Access the Trajectory of this track.
Definition MutableTrack.cc:68
const podio::ObjectID getObjectID() const
Definition MutableTrack.cc:194
void setType(std::int32_t value)
Set the Flag that defines the type of track.
Definition MutableTrack.cc:76
std::int32_t & type()
Get reference to Flag that defines the type of track.
Definition MutableTrack.cc:78
float & chi2()
Get reference to Total chi2.
Definition MutableTrack.cc:99
bool operator<(const MutableTrack &other) const
Definition MutableTrack.h:216
void setTimeError(float value)
Set the Error on the track vertex time.
Definition MutableTrack.cc:91
bool operator!=(const Track &other) const
Definition MutableTrack.h:213
std::int32_t getType() const
Access the Flag that defines the type of track.
Definition MutableTrack.cc:57
float getChi2() const
Access the Total chi2.
Definition MutableTrack.cc:64
void setPosition(edm4hep::Vector3f value)
Set the Track 3-position at the vertex.
Definition MutableTrack.cc:79
std::size_t measurements_size() const
Definition MutableTrack.cc:130
std::vector< edm4eic::Track >::const_iterator tracks_end() const
Definition MutableTrack.cc:160
podio::RelationRange< edm4eic::Measurement2D > getMeasurements() const
Definition MutableTrack.cc:141
MutableTrack()
default constructor
Definition MutableTrack.cc:19
MutableTrack clone(bool cloneRelations=true) const
Definition MutableTrack.cc:41
edm4hep::Vector3f & position()
Get reference to Track 3-position at the vertex.
Definition MutableTrack.cc:81
const edm4hep::Vector3f & getMomentum() const
Access the Track 3-momentum at the vertex [GeV].
Definition MutableTrack.cc:59
bool operator!=(const MutableTrack &other) const
Definition MutableTrack.h:212
void setMomentum(edm4hep::Vector3f value)
Set the Track 3-momentum at the vertex [GeV].
Definition MutableTrack.cc:82
podio::RelationRange< edm4eic::Track > getTracks() const
Definition MutableTrack.cc:177
float getTimeError() const
Access the Error on the track vertex time.
Definition MutableTrack.cc:62
void addToTracks(const edm4eic::Track &)
Definition MutableTrack.cc:149
MutableTrack & operator=(MutableTrack other)
copy-assignment operator
Definition MutableTrack.cc:36
void unlink()
disconnect from TrackObj instance
Definition MutableTrack.h:207
edm4eic::Cov6f & positionMomentumCovariance()
Get reference to Covariance matrix in basis [x,y,z,px,py,pz].
Definition MutableTrack.cc:87
std::vector< edm4eic::Track >::const_iterator tracks_begin() const
Definition MutableTrack.cc:154
edm4hep::Vector3f & momentum()
Get reference to Track 3-momentum at the vertex [GeV].
Definition MutableTrack.cc:84
std::size_t tracks_size() const
Definition MutableTrack.cc:166
MutableTrack(const MutableTrack &other)=default
copy constructor
float getCharge() const
Access the Particle charge.
Definition MutableTrack.cc:63
const edm4eic::Cov6f & getPositionMomentumCovariance() const
Access the Covariance matrix in basis [x,y,z,px,py,pz].
Definition MutableTrack.cc:60
std::uint32_t & ndf()
Get reference to Number of degrees of freedom.
Definition MutableTrack.cc:102
bool isAvailable() const
check whether the object is actually available
Definition MutableTrack.cc:190
void addToMeasurements(const edm4eic::Measurement2D &)
Definition MutableTrack.cc:113
friend class Track
Definition MutableTrack.h:43
float & timeError()
Get reference to Error on the track vertex time.
Definition MutableTrack.cc:93
void setNdf(std::uint32_t value)
Set the Number of degrees of freedom.
Definition MutableTrack.cc:100
void setPositionMomentumCovariance(edm4eic::Cov6f value)
Set the Covariance matrix in basis [x,y,z,px,py,pz].
Definition MutableTrack.cc:85
std::uint32_t getNdf() const
Access the Number of degrees of freedom.
Definition MutableTrack.cc:65
const edm4hep::Vector3f & getPosition() const
Access the Track 3-position at the vertex.
Definition MutableTrack.cc:58
bool operator==(const MutableTrack &other) const
Definition MutableTrack.h:209
void setChi2(float value)
Set the Total chi2.
Definition MutableTrack.cc:97
float & time()
Get reference to Track time at the vertex [ns].
Definition MutableTrack.cc:90
void setCharge(float value)
Set the Particle charge.
Definition MutableTrack.cc:94
float getTime() const
Access the Track time at the vertex [ns].
Definition MutableTrack.cc:61
friend class TrackCollection
Definition MutableTrack.h:41
std::vector< edm4eic::Measurement2D >::const_iterator measurements_end() const
Definition MutableTrack.cc:124
std::vector< edm4eic::Measurement2D >::const_iterator measurements_begin() const
Definition MutableTrack.cc:118
Definition TrackCollection.h:92
Definition TrackCollection.h:63
Definition Trajectory.h:40
Definition CalorimeterHit.cc:17