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);
100 std::uint32_t
getNdf()
const;
103 std::int32_t
getPdg()
const;
112 std::vector<edm4eic::Measurement2D>::const_iterator
measurements_end()
const;
116 std::vector<edm4eic::Track>::const_iterator
tracks_begin()
const;
117 std::vector<edm4eic::Track>::const_iterator
tracks_end()
const;
118 podio::RelationRange<edm4eic::Track>
getTracks()
const;
124 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackObj>{
nullptr}; }
138 swap(a.m_obj, b.m_obj);
143 explicit Track(podio::utils::MaybeSharedPtr<TrackObj> obj);
146 podio::utils::MaybeSharedPtr<TrackObj> m_obj{
nullptr};
149std::ostream&
operator<<(std::ostream& o,
const Track& value);
151#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
152void to_json(nlohmann::json& j,
const Track& value);
Definition Measurement2D.h:36
Definition MutableTrack.h:40
Definition TrackCollectionData.h:32
Definition TrackCollection.h:95
Definition TrackCollection.h:40
bool operator==(const Track &other) const
Definition Track.h:126
friend class MutableTrack
Definition Track.h:43
const edm4hep::Vector3f & getPosition() const
Access the Track 3-position at the vertex.
Definition Track.cc:57
std::int32_t getType() const
Access the Flag that defines the type of track.
Definition Track.cc:56
void unlink()
disconnect from TrackObj instance
Definition Track.h:124
Track & operator=(Track other)
copy-assignment operator
Definition Track.cc:39
float getChi2() const
Access the Total chi2.
Definition Track.cc:63
const edm4hep::Vector3f & getMomentum() const
Access the Track 3-momentum at the vertex [GeV].
Definition Track.cc:58
podio::RelationRange< edm4eic::Track > getTracks() const
Definition Track.cc:131
std::vector< edm4eic::Measurement2D >::const_iterator measurements_end() const
Definition Track.cc:82
podio::ObjectID id() const
Definition Track.h:132
std::vector< edm4eic::Track >::const_iterator tracks_end() const
Definition Track.cc:114
~Track()=default
destructor
std::int32_t getPdg() const
Access the PDG particle ID hypothesis.
Definition Track.cc:65
friend void swap(Track &a, Track &b)
Definition Track.h:136
podio::RelationRange< edm4eic::Measurement2D > getMeasurements() const
Definition Track.cc:99
Track(const Track &other)=default
copy constructor
bool operator<(const Track &other) const
Definition Track.h:130
float getTime() const
Access the Track time at the vertex [ns].
Definition Track.cc:60
MutableTrack clone() const
create a mutable deep-copy of the object with identical relations
Definition Track.cc:44
std::vector< edm4eic::Track >::const_iterator tracks_begin() const
Definition Track.cc:108
std::size_t measurements_size() const
Definition Track.cc:88
const podio::ObjectID getObjectID() const
Definition Track.cc:150
std::uint32_t getNdf() const
Access the Number of degrees of freedom.
Definition Track.cc:64
std::size_t tracks_size() const
Definition Track.cc:120
const edm4eic::Cov6f & getPositionMomentumCovariance() const
Access the Covariance matrix in basis [x,y,z,px,py,pz].
Definition Track.cc:59
static Track makeEmpty()
Definition Track.cc:52
float getCharge() const
Access the Particle charge.
Definition Track.cc:62
const edm4eic::Trajectory getTrajectory() const
Access the Trajectory of this track.
Definition Track.cc:67
float getTimeError() const
Access the Error on the track vertex time.
Definition Track.cc:61
bool isAvailable() const
check whether the object is actually available
Definition Track.cc:143
Track()
default constructor
Definition Track.cc:22
std::vector< edm4eic::Measurement2D >::const_iterator measurements_begin() const
Definition Track.cc:76
friend class TrackCollection
Definition Track.h:44
Definition Trajectory.h:40
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97