49 using std::stable_sort;
73 : _c2 (constant * constant / 2)
146 return auto_ptr<Constraint_Intermed>
165 stable_sort (_labels.begin(), _labels.end());
195 swap (ilabel, jlabel);
197 unsigned sz = _labels.size();
199 for (i=0; i < sz; i++) {
200 if (_labels[i] == ilabel)
207 for (; i < sz; i++) {
208 if (_labels[i] == jlabel)
232 int nobjs = ev.nobjs();
234 for (
int i = 0;
i < nobjs;
i++) {
236 if (has_label (o.
label))
253 for (
unsigned i = 0;
i < _labels.size();
i++) {
273 return find (_labels.begin(), _labels.end(),
label) != _labels.end();
285 return auto_ptr<Constraint_Intermed>
348 while (i < s.size() && s[
i] ==
' ')
352 while (i < s.size() && s[
i] ==
' ')
354 if (i < s.size() && s[
i] ==
'<') {
356 if (i == string::npos)
357 return auto_ptr<Constraint_Intermed> ();
360 while (i < s.size() && s[
i] ==
' ')
365 return auto_ptr<Constraint_Intermed> ();
372 while (i < s.size()) {
373 while (i < s.size() && s[
i] ==
' ')
375 if (i < s.size() && s[
i] ==
')')
378 labels.push_back (atoi (s.c_str() +
i));
379 while (i < s.size() && s[
i] !=
' ' && s[
i] !=
')')
382 return auto_ptr<Constraint_Intermed>
387 return auto_ptr<Constraint_Intermed>
bool has_label(int label) const
void swap(ora::Record &rh, ora::Record &lh)
Concrete class for one side of mass constraint equation of the type: .
std::auto_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
virtual double sum_mass_terms(const Fourvec_Event &ev) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual void print(std::ostream &s) const
Constraint_Intermed_Constant(double constant)
Constraint_Intermed_Labels(const std::vector< int > &labels)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
virtual bool has_labels(int ilabel, int jlabel) const
virtual void print(std::ostream &s) const
std::vector< int > _labels
virtual std::auto_ptr< Constraint_Intermed > clone() const
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.
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...
virtual double sum_mass_terms(const Fourvec_Event &ev) const
virtual std::auto_ptr< Constraint_Intermed > clone() const
virtual bool has_labels(int ilabel, int jlabel) const
Represent an event for kinematic fitting as a collection of four-momenta.