Rivet
1.8.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
include
Rivet
Projections
LeadingParticlesFinalState.hh
1
// -*- C++ -*-
2
#ifndef RIVET_LeadingParticlesFinalState_HH
3
#define RIVET_LeadingParticlesFinalState_HH
4
5
#include "Rivet/Event.hh"
6
#include "Rivet/Projection.hh"
7
#include "Rivet/Projections/FinalState.hh"
8
9
namespace
Rivet {
10
11
class
Particle;
12
14
class
LeadingParticlesFinalState
:
public
FinalState
{
15
16
public
:
17
19
LeadingParticlesFinalState
(
const
FinalState
& fsp)
20
:
FinalState
(), _leading_only(false)
21
{
22
setName
(
"LeadingParticlesFinalState"
);
23
addProjection
(fsp,
"FS"
);
24
}
25
27
virtual
const
Projection
*
clone
()
const
{
28
return
new
LeadingParticlesFinalState
(*
this
);
29
}
30
32
LeadingParticlesFinalState
&
addParticleId
(
long
id
) {
33
_ids.insert(
id
);
34
return
*
this
;
35
}
36
38
LeadingParticlesFinalState
&
addParticleIdPair
(
long
id
) {
39
_ids.insert(
id
);
40
_ids.insert(-
id
);
41
return
*
this
;
42
}
43
47
void
setLeadingOnly
(
const
bool
& leadingonly) {
48
_leading_only = leadingonly;
49
}
50
51
// /// Check if a particle of a particular ID was found in the current event
52
// bool hasParticleId(const PdgId pid) const;
53
54
// /// Get a particle of a particular ID (check it exists first)
55
// bool get(const PdgId pid) const;
56
57
58
protected
:
59
61
void
project
(
const
Event
& e);
62
64
int
compare
(
const
Projection
& p)
const
;
65
67
bool
inList
(
const
Particle
& particle)
const
;
68
69
private
:
70
72
std::set<long>_ids;
73
bool
_leading_only;
74
75
};
76
77
}
78
79
#endif
Generated on Fri Jun 8 2012 06:50:47 for Rivet by
1.8.1