3#ifndef EDM4EIC_MutableTrackerHit_H
4#define EDM4EIC_MutableTrackerHit_H
11#include "edm4hep/Vector3f.h"
14#include "podio/utilities/MaybeSharedPtr.h"
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
51 MutableTrackerHit(
const std::uint64_t cellID,
const edm4hep::Vector3f& position,
const edm4eic::CovDiag3f& positionError,
const float time,
const float timeError,
const float edep,
const float edepError);
96 void setCellID(
const std::uint64_t cellID);
101 void setPosition(
const edm4hep::Vector3f& position);
111 void setTime(
const float time);
121 void setEdep(
const float edep);
140 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackerHitObj>{
nullptr}; }
155 friend std::hash<MutableTrackerHit>;
159 swap(a.m_obj, b.m_obj);
166 podio::utils::MaybeSharedPtr<TrackerHitObj> m_obj{
new TrackerHitObj{}, podio::utils::MarkOwned};
169#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
181 return std::hash<edm4eic::TrackerHitObj*>{}(obj.m_obj.get());
Definition CovDiag3f.h:19
Definition MutableRawTrackerHit.h:33
Definition MutableTrackerHit.h:37
friend class TrackerHitCollection
Definition MutableTrackerHit.h:39
~MutableTrackerHit()=default
destructor
MutableTrackerHit & operator=(MutableTrackerHit other) &
copy-assignment operator
Definition MutableTrackerHit.cc:29
TrackerHit object_type
Definition MutableTrackerHit.h:44
void setRawHit(const edm4eic::RawTrackerHit &value)
Set the Related raw tracker hit.
Definition MutableTrackerHit.cc:75
MutableTrackerHit & operator=(MutableTrackerHit other) &&=delete
friend class TrackerHit
Definition MutableTrackerHit.h:41
const podio::ObjectID getObjectID() const
Definition MutableTrackerHit.cc:89
float getEdep() const
Access the Energy deposit in this hit [GeV].
Definition MutableTrackerHit.cc:49
bool isAvailable() const
check whether the object is actually available
Definition MutableTrackerHit.cc:85
float getTimeError() const
Access the Error on the time.
Definition MutableTrackerHit.cc:48
void setCellID(const std::uint64_t cellID)
Set the The detector specific (geometrical) cell id.
Definition MutableTrackerHit.cc:60
void setTimeError(const float timeError)
Set the Error on the time.
Definition MutableTrackerHit.cc:68
void unlink()
disconnect from TrackerHitObj instance
Definition MutableTrackerHit.h:140
void setEdep(const float edep)
Set the Energy deposit in this hit [GeV].
Definition MutableTrackerHit.cc:70
bool operator!=(const TrackerHit &other) const
Definition MutableTrackerHit.h:146
float getTime() const
Access the Hit time [ns].
Definition MutableTrackerHit.cc:47
bool operator<(const MutableTrackerHit &other) const
Definition MutableTrackerHit.h:149
const edm4eic::RawTrackerHit getRawHit() const
Access the Related raw tracker hit.
Definition MutableTrackerHit.cc:52
void setEdepError(const float edepError)
Set the Error on the energy deposit [GeV].
Definition MutableTrackerHit.cc:72
MutableTrackerHit clone(bool cloneRelations=true) const
Definition MutableTrackerHit.cc:34
void setPosition(const edm4hep::Vector3f &position)
Set the Hit (cell) position [mm].
Definition MutableTrackerHit.cc:62
const edm4eic::CovDiag3f & getPositionError() const
Access the Covariance Matrix.
Definition MutableTrackerHit.cc:46
friend class TrackerHitMutableCollectionIterator
Definition MutableTrackerHit.h:40
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition MutableTrackerHit.cc:44
const edm4hep::Vector3f & getPosition() const
Access the Hit (cell) position [mm].
Definition MutableTrackerHit.cc:45
constexpr bool operator==(const MutableTrackerHit &other) const
Definition MutableTrackerHit.h:142
TrackerHitCollection collection_type
Definition MutableTrackerHit.h:45
void setPositionError(const edm4eic::CovDiag3f &positionError)
Set the Covariance Matrix.
Definition MutableTrackerHit.cc:64
friend void swap(MutableTrackerHit &a, MutableTrackerHit &b)
Definition MutableTrackerHit.h:157
MutableTrackerHit()=default
default constructor
void setTime(const float time)
Set the Hit time [ns].
Definition MutableTrackerHit.cc:66
MutableTrackerHit(const MutableTrackerHit &other)=default
copy constructor
constexpr bool operator!=(const MutableTrackerHit &other) const
Definition MutableTrackerHit.h:145
float getEdepError() const
Access the Error on the energy deposit [GeV].
Definition MutableTrackerHit.cc:50
podio::ObjectID id() const
Definition MutableTrackerHit.h:151
Definition RawTrackerHit.h:41
Definition TrackerHitCollection.h:139
Definition TrackerHit.h:45
Definition TrackerHitObj.h:21
Definition ArrowMapper.cc:61
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableTrackerHit &obj) const
Definition MutableTrackerHit.h:180