CMS 3D CMS Logo

L1GctInternJetData.cc
Go to the documentation of this file.
2 
3 L1GctInternJetData::L1GctInternJetData() : capBlock_(0), capIndex_(0), bx_(0), type_(null), data_(0) {}
4 
7  uint16_t capBlock,
8  uint16_t capIndex,
9  int16_t bx,
10  uint8_t sgnEta,
11  uint8_t oflow,
12  uint16_t et,
13  uint8_t eta,
14  uint8_t phi,
15  uint8_t tauVeto,
16  uint8_t rank)
17  : regionId_(rgn), capBlock_(capBlock), capIndex_(capIndex), bx_(bx), type_(null), data_(0) {
19 }
20 
21 // 'named' constructors to avoid confusion
22 
23 // emulator calibrated jet ctor
25  L1CaloRegionDetId rgn, int16_t bx, uint16_t et, bool oflow, bool tauVeto, uint8_t eta, uint8_t phi, uint16_t rank) {
27 
28  d.setType(emulator);
29  d.setRegionId(rgn);
30  d.setData(0, (oflow ? 1 : 0), et, eta, phi, (tauVeto ? 1 : 0), rank);
31  d.setBx(bx);
32 
33  return d;
34 }
35 
38  L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) {
40 
41  d.setRegionId(rgn);
42  d.setCapBlock(capBlock);
43  d.setCapIndex(capIndex);
44  d.setBx(bx);
45  d.setType(jet_cluster);
46  d.setRawData(data & 0x1fffffff);
47 
48  return d;
49 }
50 
53  L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) {
55 
56  d.setRegionId(rgn);
57  d.setCapBlock(capBlock);
58  d.setCapIndex(capIndex);
59  d.setBx(bx);
60  d.setType(jet_precluster);
61  d.setData(0, (data >> 10) & 0x1, data & 0x3ff, (data >> 12) & 0xf, 0, (data >> 11) & 0x1, 0);
62 
63  return d;
64 }
65 
68  L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) {
70 
71  d.setRegionId(rgn);
72  d.setCapBlock(capBlock);
73  d.setCapIndex(capIndex);
74  d.setBx(bx);
75  d.setType(jet_cluster_minimal);
76  d.setData(0, (data >> 10) & 0x1, 0, (data >> 6) & 0xf, (data >> 12) & 0x1, (data >> 11) & 0x1, data & 0x3f);
77 
78  return d;
79 }
80 
83  L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) {
85 
86  d.setRegionId(rgn);
87  d.setCapBlock(capBlock);
88  d.setCapIndex(capIndex);
89  d.setBx(bx);
90  d.setType(gct_trig_object);
91  d.setData((data >> 10) & 0x1, 0, 0, (data >> 6) & 0xf, (data >> 11) & 0x1f, 0, data & 0x3f);
92 
93  return d;
94 }
95 
98 
101  uint8_t sgnEta, uint8_t oflow, uint16_t et, uint8_t eta, uint8_t phi, uint8_t tauVeto, uint8_t rank) {
102  data_ = 0;
103  data_ = rank & 0x3f;
104  data_ |= (tauVeto & 0x1) << 6;
105  data_ |= (phi & 0x1f) << 7;
106  data_ |= (eta & 0xf) << 12;
107  data_ |= (et & 0xfff) << 16;
108  data_ |= (oflow & 0x1) << 28;
109  data_ |= (sgnEta & 0x1) << 29;
110 }
111 
113 
116  return (type_ == c.type() && data_ == c.raw() && regionId_ == c.regionId() && bx_ == c.bx());
117 }
118 
120 std::ostream& operator<<(std::ostream& s, const L1GctInternJetData& c) {
121  s << "L1GctInternJetData :";
122  if (c.empty()) {
123  s << " empty!";
124  }
125  if (c.type() == L1GctInternJetData::jet_cluster) {
126  s << " type=jet_cluster";
127  s << " oflow=" << c.oflow();
128  s << " et=" << c.et();
129  s << " eta=" << c.eta();
130  s << " phi=" << c.phi();
131  s << " tauVeto=" << c.tauVeto();
132  s << " rank=" << c.rank();
133  } else if (c.type() == L1GctInternJetData::jet_precluster) {
134  s << " type=jet_precluster";
135  s << " oflow=" << c.oflow();
136  s << " et=" << c.et();
137  s << " eta=" << c.eta();
138  s << " tauVeto=" << c.tauVeto();
139  } else if (c.type() == L1GctInternJetData::jet_cluster_minimal) {
140  s << " type=jet_cluster_minimal";
141  s << " oflow=" << c.oflow();
142  s << " eta=" << c.eta();
143  s << " phi=" << c.phi();
144  s << " tauVeto=" << c.tauVeto();
145  s << " rank=" << c.rank();
146  } else if (c.type() == L1GctInternJetData::gct_trig_object) {
147  s << " type=gct_trig_object";
148  s << " eta=" << c.eta();
149  s << " phi=" << c.phi();
150  s << " rank=" << c.rank();
151  }
152  s << " cap block=" << std::hex << c.capBlock();
153  s << " index=" << std::dec << c.capIndex();
154  s << " BX=" << c.bx();
155 
156  return s;
157 }
L1GctInternJetData::fromJetClusterMinimal
static L1GctInternJetData fromJetClusterMinimal(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "jet_cluster_minimal"
Definition: L1GctInternJetData.cc:67
L1GctInternJetData::jet_precluster
Definition: L1GctInternJetData.h:16
L1GctInternJetData::jet_cluster
Definition: L1GctInternJetData.h:16
L1GctInternJetData::sgnEta
uint16_t sgnEta() const
get sign of eta
Definition: L1GctInternJetData.h:108
L1GctInternJetData::eta
uint16_t eta() const
get eta
Definition: L1GctInternJetData.h:99
L1GctInternJetData::setData
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
Definition: L1GctInternJetData.cc:100
L1GctInternJetData::bx_
int16_t bx_
Definition: L1GctInternJetData.h:148
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1GctInternJetData::L1GctInternJetData
L1GctInternJetData()
default constructor (for vector initialisation etc.)
Definition: L1GctInternJetData.cc:3
L1GctInternJetData::fromJetPreCluster
static L1GctInternJetData fromJetPreCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "jet_precluster"
Definition: L1GctInternJetData.cc:52
L1GctInternJetData::et
uint16_t et() const
get et
Definition: L1GctInternJetData.h:102
L1GctInternJetData::gct_trig_object
Definition: L1GctInternJetData.h:16
L1GctInternJetData::fromEmulator
static L1GctInternJetData fromEmulator(L1CaloRegionDetId rgn, int16_t bx, uint16_t et, bool overFlow, bool tauVeto, uint8_t eta, uint8_t phi, uint16_t rank)
Definition: L1GctInternJetData.cc:24
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GctInternJetData::fromGctTrigObject
static L1GctInternJetData fromGctTrigObject(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "gct_trig_object"
Definition: L1GctInternJetData.cc:82
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
L1GctInternJetData::fromJetCluster
static L1GctInternJetData fromJetCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from "jet_cluster"
Definition: L1GctInternJetData.cc:37
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1GctInternJetData::~L1GctInternJetData
virtual ~L1GctInternJetData()
destructor (virtual to prevent compiler warnings)
Definition: L1GctInternJetData.cc:97
L1GctInternJetData::phi
uint16_t phi() const
get phi
Definition: L1GctInternJetData.h:96
L1GctInternJetData::bx
int16_t bx() const
get BX number
Definition: L1GctInternJetData.h:84
L1GctInternJetData::emulator
Definition: L1GctInternJetData.h:16
L1GctInternJetData.h
PVValHelper::phi
Definition: PVValidationHelpers.h:68
L1GctInternJetData::capIndex
uint16_t capIndex() const
get index within capture block
Definition: L1GctInternJetData.h:81
L1GctInternJetData::jet_cluster_minimal
Definition: L1GctInternJetData.h:16
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1GctInternJetData::regionId_
L1CaloRegionDetId regionId_
Definition: L1GctInternJetData.h:143
L1GctInternJetData::capBlock
uint16_t capBlock() const
get capture block
Definition: L1GctInternJetData.h:78
L1GctInternJetData::rank
uint16_t rank() const
get rank bits
Definition: L1GctInternJetData.h:90
L1GctInternJetData::oflow
uint16_t oflow() const
get oflow
Definition: L1GctInternJetData.h:105
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ztail.d
d
Definition: ztail.py:151
operator<<
std::ostream & operator<<(std::ostream &s, const L1GctInternJetData &c)
pretty print
Definition: L1GctInternJetData.cc:120
L1GctInternJetData::operator==
bool operator==(const L1GctInternJetData &c) const
equality operator
Definition: L1GctInternJetData.cc:115
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
L1GctInternJetData::type_
L1GctInternJetType type_
Definition: L1GctInternJetData.h:151
L1GctInternJetData::tauVeto
uint16_t tauVeto() const
get tau veto
Definition: L1GctInternJetData.h:93
L1GctInternJetData::data_
uint32_t data_
Definition: L1GctInternJetData.h:154
L1GctInternJetData
L1 GCT internal jet candidate.
Definition: L1GctInternJetData.h:14