3#ifndef EDM4EIC_MutableTrackParameters_H
4#define EDM4EIC_MutableTrackParameters_H
11#include "edm4hep/Vector2f.h"
14#include "podio/utilities/MaybeSharedPtr.h"
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
49 MutableTrackParameters(
const std::int32_t type,
const std::uint64_t surface,
const edm4hep::Vector2f& loc,
const float phi,
const float theta,
const float qOverP,
const float time,
const std::int32_t pdg,
const edm4eic::Cov6f& covariance);
75 const edm4hep::Vector2f&
getLoc()
const;
90 std::int32_t
getPdg()
const;
98 void setType(
const std::int32_t type);
108 void setLoc(
const edm4hep::Vector2f& loc);
110 edm4hep::Vector2f&
getLoc();
113 void setPhi(
const float phi);
128 void setTime(
const float time);
133 void setPdg(
const std::int32_t pdg);
150 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackParametersObj>{
nullptr}; }
165 friend std::hash<MutableTrackParameters>;
169 swap(a.m_obj, b.m_obj);
176 podio::utils::MaybeSharedPtr<TrackParametersObj> m_obj{
new TrackParametersObj{}, podio::utils::MarkOwned};
179#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
189struct std::hash<
edm4eic::MutableTrackParameters> {
191 return std::hash<edm4eic::TrackParametersObj*>{}(obj.m_obj.get());
Definition MutableTrackParameters.h:35
constexpr bool operator!=(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:155
bool isAvailable() const
check whether the object is actually available
Definition MutableTrackParameters.cc:81
void setTheta(const float theta)
Set the Track polar angle [rad].
Definition MutableTrackParameters.cc:64
float getQOverP() const
Access the [e/GeV].
Definition MutableTrackParameters.cc:50
MutableTrackParameters & operator=(MutableTrackParameters other) &
copy-assignment operator
Definition MutableTrackParameters.cc:30
void setType(const std::int32_t type)
Set the Type of track parameters (-1/seed, 0/head, ...).
Definition MutableTrackParameters.cc:56
void unlink()
disconnect from TrackParametersObj instance
Definition MutableTrackParameters.h:150
void setTime(const float time)
Set the Track time [ns].
Definition MutableTrackParameters.cc:68
podio::ObjectID id() const
Definition MutableTrackParameters.h:161
void setSurface(const std::uint64_t surface)
Set the Surface for bound parameters (geometryID).
Definition MutableTrackParameters.cc:58
TrackParameters object_type
Definition MutableTrackParameters.h:42
void setPhi(const float phi)
Set the Track azimuthal angle [rad].
Definition MutableTrackParameters.cc:62
const podio::ObjectID getObjectID() const
Definition MutableTrackParameters.cc:85
bool operator!=(const TrackParameters &other) const
Definition MutableTrackParameters.h:156
void setQOverP(const float qOverP)
Set the [e/GeV].
Definition MutableTrackParameters.cc:66
MutableTrackParameters(const MutableTrackParameters &other)=default
copy constructor
bool operator<(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:159
MutableTrackParameters clone(bool cloneRelations=true) const
Definition MutableTrackParameters.cc:35
std::int32_t getPdg() const
Access the pdg pid for these parameters.
Definition MutableTrackParameters.cc:52
void setPdg(const std::int32_t pdg)
Set the pdg pid for these parameters.
Definition MutableTrackParameters.cc:70
void setCovariance(const edm4eic::Cov6f &covariance)
Set the Full covariance in basis following ACTS convention [l0,l1,phi,theta,q/p,t].
Definition MutableTrackParameters.cc:72
std::uint64_t getSurface() const
Access the Surface for bound parameters (geometryID).
Definition MutableTrackParameters.cc:46
friend class TrackParameters
Definition MutableTrackParameters.h:39
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition MutableTrackParameters.cc:47
const edm4eic::Cov6f & getCovariance() const
Access the Full covariance in basis following ACTS convention [l0,l1,phi,theta,q/p,...
Definition MutableTrackParameters.cc:53
friend void swap(MutableTrackParameters &a, MutableTrackParameters &b)
Definition MutableTrackParameters.h:167
~MutableTrackParameters()=default
destructor
float getTheta() const
Access the Track polar angle [rad].
Definition MutableTrackParameters.cc:49
TrackParametersCollection collection_type
Definition MutableTrackParameters.h:43
float getPhi() const
Access the Track azimuthal angle [rad].
Definition MutableTrackParameters.cc:48
constexpr bool operator==(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:152
friend class TrackParametersMutableCollectionIterator
Definition MutableTrackParameters.h:38
void setLoc(const edm4hep::Vector2f &loc)
Set the 2D location on surface.
Definition MutableTrackParameters.cc:60
MutableTrackParameters()=default
default constructor
float getTime() const
Access the Track time [ns].
Definition MutableTrackParameters.cc:51
friend class TrackParametersCollection
Definition MutableTrackParameters.h:37
std::int32_t getType() const
Access the Type of track parameters (-1/seed, 0/head, ...).
Definition MutableTrackParameters.cc:45
MutableTrackParameters & operator=(MutableTrackParameters other) &&=delete
Definition TrackParametersCollection.h:139
Definition TrackParameters.h:43
Definition TrackParametersObj.h:17
Definition ArrowMapper.cc:61
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableTrackParameters &obj) const
Definition MutableTrackParameters.h:190