CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HcalFinegrainBit Class Reference

#include <HcalFinegrainBit.h>

Public Types

typedef std::array< std::bitset< 6 >, 2 > Tower
 

Public Member Functions

std::bitset< 4 > compute (const Tower &) const
 
 HcalFinegrainBit (int version)
 

Private Attributes

const int is_above_mip = 1
 
const int is_mip = 0
 
int version_
 

Detailed Description

Definition at line 7 of file HcalFinegrainBit.h.

Member Typedef Documentation

◆ Tower

typedef std::array<std::bitset<6>, 2> HcalFinegrainBit::Tower

Definition at line 11 of file HcalFinegrainBit.h.

Constructor & Destructor Documentation

◆ HcalFinegrainBit()

HcalFinegrainBit::HcalFinegrainBit ( int  version)
inline

Definition at line 13 of file HcalFinegrainBit.h.

13 : version_(version){};

Member Function Documentation

◆ compute()

std::bitset< 4 > HcalFinegrainBit::compute ( const Tower tower) const

Definition at line 5 of file HcalFinegrainBit.cc.

5  {
6  if (version_ == 0) {
7  std::bitset<4> result;
8 
9  // First layer consistent with a MIP
10  result[0] = tower[is_mip][0];
11 
12  // First layer consistent with a MIP, at least one layer with more
13  // than MIP energy deposition
14  result[1] = result[0] & (tower[is_above_mip].count() > 0);
15 
16  // There layers consistent with a MIP
17  result[2] = tower[is_mip].count() >= 3;
18 
19  // Unset
20  result[3] = false;
21 
22  return result;
23  }
24  if (version_ == 1) {
25  std::bitset<4> result;
26 
27  // All algorithms the same for testing purposes
28  result[0] = result[1] = result[2] = result[3] = tower[is_mip][0];
29 
30  return result;
31  }
32  if (version_ == 2) {
33  std::bitset<4> result;
34 
35  // All algorithms the same for testing purposes
36  result[0] = result[1] = result[2] = result[3] = true;
37 
38  return result;
39  }
40  return 0;
41 }

References is_above_mip, is_mip, mps_fire::result, hgcalTowerProducer_cfi::tower, and version_.

Referenced by HcalTriggerPrimitiveAlgo::analyzeQIE11().

Member Data Documentation

◆ is_above_mip

const int HcalFinegrainBit::is_above_mip = 1
private

Definition at line 20 of file HcalFinegrainBit.h.

Referenced by compute().

◆ is_mip

const int HcalFinegrainBit::is_mip = 0
private

Definition at line 19 of file HcalFinegrainBit.h.

Referenced by compute().

◆ version_

int HcalFinegrainBit::version_
private

Definition at line 22 of file HcalFinegrainBit.h.

Referenced by compute().

HcalFinegrainBit::version_
int version_
Definition: HcalFinegrainBit.h:22
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
HcalFinegrainBit::is_mip
const int is_mip
Definition: HcalFinegrainBit.h:19
HcalFinegrainBit::is_above_mip
const int is_above_mip
Definition: HcalFinegrainBit.h:20
mps_fire.result
result
Definition: mps_fire.py:311
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45