Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 //***************************************************************************
5 
6  #ifndef CMXCPHits_H
7  #define CMXCPHits_H
8 
9  #include "AthenaKernel/CLASS_DEF.h"
10 
11 
12  #ifndef TRIGGERSPACE
14  #else
15  #include "Coordinate.h"
16  #endif
17  namespace LVL1 {
18 
23  class CMXCPHits {
24  public:
25 
29 
31  CMXCPHits() = default;
32  CMXCPHits(int crate, int cmx, int source);
33  CMXCPHits(int crate, int cmx, int source,
34  const std::vector<unsigned int>& hits0,
35  const std::vector<unsigned int>& hits1,
36  const std::vector<int>& error0,
37  const std::vector<int>& error1,
38  int peak);
39 
40 
42  void setPeak(int peak);
44  void addHits(const std::vector<unsigned int>& hits0,
45  const std::vector<unsigned int>& hits1,
46  const std::vector<int>& error0,
47  const std::vector<int>& error1);
48 
50  int crate() const;
51  int cmx() const;
52  int source() const;
54  unsigned int hits0() const;
55  unsigned int hits1() const;
56  int error0() const;
57  int error1() const;
59  const std::vector<unsigned int>& hitsVec0() const;
60  const std::vector<unsigned int>& hitsVec1() const;
61  const std::vector<int>& errorVec0() const;
62  const std::vector<int>& errorVec1() const;
63  int peak() const;
64 
66  private:
67  int m_crate{};
68  int m_cmx{}; // <<== Do we need firmware as well?
69  int m_source{};
70  int m_peak{};
71  std::vector<unsigned int> m_hits0{0};
72  std::vector<unsigned int> m_hits1{0};
73  std::vector<int> m_error0{0};
74  std::vector<int> m_error1{0};
75 
76  };
77 
79  inline int CMXCPHits::crate() const{
80  return m_crate;
81  }
82  // <<== CHECK Might have two firmware types
84  inline int CMXCPHits::cmx() const{
85  return m_cmx;
86  }
87 
89  inline int CMXCPHits::source() const{
90  return m_source;
91  }
92 
94  inline unsigned int CMXCPHits::hits0() const{
95  return m_hits0[m_peak];
96  }
97 
99  inline unsigned int CMXCPHits::hits1() const{
100  return m_hits1[m_peak];
101  }
102 
104  inline int CMXCPHits::error0() const{
105  return m_error0[m_peak];
106  }
107 
109  inline int CMXCPHits::error1() const{
110  return m_error1[m_peak];
111  }
112 
114  inline const std::vector<unsigned int>& CMXCPHits::hitsVec0() const{
115  return m_hits0;
116  }
117 
119  inline const std::vector<unsigned int>& CMXCPHits::hitsVec1() const{
120  return m_hits1;
121  }
122 
124  inline const std::vector<int>& CMXCPHits::errorVec0() const{
125  return m_error0;
126  }
127 
129  inline const std::vector<int>& CMXCPHits::errorVec1() const{
130  return m_error1;
131  }
132 
134  inline void CMXCPHits::addHits(const std::vector<unsigned int>& hits0,
135  const std::vector<unsigned int>& hits1,
136  const std::vector<int>& error0,
137  const std::vector<int>& error1) {
138  m_hits0 = hits0;
139  m_hits1 = hits1;
140  m_error0 = error0;
141  m_error1 = error1;
142  }
143 
145  inline void CMXCPHits::setPeak(int peak) {
146  m_peak = peak;
147  }
148 
150  inline int CMXCPHits::peak() const{
151  return m_peak;
152  }
153 
154 } // end of namespace
155 
156 #ifndef CMXCPHits_ClassDEF_H
158 #endif
159 
160 #endif
LVL1::CMXCPHits::setPeak
void setPeak(int peak)
For multi-slice readout, need to indicate position of triggered BC.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:145
LVL1::CMXCPHits::m_crate
int m_crate
Internal data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:67
LVL1::CMXCPHits::hitsVec0
const std::vector< unsigned int > & hitsVec0() const
For multi-slice readout.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:114
LVL1::CMXCPHits::m_hits1
std::vector< unsigned int > m_hits1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:72
LVL1::CMXCPHits::m_hits0
std::vector< unsigned int > m_hits0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:71
LVL1::CMXCPHits::cmx
int cmx() const
returns CMX number (0/1)==(Left/Right)==(Tau/Em?)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:84
LVL1::CMXCPHits::m_error1
std::vector< int > m_error1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:74
LVL1::CMXCPHits::REMOTE_1
@ REMOTE_1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:26
LVL1::CMXCPHits::LOCAL
@ LOCAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:26
LVL1::CMXCPHits
Summary of CP (EM/tau) hits produced by the merger modules.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:23
LVL1::CMXCPHits::hits1
unsigned int hits1() const
returns hits1 for peak sample
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:99
LVL1::CMXCPHits::CMXCPHits
CMXCPHits()=default
Constructors.
LVL1::CMXCPHits::errorVec1
const std::vector< int > & errorVec1() const
returns error1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:129
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CMXCPHits::m_cmx
int m_cmx
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:68
LVL1::CMXCPHits::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:27
LVL1::CMXCPHits::Sources
Sources
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:26
LVL1::CMXCPHits::m_error0
std::vector< int > m_error0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:73
LVL1::CMXCPHits::addHits
void addHits(const std::vector< unsigned int > &hits0, const std::vector< unsigned int > &hits1, const std::vector< int > &error0, const std::vector< int > &error1)
Add data to existing object.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:134
LVL1::CMXCPHits::REMOTE_2
@ REMOTE_2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:26
LVL1::CMXCPHits::TOPO_OCCUPANCY_MAP
@ TOPO_OCCUPANCY_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:27
LVL1::CMXCPHits::REMOTE_0
@ REMOTE_0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:26
Coordinate.h
Coordinate policies.
LVL1::CMXCPHits::error1
int error1() const
returns error1 for peak sample
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:109
LVL1::CMXCPHits::source
int source() const
returns source of data
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:89
LVL1::CMXCPHits::hits0
unsigned int hits0() const
For triggered time slice.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:94
Coordinate.h
LVL1::CMXCPHits::peak
int peak() const
returns peak slice number
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:150
CMXCPHits_ClassDEF.h
LVL1::CMXCPHits::hitsVec1
const std::vector< unsigned int > & hitsVec1() const
returns hits1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:119
LVL1::CMXCPHits::TOPO_CHECKSUM
@ TOPO_CHECKSUM
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:27
LVL1::CMXCPHits::error0
int error0() const
returns error0 for peak sample
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:104
LVL1::CMXCPHits::crate
int crate() const
Data accessors.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:79
LVL1::CMXCPHits::errorVec0
const std::vector< int > & errorVec0() const
returns error0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:124
LVL1::CMXCPHits::m_source
int m_source
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:69
LVL1::CMXCPHits::m_peak
int m_peak
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:70
LVL1::CMXCPHits::TOTAL
@ TOTAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:26
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::CMXCPHits::MAXSOURCE
@ MAXSOURCE
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:28