ATLAS Offline Software
Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 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 
23 #include "AthenaKernel/CLASS_DEF.h"
26 #include "GaudiKernel/MsgStream.h"
27 
28 #include <vector>
29 #include <string>
30 #include <map>
31 #include <math.h>
32 
36 
37  public:
39  TrigMissingET();
41  TrigMissingET(unsigned char n); //<!
42  TrigMissingET(std::vector< TrigMissingEtComponent >&& compVec);
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 sqrt(m_ex*m_ex+m_ey*m_ey); }
62  float e() const { return 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 
175 bool operator== (const TrigMissingET& a, const TrigMissingET& b);
176 
178 inline bool operator!= (const TrigMissingET& a, const TrigMissingET& b) {
179  return !( a == b );
180 }
181 
183 void diff(const TrigMissingET& a, const TrigMissingET& b,
184  std::map<std::string, double>& variableChange);
185 
187 std::string str (const TrigMissingET& a);
188 
189 
190 
191 CLASS_DEF(TrigMissingET, 145610168, 1)
192 CLASS_DEF( DataVector<TrigMissingET> , 23170091 , 1 )
193 
194 #endif
TrigMissingET::getStatus
short getStatus(unsigned int index) const
get status flag for component ‘index’
Definition: TrigMissingET.cxx:157
TrigMissingET::operator<<
friend MsgStream & operator<<(MsgStream &m, const TrigMissingET &d)
formatted output
Definition: TrigMissingET.cxx:336
TrigMissingET::m_compVec
std::vector< TrigMissingEtComponent > m_compVec
Auxiliary information: components from different calo layers and muons.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:169
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TrigMissingET::m_sum_et
float m_sum_et
Basic information: scalar sum of Et.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:159
TrigMissingET::m_roiWord
long m_roiWord
Basic information: RoIword.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:165
TrigMissingET::m_ez
float m_ez
Basic information: Ez component.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:157
index
Definition: index.py:1
hist_file_dump.d
d
Definition: hist_file_dump.py:137
TrigMissingET::getUsedChannels
unsigned short getUsedChannels(unsigned int index) const
get number of used channes in component ‘index’
Definition: TrigMissingET.cxx:149
TrigMissingET::setStatus
void setStatus(unsigned int index, short value)
set status flag of component ‘index’
Definition: TrigMissingET.cxx:233
TrigMissingET::setEx
void setEx(float ex)
set Ex component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:82
athena.value
value
Definition: athena.py:124
TrigMissingET::ex
float ex() const
Ex component of missing energy vector.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:50
TrigMissingET::addSumEt
void addSumEt(float ets)
increment sumEt
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:77
TrigMissingET::setNameOfComponent
void setNameOfComponent(unsigned int index, const char *str)
set name of component ‘index’
Definition: TrigMissingET.cxx:183
TrigMissingET::clear
void clear()
reset contents
Definition: TrigMissingET.cxx:75
TrigMissingET::sumE
float sumE() const
sum of |E|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:58
TrigMissingET::RoIword
long RoIword() const
RoI word.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:67
TrigMissingET::ey
float ey() const
Ey component of missing energy vector.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:52
TrigMissingET::m_ey
float m_ey
Basic information: Ey component.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:155
TrigMissingET::getEyComponent
float getEyComponent(unsigned int index) const
get Ey from component ‘index’
Definition: TrigMissingET.cxx:109
TrigMissingET::setSumOfSigns
void setSumOfSigns(unsigned int index, short value)
set sum of energy signs for calibration of component ‘index’
Definition: TrigMissingET.cxx:223
TrigMissingET::set_RoIword
void set_RoIword(long word)
set RoIword
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:95
TrigMissingET::setFlag
void setFlag(int flag)
set event flag
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:93
TrigMissingET::setSumEt
void setSumEt(float ets)
set sum of |Et|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:88
TrigMissingET::setSumE
void setSumE(float sumE)
set sum of |E|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:90
TrigMissingET::getNameOfComponent
std::string getNameOfComponent(unsigned int index) const
get name of component ‘index’
Definition: TrigMissingET.cxx:92
beamspotman.n
n
Definition: beamspotman.py:731
TrigMissingET::getComponentCalib1
float getComponentCalib1(unsigned int index) const
get scale for calibration of component ‘index’
Definition: TrigMissingET.cxx:173
master.flag
bool flag
Definition: master.py:29
TrigMissingET::getExComponent
float getExComponent(unsigned int index) const
get Ex from component ‘index’
Definition: TrigMissingET.cxx:101
TrigMissingEtComponent.h
TrigMissingET::setUsedChannels
void setUsedChannels(unsigned int index, unsigned short value)
set number of used channels in component ‘index’
Definition: TrigMissingET.cxx:228
TrigMissingET::addEz
void addEz(float ez)
increment Ez component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:74
TrigMissingET::getFlag
int getFlag() const
event flag: 0 (default) means OK
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:65
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TrigMissingET::getComponentCalib0
float getComponentCalib0(unsigned int index) const
get constant term for calibration of component ‘index’
Definition: TrigMissingET.cxx:165
TrigMissingET::setSumEComponent
void setSumEComponent(unsigned int index, float value)
set sum of |E| for component ‘index’
Definition: TrigMissingET.cxx:208
diff
void diff(const TrigMissingET &a, const TrigMissingET &b, std::map< std::string, double > &variableChange)
Comparison with feedback.
Definition: TrigMissingET.cxx:342
TrigMissingET::setEzComponent
void setEzComponent(unsigned int index, float value)
set Ez for component ‘index’
Definition: TrigMissingET.cxx:198
TrigMissingET::addSumE
void addSumE(float sumE)
increment sumE
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:79
TrigMissingET
Class for LVL2/EF MissingET trigger.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:35
TrigMissingET::getSumEtComponent
float getSumEtComponent(unsigned int index) const
get sum of |Et| from component ‘index’
Definition: TrigMissingET.cxx:125
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigMissingET::setComponentCalib0
void setComponentCalib0(unsigned int index, float value)
set constant term for calibration of component ‘index’
Definition: TrigMissingET.cxx:213
TrigMissingET::TrigMissingET
TrigMissingET()
default constructor
Definition: TrigMissingET.cxx:14
str
std::string str(const TrigMissingET &a)
conversion to formatted string: multi-line!
Definition: TrigMissingET.cxx:292
TrigMissingET::sumEt
float sumEt() const
sum of |Et|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:56
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
TrigMissingET::setEyComponent
void setEyComponent(unsigned int index, float value)
set Ey for component ‘index’
Definition: TrigMissingET.cxx:193
TrigMissingET::setEz
void setEz(float ez)
set Ez component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:86
TrigMissingET::setComponentCalib1
void setComponentCalib1(unsigned int index, float value)
set scale for calibration of component ‘index’
Definition: TrigMissingET.cxx:218
TrigMissingET::getEzComponent
float getEzComponent(unsigned int index) const
get Ez from component ‘index’
Definition: TrigMissingET.cxx:117
a
TList * a
Definition: liststreamerinfos.cxx:10
TrigMissingET::setExComponent
void setExComponent(unsigned int index, float value)
set Ex for component ‘index’
Definition: TrigMissingET.cxx:188
TrigMissingET::e
float e() const
(modulus of) energy
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:62
TrigMissingET::m_sum_e
float m_sum_e
Basic information: scalar sum of E.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:161
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TrigMissingET::getNumOfComponents
unsigned int getNumOfComponents() const
get number of auxiliary components
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:98
TrigMissingET::getSumOfSigns
short getSumOfSigns(unsigned int index) const
get sum of energy signs for calibration of component ‘index’
Definition: TrigMissingET.cxx:141
str
Definition: BTagTrackIpAccessor.cxx:11
TrigMissingET::ez
float ez() const
Ez component of missing energy vector.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:54
TrigMissingET::et
float et() const
(modulus of) transverse energy
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:60
TrigMissingET::getSumEComponent
float getSumEComponent(unsigned int index) const
get sum of |E| from component ‘index’
Definition: TrigMissingET.cxx:133
TrigMissingET::addEx
void addEx(float ex)
increment Ex component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:70
TrigMissingET::addEy
void addEy(float ey)
increment Ey component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:72
CLASS_DEF.h
macros to associate a CLID to a type
TrigMissingET::~TrigMissingET
~TrigMissingET()
destructor
Definition: TrigMissingET.cxx:72
TrigMissingET::m_flag
int m_flag
Basic information: event status flag: 0 (default) means OK.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:163
TrigMissingET::m_ex
float m_ex
Basic information: Ex component.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:153
TrigMissingET::setEy
void setEy(float ey)
set Ey component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:84
operator==
bool operator==(const TrigMissingET &a, const TrigMissingET &b)
Operator comparing two objects for equality.
Definition: TrigMissingET.cxx:241
operator!=
bool operator!=(const TrigMissingET &a, const TrigMissingET &b)
Operator comparing two objects for inequality.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:178
TrigMissingET::setSumEtComponent
void setSumEtComponent(unsigned int index, float value)
set sum of |Et| for component ‘index’
Definition: TrigMissingET.cxx:203