3#ifndef EDM4EIC_TrackerHit_H
4#define EDM4EIC_TrackerHit_H
9#include "edm4hep/Vector3f.h"
12#include "podio/utilities/MaybeSharedPtr.h"
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
24class MutableRawTrackerHit;
30class MutableTrackerHit;
31class TrackerHitCollection;
32class TrackerHitCollectionData;
53 TrackerHit(std::uint64_t cellID, edm4hep::Vector3f position,
edm4eic::CovDiag3f positionError,
float time,
float timeError,
float edep,
float edepError);
105 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackerHitObj>{
nullptr}; }
122 swap(a.m_obj, b.m_obj);
127 explicit TrackerHit(podio::utils::MaybeSharedPtr<TrackerHitObj> obj);
130 podio::utils::MaybeSharedPtr<TrackerHitObj> m_obj{
nullptr};
133std::ostream&
operator<<(std::ostream& o,
const TrackerHit& value);
135#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
136void to_json(nlohmann::json& j,
const TrackerHit& value);
Definition CovDiag3f.h:18
Definition MutableTrackerHit.h:36
Definition RawTrackerHit.h:31
Definition TrackerHitCollectionData.h:31
Definition TrackerHitCollection.h:92
Definition TrackerHitCollection.h:37
Definition TrackerHit.h:38
friend class TrackerHitCollection
Definition TrackerHit.h:41
bool operator!=(const TrackerHit &other) const
Definition TrackerHit.h:110
float getEdep() const
Access the Energy deposit in this hit [GeV].
Definition TrackerHit.cc:67
const edm4eic::CovDiag3f & getPositionError() const
Access the Covariance Matrix.
Definition TrackerHit.cc:64
~TrackerHit()=default
destructor
bool isAvailable() const
check whether the object is actually available
Definition TrackerHit.cc:82
const edm4eic::RawTrackerHit getRawHit() const
Access the Related raw tracker hit.
Definition TrackerHit.cc:70
friend void swap(TrackerHit &a, TrackerHit &b)
Definition TrackerHit.h:120
bool operator!=(const MutableTrackerHit &other) const
Definition TrackerHit.h:111
MutableTrackerHit clone(bool cloneRelations=true) const
Definition TrackerHit.cc:40
float getTimeError() const
Access the Error on the time.
Definition TrackerHit.cc:66
static TrackerHit makeEmpty()
Definition TrackerHit.cc:58
float getEdepError() const
Access the Error on the energy deposit [GeV].
Definition TrackerHit.cc:68
const podio::ObjectID getObjectID() const
Definition TrackerHit.cc:86
bool operator==(const TrackerHit &other) const
Definition TrackerHit.h:107
float getTime() const
Access the Hit time [ns].
Definition TrackerHit.cc:65
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition TrackerHit.cc:62
TrackerHit()
default constructor
Definition TrackerHit.cc:21
void unlink()
disconnect from TrackerHitObj instance
Definition TrackerHit.h:105
TrackerHit(const TrackerHit &other)=default
copy constructor
friend class MutableTrackerHit
Definition TrackerHit.h:40
bool operator<(const TrackerHit &other) const
Definition TrackerHit.h:114
TrackerHit & operator=(TrackerHit other)
copy-assignment operator
Definition TrackerHit.cc:35
podio::ObjectID id() const
Definition TrackerHit.h:116
const edm4hep::Vector3f & getPosition() const
Access the Hit (cell) position [mm].
Definition TrackerHit.cc:63
Definition TrackerHitObj.h:21
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103