3#ifndef EDM4EIC_TrackParameters_H
4#define EDM4EIC_TrackParameters_H
9#include "edm4hep/Vector2f.h"
12#include "podio/utilities/MaybeSharedPtr.h"
13#include "podio/detail/OrderKey.h"
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
30OrderKey
getOrderKey(
const edm4eic::TrackParameters& obj);
59 TrackParameters(
const std::int32_t type,
const std::uint64_t surface,
const edm4hep::Vector2f& loc,
const float theta,
const float phi,
const float qOverP,
const float time,
const std::int32_t pdg,
const edm4eic::Cov6f& covariance);
82 static constexpr std::string_view
typeName =
"edm4eic::TrackParameters";
91 const edm4hep::Vector2f&
getLoc()
const;
106 std::int32_t
getPdg()
const;
118 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackParametersObj>{
nullptr}; }
133 friend std::hash<TrackParameters>;
137 swap(a.m_obj, b.m_obj);
142 explicit TrackParameters(podio::utils::MaybeSharedPtr<TrackParametersObj> obj);
145 podio::utils::MaybeSharedPtr<TrackParametersObj> m_obj{
nullptr};
150#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
162 return std::hash<edm4eic::TrackParametersObj*>{}(obj.m_obj.get());
170#if defined(__clang__)
171#pragma clang diagnostic push
172#pragma clang diagnostic ignored "-Wunknown-warning-option"
173#pragma clang diagnostic ignored "-Wdeprecated-redundant-constexpr-static-def"
174#pragma clang diagnostic ignored "-Wdeprecated"
176#pragma clang diagnostic pop
177#elif defined(__GNUC__)
178#pragma GCC diagnostic push
179#pragma GCC diagnostic ignored "-Wdeprecated"
181#pragma GCC diagnostic pop
Definition MutableTrackParameters.h:35
Definition TrackParametersCollectionData.h:30
Definition TrackParametersCollection.h:137
Definition TrackParameters.h:43
friend void swap(TrackParameters &a, TrackParameters &b)
Definition TrackParameters.h:135
float getPhi() const
Access the Track azimuthal angle [rad].
Definition TrackParameters.cc:64
std::int32_t getPdg() const
Access the pdg pid for these parameters.
Definition TrackParameters.cc:67
bool operator==(const TrackParameters &other) const
Definition TrackParameters.h:120
static constexpr std::string_view typeName
Definition TrackParameters.h:82
bool operator<(const TrackParameters &other) const
Definition TrackParameters.h:127
TrackParameters & operator=(TrackParameters other) &
copy-assignment operator
Definition TrackParameters.cc:36
static TrackParameters makeEmpty()
Definition TrackParameters.cc:56
TrackParameters & operator=(TrackParameters other) &&=delete
float getQOverP() const
Access the [e/GeV].
Definition TrackParameters.cc:65
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition TrackParameters.cc:62
bool operator!=(const MutableTrackParameters &other) const
Definition TrackParameters.h:124
TrackParameters()
default constructor
Definition TrackParameters.cc:20
const podio::ObjectID getObjectID() const
Definition TrackParameters.cc:79
const edm4eic::Cov6f & getCovariance() const
Access the Full covariance in basis [l0,l1,theta,phi,q/p,t].
Definition TrackParameters.cc:68
TrackParametersCollection collection_type
Definition TrackParameters.h:53
~TrackParameters()=default
destructor
std::uint64_t getSurface() const
Access the Surface for bound parameters (geometryID)
Definition TrackParameters.cc:61
bool isAvailable() const
check whether the object is actually available
Definition TrackParameters.cc:75
TrackParameters(const TrackParameters &other)=default
copy constructor
float getTime() const
Access the Track time [ns].
Definition TrackParameters.cc:66
friend class TrackParametersCollectionIterator
Definition TrackParameters.h:48
void unlink()
disconnect from TrackParametersObj instance
Definition TrackParameters.h:118
float getTheta() const
Access the Track polar angle [rad].
Definition TrackParameters.cc:63
podio::ObjectID id() const
Definition TrackParameters.h:129
MutableTrackParameters mutable_type
Definition TrackParameters.h:52
MutableTrackParameters clone(bool cloneRelations=true) const
Definition TrackParameters.cc:41
std::int32_t getType() const
Access the Type of track parameters (-1/seed, 0/head, ...)
Definition TrackParameters.cc:60
friend class TrackParametersCollection
Definition TrackParameters.h:46
bool operator!=(const TrackParameters &other) const
Definition TrackParameters.h:123
friend class MutableTrackParameters
Definition TrackParameters.h:45
Definition TrackParametersObj.h:17
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150
std::size_t operator()(const edm4eic::TrackParameters &obj) const
Definition TrackParameters.h:161