ATLAS Offline Software
Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGCALOCLUSTER_H
6 #define TRIGCALOCLUSTER_H
7 
8 
9 /*******************************************************
10 
11 NAME: TrigCaloCluster.h
12 PACKAGE: Trigger/TrigEvent/TrigCaloEvent
13 AUTHORS: Denis O. Damazio, Carlos Osuna, Xin Wu
14 
15 PURPOSE: Keep the important output variables
16  from the Calorimeter LVL2 Trigger.
17  Optionally seed ID Trigger and EF.
18  Variables here should be RAW variables
19  not corrected.
20 KNOWTOINHERIT: TrigEmCluster, TrigTauCluster,
21  TrigJetCluster
22 DATE: October 17th, 2005
23 
24 ******************************************************/
25 
26 // for printing out
27 #include <iostream>
28 #include "GaudiKernel/MsgStream.h"
29 // t have quantities per sample
30 #include "CaloGeoHelpers/CaloSampling.h"
31 // CLID for persistency
32 #include "AthenaKernel/CLASS_DEF.h"
33 #include "CxxUtils/copy_bounded.h"
34 #include <algorithm>
35 
37 
40 
41 public:
43  TrigCaloCluster (float energy = 0.0, float eta = -10.0,
44  float phi = -10.0, long roi_word = 0);
48  TrigCaloCluster ( const TrigCaloCluster* trigcalocluster );
49 
51  void print ( void ) const;
53  void print ( MsgStream& log) const;
54 
55  // set methods
57  inline void setRawEnergy( float energy )
58  { m_rawEnergy = energy; };
59  template <class ITERATOR>
60  void setRawEnergies (ITERATOR beg, ITERATOR end)
61  {
66  }
68  inline void setRawEt( float et )
69  { m_rawEt = et; };
72  float energy )
73  { m_rawEnergyS[sample] = energy; };
75  inline void setRawEta ( float eta )
76  { m_rawEta = eta; };
78  inline void setRawPhi ( float phi )
79  { m_rawPhi = phi; };
81  inline void setRoIword ( long roiword )
82  { m_roiWord = roiword; };
84  inline void setNCells ( int ncells )
85  { m_numberUsedCells = ncells;};
87  inline void setquality ( unsigned int quality )
88  { m_quality = quality; };
89 
90  // get methods
92  inline float rawEnergy( ) const
93  { return m_rawEnergy ;};
94  template <class ITERATOR>
95  void rawEnergies (ITERATOR beg, ITERATOR end) const
96  {
99  beg, end);
100  std::fill (out, end, 0);
101  }
103  inline float rawEt ( ) const
104  { return m_rawEt ;};
107  { return m_rawEnergyS[sample]; };
109  inline float rawEta ( ) const
110  { return m_rawEta ;};
112  inline float rawPhi ( ) const
113  { return m_rawPhi ;};
115  inline long RoIword ( ) const
116  { return m_roiWord ;};
118  inline int nCells ( ) const
119  { return m_numberUsedCells ;};
121  inline unsigned int quality ( ) const
122  { return m_quality ;};
123 
124  // internal variables must be protected to be
125  // modified in daughter classes like TrigEM/Tau Clusters.
126 protected:
128  float m_rawEnergy;
130  float m_rawEt;
134  float m_rawEta;
136  float m_rawPhi;
138  long m_roiWord;
142  unsigned int m_quality;
143 
144 };
145 
146 // stream output
147 std::string str( const TrigCaloCluster& d );
148 MsgStream& operator<< ( MsgStream& m, const TrigCaloCluster& d );
149 
150 // comparison
151 bool operator== (const TrigCaloCluster& a, const TrigCaloCluster& b);
152 inline bool operator!= ( const TrigCaloCluster& a,
153  const TrigCaloCluster& b ) { return !(a==b); }
154 
155 void diff( const TrigCaloCluster& clus1, const TrigCaloCluster& clus2,
156  std::map< std::string, double >& varChange );
157 
158 CLASS_DEF ( TrigCaloCluster, 220079886, 1)
159 
160 #endif
TrigCaloCluster::m_numberUsedCells
int m_numberUsedCells
Number of cells used from RoI.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:140
TrigCaloCluster::nCells
int nCells() const
get number of cells used from RoI
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:118
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
TrigCaloCluster::m_rawEt
float m_rawEt
Raw Et (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:130
TrigCaloCluster::m_rawEnergyS
float m_rawEnergyS[MAXSIZE]
Raw Energy per sample (upto 25 samples - no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:132
et
Extra patterns decribing particle interation process.
TrigCaloCluster::m_quality
unsigned int m_quality
quality of cluster built (to be defined)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:142
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
TrigCaloCluster::setRawEt
void setRawEt(float et)
set Raw Et (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:68
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
TrigCaloCluster::m_rawPhi
float m_rawPhi
Raw Phi (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:136
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
hist_file_dump.d
d
Definition: hist_file_dump.py:137
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
TrigCaloCluster::rawPhi
float rawPhi() const
get Raw Phi (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:112
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
TrigCaloCluster::setquality
void setquality(unsigned int quality)
set quality of cluster built (to be defined)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:87
copy_bounded.h
Copy a range with bounds restriction.
str
std::string str(const TrigCaloCluster &d)
Definition: TrigCaloCluster.cxx:94
TrigCaloCluster::setRawEnergy
void setRawEnergy(float energy)
set Raw Energy (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:57
TrigCaloCluster::RoIword
long RoIword() const
get RoI Word
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:115
TrigCaloCluster::setRoIword
void setRoIword(long roiword)
set RoI Word
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:81
TrigCaloCluster::setRawEnergy
void setRawEnergy(CaloSampling::CaloSample sample, float energy)
set Raw Et (no calibration) per sampling layer
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:71
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
diff
void diff(const TrigCaloCluster &clus1, const TrigCaloCluster &clus2, std::map< std::string, double > &varChange)
Definition: TrigCaloCluster.cxx:127
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
TrigCaloCluster::setNCells
void setNCells(int ncells)
set number of cells used from RoI
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:84
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
MAXSIZE
const int MAXSIZE
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:36
TrigCaloCluster::rawEnergy
float rawEnergy(CaloSampling::CaloSample sample) const
get Raw Energy (no calibration) per sampling layer
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:106
TrigCaloCluster::TrigCaloCluster
TrigCaloCluster(float energy=0.0, float eta=-10.0, float phi=-10.0, long roi_word=0)
Constructor, please note the default values
Definition: TrigCaloCluster.cxx:27
TrigCaloCluster::quality
unsigned int quality() const
get quality of cluster built (to be defined)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:121
TrigCaloCluster
Base Cluster Class.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:39
TrigCaloCluster::setRawEnergies
void setRawEnergies(ITERATOR beg, ITERATOR end)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:60
operator!=
bool operator!=(const TrigCaloCluster &a, const TrigCaloCluster &b)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:152
TrigCaloCluster::~TrigCaloCluster
~TrigCaloCluster()
Destructor
Definition: TrigCaloCluster.cxx:39
TrigCaloCluster::rawEta
float rawEta() const
get Raw Eta (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:109
TrigCaloCluster::print
void print(void) const
Prints out cluster variables to std::cout
Definition: TrigCaloCluster.cxx:57
TrigCaloCluster::m_rawEnergy
float m_rawEnergy
Raw Energy (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:122
TrigCaloCluster::m_roiWord
long m_roiWord
RoI Word.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:138
TrigCaloCluster::setRawPhi
void setRawPhi(float phi)
set Raw Phi (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:78
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
TrigCaloCluster::setRawEta
void setRawEta(float eta)
set Raw Eta (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:75
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigCaloCluster::rawEnergies
void rawEnergies(ITERATOR beg, ITERATOR end) const
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:95
operator<<
MsgStream & operator<<(MsgStream &m, const TrigCaloCluster &d)
Definition: TrigCaloCluster.cxx:111
a
TList * a
Definition: liststreamerinfos.cxx:10
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CxxUtils::copy_bounded
auto copy_bounded(const InputRange &input, OutputRange &output) -> decltype(std::begin(output))
Copy a range with bounds restriction.
Definition: copy_bounded.h:102
operator==
bool operator==(const TrigCaloCluster &a, const TrigCaloCluster &b)
Definition: TrigCaloCluster.cxx:117
TrigCaloCluster::m_rawEta
float m_rawEta
Raw Eta (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:134
CLASS_DEF.h
macros to associate a CLID to a type
TrigCaloCluster::rawEnergy
float rawEnergy() const
get Raw Energy (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:92
TrigCaloCluster::rawEt
float rawEt() const
get Raw Et (no calibration)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:103