CMS 3D CMS Logo

L1GctInternJetData.h
Go to the documentation of this file.
1 #ifndef L1GCTINTERNJETDATA_H
2 #define L1GCTINTERNJETDATA_H
3 
4 #include <string>
5 
7 
13 
14 
16 
17  public:
18 
20 
21 public:
22 
25 
28  uint16_t capBlock,
29  uint16_t capIndex,
30  int16_t bx,
31  uint8_t sgnEta,
32  uint8_t oflow,
33  uint16_t et,
34  uint8_t eta,
35  uint8_t phi,
36  uint8_t tauVeto,
37  uint8_t rank);
38 
39  // 'named' constructors to avoid confusion
40 
41  // emulator calibrated jet ctor
43  int16_t bx,
44  uint16_t et,
45  bool overFlow,
46  bool tauVeto,
47  uint8_t eta,
48  uint8_t phi,
49  uint16_t rank);
50 
53  uint16_t capBlock,
54  uint16_t capIndex,
55  int16_t bx,
56  uint32_t data);
57 
60  uint16_t capBlock,
61  uint16_t capIndex,
62  int16_t bx,
63  uint32_t data);
64 
67  uint16_t capBlock,
68  uint16_t capIndex,
69  int16_t bx,
70  uint32_t data);
71 
74  uint16_t capBlock,
75  uint16_t capIndex,
76  int16_t bx,
77  uint32_t data);
78 
79 
81  virtual ~L1GctInternJetData();
82 
83 
84  // getters
85 
88 
90  L1CaloRegionDetId regionId() const { return regionId_; }
91 
93  bool empty() const { return (data_ == 0); }
94 
96  uint16_t capBlock() const { return capBlock_; }
97 
99  uint16_t capIndex() const { return capIndex_; }
100 
102  int16_t bx() const { return bx_; }
103 
105  uint32_t raw() const { return data_; }
106 
108  uint16_t rank() const { return data_ & 0x3f; }
109 
111  uint16_t tauVeto() const { return (data_>>6) & 0x1; }
112 
114  uint16_t phi() const { return (data_>>7) & 0x1f; }
115 
117  uint16_t eta() const { return (data_>>12) & 0xf; }
118 
120  uint16_t et() const { return (data_>>16) & 0xfff; }
121 
123  uint16_t oflow() const { return (data_>>28) & 0x1; }
124 
126  uint16_t sgnEta() const { return (data_>>29) & 0x1; }
127 
128 
129  // setters
130 
133 
135  void setCapBlock(uint16_t capBlock) { capBlock_ = capBlock; }
136 
138  void setCapIndex(uint16_t capIndex) { capIndex_ = capIndex; }
139 
141  void setBx(uint16_t bx) { bx_ = bx; }
142 
145 
147  void setRawData(uint32_t data) { data_ = data; }
148 
150  void setData(uint8_t sgnEta,
151  uint8_t oflow,
152  uint16_t et,
153  uint8_t eta,
154  uint8_t phi,
155  uint8_t tauVeto,
156  uint8_t rank);
157 
158 
159  // operators
160 
162  bool operator==(const L1GctInternJetData& c) const;
163 
165  bool operator!=(const L1GctInternJetData& c) const { return !(*this == c); }
166 
167 
168  private:
169 
170  // location in calorimeter (optionally set by unpacker)
172 
173  // source of the data
174  uint16_t capBlock_;
175  uint16_t capIndex_;
176  int16_t bx_;
177 
178  // type of data
180 
181  // the captured data
182  uint32_t data_;
183 
184  };
185 
186 std::ostream& operator<<(std::ostream& s, const L1GctInternJetData& cand);
187 
188 #endif
type
Definition: HCALResponse.h:21
static L1GctInternJetData fromJetPreCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "jet_precluster"
L1GctInternJetData()
default constructor (for vector initialisation etc.)
void setCapBlock(uint16_t capBlock)
set cap block
uint16_t rank() const
get rank bits
bool operator==(const L1GctInternJetData &c) const
equality operator
void setType(L1GctInternJetType type)
set type
uint16_t tauVeto() const
get tau veto
L1 GCT internal jet candidate.
void setRawData(uint32_t data)
set data
static L1GctInternJetData fromJetClusterMinimal(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "jet_cluster_minimal"
uint16_t capIndex() const
get index within capture block
void setCapIndex(uint16_t capIndex)
set cap index
uint16_t eta() const
get eta
std::ostream & operator<<(std::ostream &s, const L1GctInternJetData &cand)
pretty print
uint16_t oflow() const
get oflow
L1CaloRegionDetId regionId_
bool empty() const
was an object really found?
void setRegionId(L1CaloRegionDetId rgn)
set region
L1GctInternJetType type_
static L1GctInternJetData fromEmulator(L1CaloRegionDetId rgn, int16_t bx, uint16_t et, bool overFlow, bool tauVeto, uint8_t eta, uint8_t phi, uint16_t rank)
virtual ~L1GctInternJetData()
destructor (virtual to prevent compiler warnings)
int16_t bx() const
get BX number
void setBx(uint16_t bx)
set bx
static L1GctInternJetData fromJetCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "jet_cluster"
uint32_t raw() const
get the raw data
uint16_t et() const
get et
static L1GctInternJetData fromGctTrigObject(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "gct_trig_object"
bool operator!=(const L1GctInternJetData &c) const
inequality operator
uint16_t phi() const
get phi
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
L1CaloRegionDetId regionId() const
region associated with the candidate
uint16_t sgnEta() const
get sign of eta
L1GctInternJetData::L1GctInternJetType type() const
&#39;type&#39; of object
uint16_t capBlock() const
get capture block
void setData(uint8_t sgnEta, uint8_t oflow, uint16_t et, uint8_t eta, uint8_t phi, uint8_t tauVeto, uint8_t rank)
construct data word from components