Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Project Juggler
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
Container registry
Model registry
Operate
Environments
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
Project Juggler
Merge requests
!91
Added dummy MC2DummyParticle class
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added dummy MC2DummyParticle class
dummy
into
master
Overview
0
Commits
2
Pipelines
0
Changes
1
Merged
Whitney Armstrong
requested to merge
dummy
into
master
4 years ago
Overview
0
Commits
2
Pipelines
0
Changes
1
Expand
Just a simple mcparticles-> ReconstructedParticle
0
0
Merge request reports
Compare
master
version 5
5a9b001d
4 years ago
version 4
524268b2
4 years ago
version 3
41285d0e
4 years ago
version 2
15deeb1d
4 years ago
version 1
1cc21db7
4 years ago
master (base)
and
latest version
latest version
9024c172
2 commits,
4 years ago
version 5
5a9b001d
1 commit,
4 years ago
version 4
524268b2
4 commits,
4 years ago
version 3
41285d0e
3 commits,
4 years ago
version 2
15deeb1d
2 commits,
4 years ago
version 1
1cc21db7
1 commit,
4 years ago
1 file
+
56
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
JugBase/src/components/MC2DummyParticle.cpp
0 → 100644
+
56
−
0
Options
#include
<algorithm>
#include
<cmath>
#include
"GaudiAlg/Transformer.h"
#include
"GaudiAlg/Producer.h"
#include
"GaudiAlg/GaudiTool.h"
#include
"Gaudi/Algorithm.h"
// FCCSW
#include
"JugBase/DataHandle.h"
// Event Model related classes
#include
"dd4pod/Geant4ParticleCollection.h"
#include
"eicd/ReconstructedParticleCollection.h"
namespace
Jug
{
namespace
Base
{
class
MC2DummyParticle
:
public
GaudiAlgorithm
{
public:
// ill-formed: using GaudiAlgorithm::GaudiAlgorithm;
MC2DummyParticle
(
const
std
::
string
&
name
,
ISvcLocator
*
svcLoc
)
:
GaudiAlgorithm
(
name
,
svcLoc
)
{
declareProperty
(
"inputCollection"
,
m_inputHitCollection
,
"mcparticles"
);
declareProperty
(
"outputCollection"
,
m_outputHitCollection
,
"DummyReconstructedParticles"
);
}
StatusCode
initialize
()
override
{
if
(
GaudiAlgorithm
::
initialize
().
isFailure
())
return
StatusCode
::
FAILURE
;
return
StatusCode
::
SUCCESS
;
}
StatusCode
execute
()
override
{
// input collection
const
dd4pod
::
Geant4ParticleCollection
*
parts
=
m_inputHitCollection
.
get
();
// output collection
auto
out_parts
=
m_outputHitCollection
.
createAndPut
();
for
(
const
auto
&
p
:
*
parts
)
{
double
momentum
=
std
::
hypot
(
p
.
psx
(),
p
.
psy
(),
p
.
psz
());
double
energy
=
std
::
hypot
(
momentum
,
p
.
mass
());
out_parts
->
push_back
({
p
.
pdgID
(),
energy
,
{
p
.
psx
(),
p
.
psy
(),
p
.
psz
()},
p
.
charge
(),
p
.
mass
()});
}
return
StatusCode
::
SUCCESS
;
}
DataHandle
<
dd4pod
::
Geant4ParticleCollection
>
m_inputHitCollection
{
"mcparticles"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
DataHandle
<
eic
::
ReconstructedParticleCollection
>
m_outputHitCollection
{
"DummyReconstructedParticles"
,
Gaudi
::
DataHandle
::
Writer
,
this
};
};
DECLARE_COMPONENT
(
MC2DummyParticle
)
}
// namespace Base
}
// namespace Gaudi
Loading