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:42
HepMC3::GenEvent::particles
const std::vector< ConstGenParticlePtr > & particles() const
Get list of particles (const)
Definition
GenEvent.cc:40
IsGoodEventDIS
Definition
IsGoodEvent.h:26
IsGoodEventDIS::operator()
bool operator()(const GenEvent &evt)
The main member.
Definition
IsGoodEvent.h:29
IsGoodEvent
Definition
IsGoodEvent.h:14
IsGoodEvent::operator()
bool operator()(const GenEvent &evt)
The main member.
Definition
IsGoodEvent.h:17
HepMC3
HepMC3 main namespace.
Definition
ReaderGZ.h:28
Generated on Sat Feb 17 2024 07:13:40 for HepMC3 event record library by
1.9.8