Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
atlas
athena
Merge requests
!36118
Herwig HepMC3 interface
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Herwig HepMC3 interface
averbyts/athena:hepmc3_herwig7
into
master
Overview
13
Commits
3
Pipelines
1
Changes
1
Merged
Andrii Verbytskyi
requested to merge
averbyts/athena:hepmc3_herwig7
into
master
4 years ago
Overview
13
Commits
3
Pipelines
1
Changes
1
Expand
Implement Herwig HepMC3 interface
Edited
4 years ago
by
Andrii Verbytskyi
0
0
Merge request reports
Viewing commit
564a56bd
Prev
Next
Show latest version
1 file
+
12
−
13
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
564a56bd
Herwig
· 564a56bd
Andrii Verbytskyi
authored
4 years ago
Generators/Herwig7_i/src/Herwig7HepMC.cxx
+
12
−
13
Options
@@ -50,32 +50,33 @@ namespace ThePEG {
unit before given to the GenEvent. */
static
void
setScaleAndAlphas
(
HepMC3
::
GenEvent
&
e
,
Energy2
scale
,
double
aS
,
double
aEM
,
Energy
unit
)
{
//
e.
set_event_scale
(sqrt(scale)/unit);
//
e.
set_alphaQCD
(aS);
//
e.
set_alphaQED
(aEM);
e
.
add_attribute
(
"event_scale"
,
std
::
make_shared
<
HepMC3
::
DoubleAttribute
>
(
sqrt
(
scale
)
/
unit
)
)
;
e
.
add_attribute
(
"alphaQCD"
,
std
::
make_shared
<
HepMC3
::
DoubleAttribute
>
(
aS
)
)
;
e
.
add_attribute
(
"alphaQED"
,
std
::
make_shared
<
HepMC3
::
DoubleAttribute
>
(
aEM
)
)
;
}
/** Set the primary vertex, \a v, for the event \a e. */
static
void
setSignalProcessVertex
(
HepMC3
::
GenEvent
&
e
,
HepMC3
::
GenVertexPtr
v
)
{
// e.set_
signal_process_vertex
(v
);
e
.
add_attribute
(
"
signal_process_vertex
"
,
std
::
make_shared
<
HepMC3
::
IntAttribute
>
(
v
->
id
())
);
}
/** Set the polarization directions, \a the and \a phi, for particle
\a p. */
static
void
setPolarization
(
HepMC3
::
GenParticle
&
genp
,
double
the
,
double
phi
)
{
//genp.set_polarization(PolarizationT(the, phi));
genp
.
add_attribute
(
"theta"
,
std
::
make_shared
<
HepMC3
::
DoubleAttribute
>
(
the
));
genp
.
add_attribute
(
"phi"
,
std
::
make_shared
<
HepMC3
::
DoubleAttribute
>
(
phi
));
}
/** Set the colour line (with index \a indx) to \a coline for
particle \a p. */
static
void
setColourLine
(
HepMC3
::
GenParticle
&
p
,
int
indx
,
int
coline
)
{
//p.set_flow(indx,
coline);
p
.
add_attribute
(
"flow"
+
std
::
to_string
(
indx
),
std
::
make_shared
<
HepMC3
::
IntAttribute
>
(
coline
)
)
;
}
/** Set the beam particles for the event.*/
static
void
setBeamParticles
(
HepMC3
::
GenEvent
&
e
,
HepMC3
::
GenParticlePtr
p1
,
HepMC3
::
GenParticlePtr
p2
)
{
// e.set_beam_particles(p1,p2);
p1
->
set_status
(
4
);
p2
->
set_status
(
4
);
e
.
set_beam_particles
(
p1
,
p2
);
}
static
HepMC3
::
GenParticlePtr
newParticle
(
const
Lorentz5Momentum
&
p
,
@@ -83,23 +84,21 @@ namespace ThePEG {
// Note that according to the documentation the momentum is stored in a
// HepLorentzVector in GeV (event though the CLHEP standard is MeV).
LorentzVector
<
double
>
p_scalar
=
p
/
unit
;
HepMC3
::
GenParticlePtr
genp
;
// =
//new ParticleT(p_scalar, id, status);
//genp->setGeneratedMass(p.mass()/unit);
HepMC3
::
GenParticlePtr
genp
=
std
::
make_shared
<
HepMC3
::
GenParticle
>
(
HepMC
::
FourVector
(
p_scalar
.
x
(),
p_scalar
.
y
(),
p_scalar
.
z
(),
p_scalar
.
e
()),
id
,
status
);
genp
->
set_generated_mass
(
p
.
mass
()
/
unit
);
return
genp
;
}
/** Set the position \a p for the vertex, \a v. The length will be
scaled with \a unit which normally should be millimeters. */
static
void
setPosition
(
HepMC3
::
GenVertex
&
v
,
const
LorentzPoint
&
p
,
Length
unit
)
{
LorentzVector
<
double
>
p_scaled
=
p
/
unit
;
//
v.set_position(
p_scaled
);
v
.
set_position
(
HepMC
::
FourVector
(
p_scaled
.
x
(),
p_scaled
.
y
(),
p_scaled
.
z
(),
p_scaled
.
t
())
);
}
/** Create a new vertex. */
static
HepMC3
::
GenVertexPtr
newVertex
()
{
return
HepMC3
::
GenVertex
Ptr
();
return
std
::
make_shared
<
HepMC3
::
GenVertex
>
();
}
};
}
#else
Loading