HepMC3 event record library
test
IsGoodEvent.h
1
//////////////////////////////////////////////////////////////////////////
2
// IsGoodEvent.h
3
//
4
// garren@fnal.gov, May 2007
5
// andrii.verbytskyi@mpp.mpg.de, Nov 2018
6
//
7
//////////////////////////////////////////////////////////////////////////
8
9
//! used in the tests
10
using namespace
HepMC3
;
11
/// \class IsGoodEvent
12
/// event selection predicate. returns true if the event contains
13
/// a photon with pT > 50 GeV
14
class
IsGoodEvent
{
15
public
:
16
/// The main member
17
bool
operator()
(
const
GenEvent
& evt ) {
18
for
(ConstGenParticlePtr p: evt.
particles
())
19
if
( p->pdg_id() == 22 && p->momentum().perp() > 25. )
return
1;
20
return
0;
21
}
22
};
23
/// \class IsGoodEventDIS
24
/// event selection predicate. returns true if the event contains
25
/// an electron with E > 10 GeV
26
class
IsGoodEventDIS
{
27
public
:
28
/// The main member
29
bool
operator()
(
const
GenEvent
& evt ) {
30
for
(ConstGenParticlePtr p: evt.
particles
())
31
if
( p->status() == 1 &&
std::abs
(p->pdg_id()) == 11 && p->momentum().e() > 10.)
return
1;
32
return
0;
33
}
34
};
HepMC3::GenEvent
Stores event-related information.
Definition:
GenEvent.h:41
HepMC3
HepMC3 main namespace.
Definition:
AnalysisExample.h:18
IsGoodEventDIS
Definition:
IsGoodEvent.h:26
HepMC3::abs
Feature< Feature_type > abs(const Feature< Feature_type > &input)
Obtain the absolute value of a Feature. This works as you'd expect. If foo is a valid Feature,...
Definition:
Feature.h:316
IsGoodEvent
Definition:
IsGoodEvent.h:14
IsGoodEvent::operator()
bool operator()(const GenEvent &evt)
The main member.
Definition:
IsGoodEvent.h:17
IsGoodEventDIS::operator()
bool operator()(const GenEvent &evt)
The main member.
Definition:
IsGoodEvent.h:29
HepMC3::GenEvent::particles
const std::vector< ConstGenParticlePtr > & particles() const
Get list of particles (const)
Definition:
GenEvent.cc:39
Generated on Sun Mar 22 2020 00:00:00 for HepMC3 event record library by
1.8.17