ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ********************************************************************
6//
7// NAME: TrigMissingET.h
8// PACKAGE: Trigger/TrigEvent/TrigMissingEtEvent
9//
10// AUTHOR: Rashid Djilkibaev (Diego Casadei)
11// CREATED: March, 2006 (auxiliary info added in March 2008)
12//
13// Description: MET trigger slice persistent class.
14// Basic info: Ex, Ey, Ez, SumE, SumEt, and a status flag.
15// Auxiliary info: collection of TrigMissingEtComponent's
16//
17// ********************************************************************
18
19#ifndef TRIGMISSINGETEVENT_TRIGMISSINGET_H
20#define TRIGMISSINGETEVENT_TRIGMISSINGET_H
21
22
26
27#include <vector>
28#include <string>
29#include <map>
30#include <cmath>
31
32class MsgStream;
33
35
37
38 public:
40 TrigMissingET() = default;
42 explicit TrigMissingET(unsigned char n); //<!
43 TrigMissingET(std::vector< TrigMissingEtComponent >&& compVec);
44
45
47 void clear();
48
50 float ex() const { return m_ex; }
52 float ey() const { return m_ey; }
54 float ez() const { return m_ez; }
56 float sumEt() const { return m_sum_et; }
58 float sumE() const { return m_sum_e; }
60 float et() const { return std::sqrt(m_ex*m_ex+m_ey*m_ey); }
62 float e() const { return std::sqrt(m_ex*m_ex+m_ey*m_ey+m_ez*m_ez); }
63
65 int getFlag() const {return m_flag;}
67 long RoIword() const { return m_roiWord; }
68
70 void addEx(float ex) { m_ex += ex; }
72 void addEy(float ey) { m_ey += ey; }
74 void addEz(float ez) { m_ez += ez; }
75
77 void addSumEt(float ets) { m_sum_et += ets; }
79 void addSumE(float sumE) { m_sum_e += sumE; }
80
82 void setEx(float ex) { m_ex = ex; }
84 void setEy(float ey) { m_ey = ey; }
86 void setEz(float ez) { m_ez = ez; }
88 void setSumEt(float ets) { m_sum_et = ets; }
90 void setSumE(float sumE) { m_sum_e = sumE; }
91
93 void setFlag(int flag) { m_flag=flag; }
95 void set_RoIword(long word) { m_roiWord=word; }
96
98 unsigned int getNumOfComponents() const {return m_compVec.size();}
99
101 std::string getNameOfComponent(unsigned int index) const;
103 float getExComponent(unsigned int index) const;
105 float getEyComponent(unsigned int index) const;
107 float getEzComponent(unsigned int index) const;
109 float getSumEtComponent(unsigned int index) const;
111 float getSumEComponent(unsigned int index) const;
113 float getComponentCalib0(unsigned int index) const;
115 float getComponentCalib1(unsigned int index) const;
117 short getSumOfSigns(unsigned int index) const;
119 unsigned short getUsedChannels(unsigned int index) const;
121 short getStatus(unsigned int index) const;
122
124 void setNameOfComponent(unsigned int index, const char* str);
126 void setExComponent(unsigned int index, float value);
128 void setEyComponent(unsigned int index, float value);
130 void setEzComponent(unsigned int index, float value);
132 void setSumEtComponent(unsigned int index, float value);
134 void setSumEComponent(unsigned int index, float value);
136 void setComponentCalib0(unsigned int index, float value);
138 void setComponentCalib1(unsigned int index, float value);
140 void setSumOfSigns(unsigned int index, short value);
142 void setUsedChannels(unsigned int index, unsigned short value);
144 void setStatus(unsigned int index, short value);
145
147 friend MsgStream& operator<< (MsgStream& m, const TrigMissingET& d);
148
149
150 private:
151
153 float m_ex{};
155 float m_ey{};
157 float m_ez{};
159 float m_sum_et{};
161 float m_sum_e{};
163 int m_flag{};
165 long m_roiWord{};
166
169 std::vector< TrigMissingEtComponent > m_compVec;
170
171};
172
173
175bool operator== (const TrigMissingET& a, const TrigMissingET& b);
176
178inline bool operator!= (const TrigMissingET& a, const TrigMissingET& b) {
179 return !( a == b );
180}
181
183void diff(const TrigMissingET& a, const TrigMissingET& b,
184 std::map<std::string, double>& variableChange);
185
187std::string str (const TrigMissingET& a);
188
189
190
191CLASS_DEF(TrigMissingET, 145610168, 1)
192CLASS_DEF( DataVector<TrigMissingET> , 23170091 , 1 )
193
194#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
static Double_t a
bool operator==(const TrigMissingET &a, const TrigMissingET &b)
Operator comparing two objects for equality.
void diff(const TrigMissingET &a, const TrigMissingET &b, std::map< std::string, double > &variableChange)
Comparison with feedback.
bool operator!=(const TrigMissingET &a, const TrigMissingET &b)
Operator comparing two objects for inequality.
Derived DataVector<T>.
Definition DataVector.h:795
float ez() const
Ez component of missing energy vector.
friend MsgStream & operator<<(MsgStream &m, const TrigMissingET &d)
get name of component index' */ std::string getNameOfComponent(unsigned int index) const; /** get Ex ...
float ex() const
Ex component of missing energy vector.
void clear()
reset contents
int m_flag
Basic information: event status flag: 0 (default) means OK.
unsigned int getNumOfComponents() const
get number of auxiliary components
TrigMissingET()=default
default constructor
float ey() const
Ey component of missing energy vector.
std::vector< TrigMissingEtComponent > m_compVec
Auxiliary information: components from different calo layers and muons.
Definition index.py:1