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-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
26#include "GaudiKernel/MsgStream.h"
27
28#include <vector>
29#include <string>
30#include <map>
31#include <math.h>
32
34
36
37 public:
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;
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
void setSumOfSigns(unsigned int index, short value)
set sum of energy signs for calibration of component ‘index’
void setEzComponent(unsigned int index, float value)
set Ez for component ‘index’
float ez() const
Ez component of missing energy vector.
friend MsgStream & operator<<(MsgStream &m, const TrigMissingET &d)
formatted output
void setUsedChannels(unsigned int index, unsigned short value)
set number of used channels in component ‘index’
float ex() const
Ex component of missing energy vector.
unsigned short getUsedChannels(unsigned int index) const
get number of used channes in component ‘index’
~TrigMissingET()
destructor
short getStatus(unsigned int index) const
get status flag for component ‘index’
void setSumEComponent(unsigned int index, float value)
set sum of |E| for component ‘index’
float getEyComponent(unsigned int index) const
get Ey from component ‘index’
void setStatus(unsigned int index, short value)
set status flag of component ‘index’
void clear()
reset contents
std::string getNameOfComponent(unsigned int index) const
get name of component ‘index’
short getSumOfSigns(unsigned int index) const
get sum of energy signs for calibration of component ‘index’
void setComponentCalib1(unsigned int index, float value)
set scale for calibration of component ‘index’
void setSumEtComponent(unsigned int index, float value)
set sum of |Et| for component ‘index’
int m_flag
Basic information: event status flag: 0 (default) means OK.
float getSumEComponent(unsigned int index) const
get sum of |E| from component ‘index’
void setExComponent(unsigned int index, float value)
set Ex for component ‘index’
float getExComponent(unsigned int index) const
get Ex from component ‘index’
float getSumEtComponent(unsigned int index) const
get sum of |Et| from component ‘index’
unsigned int getNumOfComponents() const
get number of auxiliary components
TrigMissingET()
default constructor
void setEyComponent(unsigned int index, float value)
set Ey for component ‘index’
float getComponentCalib0(unsigned int index) const
get constant term for calibration of component ‘index’
float getEzComponent(unsigned int index) const
get Ez from component ‘index’
float ey() const
Ey component of missing energy vector.
std::vector< TrigMissingEtComponent > m_compVec
Auxiliary information: components from different calo layers and muons.
void setComponentCalib0(unsigned int index, float value)
set constant term for calibration of component ‘index’
void setNameOfComponent(unsigned int index, const char *str)
set name of component ‘index’
float getComponentCalib1(unsigned int index) const
get scale for calibration of component ‘index’
Definition index.py:1