|
|
Go to the documentation of this file.
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))
207 sum +=
o.mass *
o.mass / 2;
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] !=
')')
Represent an event for kinematic fitting as a collection of four-momenta.
void swap(Association< C > &lhs, Association< C > &rhs)
Constraint_Intermed_Labels(const std::vector< int > &labels)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool has_label(int label) const
void print(std::ostream &s) const override
Represent an event for kinematic fitting as a collection of four-momenta. Each object is represented ...
Represent a single object in a Fourvec_Event, this is just a dumb data container. Each object in a Fo...
double sum_mass_terms(const Fourvec_Event &ev) const override
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Constraint_Intermed_Constant(double constant)
std::unique_ptr< Constraint_Intermed > make_constraint_intermed(std::string s)
bool has_labels(int ilabel, int jlabel) const override
std::ostream & operator<<(std::ostream &s, const Constraint_Intermed &ci)
Output stream operator, print the content of this Constraint_Intermed to an output stream.
double sum_mass_terms(const Fourvec_Event &ev) const override
std::unique_ptr< Constraint_Intermed > clone() const override
void print(std::ostream &s) const override
Concrete class for one side of mass constraint equation of the type: .
Represent one side of a mass constraint equation. Contains the abstract base class Constraint_Interme...
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
std::unique_ptr< Constraint_Intermed > clone() const override
Concrete class for one side of mass constraint equation of the type: .
Abstract base classes for describing one side of a mass constraint.
virtual void print(std::ostream &s) const =0
bool has_labels(int ilabel, int jlabel) const override
std::vector< int > _labels