ATLAS Offline Software
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 //***************************************************************************
5 
6  #ifndef CMXJetHits_H
7  #define CMXJetHits_H
8 
9  #include "AthenaKernel/CLASS_DEF.h"
10 
11 
12  #include <iostream>
13  #ifndef TRIGGERSPACE
15  #else
16  #include "Coordinate.h"
17  #endif
18  namespace LVL1 {
19 
24  class CMXJetHits {
25  public:
26 
27  enum Sources {
37  MAX_SOURCE = 15
38  };
39 
41  CMXJetHits();
42  CMXJetHits(int crate, int source);
43  CMXJetHits(int crate, int source,
44  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  int peak);
49 
50  virtual ~CMXJetHits();
51 
53  void setPeak(int peak);
55  void addHits(const std::vector<unsigned int>& hits0,
56  const std::vector<unsigned int>& hits1,
57  const std::vector<int>& error0,
58  const std::vector<int>& error1);
59 
61  int crate() const;
62  int source() const;
64  unsigned int hits0() const;
65  unsigned int hits1() const;
66  int error0() const;
67  int error1() const;
69  const std::vector<unsigned int>& hitsVec0() const;
70  const std::vector<unsigned int>& hitsVec1() const;
71  const std::vector<int>& errorVec0() const;
72  const std::vector<int>& errorVec1() const;
73  int peak() const;
74 
76  private:
77  int m_crate;
78  int m_source;
79  int m_peak;
80  std::vector<unsigned int> m_hits0;
81  std::vector<unsigned int> m_hits1;
82  std::vector<int> m_error0;
83  std::vector<int> m_error1;
84 
85  };
86 
88  inline int CMXJetHits::crate() const{
89  return m_crate;
90  }
91 
93  inline int CMXJetHits::source() const{
94  return m_source;
95  }
96 
98  inline unsigned int CMXJetHits::hits0() const{
99  return m_peak < (int)m_hits0.size()? m_hits0[m_peak]: 0;
100  }
101 
103  inline unsigned int CMXJetHits::hits1() const{
104  return m_peak < (int)m_hits1.size()? m_hits1[m_peak]: 0;
105  }
106 
108  inline int CMXJetHits::error0() const{
109  return m_peak < (int)m_error0.size()? m_error0[m_peak]: 0;
110  }
111 
113  inline int CMXJetHits::error1() const{
114  return m_peak < (int)m_error1.size()? m_error1[m_peak]: 0;
115  }
116 
118  inline const std::vector<unsigned int>& CMXJetHits::hitsVec0() const{
119  return m_hits0;
120  }
121 
123  inline const std::vector<unsigned int>& CMXJetHits::hitsVec1() const{
124  return m_hits1;
125  }
126 
128  inline const std::vector<int>& CMXJetHits::errorVec0() const{
129  return m_error0;
130  }
131 
133  inline const std::vector<int>& CMXJetHits::errorVec1() const{
134  return m_error1;
135  }
136 
138  inline void CMXJetHits::addHits(const std::vector<unsigned int>& hits0,
139  const std::vector<unsigned int>& hits1,
140  const std::vector<int>& error0,
141  const std::vector<int>& error1) {
142  m_hits0 = hits0;
143  m_hits1 = hits1;
144  m_error0 = error0;
145  m_error1 = error1;
146  }
147 
149  inline void CMXJetHits::setPeak(int peak) {
150  m_peak = peak;
151  }
152 
154  inline int CMXJetHits::peak() const{
155  return m_peak;
156  }
157 
158 } // end of namespace
159 
160 #ifndef CMXJetHits_ClassDEF_H
162 #endif
163 
164 #endif
LVL1::CMXJetHits::REMOTE_MAIN
@ REMOTE_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:28
LVL1::CMXJetHits::LOCAL_FORWARD
@ LOCAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:32
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LVL1::CMXJetHits::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:33
LVL1::CMXJetHits::m_peak
int m_peak
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:79
LVL1::CMXJetHits::TOTAL_MAIN
@ TOTAL_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:30
LVL1::CMXJetHits::hits1
unsigned int hits1() const
returns hits1 for peak sample
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:103
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CMXJetHits::hitsVec1
const std::vector< unsigned int > & hitsVec1() const
returns hits1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:123
LVL1::CMXJetHits::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:31
LVL1::CMXJetHits::error1
int error1() const
returns error1 for peak sample
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:113
CMXJetHits_ClassDEF.h
LVL1::CMXJetHits::hitsVec0
const std::vector< unsigned int > & hitsVec0() const
For multi-slice readout.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:118
LVL1::CMXJetHits::peak
int peak() const
returns peak slice number
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:154
LVL1::CMXJetHits::m_error0
std::vector< int > m_error0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:82
LVL1::CMXJetHits::MAX_SOURCE
@ MAX_SOURCE
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:37
LVL1::CMXJetHits::Sources
Sources
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:27
LVL1::CMXJetHits::setPeak
void setPeak(int peak)
For multi-slice readout, need to indicate position of triggered BC.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:149
LVL1::CMXJetHits::m_hits1
std::vector< unsigned int > m_hits1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:81
LVL1::CMXJetHits::m_source
int m_source
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:78
LVL1::CMXJetHits::m_crate
int m_crate
Internal data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:77
LVL1::CMXJetHits::errorVec1
const std::vector< int > & errorVec1() const
returns error1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:133
Coordinate.h
Coordinate policies.
LVL1::CMXJetHits::source
int source() const
returns source of data
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:93
LVL1::CMXJetHits::errorVec0
const std::vector< int > & errorVec0() const
returns error0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:128
Coordinate.h
LVL1::CMXJetHits::error0
int error0() const
returns error0 for peak sample
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:108
LVL1::CMXJetHits::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/CMXJetHits.h:138
LVL1::CMXJetHits::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:36
LVL1::CMXJetHits::~CMXJetHits
virtual ~CMXJetHits()
Definition: CMXJetHits.cxx:27
LVL1::CMXJetHits::m_hits0
std::vector< unsigned int > m_hits0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:80
LVL1::CMXJetHits::TOPO_OCCUPANCY_MAP
@ TOPO_OCCUPANCY_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:35
LVL1::CMXJetHits::hits0
unsigned int hits0() const
For triggered time slice.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:98
LVL1::CMXJetHits::m_error1
std::vector< int > m_error1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:83
LVL1::CMXJetHits::LOCAL_MAIN
@ LOCAL_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:29
LVL1::CMXJetHits::crate
int crate() const
Data accessors.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:88
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::CMXJetHits::TOPO_CHECKSUM
@ TOPO_CHECKSUM
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:34
LVL1::CMXJetHits
Summary of JEP (Jet) hits produced by the merger modules.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:24
LVL1::CMXJetHits::CMXJetHits
CMXJetHits()
Constructors.
Definition: CMXJetHits.cxx:16