Skip to content
Snippets Groups Projects
Commit f60bc54d authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

wip

parent 09eaf761
No related branches found
No related tags found
1 merge request!33Draft: Streamline data model
Pipeline #14371 failed
' 0 → 100644
---
options:
# should getters / setters be prefixed with get / set?
getSyntax: False
# should POD members be exposed with getters/setters in classes that have them as members?
exposePODMembers: False
includeSubfolder: True
## right now we rigurously enforce:
## - No breaking of PODness:
## - No use of relations and vectors
## - For 1-to-1 relations store linking IDs where useful. Either use forward or
## backward links as they make sense
## - For 1-to-many relations: Use many-to-1 IDs instead --> use forward links
## This puts the burden on the reconstruction algorithm and keeps the data 2D!
## - Use float most of the time except for 4-vectors where ppm precision is important.
## - Data alignment: data should be aligned with a 64-bit structure.
## Make sure 32 bit values (eg int32_t) come either in pairs, or are
## located at the end of the structure
## - Indices are stored as signed integers, where -1 significes "no index"
## - Provide explicit copy/assignment instructors from the Const... classes, as
## doing this here will avoid errors in the algorithms.
components:
## first-second or first-last pair of integers
eic::IntegerPair:
Members:
- int32_t first
- int32_t second
ExtraCode:
includes: "#include <span>\n#include <cmath>\n#include <pair>"
declaration: "
IntegerPair() : first{0}, second{0} {}\n
IntegerPair(int32_t a, int32_t b) : first{a}, second{b} {}\n
IntegerPair(std::span<int32_t> v) : first{v[0]}, second{v[1]} {}\n
IntegerPair& operator=(std::span<int32_t> v) {first=v[0]; second=v[1]; return *this;}\n
IntegerPair(const std::pair<int32_t, int32_t>& p) : first{p.first}, second{p.second} {}\n
IntegerPair& operator=(const std::pair<int32_t, int32_t>& p) {first = p.first; second = p.second; return *this;}\n
explicit IntegerPair(const ConstIntegerPair& cv) : first{cv.first()}, second{cv.second()}} {}\n
IntegerPair& operator=(const ConstIntegerPair& cv) {first = cv.first(); second = cv.second(); return *this;}\n
int32_t operator[](unsigned i) const { return *(&first + i); }\n
int32_t last() const {return second;}\n
int32_t last(int32_t b) {second = b; return second;}\n
"
ConstExtraCode:
includes: "#include <cmath>"
declaration: "
int32_t operator[](unsigned i) const { return *(&first + i); }\n
int32_t last() const {return second;}\n
"
## first-second pair of float s
eic::FloatPair:
Members:
- float first
- float second
ExtraCode:
includes: "#include <span>\n#include <cmath>\n#include <pair>"
declaration: "
FloatPair() : first{0}, second{0} {}\n
FloatPair(float a, float b) : first{a}, second{b} {}\n
FloatPair(std::span<float> v) : first{v[0]}, second{v[1]} {}\n
FloatPair& operator=(std::span<float> v) {first=v[0]; second=v[1]; return *this;}\n
FloatPair(const std::pair<float, float>& p) : first{p.first}, second{p.second} {}\n
FloatPair& operator=(const std::pair<float, float>& p) {first = p.first; second = p.second; return *this;}\n
FloatPair(const std::pair<float,float>& fp)\n
explicit FloatPair(const ConstFloatPair& cv) : first{cv.first()}, second{cv.second()}} {}\n
FloatPair& operator=(const ConstFloatPair& cv) {first = cv.first(); second = cv.second(); return *this}\n
float operator[](unsigned i) const { return *(&first + i); }\n
"
ConstExtraCode:
includes: "#include <cmath>"
declaration: "
float operator[](unsigned i) const { return *(&first + i); }\n
"
eic::VectorXY:
Members:
- float x // [mm] or [GeV]
- float y //
ExtraCode:
includes: "#include <span>\n#include <cmath>\n"
declaration: "
VectorXY() : x{0}, y{0} {}\n
VectorXY(float xx, float yy) : x{xx}, y{yy} {}\n
VectorXY(std::span<float > v) : x{v[0]}, y{v[1]} {}\n
VectorXY& operator=(std::span<float > v) {x = v[0]; y = v[1]; return *this;}\n
explicit VectorXY(const ConstVectorXY& cv) : x{cv.x()}, y{cv.y()}} {}\n
VectorXY& operator=(const ConstVectorXY& cv) {x = cv.x(); y = cv.y(); return *this;}\n
float operator[](unsigned i) const { return *(&x + i); }\n
float mag() const {return std::hypot(x, y);}\n
float px() const {return x();}\n
float py() const {return y();}\n
float px(float xx) {x = xx; return x;}\n
float py(float yy) {y = yy; return y;}\n
"
ConstExtraCode:
includes: "#include <cmath>"
declaration: "
float operator[](unsigned i) const { return *(&x + i); }\n
float mag() const {return std::hypot(x, y);}\n
float px() const {return x();}\n
float py() const {return y();}\n
"
eic::Direction:
Members:
- float theta // [rad]
- float phi //
ExtraCode:
includes: "#include <cmath>"
declaration: "
Direction() : theta{0}, phi{0} {}\n
Direction(float th, float ph) : theta{th}, phi{ph} {}\n
Direction(float x, float y, float z) : theta{return acos(z/std::hypot(x,y,z))}, phi{atan2(y,x)} {}\n
explicit Direction(const ConstDirection& cv) : theta{cv.theta()}, phi{cv.phi()}} {}\n
Direction& operator=(const ConstDirection& cv) {theta = cv.theta(); phi = cv.phi(); return *this;}\n
"
eic::VectorXYZ:
Members:
- float x // [mm] or [GeV]
- float y //
- float z //
ExtraCode:
includes: "#include <span>\n#include <cmath>\n"
declaration: "
VectorXYZ() : x{0}, y{0}, z{0} {}\n
VectorXYZ(float xx, float yy, float zz) : x{xx}, y{yy}, z{zz} {}\n
VectorXYZ(std::span<float> v) : x{v[0]}, y{v[1]}, z{v[2]} {}\n
VectorXYZ& operator=(std::span<float> v) {x = v[0]; y = v[1]; z = v[2]; return *this;}\n
explicit VectorXYZ(const ConstVectorXYZ& cv) : x{cv.x()}, y{cv.y()}, z{cv.z()} {}\n
VectorXYZ& operator=(const ConstVectorXYZ& cv) {x = cv.x(); y = cv.y(); z = cv.z(); return *this}\n
float operator[](unsigned i) const { return *(&x + i); }\n
float mag() const {return std::hypot(x, y, z);}\n
float r() const {return mag();}\n
float theta() const {return acos(z/mag());}\n
float phi() const {return atan2(y,x);}\n
float px() const {return x();}\n
float py() const {return y();}\n
float pz() const {return z();}\n
"
ConstExtraCode:
declaration: "
float operator[](unsigned i) const { return *(&x + i); }\n
float mag() const {return std::hypot(x, y, z);}\n
float r() const {return mag();}\n
float theta() const {return acos(z/mag());}\n
float phi() const {return atan2(y,x);}\n
float px() const {return x();}\n
float py() const {return y();}\n
float pz() const {return z();}\n
"
eic::VectorPolar:
Members:
- float r // [mm] or [GeV]
- float theta // [rad]
- float phi //
ExtraCode:
includes: "#include <span>\n#include <cmath>\n"
declaration: "
VectorPolar() : x{0}, theta{0}, phi{0} {}\n
VectorPolar(float rr, float th, float ph) : r{rr}, theta{th}, phi{ph} {}\n
explicit VectorPolar(const ConstVectorPolar& cv) : r{cv.r()}, theta{cv.theta()}, phi{cv.phi()} {}\n
VectorPolar& operator=(const ConstVectorPolar& cv) {r = cv.r(); theta = cv.theta(); phi = cv.phi(); return *this;}\n
float mag() const {return r;}\n
float x() const {return r * cos(phi) * sin(theta);}\n
float y() const {return r * sin(phi) * cos(theta);}\n
float z() const {return r * cos(theta);}\n
float px() const {return x();}\n
float py() const {return y();}\n
float pz() const {return z();}\n
"
ConstExtraCode:
includes: "#include <span>\n#include <cmath>\n"
declaration: "
float mag() const {return r;}\n
float x() const {return r * cos(phi) * sin(theta);}\n
float y() const {return r * sin(phi) * cos(theta);}\n
float z() const {return r * cos(theta);}\n
float px() const {return x();}\n
float py() const {return y();}\n
float pz() const {return z();}\n
"
eic::VectorXYZT:
Members:
- double x // [mm] or [GeV]
- double y //
- double z //
- double t // [ns] or [GeV]
ExtraCode:
includes: "#include <span>\n#include <cmath>\n"
declaration: "
VectorXYZT() : x{0}, y{0}, z{0}, t{0] {}\n
VectorXYZT(double xx, double yy, double zz, double tt) : x{xx}, y{yy}, z{zz}, t{tt} {}\n
VectorXYZT(std::span<double> v) : x{v[0]}, y{v[1]}, z{v[2]}, t{v[3]} {}\n
VextorXYZT& operator=(std::span<double> v) { x = v[0]; y = v[1]; z = v[2]; t = v[3]; return *this;} \n
explicit VectorXYZT(const ConstVectorXYZT& cv) : x{cv.x()}, y{cv.y()}, z{cv.z()}, t{cv.t()} {}\n
VectorXYZT& operator=(const ConstVectorXYZT& cv) {x = cv.x(); y = cv.y(); z = cv.z(); t = cv.t(); return *this;}\n
double operator[](unsigned i) const { return *(&x + i); }\n
double mag() const {return std::hypot(x, y, z);}\n
double r() const {return mag();}\n
double theta() const {return acos(z/mag());}\n
double phi() const {return atan2(y,x);}\n
double m() const {return sqrt(t*t - x*x - y*y - z*z);}\n
double px() const {return x;}\n
double py() const {return y;}\n
double pz() const {return z;}\n
double energy() const {return t;}\n
double px(px) { x = px; return x;}\n
double py(py) { y = py; return y;}\n
double pz(pz) { z = pz; return z;}\n
double energy(E) {t = E; return t;}\n
"
ConstExtraCode:
includes: "#include <cmath>\n"
declaration: "
double operator[](unsigned i) const { return *(&x + i); }\n
double mag() const {return std::hypot(x, y, z);}\n
double r() const {return mag();}\n
double theta() const {return acos(z/mag());}\n
double phi() const {return atan2(y,x);}\n
double m() const {return sqrt(t*t - x*x - y*y - z*z);}\n
double px() const {return x;}\n
double py() const {return y;}\n
double pz() const {return z;}\n
double energy() const {return t;}\n
"
eic::VectorPxPyPzM:
Members:
- double x // [GeV]
- double y //
- double z //
- double m //
ExtraCode:
includes: "#include <span>\n#include <cmath>\n"
declaration: "
VectorPxPyPzM() : x{0}, y{0}, z{0}, m{0] {}\n
VectorPxPyPzM(double xx, double yy, double zz, double mm) : x{xx}, y{yy}, z{zz}, m{mm} {}\n
VectorPxPyPzM(std::span<double> v) : x{v[0]}, y{v[1]}, z{v[2]}, m{v[3]} {}\n
VectorPxPyPzM& operator=(std::span<double> v) { x = v[0]; y = v[1]; z = v[2]; m = v[3]; return *this;}\n
explicit VectorPxPyPzM(const ConstVectorPxPyPzM& cv) : x{cv.x()}, y{cv.y()}, z{cv.z()}, m{cv.m()} {}\n
VectorPxPyPzM& operator=(const ConstVectorPxPyPzM& cv) {x = cv.x(); y = cv.y(); z = cv.z(); m = cv.m(); return *this;}\n
double operator[](unsigned i) const { return *(&x + i); }\n
double mag() const {return std::hypot(x, y, z);}\n
double r() const {return mag();}\n
double theta() const {return acos(z/mag());}\n
double phi() const {return atan2(y,x);}\n
double px() const {return x;}\n
double py() const {return y;}\n
double pz() const {return z;}\n
double energy() const {return sqrt(x*x + y*y + z*z + m*m);}\n
double mass() const {return m;}\n
double px(px) { x = px;}\n
double py(py) { y = py;}\n
double pz(pz) { z = pz;}\n
"
ConstExtraCode:
includes: "#include <cmath>"
declaration: "
double operator[](unsigned i) const { return *(&x + i); }\n
double mag() const {return std::hypot(x, y, z);}\n
double r() const {return mag();}\n
double theta() const {return acos(z/mag());}\n
double phi() const {return atan2(y,x);}\n
double px() const {return x;}\n
double py() const {return y;}\n
double pz() const {return z;}\n
double energy() const {return sqrt(x*x + y*y + z*z + m*m);}\n
double mass() const {return m;}\n
"
eic::CovDiagXYZ:
Members:
- float xx
- float yy
- float zz
ExtraCode:
declaration: "
CovDiagXYZ() : xx{0}, yy{0}, zz{0} {}\n
CovDiagXYZ(float x, float y, float z) : xx{x}, yy{y}, zz{z} {}\n
CovDiagXYZ(std::span<float> v) : xx{v[0]}, yy{v[1]}, zz{v[2]} {}\n
CovDiagXYZ& operator=(std::span<float> v) { xx = v[0]; yy = v[1]; zz = v[2]; return *this;}
explicit CovDiagXYZ(const ConstCovDiagXYZ& cv) : xx{cv.xx()}, yy{cv.yy()}, zz{cv.zz()} {}\n
CovDiagXYZ& operator=(const ConstCovDiagXYZ& cv) {xx = cv.xx(); yy = cv.yy(); zz = cv.zz(); return *this;}\n
float operator[](unsigned i, unsigned j) const {return (i == j) ? *(&xx + i) : 0.;}\n
"
ConstExtraCode:
declaration: "
float operator[](unsigned i, unsigned j) const {return (i == j) ? *(&xx + i) : 0.;}\n
"
eic::CovXYZ:
Members:
- float xx
- float yy
- float zz
- float xy
- float xz
- float yz
ExtraCode:
declaration: "
CovXYZ() : xx{0}, yy{0}, zz{0}, xy{0}, xz{0}, yz{0} {}\n
CovXYZ(float vx, float vy, float vz, vxy, vxz, vyz) : xx{vx}, yy{vy}, zz{vz}, xy{vxy}, xz{vxz}, yz{vyz} {}\n
CovXYZ(std::span<float> v) : xx{v[0]}, yy{v[1]}, zz{v[2]}, xy{v[3]}, xz{v[4]}, yx{v[5]} {}\n
CovDiagXYZ& operator=(std::span<float> v) { xx = v[0]; yy = v[1]; zz = v[2]; xy = v[3]; xz = v[4]; yz = v[5]; return *this;}
explicit CovXYZ(const ConstCovXYZ& cv) : xx{cv.xx()}, yy{cv.yy()}, zz{cv.zz()}, xy{cv.xy()}, xz{cv.xz()}, yz{cv.yz()} {}\n
CovXYZ& operator=(const ConstCovXYZ& cv) {xx = cv.xx(); yy = cv.yy(); zz = cv.zz(); xy = cv.xy(); xz = cv.xz(); yz = cv.yz(); return *this;}\n
float operator[](unsigned i, unsigned j) const {
// diagonal
if (i == j) {
return *(&xx + i);
}
// off-diagonal
// we have as options (0, 1), (0, 2) and (1, 2) (and mirrored)
// note that, starting from xy, we find the correct element at (i+j-1)
return *(&xy + i + j - 1);
}
"
ConstExtraCode:
declaration: "
float operator[](unsigned i, unsigned j) const {
// diagonal
if (i == j) {
return *(&xx + i);
}
// off-diagonal
// we have as options (0, 1), (0, 2) and (1, 2) (and mirrored)
// note that, starting from xy, we find the correct element at (i+j-1)
return *(&xy + i + j - 1);
}
"
eic::ElectronBeam:
Members:
- float eEnergy // [GeV]
- int helicity
eic::HadronBeam:
Members:
- float hEnergy // [GeV]
- int pol
datatypes:
eic::EventInfo:
Description: "Event Info"
Author: "W. Armstrong, S. Joosten"
Members:
- uint64_t run // Run number.
- uint64_t number // Event number.
- int32_t genID // Generator ID (TBD).
- int32_t procID // Processes ID (TBD).
- int32_t type // event type ID (TBD).
ExtraCode:
declaration: "
explicit EventInfo(const ConstEventInfo& cv) : run{cv.run()}, number{cv.number()}, genID{cv.genID()}, procID{cv.procID()}, type{cv.type()} {}\n
EventInfo& operator=(const ConstEventInfo& cv) {run = cv.run(); number = cv.number(); genID = cv.genID(); procID = cv.procID(); type = cv.type();return *this;}\n
"
eic::Particle:
Description: "Basic Particle used for reconstructed and generated particles"
Author: "W. Armstrong, S. Joosten"
Members:
- eic::VectorPxPyPzM p // Four momentum [GeV]
- eic::VectorXYZT v // vertex [mm, ns].
- int32_t pid // Particle type identification code
- int32_t status // Status code
ExtraCode:
declaration: "
explicit Particle(const ConstParticle& cv) : p{cv.p()}, v{cv.v()}, pid{cv.pid()}, status{cv.status()} {}\n
Particle& operator=(const ConstParticle& cv) {p = cv.p(); v = cv.v(); pid = cv.pid(); status = cv.status();return *this;}\n
"
## NOTE: this class seems to be unused right now?
eic::MCParticle:
Description: "EIC MC Particle"
Author: "W. Armstrong, S. Joosten"
Members:
- int32_t ID // Unique particle index
- int32_t pid // The PDG code of the particle.
- int32_t status // The status for particles as defined by the generator.
- float charge // The particle's charge.
- eic::VectorPxPyPzM p // The particle's 4-momentum at the production vertex in [GeV]
- eic::VectorXYZT v // The production vertex and time of the particle in [mm, ns].
- eic::VectorXYZ endpoint // The endpoint of the particle in [mm]
- eic::IntegerPair parentIDs // IDs of the first and second parent, or -1
- eic::IntegerPair childIDs // IDs of the first and last children, or -1
- bool endpointSet // Whether the endpoint has been set
ExtraCode:
declaration: "
explicit MCParticle(const ConstMCParticle& cv)
: ID{cv.ID()}, pid{cv.pid()}, status{cv.status()}, p{cv.p()}, v{cv.v()}, endpoint{cv.endpoint()}
, parentIDs{cv.parentIDs()}, childIDs{cv.childIDs()}, endpointSet{cv.endpointSet()} {}\n
MCParticle& operator=(const ConstMCParticle& cv) {
ID = cv.ID(); pid = cv.pid(); status = cv.status(); p = cv.p(); v = cv.v(); endpoint = cv.endpoint();
parentIDs = cv.parentIDs(); childIDs = cv.childIDs(); return *this;}\n
float mass() const {return p.m();}\n
float time() const {return v.t();}\n
"
ConstExtraCode:
declaration: "
float mass() const {return p.m();}\n
float time() const {return v.t();}\n
"
eic::ReconstructedParticle:
Description: "EIC Reconstructed Particle"
Author: "W. Armstrong, S. Joosten"
Members:
- int32_t ID // Unique particle index
- int32_t pid // PID of reconstructed particle.
- eic::VectorXYZ p // three momentum [GeV], from tracking or calorimetry
- eic::VexterXYZ v // vertex position of the reconstructed particle [mm]
- float energy // Energy (from calorimetery) of the particle [GeV]
- float mass // The mass of the particle in [GeV]
- float time // Vertex time [ns]
- float charge // The particle's charge [e]
- int32_t parentID // Parent particle reconstructed from this particle, -1 if none
- int32_t vertexID // Start vertex for this particle
ExtraCode:
declaration: "
explicit ReconstructedParticle(const ConstReconstructedParticle& cv)
: ID{cv.ID()}, pid{cv.pid()}, p{cv.p()}, v{cv.v()}, energy{cv.energy()}, mass{cv.mass()}, time{cv.time()}
, charge{cv.charge()}, parentID{cv.parentID()}, vertexID{cv.vertexID()} {}\n
ReconstructedParticle& operator=(const ConstReconstructedParticle& cv) {
ID = cv.ID(); pid = cv.pid(); p = cv.p(); v = cv.v(); energy = cv.energy(); mass = cv.mass(); time = cv.time();
charge = cv.charge(); parentID = cv.parentID(); vertexID = cv.vertexID(); return *this;}\n
bool has_parent() const {return parentID >= 0;}
"
ConstExtraCode:
declaration: "
bool has_parent() const {return parentID >= 0;}
"
eic::RawCalorimeterHit:
Description: "Raw (digitized) calorimeter hit"
Author: "W. Armstrong, S. Joosten"
Members:
- int64_t ID // unique ID for this hit
- int64_t cellID // The detector specific (geometrical) cell id.
- int64_t amplitude // The amplitude of the hit in ADC counts.
ExtraCode:
declaration: "
explicit RawCalorimeterHit(const ConstRawCalorimeterHit& cv) : ID{cv.ID()}, cellID{cv.cellID()}, amplitude{cv.amplitude()} {}\n
RawCalorimeterHit& operator=(const ConstRawCalorimeterHit& cv) {ID = cv.ID(); cellID = cv.cellID(); amplitude = cv.amplitude();return *this;}\n
"
eic::CalorimeterHit:
Description: "Calorimeter hit"
Author: "W. Armstrong, S. Joosten"
Members:
- int64_t ID // unique ID for this hit
- int64_t cellID // The detector specific (geometrical) cell id.
- int32_t layerID // ID of the layer that has this hit (-1 if none)
- int32_t sectorID // ID of the sector that has this hit (-1 if none)
- int32_t clusterID // ID of the cluster associated with this hit (-1 if none)
- int32_t type // The type of the hit.
- float energy // The energy of the hit in [GeV].
- float time // The time of the hit in [ns].
- eic::VectorXYZ position // The global position of the hit in world coordinates [mm].
- eic::VectorXYZ local // The local position of the hit in detector coordinates [mm].
- eic::VectorXYZ dimension // The dimension information of the cell [mm].
ExtraCode:
declaration: "
explicit CalorimeterHit(const ConstCalorimeterHit& cv)
: ID{cv.ID()}, cellID{cv.cellID()}, layerID{cv.layerID()}, sectorID{cv.sectorID()}, clusterID{cv.clusterID()}
, type{cv.type()}, energy{cv.energy()}, time{cv.time()}, position{cv.position()}, local{cv.local()}
, dimension{cv.dimension()} {}\n
CalorimeterHit& operator=(const ConstCalorimeterHit& cv) {
ID = cv.ID(); cellID = cv.cellID(); layerID = cv.layerID(); sectorID = cv.sectorID(); clusterID = cv.clusterID();
type = cv.type(); energy = cv.energy(); time = cv.time(); position = cv.position(); local = cv.local();
dimension = cv.dimension();}\n
"
eic::RawTrackerHit:
Description: "Raw (digitized) tracker hit"
Author: "W. Armstrong, S. Joosten"
Members:
- int64_t ID // unique ID for this hit
- int64_t cellID // The detector specific (geometrical) cell id.
- int32_t time // tdc value.
- int32_t charge // adc value
ExtraCode:
declaration: "
explicit RawTrackerHit(const ConstRawTrackerHit& cv) : ID{cv.ID()}, cellID{cv.cellID()}, time{cv.time()}, charge{cv.charge()} {}\n
RawTrackerHit& operator=(const ConstRawTrackerHit& cv) {ID = cv.ID(); cellID = cv.cellID(); time = cv.time(); charge = cv.charge(); return *this;}\n
"
eic::TrackerHit:
Description: "Tracker hit (reconstructed from Raw)"
Author: "W. Armstrong, S. Joosten"
Members:
- int64_t ID // unique ID for this hit
- int64_t cellID // The detector specific (geometrical) cell id.
- int32_t clusterID // Associated cluster ID if applicable (-1 if not set)
- float time // The time of the hit. [ns]
- float edep // Energy deposit in this hit [GeV]
- float edepError // Error on the energy deposit [GeV]
- eic::VectorXYZ position // Hit (cell) position [mm]
- eic::CovDiagXYZ covMatrix // Covariance Matrix
- int32_t trackID // ID of associated track (-1 if not set)
ExtraCode:
declaration: "
explicit TrackerHit(const ConstTrackerHit& cv)
: ID{cv.ID()}, cellID{cv.cellID()}, clusterID{cv.clusterID()}
, time{cv.time()}, EDep{cv.EDep()}, EDepError{cv.EDepError()}
, position{cv.position()}, covMatrix{cv.covMatrix()} {} \n
TrackerHit& operator=(const ConstTrackerHit& cv) {
ID = cv.ID(); cellID = cv.cellID();
time = cv.time(); EDep = cv.EDep(); EDepError = cv.EDepError();
position = cv.position(); covMatrix = cv.covMatrix(); return *this;}\n
bool has_track() const {return trackID >= 0;}
"
ConstExtraCode:
declaration: "
bool has_track() const {return trackID >= 0;}
"
eic::Cluster:
Description: "EIC cluster"
Author: "W. Armstrong, S. Joosten, C.Peng"
Members:
- int32_t ID // unique ID for this cluster
- float energy // Reconstructed energy of the cluster [GeV].
- float edep // Energy deposit of the cluster [GeV].
- uint32_t nhits // Number of hits in the cluster.
- eic::VectorXYZ position // Global position of the cluster [mm].
- eic::CovXYZ positionError // Covariance matrix of the position (6 Parameters).
- eic::Direction direction // Intrinsic direction of the cluster at the central position [rad]
# TODO: determine if polar is really needed, as we also access the spherical
# coordinates through the position XYZ member functions
#- eic::VectorPolar polar // Polar coordinates for global position.
ExtraCode:
declaration: "
explicit Cluster(const ConstCluster& cv)
: ID{cv.ID()}, energy{cv.energy()}, edep{cv.edep()}, nhits{cv.nhits()}
, position{cv.position()}, positionError{cv.positionError()}, direction{cv.direction()} {}\n
Cluster& operator=(const ConstCluster& cv) {
ID = cv.ID(); energy = cv.energy(); edep = cv.edep(); nhits = cv.nhits();
position = cv.position(); positionError = cv.positionError(); direction = cv.direction();}\n
"
eic::TrackParameters:
Description: "ACTS Track parameters"
Author: "W. Armstrong, S. Joosten"
Members:
- eic::FloatPair loc // tracking location
- eic::FloatPair locError // error on the location
- eic::Direction direction // track direction (theta, phi) [rad]
- eic::Direction directionError // error on the direction [rad]
- float qOverP // [e/GeV]
- float time // track time [ns]
eic::Track:
Description: "EIC reconstructed track"
Author: "F.Gaede, B. Hegner"
Members:
- float chi2 // Chi2
- int ndf // Number of degrees of freedom of the track fit.
- float dEdx // dEdx of the track.
- float dEdxError // Error of dEdx.
- float radiusOfInnermostHit // The radius of the innermost hit that has been used in the track fit.
#- std::vector<int> subdetectorHitNumbers // The number of hits in particular subdetectors
OneToManyRelations:
- eic::Track tracks // The tracks that have been combined to this track.
- eic::TrackerHit hits // The hits that have been combined to this track.
- eic::TrackState trackStates // Track states associated to this track.
eic::TrackerData:
Description: "EIC tracker data"
Author: "F.Gaede, B. Hegner"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int time // The time of the hit.
- int charge // adc value
#- std::vector<float > charge // The corrected (calibrated) FADC spectrum.
eic::TrackerPulse:
Description: "EIC tracker pulse"
Author: "F. Gaede, B. Hegner"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int quality // ...
- float time // The time of the pulse.
- float charge // The integrated charge of the pulse
# - std::vector<float > covMatrix // ...
OneToOneRelations:
- eic::TrackerData corrData // ...
eic::TrackerRawData:
Description: "EIC tracker raw data"
Author: "W. Armstrong"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int64_t channelID // channel id.
- int time // time measurement associated with the adc values.
- int adc // measured ADC values
eic::TrackerData:
Description: "EIC tracker data"
Author: "F.Gaede, B. Hegner"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int time // time measurement associated with the adc values.
# - std::vector<short> charge // The actual FADC spectrum.
# EIC TrackState
eic::TrackState:
Description: "EIC track state"
Author: "F.Gaede, B. Hegner"
Members:
- int location // The location of the track state.
- float d0 // Impact parameter of the track in (r-phi).
- float phi // Phi of the track at the reference point.
- float omega // Omega is the signed curvature of the track in [1/mm].
- float z0 // Impact parameter of the track in (r-z).
- float tanLambda // Lambda is the dip angle of the track in r-z at the reference point.
- std::array<float , 3> referencePoint // Reference point of the track parameters
# - std::vector<float > covMatrix // Covariance matrix of the track parameters.
eic::Vertex:
Description: "EIC vertex"
Author: "W. Armstrong"
Members:
- int primary // Whether it is the primary vertex of the event
- float chi2 // Chi squared of the vertex fit.
- float probability // Probability of the vertex fit
- eic::VectorXYZT position // postion and time of vertex.
OneToOneRelations:
- eic::ReconstructedParticle particle // Reconstructed Particle associated to the Vertex.
eic::RawPMTHit:
Description: "EIC Raw PMT hit"
Author: "C. Peng"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- unsigned amplitude // PMT signal amplitude
- unsigned timeStamp // PMT signal time
eic::PMTHit:
Description: "EIC PMT hit"
Author: "C. Peng"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- float npe // estimated number of photo-electrons
- float time // time
- eic::VectorXYZ position // PMT hit position
- eic::VectorXYZLocal local // The local position of the hit in detector coordinates.
eic::RIChCluster:
Description: "EIC RICh Cluster"
Author: "C. Peng"
Members:
- eic::VectorXYZ position // Global position of the cluster.
- float theta // opening angle of the ring
- float radius // radius of the best fit ring
- float radiusError // estimated error from the fit
- float npe // number of photo-electrons
OneToManyRelations:
- eic::PMTHit hits // The hits that have been included in this cluster
eic::ImagingPixel:
Description: "Pixel for Imaging Calorimeter"
Author: "C. Peng"
Members:
- int clusterID // Cluster id
- int layerID // Layer id
- int sectorID // Sector id
- int hitID // Hit id
- float edep // Energy deposition
- float time // Timestamp
- float eta // Pseudorapidity
- eic::VectorXYZLocal local // Local position in its sector
- eic::VectorXYZ position // Global position
- eic::VectorPolar polar // Global position in polar coordinates
eic::ImagingLayer:
Description: "Layer for Imaging Calorimeter"
Author: "C. Peng"
Members:
- int clusterID // Cluster id
- int layerID // Layer id
- int nhits // Number of hits
- float edep // Energy deposit
- float radius // Shower radius
- float skewness // Skewness of hits distribution
- float eta // Pseudorapidity
- eic::VectorXYZ position // Global center position.
- eic::VectorPolar polar // Global center position in polar coordinates
OneToManyRelations:
- eic::ImagingPixel hits // hits data
eic::ImagingCluster:
Description: "Cluster for Imaging Calorimeter"
Author: "S. Joosten, C. Peng"
Members:
- int clusterID // Cluster id
- int nhits // Number of hits in this cluster.
- float energy // Energy of the cluster.
- float edep // Energy deposit of the cluster.
- float radius // Shower radius
- float skewness // Skewness of hits distribution
- float leakcorr // Leakage correction to the cluster
- float eta // Pseudorapidity
- eic::VectorXYZ position // Global position of the cluster.
- eic::VectorPolar polar // Polar coordinates for global position.
- float cl_theta // Intrinsic direction of cluster at position - Theta.
- float cl_phi // Intrinsic direction of cluster at position - Phi.
OneToManyRelations:
# cluster <-> hit relation is deprecated
- eic::ImagingPixel hits // hits data
- eic::ImagingLayer layers // layer data
......@@ -529,6 +529,7 @@ datatypes:
- eic::VectorXYZ position // Global position of the cluster [mm].
- eic::CovXYZ positionError // Covariance matrix of the position (6 Parameters).
- eic::Direction direction // Intrinsic direction of the cluster at the central position [rad]
- int32_t recID // ID of the reconstructed particle associated with this cluster, or -1 if none
# TODO: determine if polar is really needed, as we also access the spherical
# coordinates through the position XYZ member functions
#- eic::VectorPolar polar // Polar coordinates for global position.
......@@ -539,7 +540,12 @@ datatypes:
, position{cv.position()}, positionError{cv.positionError()}, direction{cv.direction()} {}\n
Cluster& operator=(const ConstCluster& cv) {
ID = cv.ID(); energy = cv.energy(); edep = cv.edep(); nhits = cv.nhits();
position = cv.position(); positionError = cv.positionError(); direction = cv.direction();}\n
position = cv.position(); positionError = cv.positionError(); direction = cv.direction(); return *this;}\n
bool has_reconstructedParticle() const {return recID >= 0;}
"
ConstExtraCode:
declaration: "
bool has_reconstructedParticle() const {return recID >= 0;}
"
eic::TrackParameters:
......@@ -552,82 +558,56 @@ datatypes:
- eic::Direction directionError // error on the direction [rad]
- float qOverP // [e/GeV]
- float time // track time [ns]
ExtraCode:
declaration: "
explicit TrackParameters(const ConstTrackParameters& cv)
: loc{cv.loc()}, locError{cv.locError()}, direction{cv.direction()}, directionError{cv.directionError}
, qOverP{cv.qOverP()}, time{cv.time()} {}\n
TrackParameters& operator=(const ConstTrackParameters& cv) {
loc = cv.loc(); locError = cv.locError(); direction = cv.direction(); directionError = cv.directionError
qOverP = cv.qOverP(); time = cv.time(); return *this'}\n
"
eic::Track:
Description: "EIC reconstructed track"
Author: "F.Gaede, B. Hegner"
Members:
- float chi2 // Chi2
- int ndf // Number of degrees of freedom of the track fit.
- float dEdx // dEdx of the track.
- float dEdxError // Error of dEdx.
- float radiusOfInnermostHit // The radius of the innermost hit that has been used in the track fit.
#- std::vector<int> subdetectorHitNumbers // The number of hits in particular subdetectors
OneToManyRelations:
- eic::Track tracks // The tracks that have been combined to this track.
- eic::TrackerHit hits // The hits that have been combined to this track.
- eic::TrackState trackStates // Track states associated to this track.
eic::TrackerData:
Description: "EIC tracker data"
Author: "F.Gaede, B. Hegner"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int time // The time of the hit.
- int charge // adc value
#- std::vector<float > charge // The corrected (calibrated) FADC spectrum.
eic::TrackerPulse:
Description: "EIC tracker pulse"
Author: "F. Gaede, B. Hegner"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int quality // ...
- float time // The time of the pulse.
- float charge // The integrated charge of the pulse
# - std::vector<float > covMatrix // ...
OneToOneRelations:
- eic::TrackerData corrData // ...
eic::TrackerRawData:
Description: "EIC tracker raw data"
Author: "W. Armstrong"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int64_t channelID // channel id.
- int time // time measurement associated with the adc values.
- int adc // measured ADC values
eic::TrackerData:
Description: "EIC tracker data"
Author: "F.Gaede, B. Hegner"
Members:
- int64_t cellID // The detector specific (geometrical) cell id.
- int time // time measurement associated with the adc values.
# - std::vector<short> charge // The actual FADC spectrum.
# EIC TrackState
eic::TrackState:
Description: "EIC track state"
Author: "F.Gaede, B. Hegner"
Members:
- int location // The location of the track state.
- float d0 // Impact parameter of the track in (r-phi).
- float phi // Phi of the track at the reference point.
- float omega // Omega is the signed curvature of the track in [1/mm].
- float z0 // Impact parameter of the track in (r-z).
- float tanLambda // Lambda is the dip angle of the track in r-z at the reference point.
- std::array<float , 3> referencePoint // Reference point of the track parameters
# - std::vector<float > covMatrix // Covariance matrix of the track parameters.
# TODO: needed? currently not used in Juggler
# eic::TrackerRawData:
# Description: "EIC tracker raw data"
# Author: "W. Armstrong"
# Members:
# - int64_t cellID // The detector specific (geometrical) cell id.
# - int64_t channelID // channel id.
# - int time // time measurement associated with the adc values.
# - int adc // measured ADC values
#
# eic::TrackerData:
# Description: "EIC tracker data"
# Author: "F.Gaede, B. Hegner"
# Members:
# - int64_t cellID // The detector specific (geometrical) cell id.
# - int time // time measurement associated with the adc values.
# # - std::vector<short> charge // The actual FADC spectrum.
# # EIC TrackState
# eic::TrackState:
# Description: "EIC track state"
# Author: "F.Gaede, B. Hegner"
# Members:
# - int location // The location of the track state.
# - float d0 // Impact parameter of the track in (r-phi).
# - float phi // Phi of the track at the reference point.
# - float omega // Omega is the signed curvature of the track in [1/mm].
# - float z0 // Impact parameter of the track in (r-z).
# - float tanLambda // Lambda is the dip angle of the track in r-z at the reference point.
# - std::array<float , 3> referencePoint // Reference point of the track parameters
# # - std::vector<float > covMatrix // Covariance matrix of the track parameters.
eic::Vertex:
Description: "EIC vertex"
Author: "W. Armstrong"
Author: "W. Armstrong, S. Joosten"
Members:
- int primary // Whether it is the primary vertex of the event
- eic::VectorXYZT position // postion and time of vertex [mm, ns]
- float chi2 // Chi squared of the vertex fit.
- float probability // Probability of the vertex fit
- eic::VectorXYZT position // postion and time of vertex.
- bool primary // Whether it is the primary vertex of the event
OneToOneRelations:
- eic::ReconstructedParticle particle // Reconstructed Particle associated to the Vertex.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment