48 using std::stable_sort;
72 : _c2 (constant * constant / 2)
145 return auto_ptr<Constraint_Intermed>
164 stable_sort (_labels.begin(), _labels.end());
194 swap (ilabel, jlabel);
196 unsigned sz = _labels.size();
198 for (i=0; i < sz; i++) {
199 if (_labels[i] == ilabel)
206 for (; i < sz; i++) {
207 if (_labels[i] == jlabel)
231 int nobjs = ev.nobjs();
233 for (
int i = 0;
i < nobjs;
i++) {
235 if (has_label (o.
label))
252 for (
unsigned i = 0;
i < _labels.size();
i++) {
272 return find (_labels.begin(), _labels.end(),
label) != _labels.end();
284 return auto_ptr<Constraint_Intermed>
347 while (i < s.size() && s[
i] ==
' ')
351 while (i < s.size() && s[
i] ==
' ')
353 if (i < s.size() && s[
i] ==
'<') {
355 if (i == string::npos)
356 return auto_ptr<Constraint_Intermed> ();
359 while (i < s.size() && s[
i] ==
' ')
364 return auto_ptr<Constraint_Intermed> ();
371 while (i < s.size()) {
372 while (i < s.size() && s[
i] ==
' ')
374 if (i < s.size() && s[
i] ==
')')
377 labels.push_back (atoi (s.c_str() +
i));
378 while (i < s.size() && s[
i] !=
' ' && s[
i] !=
')')
381 return auto_ptr<Constraint_Intermed>
386 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.