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

Private Attributes

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

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!=()

bool xAOD::MissingETComponent_v1::Weight::operator!= ( const Weight & wght) const

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; }
double wpx() const
Returns .
double wpy() const
Returns .
double wet() const
Returns .

◆ 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}
static double divide(double x, double y)
Failsafe division.

◆ 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}
Weight & operator*=(const Weight &wght)
Multiply two weights.

◆ 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}
static bool isEqual(double x, double y)
Test of equality.

◆ 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: