ATLAS Offline Software
Loading...
Searching...
No Matches
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
18#include <math.h>
19#include <stdio.h>
20
26
29
30
37
38
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
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(),
53 return std::string(buff);
54}
55
56
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}
static const double DELTA
static Double_t a
bool operator==(const TrigMissingEtComponent &a, const TrigMissingEtComponent &b)
Operator comparing two objects for equality.
MET trigger slice components (auxiliary information for TrigMissingET)
std::string getFormattedHeader()
use this to print the header of the table printed by the following method
float m_calib0
constant term, for calibration (default 0)
std::string getFormattedValues()
print the (1-line) table of all attributes
void reset()
clean values and calibration constants
short m_sumOfSigns
calibration: sum of energy signs (-1, +1)