ATLAS Offline Software
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 
22  : m_name ("empty")
23 {
24  reset();
25 }
26 
28 }
29 
30 
33  m_calib0 = 0;
34  m_calib1 = 1;
35  m_ex = m_ey = m_ez = m_sumEt = m_sumE = 0;
36 }
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 }
get_hdefs.buff
buff
Definition: get_hdefs.py:64
TrigMissingEtComponent::m_calib1
float m_calib1
scale, for calibration (default 1)
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:108
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigMissingEtComponent::m_ey
float m_ey
Ey.
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:98
TrigMissingEtComponent
MET trigger slice components (auxiliary information for TrigMissingET)
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:27
TrigMissingEtComponent::m_status
short m_status
status flag
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:94
TrigMissingEtComponent::m_sumEt
float m_sumEt
sum of |Et|
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:102
TrigMissingEtComponent::m_ez
float m_ez
Ez.
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:100
TrigMissingEtComponent::reset
void reset()
clean values and calibration constants
Definition: TrigMissingEtComponent.cxx:31
TrigMissingEtComponent::m_sumE
float m_sumE
sum of |E|
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:104
TrigMissingEtComponent.h
TrigMissingEtComponent::getFormattedValues
std::string getFormattedValues()
print the (1-line) table of all attributes
Definition: TrigMissingEtComponent.cxx:46
TrigMissingEtComponent::m_name
std::string m_name
name
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:92
TrigMissingEtComponent::m_ex
float m_ex
Ey.
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:96
operator==
bool operator==(const TrigMissingEtComponent &a, const TrigMissingEtComponent &b)
Operator comparing two objects for equality.
Definition: TrigMissingEtComponent.cxx:57
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigMissingEtComponent::TrigMissingEtComponent
TrigMissingEtComponent()
constructor
Definition: TrigMissingEtComponent.cxx:21
TrigMissingEtComponent::m_usedChannels
unsigned short m_usedChannels
number of used channels
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:112
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
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_calib0
float m_calib0
constant term, for calibration (default 0)
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:106
TrigMissingEtComponent::~TrigMissingEtComponent
~TrigMissingEtComponent()
destructor
Definition: TrigMissingEtComponent.cxx:27
TrigMissingEtComponent::m_sumOfSigns
short m_sumOfSigns
calibration: sum of energy signs (-1, +1)
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:110