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"
22#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
23#include "nlohmann/json_fwd.hpp"
29class MutableTrajectory;
70 operator Track()
const;
99 std::uint32_t
getNdf()
const;
102 std::int32_t
getPdg()
const;
109 void setType(std::int32_t value);
139 void setNdf(std::uint32_t value);
142 void setPdg(std::int32_t value);
152 std::vector<edm4eic::Measurement2D>::const_iterator
measurements_end()
const;
157 std::vector<edm4eic::Track>::const_iterator
tracks_begin()
const;
158 std::vector<edm4eic::Track>::const_iterator
tracks_end()
const;
159 podio::RelationRange<edm4eic::Track>
getTracks()
const;
166 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackObj>{
nullptr}; }
180 swap(a.m_obj, b.m_obj);
185 explicit MutableTrack(podio::utils::MaybeSharedPtr<TrackObj> obj);
187 podio::utils::MaybeSharedPtr<TrackObj> m_obj{
nullptr};
190#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
191void to_json(nlohmann::json& j,
const MutableTrack& value);
Definition Measurement2D.h:36
Definition MutableTrack.h:40
~MutableTrack()=default
destructor
podio::ObjectID id() const
Definition MutableTrack.h:174
void setPdg(std::int32_t value)
Set the PDG particle ID hypothesis.
Definition MutableTrack.cc:82
std::int32_t getPdg() const
Access the PDG particle ID hypothesis.
Definition MutableTrack.cc:60
void setTrajectory(edm4eic::Trajectory value)
Set the Trajectory of this track.
Definition MutableTrack.cc:84
friend void swap(MutableTrack &a, MutableTrack &b)
Definition MutableTrack.h:178
void setTime(float value)
Set the Track time at the vertex [ns].
Definition MutableTrack.cc:77
const edm4eic::Trajectory getTrajectory() const
Access the Trajectory of this track.
Definition MutableTrack.cc:62
const podio::ObjectID getObjectID() const
Definition MutableTrack.cc:176
void setType(std::int32_t value)
Set the Flag that defines the type of track.
Definition MutableTrack.cc:70
bool operator<(const MutableTrack &other) const
Definition MutableTrack.h:172
void addToTracks(edm4eic::Track)
Definition MutableTrack.cc:128
void setTimeError(float value)
Set the Error on the track vertex time.
Definition MutableTrack.cc:78
std::int32_t getType() const
Access the Flag that defines the type of track.
Definition MutableTrack.cc:51
float getChi2() const
Access the Total chi2.
Definition MutableTrack.cc:58
void setPosition(edm4hep::Vector3f value)
Set the Track 3-position at the vertex.
Definition MutableTrack.cc:71
std::size_t measurements_size() const
Definition MutableTrack.cc:109
std::vector< edm4eic::Track >::const_iterator tracks_end() const
Definition MutableTrack.cc:139
podio::RelationRange< edm4eic::Measurement2D > getMeasurements() const
Definition MutableTrack.cc:120
MutableTrack()
default constructor
Definition MutableTrack.cc:22
edm4hep::Vector3f & position()
Get reference to Track 3-position at the vertex.
Definition MutableTrack.cc:72
const edm4hep::Vector3f & getMomentum() const
Access the Track 3-momentum at the vertex [GeV].
Definition MutableTrack.cc:53
void setMomentum(edm4hep::Vector3f value)
Set the Track 3-momentum at the vertex [GeV].
Definition MutableTrack.cc:73
podio::RelationRange< edm4eic::Track > getTracks() const
Definition MutableTrack.cc:156
float getTimeError() const
Access the Error on the track vertex time.
Definition MutableTrack.cc:56
MutableTrack & operator=(MutableTrack other)
copy-assignment operator
Definition MutableTrack.cc:39
void unlink()
disconnect from TrackObj instance
Definition MutableTrack.h:166
edm4eic::Cov6f & positionMomentumCovariance()
Get reference to Covariance matrix in basis [x,y,z,px,py,pz].
Definition MutableTrack.cc:76
std::vector< edm4eic::Track >::const_iterator tracks_begin() const
Definition MutableTrack.cc:133
edm4hep::Vector3f & momentum()
Get reference to Track 3-momentum at the vertex [GeV].
Definition MutableTrack.cc:74
std::size_t tracks_size() const
Definition MutableTrack.cc:145
MutableTrack(const MutableTrack &other)=default
copy constructor
float getCharge() const
Access the Particle charge.
Definition MutableTrack.cc:57
const edm4eic::Cov6f & getPositionMomentumCovariance() const
Access the Covariance matrix in basis [x,y,z,px,py,pz].
Definition MutableTrack.cc:54
bool isAvailable() const
check whether the object is actually available
Definition MutableTrack.cc:169
friend class Track
Definition MutableTrack.h:44
void setNdf(std::uint32_t value)
Set the Number of degrees of freedom.
Definition MutableTrack.cc:81
void addToMeasurements(edm4eic::Measurement2D)
Definition MutableTrack.cc:92
void setPositionMomentumCovariance(edm4eic::Cov6f value)
Set the Covariance matrix in basis [x,y,z,px,py,pz].
Definition MutableTrack.cc:75
std::uint32_t getNdf() const
Access the Number of degrees of freedom.
Definition MutableTrack.cc:59
const edm4hep::Vector3f & getPosition() const
Access the Track 3-position at the vertex.
Definition MutableTrack.cc:52
bool operator==(const MutableTrack &other) const
Definition MutableTrack.h:168
void setChi2(float value)
Set the Total chi2.
Definition MutableTrack.cc:80
void setCharge(float value)
Set the Particle charge.
Definition MutableTrack.cc:79
float getTime() const
Access the Track time at the vertex [ns].
Definition MutableTrack.cc:55
friend class TrackCollection
Definition MutableTrack.h:42
std::vector< edm4eic::Measurement2D >::const_iterator measurements_end() const
Definition MutableTrack.cc:103
MutableTrack clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableTrack.cc:44
std::vector< edm4eic::Measurement2D >::const_iterator measurements_begin() const
Definition MutableTrack.cc:97
Definition TrackCollection.h:95
Definition TrackCollection.h:66
Definition Trajectory.h:40
Definition CalorimeterHit.cc:18