ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::MissingET_v1 Class Reference

Principal data object for Missing ET. More...

#include <MissingET_v1.h>

Inheritance diagram for xAOD::MissingET_v1:
Collaboration diagram for xAOD::MissingET_v1:

Public Member Functions

Constructors and destructor
 MissingET_v1 (bool createStore=false)
 Default constructor.
 MissingET_v1 (const std::string &name, MissingETBase::Types::bitmask_t src=MissingETBase::Source::unknown())
 Constructor with identifiers.
 MissingET_v1 (const IParticle *particle, const std::string &name=s_defaultName, MissingETBase::Types::bitmask_t src=MissingETBase::Source::unknown())
 Constructor with particle.
 MissingET_v1 (float mpx, float mpy, float sumet, const std::string &name=s_defaultName, MissingETBase::Types::bitmask_t src=MissingETBase::Source::unknown())
 Constructor with initial kinematics.
 MissingET_v1 (const MissingET_v1 &met)
 Copy constructor.
 ~MissingET_v1 ()
 Implementation class destructor.
Kinematic accessors
float mpx () const
 Returns \( p_{x}^{\rm miss} \).
float mpy () const
 Returns \( p_{y}^{\rm miss} \).
float met () const
 Returns \( E_{\rm T}^{\rm miss} = \sqrt{(p_{x}^{\rm miss})^{2} + (p_{y}^{\rm miss})^{2}} \).
float phi () const
 Returns \( \phi(E_{\rm T}^{\rm miss}) \).
float sumet () const
 Returns.
Kinematic setters
void setMpx (float value)
 Set the \( p_{x}^{\rm miss} \) component.
void setMpy (float value)
 Set the \( p_{y}^{\rm miss} \) component.
void setSumet (float value)
 Set \( \Sigma E_{\rm T} \).
const std::string & name () const
 Identifier getters.
MissingETBase::Types::bitmask_t source () const
 MET object source tag.
std::size_t nameHash () const
 Return hash associated to the MET object name.
Identifier setters
void setName (const std::string &name)
 Set the name of the MET object.
void setSource (MissingETBase::Types::bitmask_t src)
 Set the source of the MET object.
void updateHash ()
 Update the hash to match the current name.
Manipulating the kinematic data
void add (const IParticle *particle)
 Add particle kinematics to MET.
void add (const IParticle *particle, float scale)
 Add scaled particle kinematics to MET.
void add (float px, float py, float pt)
 Add kinematic variables to MET.
MissingET_v1operator= (const MissingET_v1 &met)
 Add particle kinematics to MET.
MissingET_v1operator+= (const IParticle *particle)
 Add particle kinematics to MET.
MissingET_v1operator-= (const IParticle *part)
 Remove particle kinematics to MET.
MET object algebra
MissingET_v1operator+= (const MissingET_v1 &met)
 Add another MET object.
MissingET_v1operator-= (const MissingET_v1 &met)
 Subtract another MET object.
MissingET_v1operator*= (float scale)
 Applying a scale factor.
MissingET_v1operator/= (float scale)
 Dividing by a scale factor.
Stored data management
void clear ()
 Clear/reset the data store.
Comparators
bool operator== (const MissingET_v1 &met) const
 Equality test.
bool operator!= (const MissingET_v1 &met) const
 Inequality test.

Protected Member Functions

void createPrivateStore ()
 Function initialising the object to work in standalone mode.
Internal data modification support
floatf_mpx ()
 Returns reference to \( p_{x} \) store.
floatf_mpy ()
 Returns reference to \( p_{y} \) store.
floatf_sumet ()
 Returns reference to \( \Sigma E_{\rm T} \) store.
std::string & f_name ()
 Returns reference to MET object name store.
const std::string & f_nameConst () const
 Returns const reference to the MET object name store.
MissingETBase::Types::bitmask_tf_source ()
 Returns reference to MET object source store.

Private Attributes

CxxUtils::CachedValue< std::size_t > m_nameHash
 Stores the hash for the current f_name string.

Static Private Attributes

static const std::string s_defaultName {"MissingET"}
static const SG::AuxElement::Accessor< floatm_acc_mpx
static const SG::AuxElement::Accessor< floatm_acc_mpy
static const SG::AuxElement::Accessor< floatm_acc_sumet

Detailed Description

Principal data object for Missing ET.

Definition at line 24 of file MissingET_v1.h.

Constructor & Destructor Documentation

◆ MissingET_v1() [1/5]

MissingET_v1::MissingET_v1 ( bool createStore = false)
explicit

Default constructor.

Definition at line 20 of file MissingET_v1.cxx.

21 : SG::AuxElement() {
22
23 if( createStore ) {
25 setName(this->name());
26 }
27}
void createPrivateStore()
Function initialising the object to work in standalone mode.
const std::string & name() const
Identifier getters.
void setName(const std::string &name)
Set the name of the MET object.
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.

◆ MissingET_v1() [2/5]

MissingET_v1::MissingET_v1 ( const std::string & name,
MissingETBase::Types::bitmask_t src = MissingETBase::Source::unknown() )

Constructor with identifiers.

Definition at line 29 of file MissingET_v1.cxx.

31 : SG::AuxElement() {
32
34 setName( name );
35 setSource( src );
36
37}
void setSource(MissingETBase::Types::bitmask_t src)
Set the source of the MET object.

◆ MissingET_v1() [3/5]

MissingET_v1::MissingET_v1 ( const IParticle * particle,
const std::string & name = s_defaultName,
MissingETBase::Types::bitmask_t src = MissingETBase::Source::unknown() )

Constructor with particle.

Definition at line 52 of file MissingET_v1.cxx.

54 : SG::AuxElement() {
55
57 setName( name );
58 setSource( src );
59 add( particle->p4().Px(), particle->p4().Py(), particle->pt() );
60}
void add(const IParticle *particle)
Add particle kinematics to MET.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ MissingET_v1() [4/5]

MissingET_v1::MissingET_v1 ( float mpx,
float mpy,
float sumet,
const std::string & name = s_defaultName,
MissingETBase::Types::bitmask_t src = MissingETBase::Source::unknown() )

Constructor with initial kinematics.

Definition at line 39 of file MissingET_v1.cxx.

42 : SG::AuxElement() {
43
45 setName( name );
46 setSource( src );
47 this->f_mpx() = mpx;
48 this->f_mpy() = mpy;
49 this->f_sumet() = sumet;
50}
float sumet() const
Returns.
float & f_mpy()
Returns reference to store.
float & f_mpx()
Returns reference to store.
float mpx() const
Returns .
float & f_sumet()
Returns reference to store.
float mpy() const
Returns .

◆ MissingET_v1() [5/5]

MissingET_v1::MissingET_v1 ( const MissingET_v1 & met)

Copy constructor.

Definition at line 63 of file MissingET_v1.cxx.

65
66 this->makePrivateStore(&met);
67 updateHash();
68}
float met() const
Returns .
void updateHash()
Update the hash to match the current name.
void makePrivateStore()
Create a new (empty) private store for this object.

◆ ~MissingET_v1()

MissingET_v1::~MissingET_v1 ( )

Implementation class destructor.

Definition at line 70 of file MissingET_v1.cxx.

71{ }

Member Function Documentation

◆ add() [1/3]

void MissingET_v1::add ( const IParticle * particle)

Add particle kinematics to MET.

Definition at line 77 of file MissingET_v1.cxx.

78{
79 // retrieve kinematics
80 EXTRACT_PX( float, px, (*particle) );
81 EXTRACT_PY( float, py, (*particle) );
82 // add
83 this->add(px,py,particle->pt());
84}
#define EXTRACT_PY(_T_, _V_, _P_)
#define EXTRACT_PX(_T_, _V_, _P_)

◆ add() [2/3]

void MissingET_v1::add ( const IParticle * particle,
float scale )

Add scaled particle kinematics to MET.

Definition at line 86 of file MissingET_v1.cxx.

87{
88 // retrieve kinematics
89 EXTRACT_SCALED_PX( float, px, (*particle), scale);
90 EXTRACT_SCALED_PY( float ,py, (*particle), scale);
91 float pt(particle->pt()*scale);
92 // add
93 this->add(px,py,pt);
94}
#define EXTRACT_SCALED_PY(_T_, _V_, _P_, _S_)
#define EXTRACT_SCALED_PX(_T_, _V_, _P_, _S_)
setRcore setEtHad setFside pt

◆ add() [3/3]

void xAOD::MissingET_v1::add ( float px,
float py,
float pt )

Add kinematic variables to MET.

Definition at line 96 of file MissingET_v1.cxx.

97{ this->f_mpx() -= px; this->f_mpy() -= py; this->f_sumet() += pt; }

◆ clear()

void xAOD::MissingET_v1::clear ( )

Clear/reset the data store.

◆ createPrivateStore()

void MissingET_v1::createPrivateStore ( )
protected

Function initialising the object to work in standalone mode.

This function is added because in standalone mode we can't use C++11.

So we can't rely on constructors calling each other. Which means that the same functionality is instead now implemented in this old style.

Definition at line 121 of file MissingET_v1.cxx.

121 {
122
126 clear();
127}
void clear()
Clear/reset the data store.
static Types::bitmask_t unknown()
static const std::string & unknownString()
Access unknown string indicator.

◆ f_mpx()

float & xAOD::MissingET_v1::f_mpx ( )
protected

Returns reference to \( p_{x} \) store.

◆ f_mpy()

float & xAOD::MissingET_v1::f_mpy ( )
protected

Returns reference to \( p_{y} \) store.

◆ f_name()

std::string & xAOD::MissingET_v1::f_name ( )
protected

Returns reference to MET object name store.

◆ f_nameConst()

const std::string & xAOD::MissingET_v1::f_nameConst ( ) const
protected

Returns const reference to the MET object name store.

◆ f_source()

MissingETBase::Types::bitmask_t & xAOD::MissingET_v1::f_source ( )
protected

Returns reference to MET object source store.

◆ f_sumet()

float & xAOD::MissingET_v1::f_sumet ( )
protected

Returns reference to \( \Sigma E_{\rm T} \) store.

◆ met()

float xAOD::MissingET_v1::met ( ) const

Returns \( E_{\rm T}^{\rm miss} = \sqrt{(p_{x}^{\rm miss})^{2} + (p_{y}^{\rm miss})^{2}} \).

◆ mpx()

float xAOD::MissingET_v1::mpx ( ) const

Returns \( p_{x}^{\rm miss} \).

◆ mpy()

float xAOD::MissingET_v1::mpy ( ) const

Returns \( p_{y}^{\rm miss} \).

◆ name()

const std::string & xAOD::MissingET_v1::name ( ) const

Identifier getters.

MET object name

◆ nameHash()

std::size_t xAOD::MissingET_v1::nameHash ( ) const

Return hash associated to the MET object name.

◆ operator!=()

bool xAOD::MissingET_v1::operator!= ( const MissingET_v1 & met) const

Inequality test.

◆ operator*=()

MissingET_v1 & xAOD::MissingET_v1::operator*= ( float scale)

Applying a scale factor.

◆ operator+=() [1/2]

MissingET_v1 & xAOD::MissingET_v1::operator+= ( const IParticle * particle)

Add particle kinematics to MET.

◆ operator+=() [2/2]

MissingET_v1 & xAOD::MissingET_v1::operator+= ( const MissingET_v1 & met)

Add another MET object.

◆ operator-=() [1/2]

MissingET_v1 & MissingET_v1::operator-= ( const IParticle * part)

Remove particle kinematics to MET.

Definition at line 109 of file MissingET_v1.cxx.

110{
111 EXTRACT_PX( float, px, (*particle) );
112 EXTRACT_PY( float, py, (*particle) );
113 this->add(-px,-py,-particle->pt());
114 return *this;
115}

◆ operator-=() [2/2]

MissingET_v1 & xAOD::MissingET_v1::operator-= ( const MissingET_v1 & met)

Subtract another MET object.

◆ operator/=()

MissingET_v1 & xAOD::MissingET_v1::operator/= ( float scale)

Dividing by a scale factor.

◆ operator=()

MissingET_v1 & MissingET_v1::operator= ( const MissingET_v1 & met)

Add particle kinematics to MET.

Definition at line 99 of file MissingET_v1.cxx.

100{
101 setName( met.name() );
102 setSource( met.source() );
103 this->f_mpx() = met.mpx();
104 this->f_mpy() = met.mpy();
105 this->f_sumet() = met.sumet();
106 return *this;
107}

◆ operator==()

bool xAOD::MissingET_v1::operator== ( const MissingET_v1 & met) const

Equality test.

◆ phi()

float xAOD::MissingET_v1::phi ( ) const

Returns \( \phi(E_{\rm T}^{\rm miss}) \).

◆ setMpx()

void xAOD::MissingET_v1::setMpx ( float value)

Set the \( p_{x}^{\rm miss} \) component.

◆ setMpy()

void xAOD::MissingET_v1::setMpy ( float value)

Set the \( p_{y}^{\rm miss} \) component.

◆ setName()

void xAOD::MissingET_v1::setName ( const std::string & name)

Set the name of the MET object.

◆ setSource()

void xAOD::MissingET_v1::setSource ( MissingETBase::Types::bitmask_t src)

Set the source of the MET object.

◆ setSumet()

void xAOD::MissingET_v1::setSumet ( float value)

Set \( \Sigma E_{\rm T} \).

◆ source()

MissingETBase::Types::bitmask_t xAOD::MissingET_v1::source ( ) const

MET object source tag.

◆ sumet()

float xAOD::MissingET_v1::sumet ( ) const

Returns.

◆ updateHash()

void xAOD::MissingET_v1::updateHash ( )

Update the hash to match the current name.

Member Data Documentation

◆ m_acc_mpx

const SG::AuxElement::Accessor< float > MissingET_v1::m_acc_mpx
staticprivate

Definition at line 119 of file MissingET_v1.h.

◆ m_acc_mpy

const SG::AuxElement::Accessor< float > MissingET_v1::m_acc_mpy
staticprivate

Definition at line 120 of file MissingET_v1.h.

◆ m_acc_sumet

const SG::AuxElement::Accessor< float > MissingET_v1::m_acc_sumet
staticprivate

Definition at line 121 of file MissingET_v1.h.

◆ m_nameHash

CxxUtils::CachedValue<std::size_t> xAOD::MissingET_v1::m_nameHash
private

Stores the hash for the current f_name string.

Definition at line 117 of file MissingET_v1.h.

◆ s_defaultName

const std::string xAOD::MissingET_v1::s_defaultName {"MissingET"}
inlinestaticprivate

Definition at line 116 of file MissingET_v1.h.

116{"MissingET"};

The documentation for this class was generated from the following files: