ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigMissingEtEvent
src
TrigMissingEtComponent.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// ********************************************************************
6
//
7
// NAME: TrigMissingEtComponent.cxx
8
// PACKAGE: Trigger/TrigEvent/TrigMissingEtEvent
9
//
10
// AUTHOR: Diego Casadei
11
// CREATED: April, 2008
12
//
13
// Description: MET trigger slice components (auxiliary information).
14
//
15
// ********************************************************************
16
17
#include "
TrigMissingEtEvent/TrigMissingEtComponent.h
"
18
#include <math.h>
19
#include <stdio.h>
20
21
TrigMissingEtComponent::TrigMissingEtComponent
()
22
:
m_name
(
"empty"
)
23
{
24
reset
();
25
}
26
27
TrigMissingEtComponent::~TrigMissingEtComponent
(){
28
}
29
30
31
void
TrigMissingEtComponent::reset
(){
32
m_status
=
m_usedChannels
=
m_sumOfSigns
= 0;
33
m_calib0
= 0;
34
m_calib1
= 1;
35
m_ex
=
m_ey
=
m_ez
=
m_sumEt
=
m_sumE
= 0;
36
}
37
38
39
std::string
TrigMissingEtComponent::getFormattedHeader
(){
40
std::string s=
"_name__status_usedChannels__sumOfSigns__calib1_calib0/MeV"
;
41
s+=
"___ex/MeV_____ey/MeV_____ez/MeV___sumE/MeV__sumEt/MeV"
;
42
return
s;
43
}
44
45
46
std::string
TrigMissingEtComponent::getFormattedValues
(){
47
char
buff[256];
48
sprintf(buff,
49
"%s %7d %12d %11d %7.3f %7.2f %10.2f %10.2f %10.2f %10.2f %10.2f\n"
,
50
m_name
.c_str(),
51
m_status
,
m_usedChannels
,
m_sumOfSigns
,
m_calib1
,
m_calib0
,
52
m_ex
,
m_ey
,
m_ez
,
m_sumEt
,
m_sumE
);
53
return
std::string(buff);
54
}
55
56
57
bool
operator==
(
const
TrigMissingEtComponent
&
a
,
const
TrigMissingEtComponent
& b ) {
58
59
const
double
DELTA
=1e-3;
// distance used to compare floats
60
61
if
(
a
.name() != b.name() )
62
return
false
;
63
if
(
a
.status() != b.status() )
64
return
false
;
65
if
(
a
.sumOfSigns() != b.sumOfSigns() )
66
return
false
;
67
if
(
a
.usedChannels() != b.usedChannels() )
68
return
false
;
69
70
if
( fabsf(
a
.ex() - b.ex()) >
DELTA
)
71
return
false
;
72
if
( fabsf(
a
.ey() - b.ey()) >
DELTA
)
73
return
false
;
74
if
( fabsf(
a
.ez() - b.ez()) >
DELTA
)
75
return
false
;
76
if
( fabsf(
a
.sumEt() - b.sumEt()) >
DELTA
)
77
return
false
;
78
if
( fabsf(
a
.sumE() - b.sumE()) >
DELTA
)
79
return
false
;
80
if
( fabsf(
a
.calib0() - b.calib0()) >
DELTA
)
81
return
false
;
82
if
( fabsf(
a
.calib1() - b.calib1()) >
DELTA
)
83
return
false
;
84
85
return
true
;
86
}
DELTA
static const double DELTA
Definition
CombinedMuonFeature.cxx:19
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
operator==
bool operator==(const TrigMissingEtComponent &a, const TrigMissingEtComponent &b)
Operator comparing two objects for equality.
Definition
TrigMissingEtComponent.cxx:57
TrigMissingEtComponent.h
TrigMissingEtComponent
MET trigger slice components (auxiliary information for TrigMissingET).
Definition
TrigMissingEtComponent.h:27
TrigMissingEtComponent::getFormattedHeader
std::string getFormattedHeader()
use this to print the header of the table printed by the following method
Definition
TrigMissingEtComponent.cxx:39
TrigMissingEtComponent::m_status
short m_status
status flag
Definition
TrigMissingEtComponent.h:94
TrigMissingEtComponent::m_ex
float m_ex
Ey.
Definition
TrigMissingEtComponent.h:96
TrigMissingEtComponent::m_calib0
float m_calib0
constant term, for calibration (default 0)
Definition
TrigMissingEtComponent.h:106
TrigMissingEtComponent::m_calib1
float m_calib1
scale, for calibration (default 1)
Definition
TrigMissingEtComponent.h:108
TrigMissingEtComponent::getFormattedValues
std::string getFormattedValues()
print the (1-line) table of all attributes
Definition
TrigMissingEtComponent.cxx:46
TrigMissingEtComponent::TrigMissingEtComponent
TrigMissingEtComponent()
constructor
Definition
TrigMissingEtComponent.cxx:21
TrigMissingEtComponent::m_sumE
float m_sumE
sum of |E|
Definition
TrigMissingEtComponent.h:104
TrigMissingEtComponent::m_name
std::string m_name
name
Definition
TrigMissingEtComponent.h:92
TrigMissingEtComponent::m_sumEt
float m_sumEt
sum of |Et|
Definition
TrigMissingEtComponent.h:102
TrigMissingEtComponent::m_usedChannels
unsigned short m_usedChannels
number of used channels
Definition
TrigMissingEtComponent.h:112
TrigMissingEtComponent::reset
void reset()
clean values and calibration constants
Definition
TrigMissingEtComponent.cxx:31
TrigMissingEtComponent::m_sumOfSigns
short m_sumOfSigns
calibration: sum of energy signs (-1, +1)
Definition
TrigMissingEtComponent.h:110
TrigMissingEtComponent::m_ez
float m_ez
Ez.
Definition
TrigMissingEtComponent.h:100
TrigMissingEtComponent::m_ey
float m_ey
Ey.
Definition
TrigMissingEtComponent.h:98
TrigMissingEtComponent::~TrigMissingEtComponent
~TrigMissingEtComponent()
destructor
Definition
TrigMissingEtComponent.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0