ATLAS Offline Software
Loading...
Searching...
No Matches
MissingET_v1.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef XAODMISSINGET_VERSIONS_MISSINGET_V1_H
8#define XAODMISSINGET_VERSIONS_MISSINGET_V1_H
9
11
13
14#include "xAODBase/IParticle.h"
16
17#include <string>
18#include <functional>
19#include <utility>
20
21namespace xAOD
22{
25 {
26 public:
29 explicit MissingET_v1(bool createStore=false);
30 MissingET_v1(const std::string& name,
32 MissingET_v1(const IParticle* particle, const std::string& name=s_defaultName,
34 MissingET_v1(float mpx,float mpy,float sumet,const std::string& name=s_defaultName,
39
42 float mpx() const;
43 float mpy() const;
44 float met() const;
45 float phi() const;
46 float sumet() const;
48
51 void setMpx(float value);
52 void setMpy(float value);
53 void setSumet(float value);
55
58 const std::string& name() const;
60 std::size_t nameHash() const;
62
65 void setName(const std::string& name);
67 void updateHash();
69
72 void add(const IParticle* particle);
73 void add(const IParticle* particle,float scale);
74 void add(float px,float py,float pt);
76 MissingET_v1& operator+=(const IParticle* particle);
77 MissingET_v1& operator-=(const IParticle* part);
79
84 MissingET_v1& operator*=(float scale);
85 MissingET_v1& operator/=(float scale);
87
90 void clear();
92
95 bool operator==(const MissingET_v1& met) const;
96 bool operator!=(const MissingET_v1& met) const;
98
99
100
101 protected:
103 void createPrivateStore();
104
107 float& f_mpx();
108 float& f_mpy();
109 float& f_sumet();
110 std::string& f_name();
111 const std::string& f_nameConst() const;
114
115 private:
116 inline static const std::string s_defaultName{"MissingET"};
118
119 static const SG::AuxElement::Accessor<float> m_acc_mpx;
120 static const SG::AuxElement::Accessor<float> m_acc_mpy;
121 static const SG::AuxElement::Accessor<float> m_acc_sumet;
122 };
123}
124
135
137
138#endif
Base class for elements of a container that can have aux data.
Cached value with atomic update.
xAOD::MissingET_v1 operator+(const xAOD::MissingET_v1 &met0, const xAOD::MissingET_v1 &met1)
Create new MET object from sum of two MissingET_v1 objects.
xAOD::MissingET_v1 operator/(const xAOD::MissingET_v1 &met, float scale)
Create new MET object from source with scaled kinematics.
xAOD::MissingET_v1 operator-(const xAOD::MissingET_v1 &met0, const xAOD::MissingET_v1 &met1)
Create new MET object from difference between two MissingET_v1 objects.
Cached value with atomic update.
Definition CachedValue.h:55
Class providing the definition of the 4-vector interface.
Principal data object for Missing ET.
void setMpy(float value)
Set the component.
float sumet() const
Returns.
MissingET_v1 & operator-=(const IParticle *part)
Remove particle kinematics to MET.
MissingET_v1 & operator+=(const IParticle *particle)
Add particle kinematics to MET.
void clear()
Clear/reset the data store.
CxxUtils::CachedValue< std::size_t > m_nameHash
Stores the hash for the current f_name string.
bool operator==(const MissingET_v1 &met) const
Equality test.
MissingET_v1 & operator-=(const MissingET_v1 &met)
Subtract another MET object.
void add(const IParticle *particle)
Add particle kinematics to MET.
const std::string & f_nameConst() const
Returns const reference to the MET object name store.
MissingET_v1 & operator/=(float scale)
Dividing by a scale factor.
MissingETBase::Types::bitmask_t source() const
MET object source tag.
MissingETBase::Types::bitmask_t & f_source()
Returns reference to MET object source store.
void setSource(MissingETBase::Types::bitmask_t src)
Set the source of the MET object.
float met() const
Returns .
float & f_mpy()
Returns reference to store.
~MissingET_v1()
Implementation class destructor.
void createPrivateStore()
Function initialising the object to work in standalone mode.
static const SG::AuxElement::Accessor< float > m_acc_mpy
void updateHash()
Update the hash to match the current name.
std::size_t nameHash() const
Return hash associated to the MET object name.
MissingET_v1(bool createStore=false)
Default constructor.
static const SG::AuxElement::Accessor< float > m_acc_sumet
float & f_mpx()
Returns reference to store.
std::string & f_name()
Returns reference to MET object name store.
static const std::string s_defaultName
float phi() const
Returns .
bool operator!=(const MissingET_v1 &met) const
Inequality test.
MissingET_v1 & operator*=(float scale)
Applying a scale factor.
void setMpx(float value)
Set the component.
const std::string & name() const
Identifier getters.
float mpx() const
Returns .
MissingET_v1 & operator=(const MissingET_v1 &met)
Add particle kinematics to MET.
static const SG::AuxElement::Accessor< float > m_acc_mpx
MissingET_v1 & operator+=(const MissingET_v1 &met)
Add another MET object.
void setName(const std::string &name)
Set the name of the MET object.
float & f_sumet()
Returns reference to store.
float mpy() const
Returns .
void setSumet(float value)
Set .
uint64_t bitmask_t
Type for status word bit mask.
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setRcore setEtHad setFside pt
static Types::bitmask_t unknown()