10#include "edm4hep/Vector3f.h"
11#include "podio/RelationRange.h"
15#include "podio/utilities/MaybeSharedPtr.h"
20#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
21#include "nlohmann/json_fwd.hpp"
27class MutableTrajectory;
35class TrackCollectionData;
56 Track(std::int32_t type, edm4hep::Vector3f position, edm4hep::Vector3f momentum,
edm4eic::Cov6f positionMomentumCovariance,
float time,
float timeError,
float charge,
float chi2, std::uint32_t ndf, std::int32_t pdg);
103 std::uint32_t
getNdf()
const;
106 std::int32_t
getPdg()
const;
115 std::vector<edm4eic::Measurement2D>::const_iterator
measurements_end()
const;
119 std::vector<edm4eic::Track>::const_iterator
tracks_begin()
const;
120 std::vector<edm4eic::Track>::const_iterator
tracks_end()
const;
121 podio::RelationRange<edm4eic::Track>
getTracks()
const;
127 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackObj>{
nullptr}; }
144 swap(a.m_obj, b.m_obj);
149 explicit Track(podio::utils::MaybeSharedPtr<TrackObj> obj);
152 podio::utils::MaybeSharedPtr<TrackObj> m_obj{
nullptr};
155std::ostream&
operator<<(std::ostream& o,
const Track& value);
157#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
158void to_json(nlohmann::json& j,
const Track& value);
Definition Measurement2D.h:36
Definition MutableTrack.h:39
Definition TrackCollectionData.h:32
Definition TrackCollection.h:92
Definition TrackCollection.h:37
bool operator==(const Track &other) const
Definition Track.h:129
friend class MutableTrack
Definition Track.h:43
const edm4hep::Vector3f & getPosition() const
Access the Track 3-position at the vertex.
Definition Track.cc:88
std::int32_t getType() const
Access the Flag that defines the type of track.
Definition Track.cc:87
void unlink()
disconnect from TrackObj instance
Definition Track.h:127
Track & operator=(Track other)
copy-assignment operator
Definition Track.cc:38
float getChi2() const
Access the Total chi2.
Definition Track.cc:94
const edm4hep::Vector3f & getMomentum() const
Access the Track 3-momentum at the vertex [GeV].
Definition Track.cc:89
podio::RelationRange< edm4eic::Track > getTracks() const
Definition Track.cc:162
bool operator!=(const Track &other) const
Definition Track.h:132
MutableTrack clone(bool cloneRelations=true) const
Definition Track.cc:43
std::vector< edm4eic::Measurement2D >::const_iterator measurements_end() const
Definition Track.cc:113
podio::ObjectID id() const
Definition Track.h:138
std::vector< edm4eic::Track >::const_iterator tracks_end() const
Definition Track.cc:145
~Track()=default
destructor
std::int32_t getPdg() const
Access the PDG particle ID hypothesis.
Definition Track.cc:96
friend void swap(Track &a, Track &b)
Definition Track.h:142
podio::RelationRange< edm4eic::Measurement2D > getMeasurements() const
Definition Track.cc:130
Track(const Track &other)=default
copy constructor
bool operator<(const Track &other) const
Definition Track.h:136
bool operator!=(const MutableTrack &other) const
Definition Track.h:133
float getTime() const
Access the Track time at the vertex [ns].
Definition Track.cc:91
std::vector< edm4eic::Track >::const_iterator tracks_begin() const
Definition Track.cc:139
std::size_t measurements_size() const
Definition Track.cc:119
const podio::ObjectID getObjectID() const
Definition Track.cc:178
std::uint32_t getNdf() const
Access the Number of degrees of freedom.
Definition Track.cc:95
std::size_t tracks_size() const
Definition Track.cc:151
const edm4eic::Cov6f & getPositionMomentumCovariance() const
Access the Covariance matrix in basis [x,y,z,px,py,pz].
Definition Track.cc:90
static Track makeEmpty()
Definition Track.cc:83
float getCharge() const
Access the Particle charge.
Definition Track.cc:93
const edm4eic::Trajectory getTrajectory() const
Access the Trajectory of this track.
Definition Track.cc:98
float getTimeError() const
Access the Error on the track vertex time.
Definition Track.cc:92
bool isAvailable() const
check whether the object is actually available
Definition Track.cc:174
Track()
default constructor
Definition Track.cc:21
std::vector< edm4eic::Measurement2D >::const_iterator measurements_begin() const
Definition Track.cc:107
friend class TrackCollection
Definition Track.h:44
Definition Trajectory.h:40
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103