Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F11222183
Event.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
Event.cc
View Options
// -*- C++ -*-
#include
"Rivet/Event.hh"
#include
"Rivet/Tools/BeamConstraint.hh"
#include
"Rivet/Projections/Beam.hh"
#include
"HepMC/GenEvent.h"
namespace
Rivet
{
double
Event
::
weight
()
const
{
return
genEvent
()
->
weights
().
empty
()
?
_genevent
.
weights
()[
0
]
:
1.0
;
}
double
Event
::
centrality
()
const
{
/// @todo Use direct "centrality" property if using HepMC3
return
genEvent
()
->
heavy_ion
()
?
genEvent
()
->
heavy_ion
()
->
impact_parameter
()
:
-
1
;
}
ParticlePair
Event
::
beams
()
const
{
return
Rivet
::
beams
(
*
this
);
}
double
Event
::
sqrtS
()
const
{
return
Rivet
::
sqrtS
(
beams
());
}
double
Event
::
asqrtS
()
const
{
return
Rivet
::
asqrtS
(
beams
());
}
void
Event
::
_init
(
const
GenEvent
&
ge
)
{
// Use Rivet's preferred units if possible
#ifdef HEPMC_HAS_UNITS
_genevent
.
use_units
(
HepMC
::
Units
::
GEV
,
HepMC
::
Units
::
MM
);
#endif
}
const
Particles
&
Event
::
allParticles
()
const
{
if
(
_particles
.
empty
())
{
//< assume that empty means no attempt yet made
for
(
const
GenParticle
*
gp
:
particles
(
genEvent
()))
{
_particles
+=
Particle
(
gp
);
}
}
return
_particles
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Wed, May 14, 11:32 AM (11 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111449
Default Alt Text
Event.cc (1 KB)
Attached To
rRIVETHG rivethg
Event Timeline
Log In to Comment