CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
hitfit::Constraint_Intermed_Constant Class Reference

Concrete class for one side of mass constraint equation of the type:
$(1 + 2) = C$. More...

#include <Constraint_Intermed.h>

Inheritance diagram for hitfit::Constraint_Intermed_Constant:
hitfit::Constraint_Intermed

Public Member Functions

virtual std::auto_ptr
< Constraint_Intermed
clone () const
 
 Constraint_Intermed_Constant (double constant)
 
 Constraint_Intermed_Constant (const Constraint_Intermed_Constant &c)
 
virtual bool has_labels (int ilabel, int jlabel) const
 
virtual void print (std::ostream &s) const
 
virtual double sum_mass_terms (const Fourvec_Event &ev) const
 
virtual ~Constraint_Intermed_Constant ()
 
- Public Member Functions inherited from hitfit::Constraint_Intermed
 Constraint_Intermed ()
 
virtual ~Constraint_Intermed ()
 

Private Attributes

double _c2
 

Detailed Description

Concrete class for one side of mass constraint equation of the type:
$(1 + 2) = C$.

Definition at line 168 of file Constraint_Intermed.h.

Constructor & Destructor Documentation

hitfit::Constraint_Intermed_Constant::Constraint_Intermed_Constant ( double  constant)

Constructor.

Parameters
constantThe mass constraint of the constraint equation.

Definition at line 66 of file Constraint_Intermed.cc.

Referenced by clone().

73  : _c2 (constant * constant / 2)
74 {
75 }
virtual hitfit::Constraint_Intermed_Constant::~Constraint_Intermed_Constant ( )
inlinevirtual

Destructor.

Definition at line 186 of file Constraint_Intermed.h.

186 {};
hitfit::Constraint_Intermed_Constant::Constraint_Intermed_Constant ( const Constraint_Intermed_Constant c)

Copy constructor.

Parameters
cThe instance to be copied.

Definition at line 79 of file Constraint_Intermed.cc.

86  : _c2 (c._c2)
87 {
88 }

Member Function Documentation

auto_ptr< Constraint_Intermed > hitfit::Constraint_Intermed_Constant::clone ( void  ) const
virtual

Clone function to copy the instance.

Implements hitfit::Constraint_Intermed.

Definition at line 138 of file Constraint_Intermed.cc.

References Constraint_Intermed_Constant().

145 {
146  return auto_ptr<Constraint_Intermed>
147  (new Constraint_Intermed_Constant (*this));
148 }
bool hitfit::Constraint_Intermed_Constant::has_labels ( int  ilabel,
int  jlabel 
) const
virtual

Check the instance for reference of ilabel and jlabel.

Parameters
ilabelThe first label to test.
jlabelThe second label to test.
Return:
true if this instance references both labels ilabel and jlabel.
false if this instance doesn't reference both labels.

Implements hitfit::Constraint_Intermed.

Definition at line 91 of file Constraint_Intermed.cc.

104 {
105  return false;
106 }
void hitfit::Constraint_Intermed_Constant::print ( std::ostream &  s) const
virtual

Print out the instance to the output stream.

Parameters
sThe output stream to which the instance is printed.

Implements hitfit::Constraint_Intermed.

Definition at line 126 of file Constraint_Intermed.cc.

References alignCSCRings::s, and mathSSE::sqrt().

133 {
134  s << sqrt (2 * _c2);
135 }
T sqrt(T t)
Definition: SSEVec.h:48
double hitfit::Constraint_Intermed_Constant::sum_mass_terms ( const Fourvec_Event ev) const
virtual

Evaluate this half of the mass constraint, using the data in ev.

Parameters
evThe event for which the mass constraint is to be evaluated.
Return:
$\frac{m^{2}}{2}$.

Implements hitfit::Constraint_Intermed.

Definition at line 110 of file Constraint_Intermed.cc.

References _c2.

121 {
122  return _c2;
123 }

Member Data Documentation

double hitfit::Constraint_Intermed_Constant::_c2
private

The mass constraint value.

Definition at line 242 of file Constraint_Intermed.h.

Referenced by sum_mass_terms().