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

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

Definition at line 11 of file HcalFinegrainBit.h.

Constructor & Destructor Documentation

HcalFinegrainBit::HcalFinegrainBit ( int  version)
inline

Definition at line 13 of file HcalFinegrainBit.h.

References compute().

Member Function Documentation

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

Definition at line 6 of file HcalFinegrainBit.cc.

References KineDebug3::count(), is_above_mip, is_mip, mps_fire::result, and version_.

Referenced by HcalTriggerPrimitiveAlgo::analyze2017(), and HcalFinegrainBit().

7 {
8  if (version_ == 0) {
9  // Currently assumes that the bits that are set are mutually
10  // exclusive!
11  assert((tower[is_mip] & tower[is_above_mip]).count() == 0);
12 
13  std::bitset<4> result;
14 
15  // First layer consistent with a MIP
16  result[0] = tower[is_mip][0];
17 
18  // First layer consistent with a MIP, at least one layer with more
19  // than MIP energy deposition
20  result[1] = result[0] & (tower[is_above_mip].count() > 0);
21 
22  // There layers consistent with a MIP
23  result[2] = tower[is_mip].count() >= 3;
24 
25  // Unset
26  result[3] = false;
27 
28  return result;
29  }
30  return 0;
31 }
const int is_above_mip

Member Data Documentation

const int HcalFinegrainBit::is_above_mip = 1
private

Definition at line 19 of file HcalFinegrainBit.h.

Referenced by compute().

const int HcalFinegrainBit::is_mip = 0
private

Definition at line 18 of file HcalFinegrainBit.h.

Referenced by compute().

int HcalFinegrainBit::version_
private

Definition at line 21 of file HcalFinegrainBit.h.

Referenced by compute().