ATLAS Offline Software
Classes | Functions | Variables
Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h File Reference
#include <iostream>
#include "GaudiKernel/MsgStream.h"
#include "CaloGeoHelpers/CaloSampling.h"
#include "AthenaKernel/CLASS_DEF.h"
#include "CxxUtils/copy_bounded.h"
#include <algorithm>
Include dependency graph for Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:

Go to the source code of this file.

Classes

class  TrigCaloCluster
 Base Cluster Class. More...
 

Functions

std::string str (const TrigCaloCluster &d)
 
MsgStream & operator<< (MsgStream &m, const TrigCaloCluster &d)
 
bool operator== (const TrigCaloCluster &a, const TrigCaloCluster &b)
 
bool operator!= (const TrigCaloCluster &a, const TrigCaloCluster &b)
 
void diff (const TrigCaloCluster &clus1, const TrigCaloCluster &clus2, std::map< std::string, double > &varChange)
 

Variables

const int MAXSIZE = CaloSampling::CaloSample::Unknown
 

Function Documentation

◆ diff()

void diff ( const TrigCaloCluster clus1,
const TrigCaloCluster clus2,
std::map< std::string, double > &  varChange 
)

Definition at line 127 of file TrigCaloCluster.cxx.

128  {
129 
130  double ep=0.001; // arbitrary , but seems to be reasonable
131  if ( std::fabs( a.RoIword() - b.RoIword() )>ep ) {
132  varChange[ "RoIword" ] =a.RoIword() - b.RoIword();
133  }
134  if ( std::fabs( a.rawEta() - b.rawEta() )>ep ) {
135  varChange[ "rawEta" ] =a.rawEta() - b.rawEta();
136  }
137  if ( std::fabs( a.rawPhi() - b.rawPhi() )>ep ) {
138  varChange[ "rawPhi" ] =a.rawPhi() - b.rawPhi();
139  }
140  if ( std::fabs( a.rawEt() - b.rawEt() )>ep ) {
141  varChange[ "rawEt" ] =a.rawEt() - b.rawEt();
142  }
143  if ( std::fabs( a.quality() - b.quality() )>ep ) {
144  varChange[ "quality" ] =a.quality() - b.quality();
145  }
146 
147  return;
148 }

◆ operator!=()

bool operator!= ( const TrigCaloCluster a,
const TrigCaloCluster b 
)
inline

Definition at line 152 of file Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h.

153  { return !(a==b); }

◆ operator<<()

MsgStream& operator<< ( MsgStream &  m,
const TrigCaloCluster d 
)

Definition at line 111 of file TrigCaloCluster.cxx.

111  {
112  m << str(d);
113  return m;
114 }

◆ operator==()

bool operator== ( const TrigCaloCluster a,
const TrigCaloCluster b 
)

Definition at line 117 of file TrigCaloCluster.cxx.

117  {
118  double ep=0.001; // arbitrary , but seems to be reasonable
119  if ( std::fabs( a.RoIword() - b.RoIword() )>ep ) return false;
120  if ( std::fabs( a.rawEta() - b.rawEta() )>ep ) return false;
121  if ( std::fabs( a.rawPhi() - b.rawPhi() )>ep ) return false;
122  if ( std::fabs( a.rawEt() - b.rawEt() )>ep ) return false;
123  if ( std::fabs( a.quality() - b.quality() )>ep ) return false;
124  return true;
125 }

◆ str()

std::string str ( const TrigCaloCluster d)

Definition at line 94 of file TrigCaloCluster.cxx.

94  {
95  std::stringstream log;
96  log <<"m_rawEnergy : " << d.rawEnergy() << "; ";
97  log <<"m_rawEt : " << d.rawEt() << "; ";
98  log <<"m_rawEta : " << d.rawEta() << "; ";
99  log <<"m_rawPhi : " << d.rawPhi() << "; ";
100  log << std::hex;
101  log <<"m_roiWord : " << d.RoIword() << "; ";
102  log << std::dec;
103  log <<"m_numberUsedCells : " << d.nCells() << "; ";
104  log <<"m_quality : " << d.quality() << "; ";
105  log <<"m_rawEnergyS : ";
106  for ( int i = 0 ; i < MAXSIZE ; i++ )
107  log << d.rawEnergy((CaloSampling::CaloSample)i) << "; ";
108  return log.str();
109 }

Variable Documentation

◆ MAXSIZE

python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
str
std::string str(const TrigCaloCluster &d)
Definition: TrigCaloCluster.cxx:94
hist_file_dump.d
d
Definition: hist_file_dump.py:137
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
MAXSIZE
const int MAXSIZE
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:36
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20