Represent a mass constraint equation. Mass constraints come in two varieties, either saying that the sum of a set of labels should equal a constant:
More...
#include <Constraint.h>
Public Member Functions | |
Constraint (std::string s) | |
Constraint (const Constraint &c) | |
int | has_labels (int ilabel, int jlabel) const |
Constraint & | operator= (const Constraint &c) |
double | sum_mass_terms (const Fourvec_Event &ev) const |
~Constraint () | |
Private Attributes | |
std::auto_ptr < Constraint_Intermed > | _lhs |
std::auto_ptr < Constraint_Intermed > | _rhs |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Constraint &c) |
Output stream operator, print the content of this Constraint to an output stream. More... | |
Represent a mass constraint equation. Mass constraints come in two varieties, either saying that the sum of a set of labels should equal a constant:
.
or that two such sums should be equal to each other:
.
We represent such a constraint equation by two Constraint_Intermed instances, each of which represents one side of the equation.
Definition at line 79 of file Constraint.h.
hitfit::Constraint::Constraint | ( | std::string | s | ) |
Constructor.
s | The string to parse describing the constraint. |
Definition at line 85 of file Constraint.cc.
References _lhs, _rhs, i, and hitfit::make_constraint_intermed().
hitfit::Constraint::Constraint | ( | const Constraint & | c | ) |
Copy constructor.
c | The original object to be copied. |
Definition at line 48 of file Constraint.cc.
|
inline |
int hitfit::Constraint::has_labels | ( | int | ilabel, |
int | jlabel | ||
) | const |
See if this guy references both labels ilabel and jlabel on a single single side of the constraint equation.
ilabel | The first label to test. |
jlabel | The second label to test. |
Definition at line 112 of file Constraint.cc.
Constraint & hitfit::Constraint::operator= | ( | const Constraint & | c | ) |
Assignment operator.
c | The original object to be copied. |
Definition at line 61 of file Constraint.cc.
double hitfit::Constraint::sum_mass_terms | ( | const Fourvec_Event & | ev | ) | const |
Evaluate the mass constraint, using the data in ev.
ev | The event for which the constraint should be evaluated. |
Definition at line 136 of file Constraint.cc.
|
friend |
Output stream operator, print the content of this Constraint to an output stream.
s | The stream to which to write. |
c | The instance of Constraint to be printed. |
Definition at line 162 of file Constraint.cc.
|
private |
Left hand side of the constraint.
Definition at line 155 of file Constraint.h.
Referenced by Constraint(), hitfit::operator<<(), and operator=().
|
private |
Right hand side of the constraint.
Definition at line 160 of file Constraint.h.
Referenced by Constraint(), hitfit::operator<<(), and operator=().