45 using std::stable_sort;
66 : _c2(constant * constant / 2) {}
152 : _labels(c._labels) {}
167 swap(ilabel, jlabel);
169 unsigned sz = _labels.size();
171 for (i = 0; i < sz; i++) {
172 if (_labels[i] == ilabel)
179 for (; i < sz; i++) {
180 if (_labels[i] == jlabel)
202 int nobjs =
ev.nobjs();
204 for (
int i = 0;
i < nobjs;
i++) {
206 if (has_label(o.
label))
222 for (
unsigned i = 0;
i < _labels.size();
i++) {
241 return find(_labels.begin(), _labels.end(),
label) != _labels.end();
311 while (i < s.size() && s[
i] ==
' ')
315 while (i < s.size() && s[
i] ==
' ')
317 if (i < s.size() && s[
i] ==
'<') {
319 if (i == string::npos)
320 return unique_ptr<Constraint_Intermed>();
323 while (i < s.size() && s[
i] ==
' ')
328 return unique_ptr<Constraint_Intermed>();
335 while (i < s.size()) {
336 while (i < s.size() && s[
i] ==
' ')
338 if (i < s.size() && s[
i] ==
')')
341 labels.push_back(atoi(s.c_str() +
i));
342 while (i < s.size() && s[
i] !=
' ' && s[
i] !=
')')
bool has_label(int label) const
const edm::EventSetup & c
Concrete class for one side of mass constraint equation of the type: .
std::unique_ptr< Constraint_Intermed > make_constraint_intermed(std::string s)
Represent an event for kinematic fitting as a collection of four-momenta. Each object is represented ...
Concrete class for one side of mass constraint equation of the type: .
virtual void print(std::ostream &s) const =0
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
std::unique_ptr< Constraint_Intermed > clone() const override
void swap(Association< C > &lhs, Association< C > &rhs)
double sum_mass_terms(const Fourvec_Event &ev) const override
Constraint_Intermed_Constant(double constant)
Constraint_Intermed_Labels(const std::vector< int > &labels)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool has_labels(int ilabel, int jlabel) const override
void print(std::ostream &s) const override
void print(std::ostream &s) const override
std::vector< int > _labels
std::ostream & operator<<(std::ostream &s, const Constraint_Intermed &ci)
Output stream operator, print the content of this Constraint_Intermed to an output stream...
Abstract base classes for describing one side of a mass constraint.
std::unique_ptr< Constraint_Intermed > clone() const override
bool has_labels(int ilabel, int jlabel) const override
double sum_mass_terms(const Fourvec_Event &ev) const override
Represent a single object in a Fourvec_Event, this is just a dumb data container. Each object in a Fo...
Represent one side of a mass constraint equation. Contains the abstract base class Constraint_Interme...
Represent an event for kinematic fitting as a collection of four-momenta.