ATLAS Offline Software
Public Member Functions | List of all members
xAOD::MissingETComponent_v1::Weight Class Reference

Kinematic weight descriptor. More...

#include <MissingETComponent_v1.h>

Collaboration diagram for xAOD::MissingETComponent_v1::Weight:

Public Member Functions

 Weight ()
 Default constructor. More...
 
 Weight (double wpx, double wpy, double wet)
 Constructor with parameters. More...
 
 ~Weight ()
 Data class destructor. More...
 
Accessors
double wpx () const
 Returns \( w_{x} \). More...
 
double wpy () const
 Returns \( w_{y} \). More...
 
double wet () const
 Returns \( w_{\rm T} \). More...
 
Setters
void setWpx (double wpx)
 Set \( w_{x} \). More...
 
void setWpy (double wpy)
 Set \( w_{y} \). More...
 
void setWet (double wet)
 Set \( w_{\rm T} \). More...
 
Modifiers for kinematic weights
doublewpx ()
 Returns reference to modifiable dataword storing \( w_{x} \). More...
 
doublewpy ()
 Returns reference to modifiable data word storing \( w_{y} \). More...
 
doublewet ()
 Returns reference to modifiable data word storing \( w_{\rm T} \). More...
 
Weightoperator+= (const Weight &wght)
 Add another weight. More...
 
Weightoperator-= (const Weight &wght)
 Subtract another weight. More...
 
Weightoperator*= (const Weight &wght)
 Multiply two weights. More...
 
Weightoperator*= (double scale)
 Scale weight by multiplication. More...
 
Weightoperator/= (const Weight &wght)
 Divide two weights. More...
 
Weightoperator/= (double scale)
 Scale weight by division. More...
 
Comparators
bool operator== (const Weight &wght) const
 Equality comparator. More...
 
bool operator!= (const Weight &wght) const
 Inequality operator. More...
 

Private Attributes

Cache for weights
double m_wpx
 \( w_{x} \) More...
 
double m_wpy
 \( w_{y} \) More...
 
double m_wet
 \( w_{\rm T} \) More...
 

Detailed Description

Kinematic weight descriptor.

Definition at line 27 of file MissingETComponent_v1.h.

Constructor & Destructor Documentation

◆ Weight() [1/2]

xAOD::MissingETComponent_v1::Weight::Weight ( )

Default constructor.

◆ Weight() [2/2]

xAOD::MissingETComponent_v1::Weight::Weight ( double  wpx,
double  wpy,
double  wet 
)

Constructor with parameters.

◆ ~Weight()

xAOD::MissingETComponent_v1::Weight::~Weight ( )

Data class destructor.

Member Function Documentation

◆ operator!=()

Inequality operator.

◆ operator*=() [1/2]

MissingETComponent_v1::Weight & MissingETComponent_v1::Weight::operator*= ( const Weight wght)

Multiply two weights.

Definition at line 24 of file MissingETComponent_v1.cxx.

25 { this->wpx() *= wght.wpx(); this->wpy() *= wght.wpy(); this->wet() *= wght.wet(); return *this; }

◆ operator*=() [2/2]

MissingETComponent_v1::Weight & MissingETComponent_v1::Weight::operator*= ( double  scale)

Scale weight by multiplication.

Definition at line 27 of file MissingETComponent_v1.cxx.

28 { this->wpx() *= scale; this->wpy() *= scale; this->wet() *= scale; return *this; }

◆ operator+=()

MissingETComponent_v1::Weight & MissingETComponent_v1::Weight::operator+= ( const Weight wght)

Add another weight.

Definition at line 18 of file MissingETComponent_v1.cxx.

19 { this->wpx() += wght.wpx(); this->wpy() += wght.wpy(); this->wet() += wght.wet(); return *this; }

◆ operator-=()

MissingETComponent_v1::Weight & MissingETComponent_v1::Weight::operator-= ( const Weight wght)

Subtract another weight.

Definition at line 21 of file MissingETComponent_v1.cxx.

22 { this->wpx() -= wght.wpx(); this->wpy() -= wght.wpy(); this->wet() -= wght.wet(); return *this; }

◆ operator/=() [1/2]

MissingETComponent_v1::Weight & MissingETComponent_v1::Weight::operator/= ( const Weight wght)

Divide two weights.

Definition at line 30 of file MissingETComponent_v1.cxx.

31 {
32  this->wpx() = MissingETBase::Numerical::divide(this->wpx(),wght.wpx());
33  this->wpy() = MissingETBase::Numerical::divide(this->wpy(),wght.wpy());
34  this->wet() = MissingETBase::Numerical::divide(this->wet(),wght.wet());
35  return *this;
36 }

◆ operator/=() [2/2]

MissingETComponent_v1::Weight & MissingETComponent_v1::Weight::operator/= ( double  scale)

Scale weight by division.

Definition at line 38 of file MissingETComponent_v1.cxx.

39 {
40  if ( scale == 0. ) { this->wpx() = 0.; this->wpy() = 0.; this->wet() = 0.; return *this; }
41  else { return this->operator*=(1./scale); }
42 }

◆ operator==()

bool MissingETComponent_v1::Weight::operator== ( const Weight wght) const

Equality comparator.

Definition at line 44 of file MissingETComponent_v1.cxx.

45 {
46  return
47  MissingETBase::Numerical::isEqual(this->wpx(),wght.wpx()) &&
48  MissingETBase::Numerical::isEqual(this->wpy(),wght.wpy()) &&
49  MissingETBase::Numerical::isEqual(this->wet(),wght.wet());
50 }

◆ setWet()

void xAOD::MissingETComponent_v1::Weight::setWet ( double  wet)

Set \( w_{\rm T} \).

◆ setWpx()

void xAOD::MissingETComponent_v1::Weight::setWpx ( double  wpx)

Set \( w_{x} \).

◆ setWpy()

void xAOD::MissingETComponent_v1::Weight::setWpy ( double  wpy)

Set \( w_{y} \).

◆ wet() [1/2]

double& xAOD::MissingETComponent_v1::Weight::wet ( )

Returns reference to modifiable data word storing \( w_{\rm T} \).

◆ wet() [2/2]

double xAOD::MissingETComponent_v1::Weight::wet ( ) const

Returns \( w_{\rm T} \).

◆ wpx() [1/2]

double& xAOD::MissingETComponent_v1::Weight::wpx ( )

Returns reference to modifiable dataword storing \( w_{x} \).

◆ wpx() [2/2]

double xAOD::MissingETComponent_v1::Weight::wpx ( ) const

Returns \( w_{x} \).

◆ wpy() [1/2]

double& xAOD::MissingETComponent_v1::Weight::wpy ( )

Returns reference to modifiable data word storing \( w_{y} \).

◆ wpy() [2/2]

double xAOD::MissingETComponent_v1::Weight::wpy ( ) const

Returns \( w_{y} \).

Member Data Documentation

◆ m_wet

double xAOD::MissingETComponent_v1::Weight::m_wet
private

\( w_{\rm T} \)

Definition at line 68 of file MissingETComponent_v1.h.

◆ m_wpx

double xAOD::MissingETComponent_v1::Weight::m_wpx
private

\( w_{x} \)

Definition at line 66 of file MissingETComponent_v1.h.

◆ m_wpy

double xAOD::MissingETComponent_v1::Weight::m_wpy
private

\( w_{y} \)

Definition at line 67 of file MissingETComponent_v1.h.


The documentation for this class was generated from the following files:
MissingETBase::Numerical::divide
static double divide(double x, double y)
Failsafe division.
Definition: MissingETBase.h:125
xAOD::MissingETComponent_v1::Weight::wet
double wet() const
Returns .
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
xAOD::MissingETComponent_v1::Weight::wpy
double wpy() const
Returns .
MissingETBase::Numerical::isEqual
static bool isEqual(double x, double y)
Test of equality.
Definition: MissingETBase.h:119
xAOD::MissingETComponent_v1::Weight::wpx
double wpx() const
Returns .
xAOD::MissingETComponent_v1::Weight::operator*=
Weight & operator*=(const Weight &wght)
Multiply two weights.
Definition: MissingETComponent_v1.cxx:24