Rivet
1.8.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
include
Rivet
Projection.hh
1
// -*- C++ -*-
2
#ifndef RIVET_Projection_HH
3
#define RIVET_Projection_HH
4
5
#include "Rivet/Rivet.hh"
6
#include "Rivet/Projection.fhh"
7
#include "Rivet/ProjectionApplier.hh"
8
#include "Rivet/ProjectionHandler.hh"
9
#include "Rivet/Constraints.hh"
10
#include "Rivet/ParticleName.hh"
11
#include "Rivet/Event.fhh"
12
#include "Rivet/Tools/Logging.hh"
13
#include "Rivet/Cmp.fhh"
14
15
16
namespace
Rivet {
17
28
class
Projection
:
public
ProjectionApplier
{
29
30
public
:
31
33
friend
class
Event
;
34
36
friend
class
Cmp
<
Projection
>;
37
38
public
:
39
41
42
43
Projection
();
44
46
virtual
const
Projection
*
clone
()
const
= 0;
47
49
virtual
~Projection
();
51
52
53
public
:
54
59
virtual
void
project
(
const
Event
& e) = 0;
60
61
62
protected
:
63
83
virtual
int
compare
(
const
Projection
& p)
const
= 0;
84
85
public
:
86
92
bool
before
(
const
Projection
& p)
const
;
93
98
virtual
const
std::set<PdgIdPair>
beamPairs
()
const
;
99
101
virtual
std::string
name
()
const
{
102
return
_name;
103
}
104
105
107
Projection
&
addPdgIdPair
(
PdgId
beam1,
PdgId
beam2) {
108
_beamPairs.insert(
PdgIdPair
(beam1, beam2));
109
return
*
this
;
110
}
111
112
114
Log
&
getLog
()
const
{
115
string
logname =
"Rivet.Projection."
+
name
();
116
return
Log::getLog
(logname);
117
}
118
120
void
setName
(
const
std::string&
name
) {
121
_name =
name
;
122
}
123
124
protected
:
125
128
Cmp<Projection>
mkNamedPCmp
(
const
Projection
& otherparent,
const
std::string& pname)
const
;
129
130
133
Cmp<Projection>
mkPCmp
(
const
Projection
& otherparent,
const
std::string& pname)
const
;
134
135
136
private
:
137
140
string
_name;
141
143
set<PdgIdPair> _beamPairs;
144
145
};
146
147
148
}
149
150
152
inline
bool
std::less<const Rivet::Projection *>::operator()
(
const
Rivet::Projection
* x,
153
const
Rivet::Projection
* y)
const
{
154
return
x->
before
(*y);
155
}
156
157
158
// Definition of the comparison objects and functions
159
#include "Rivet/Cmp.hh"
160
161
162
#endif
Generated on Wed May 8 2013 13:27:21 for Rivet by
1.8.1.2