Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eicd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
eicd
Merge requests
!51
Better consistency in EICD, preparing to store MC truth links.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Better consistency in EICD, preparing to store MC truth links.
Minor_cleanup
into
master
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Sylvester Joosten
requested to merge
Minor_cleanup
into
master
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
Cleanup comments
Improved variable names for ClusterRelations
ProtoClusters now use VectorMembers for smaller memory footprint
Get rid of ClusterInfo structures, merging relevant parts into Cluster
Add provision for MC truth info to Cluster
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
18b7997e
1 commit,
3 years ago
2 files
+
174
−
146
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
dd4hep.yaml
+
110
−
75
Options
@@ -7,96 +7,131 @@ options :
includeSubfolder
:
True
components
:
dd4pod::ThreeVector
:
#Description: "three vector"
#Author : "W.Armstrong"
dd4pod::VectorXYZ
:
Members
:
-
double x
-
double y
-
double z
-
double x // [mm] or [GeV]
-
double y //
-
double z //
ExtraCode
:
includes
:
"
#include
<cmath>
\n
#include<tuple>"
declaration
:
"
VectorXYZ()
:
x{0},
y{0},
z{0}
{}
\n
VectorXYZ(double
xx,
double
yy,
double
zz)
:
x{xx},
y{yy},
z{zz}
{}
\n
double&
operator[](unsigned
i)
{return
*(&x
+
i);}
\n
const
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
eta()
const
{return
-log(tan(0.5*theta()));}
\n
operator
std::tuple<double,
double,
double>()
{return
{x,
y,
z};}
\n
double
dot(const
VectorXYZ&
rhs)
const
{return
x*rhs.x
+
y*rhs.y
+
z*rhs.z;}
\n
VectorXYZ
add(const
VectorXYZ&
rhs)
const
{return
{x+rhs.x,
y+rhs.y,
z+rhs.z};}
\n
VectorXYZ
subtract(const
VectorXYZ&
rhs)
const
{return
{x-rhs.x,
y-rhs.y,
z-rhs.z};}
\n
VectorXYZ
scale(double
f)
const
{return
{f*x,
f*y,
f*z};}
\n
"
dd4pod::MonteCarloContrib
:
#Description: "Podio implementation of dd4hep's dd4hep::sim::MonteCarloContrib class"
#Author : "W.Armstrong"
Members
:
-
int trackID // track id
-
int pdgID // pdgID
-
double deposit // en deposit
-
double time // time
-
double length //length
-
double x // x
-
double y // x
-
double z // x
datatypes
:
dd4pod::FourVector
:
Description
:
"
four
vector"
Author
:
"
W.Armstrong"
Members
:
-
double x // x
-
double y // y
-
double z // z
-
double t // t
-
int32_t trackID // track id, -1 if none/invalid. Maps to Geant4Particle::ID.
-
int32_t pdgID // PDG Particle ID code
-
double deposit // energy deposit [GeV]
-
double time // time [ns]
-
double length // length [mm]
-
float x // x position [mm]
-
float y // y position [mm]
-
float z // z position [mm]
ExtraCode
:
includes
:
"
#include
<cmath>"
declaration
:
"
MonteCarloContrib()
:
trackID{-1},
pdgID{0},
deposit{0},
time{0},
x{0},
y{0},
z{0}
{}
\n
MonteCarloContrib(int32_t
id,
int32_t
pdg,
double
e,
double
t,
\n
double
l,
double
xx,
double
yy,
double
zz)
\n
:
trackID{id},
pdgID{pdg},
deposit{e},
time{t},
length{l}
\n
,
x{static_cast<float>(xx)},
y{static_cast<float>(yy)},
z{static_cast<float>(zz)}
{}
\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
eta()
const
{return
-log(tan(0.5*theta()));}
bool
valid()
const
{return
trackID
>=
0;}
\n
bool
empty()
const
{return
trackID
<
0;}
\n
"
datatypes
:
dd4pod::Geant4Particle
:
Description
:
"
Podio
implementation
of
dd4hep's
dd4hep::sim::Geant4Particle
class"
Author
:
"
W.Armstrong"
Author
:
"
W.
Armstrong,
S.
Joosten"
Members
:
-
int32_t ID // unique identifier for this particle
-
int32_t g4Parent // g4 parent particle
-
int32_t reason // TODO document
-
int32_t mask // TODO document
-
int32_t steps // TODO document
-
int32_t secondaries // TODO document
-
int32_t pdgID // TODO document
-
int32_t status // TODO document
-
std::array<int,2> colorFlow // TODO document
-
int32_t genStatus // Generator status code
-
int32_t charge // Particle charge
-
int32_t _spare // extra int to have doubles properly aligned at 8 bytes
-
std::array<float,3> spin // Particle spin state
-
dd4pod::VectorXYZ vs // Start vertex [mm]
-
dd4pod::VectorXYZ ve // End vertex [mm]
-
dd4pod::VectorXYZ ps // 3-momentum at start vertex [GeV]
-
dd4pod::VectorXYZ pe // 3-momentum at end vertex [GeV]
-
double mass // particle mass [GeV]
-
double time // start vertex time [ns]
-
double properTime // proper time
VectorMembers
:
-
int32_t parents // parent IDs
-
int32_t daughters // daughter IDs
ConstExtraCode
:
declaration
:
"
double
px()
const
{return
ps().x;}
\n
double
py()
const
{return
ps().y;}
\n
double
pz()
const
{return
ps().z;}
\n
double
energy()
const
{return
std::hypot(ps().mag(),
mass());}
"
dd4pod::PhotoMultiplierHit
:
Description
:
"
Podio
implementation
of
a
pmt
hit
"
Author
:
"
W.
Armstrong,
S.
Joosten"
Members
:
-
int ID // x
-
int g4Parent // x
-
int reason // x
-
int mask // x
-
int steps // x
-
int secondaries // x
-
int pdgID // x
-
int status // x
-
std::array<int,2> colorFlow // x
-
int genStatus // x
-
int charge // x
-
std::array<int,1> spare // x
-
std::array<float,3> spin // x
-
double vsx // x
-
double vsy // x
-
double vsz // x
-
double vex // x
-
double vey // x
-
double vez // x
-
double psx // x
-
double psy // x
-
double psz // x
-
double pex // x
-
double pey // x
-
double pez // x
-
double mass // x
-
double time // x
-
double properTime // x
OneToManyRelations
:
-
dd4pod::Geant4Particle parents // x
-
dd4pod::Geant4Particle daughters // x
-
int64_t cellID // cellID
-
int32_t flag // User flag to classify hits
-
int32_t g4ID // Original Geant4 track identifier of the creating track (for debugging)
-
dd4pod::VectorXYZ position // hit position [mm]
-
dd4pod::VectorXYZ momentum // 3-momentum [GeV]
-
double length // length [mm]
-
dd4pod::MonteCarloContrib truth // truth info
-
double energy // photon energy [GeV]
dd4pod::TrackerHit
:
Description
:
"
Podio
implementation
of
dd4hep's
dd4hep::sim::Geant4Tracker::Hit
class"
Author
:
"
W.Armstrong"
Author
:
"
W.
Armstrong
,
S.
Joosten
"
Members
:
-
long cellID
// cellID
-
long flag
// User flag to classify hits
-
long g4ID
// Original Geant
4 track identifier of the creating track (debugging)
-
dd4pod::
Three
Vector position // position
-
dd4pod::
Three
Vector momentum // momentum
-
double
length
// length
-
dd4pod::MonteCarloContrib truth // truth
-
double energyDeposit // energy
D
eposit
-
int64_t cellID
// cellID
-
int32_t flag
// User flag to classify hits
-
int32_t g4ID
// Original Geant4 track identifier of the creating track (debugging)
-
dd4pod::Vector
XYZ
position
// position
[mm]
-
dd4pod::Vector
XYZ
momentum
//
3-
momentum
[GeV]
-
double
length
// length
[mm]
-
dd4pod::MonteCarloContrib truth
// truth
info
-
double
energyDeposit
// energy
d
eposit
[GeV]
dd4pod::CalorimeterHit
:
Description
:
"
Podio
implementation
of
dd4hep's
dd4hep::sim::Geant4Calorimeter::Hit
class"
Author
:
"
W.Armstrong"
Author
:
"
W.
Armstrong
,
S.
Joosten
"
Members
:
-
long cellID // cellID
-
long flag // User flag to classify hits
-
long g4ID // Original Geant 4 track identifier of the creating track (debugging)
-
dd4pod::ThreeVector position // position
-
dd4pod::MonteCarloContrib truth // truth
-
double energyDeposit // energyDeposit
-
int64_t cellID // cellID
-
int32_t flag // User flag to classify hits
-
int32_t g4ID // Original Geant4 track identifier of the creating track (debugging)
-
dd4pod::VectorXYZ position // position [mm]
-
dd4pod::MonteCarloContrib truth // truth-info of one of the contributing hits
-
double energyDeposit // energy deposit [GeV]
VectorMembers
:
-
dd4pod::MonteCarloContrib contributions // All contributing hits. Not filled by default.
Loading