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::unique_ptr< Constraint_Intermed > | _lhs |
std::unique_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, mps_fire::i, hitfit::make_constraint_intermed(), and eostools::move().
hitfit::Constraint::Constraint | ( | const Constraint & | c | ) |
Copy constructor.
c | The original object to be copied. |
Definition at line 48 of file Constraint.cc.
|
inline |
Destructor.
Definition at line 106 of file Constraint.h.
References ev, has_labels(), operator<<, operator=(), and sum_mass_terms().
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.
Referenced by ~Constraint().
Constraint & hitfit::Constraint::operator= | ( | const Constraint & | c | ) |
Assignment operator.
c | The original object to be copied. |
Definition at line 61 of file Constraint.cc.
References _lhs, _rhs, and eostools::move().
Referenced by ~Constraint().
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.
References _lhs, _rhs, and ev.
Referenced by ~Constraint().
|
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.
Referenced by ~Constraint().
|
private |
Left hand side of the constraint.
Definition at line 155 of file Constraint.h.
Referenced by Constraint(), has_labels(), hitfit::operator<<(), operator=(), and sum_mass_terms().
|
private |
Right hand side of the constraint.
Definition at line 160 of file Constraint.h.
Referenced by Constraint(), has_labels(), hitfit::operator<<(), operator=(), and sum_mass_terms().