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 73 of file Constraint.h.
hitfit::Constraint::Constraint | ( | std::string | s | ) |
Constructor.
s | The string to parse describing the constraint. |
Definition at line 77 of file Constraint.cc.
References _lhs, _rhs, cms::cuda::assert(), mps_fire::i, hitfit::make_constraint_intermed(), eostools::move(), and alignCSCRings::s.
hitfit::Constraint::Constraint | ( | const Constraint & | c | ) |
Copy constructor.
c | The original object to be copied. |
Definition at line 45 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 101 of file Constraint.cc.
Constraint & hitfit::Constraint::operator= | ( | const Constraint & | c | ) |
Assignment operator.
c | The original object to be copied. |
Definition at line 54 of file Constraint.cc.
References _lhs, _rhs, c, and eostools::move().
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 124 of file Constraint.cc.
References makeMEIFBenchmarkPlots::ev.
|
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 149 of file Constraint.cc.
|
private |
Left hand side of the constraint.
Definition at line 147 of file Constraint.h.
Referenced by Constraint(), and operator=().
|
private |
Right hand side of the constraint.
Definition at line 152 of file Constraint.h.
Referenced by Constraint(), and operator=().