Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
EIC
Project Juggler
Commits
7ff6b01e
Commit
7ff6b01e
authored
Mar 02, 2021
by
Whitney Armstrong
Browse files
Fixing CI block
modified: .gitlab-ci.yml
parent
0639e38d
Changes
2
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
7ff6b01e
...
...
@@ -132,8 +132,9 @@ benchmarks:physics:
purge_image
:
stage
:
cleanup
dependencies
:
-
env
needs
:
-
benchmarks:reconstruction
-
benchmarks:physics
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"merge_request_event"'
script
:
...
...
JugBase/src/components/MC2DummyParticle.cpp
View file @
7ff6b01e
...
...
@@ -4,6 +4,7 @@
#include "GaudiAlg/Producer.h"
#include "GaudiAlg/GaudiTool.h"
#include "Gaudi/Algorithm.h"
#include "GaudiKernel/RndmGenerators.h"
// FCCSW
#include "JugBase/DataHandle.h"
...
...
@@ -20,6 +21,8 @@ namespace Jug {
public:
DataHandle
<
dd4pod
::
Geant4ParticleCollection
>
m_inputHitCollection
{
"mcparticles"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
DataHandle
<
eic
::
ReconstructedParticleCollection
>
m_outputHitCollection
{
"DummyReconstructedParticles"
,
Gaudi
::
DataHandle
::
Writer
,
this
};
Rndm
::
Numbers
m_gaussDist
;
Gaudi
::
Property
<
double
>
m_smearing
{
this
,
"smearing"
,
0.01
/* 1 percent*/
};
MC2DummyParticle
(
const
std
::
string
&
name
,
ISvcLocator
*
svcLoc
)
:
GaudiAlgorithm
(
name
,
svcLoc
)
{
...
...
@@ -30,6 +33,12 @@ namespace Jug {
{
if
(
GaudiAlgorithm
::
initialize
().
isFailure
())
return
StatusCode
::
FAILURE
;
IRndmGenSvc
*
randSvc
=
svc
<
IRndmGenSvc
>
(
"RndmGenSvc"
,
true
);
StatusCode
sc
=
m_gaussDist
.
initialize
(
randSvc
,
Rndm
::
Gauss
(
0.0
,
m_smearing
.
value
()));
if
(
!
sc
.
isSuccess
())
{
return
StatusCode
::
FAILURE
;
}
return
StatusCode
::
SUCCESS
;
}
StatusCode
execute
()
override
...
...
@@ -42,9 +51,10 @@ namespace Jug {
if
(
p
.
genStatus
()
!=
1
)
{
continue
;
}
double
momentum
=
std
::
hypot
(
p
.
psx
(),
p
.
psy
(),
p
.
psz
());
double
energy
=
std
::
hypot
(
momentum
,
p
.
mass
());
eic
::
ReconstructedParticle
rec_part
(
p
.
pdgID
(),
energy
,
{
p
.
psx
(),
p
.
psy
(),
p
.
psz
()},
(
double
)
p
.
charge
(),
p
.
mass
());
eic
::
ReconstructedParticle
rec_part
(
p
.
pdgID
(),
energy
*
m_gaussDist
(),
{
p
.
psx
()
*
m_gaussDist
(),
p
.
psy
()
*
m_gaussDist
(),
p
.
psz
()
*
m_gaussDist
()},
(
double
)
p
.
charge
(),
p
.
mass
());
out_parts
->
push_back
(
rec_part
);
}
return
StatusCode
::
SUCCESS
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment