CMS 3D CMS Logo

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

std::unique_ptr< Constraint_Intermedclone () const override
 
 Constraint_Intermed_Constant (const Constraint_Intermed_Constant &c)
 
 Constraint_Intermed_Constant (double constant)
 
bool has_labels (int ilabel, int jlabel) const override
 
void print (std::ostream &s) const override
 
double sum_mass_terms (const Fourvec_Event &ev) const override
 
 ~Constraint_Intermed_Constant () override
 
- 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 158 of file Constraint_Intermed.h.

Constructor & Destructor Documentation

◆ Constraint_Intermed_Constant() [1/2]

hitfit::Constraint_Intermed_Constant::Constraint_Intermed_Constant ( double  constant)

Constructor.

Parameters
constantThe mass constraint of the constraint equation.

Definition at line 59 of file Constraint_Intermed.cc.

66  : _c2(constant * constant / 2) {}

Referenced by clone().

◆ ~Constraint_Intermed_Constant()

hitfit::Constraint_Intermed_Constant::~Constraint_Intermed_Constant ( )
inlineoverride

Destructor.

Definition at line 175 of file Constraint_Intermed.h.

175 {};

◆ Constraint_Intermed_Constant() [2/2]

hitfit::Constraint_Intermed_Constant::Constraint_Intermed_Constant ( const Constraint_Intermed_Constant c)

Copy constructor.

Parameters
cThe instance to be copied.

Definition at line 68 of file Constraint_Intermed.cc.

75  : _c2(c._c2) {}

Member Function Documentation

◆ clone()

unique_ptr< Constraint_Intermed > hitfit::Constraint_Intermed_Constant::clone ( void  ) const
overridevirtual

Clone function to copy the instance.

Implements hitfit::Constraint_Intermed.

Definition at line 120 of file Constraint_Intermed.cc.

127  {
128  return unique_ptr<Constraint_Intermed>(new Constraint_Intermed_Constant(*this));
129  }

References Constraint_Intermed_Constant().

◆ has_labels()

bool hitfit::Constraint_Intermed_Constant::has_labels ( int  ilabel,
int  jlabel 
) const
overridevirtual

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 77 of file Constraint_Intermed.cc.

90  {
91  return false;
92  }

◆ print()

void hitfit::Constraint_Intermed_Constant::print ( std::ostream &  s) const
overridevirtual

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 109 of file Constraint_Intermed.cc.

116  {
117  s << sqrt(2 * _c2);
118  }

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

◆ sum_mass_terms()

double hitfit::Constraint_Intermed_Constant::sum_mass_terms ( const Fourvec_Event ev) const
overridevirtual

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 94 of file Constraint_Intermed.cc.

105  {
106  return _c2;
107  }

Member Data Documentation

◆ _c2

double hitfit::Constraint_Intermed_Constant::_c2
private

The mass constraint value.

Definition at line 231 of file Constraint_Intermed.h.

hitfit::Constraint_Intermed_Constant::_c2
double _c2
Definition: Constraint_Intermed.h:231
alignCSCRings.s
s
Definition: alignCSCRings.py:92
hitfit::Constraint_Intermed_Constant::Constraint_Intermed_Constant
Constraint_Intermed_Constant(double constant)
Definition: Constraint_Intermed.cc:59
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46