CMS 3D CMS Logo

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

#include <HFPreRecHit.h>

Public Types

typedef HcalDetId key_type
 

Public Member Functions

constexpr float charge () const
 
std::pair< float, bool > chargeAsymmetry (float chargeThreshold) const
 
constexpr float energy () const
 
std::pair< float, bool > energyAsymmetry (float energyThreshold) const
 
constexpr HFQIE10Info const * getHFQIE10Info (unsigned index) const
 
constexpr HFPreRecHit ()
 
constexpr HFPreRecHit (const HcalDetId &id, const HFQIE10Info *first, const HFQIE10Info *second)
 
constexpr HcalDetId id () const
 

Private Attributes

bool hasInfo_ [2]
 
HFQIE10Info hfQIE10Info_ [2]
 
HcalDetId id_
 

Detailed Description

Class to contain the info needed to perform HF reconstruction using QIE10 chips and dual-anode readout. Groups the information provided by a single PMT.

Definition at line 14 of file HFPreRecHit.h.

Member Typedef Documentation

◆ key_type

Definition at line 16 of file HFPreRecHit.h.

Constructor & Destructor Documentation

◆ HFPreRecHit() [1/2]

constexpr HFPreRecHit::HFPreRecHit ( )
inlineconstexpr

Definition at line 18 of file HFPreRecHit.h.

18 : hasInfo_{false, false} {}

◆ HFPreRecHit() [2/2]

constexpr HFPreRecHit::HFPreRecHit ( const HcalDetId id,
const HFQIE10Info first,
const HFQIE10Info second 
)
inlineconstexpr

Definition at line 22 of file HFPreRecHit.h.

23  : id_(id), hasInfo_{false, false} {
24  if (first) {
25  hfQIE10Info_[0] = *first;
26  hasInfo_[0] = true;
27  }
28  if (second) {
29  hfQIE10Info_[1] = *second;
30  hasInfo_[1] = true;
31  }
32  }

Member Function Documentation

◆ charge()

constexpr float HFPreRecHit::charge ( ) const
inlineconstexpr

Definition at line 47 of file HFPreRecHit.h.

47  {
48  float q = 0.f;
49  for (unsigned i = 0; i < 2; ++i)
50  if (hasInfo_[i])
51  q += hfQIE10Info_[i].charge();
52  return q;
53  }

References HFQIE10Info::charge(), hasInfo_, hfQIE10Info_, mps_fire::i, and data-class-funcs::q.

Referenced by HFFlexibleTimeCheck::reconstruct().

◆ chargeAsymmetry()

std::pair< float, bool > HFPreRecHit::chargeAsymmetry ( float  chargeThreshold) const

Definition at line 3 of file HFPreRecHit.cc.

3  {
4  std::pair<float, bool> result(0.f, false);
5  if (hasInfo_[0] && hasInfo_[1]) {
6  const float q0 = hfQIE10Info_[0].charge();
7  const float q1 = hfQIE10Info_[1].charge();
8  const float qsum = q0 + q1;
9  if (qsum > 0.f && qsum >= chargeThreshold) {
10  result.first = (q1 - q0) / qsum;
11  result.second = true;
12  }
13  }
14  return result;
15 }

References HFQIE10Info::charge(), f, hasInfo_, hfQIE10Info_, SiStripMonitorCluster_cfi::q0, q1, and mps_fire::result.

Referenced by HFFlexibleTimeCheck::reconstruct().

◆ energy()

constexpr float HFPreRecHit::energy ( ) const
inlineconstexpr

Definition at line 54 of file HFPreRecHit.h.

54  {
55  float e = 0.f;
56  for (unsigned i = 0; i < 2; ++i)
57  if (hasInfo_[i])
58  e += hfQIE10Info_[i].energy();
59  return e;
60  }

References MillePedeFileConverter_cfg::e, HFQIE10Info::energy(), hasInfo_, hfQIE10Info_, and mps_fire::i.

Referenced by Jet.Jet::rawEnergy().

◆ energyAsymmetry()

std::pair< float, bool > HFPreRecHit::energyAsymmetry ( float  energyThreshold) const

Definition at line 17 of file HFPreRecHit.cc.

17  {
18  std::pair<float, bool> result(0.f, false);
19  if (hasInfo_[0] && hasInfo_[1]) {
20  const float e0 = hfQIE10Info_[0].energy();
21  const float e1 = hfQIE10Info_[1].energy();
22  const float esum = e0 + e1;
23  if (esum > 0.f && esum >= energyThreshold) {
24  result.first = (e1 - e0) / esum;
25  result.second = true;
26  }
27  }
28  return result;
29 }

References StorageManager_cfg::e1, HFQIE10Info::energy(), ClusterTask_cfi::energyThreshold, f, hasInfo_, hfQIE10Info_, and mps_fire::result.

◆ getHFQIE10Info()

constexpr HFQIE10Info const* HFPreRecHit::getHFQIE10Info ( unsigned  index) const
inlineconstexpr

Definition at line 39 of file HFPreRecHit.h.

39  {
40  if (index < 2 && hasInfo_[index])
41  return &hfQIE10Info_[index];
42  else
43  return nullptr;
44  }

References hasInfo_, and hfQIE10Info_.

Referenced by HFSimpleTimeCheck::reconstruct(), and HFRecHitAuxSetter::setAux().

◆ id()

constexpr HcalDetId HFPreRecHit::id ( ) const
inlineconstexpr

Definition at line 34 of file HFPreRecHit.h.

34 { return id_; }

References id_.

Referenced by HFFlexibleTimeCheck::reconstruct(), and HFSimpleTimeCheck::reconstruct().

Member Data Documentation

◆ hasInfo_

bool HFPreRecHit::hasInfo_[2]
private

Definition at line 85 of file HFPreRecHit.h.

Referenced by charge(), chargeAsymmetry(), energy(), energyAsymmetry(), and getHFQIE10Info().

◆ hfQIE10Info_

HFQIE10Info HFPreRecHit::hfQIE10Info_[2]
private

Definition at line 84 of file HFPreRecHit.h.

Referenced by charge(), chargeAsymmetry(), energy(), energyAsymmetry(), and getHFQIE10Info().

◆ id_

HcalDetId HFPreRecHit::id_
private

Definition at line 82 of file HFPreRecHit.h.

Referenced by id().

mps_fire.i
i
Definition: mps_fire.py:355
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
HFQIE10Info::energy
constexpr float energy() const
Definition: HFQIE10Info.h:80
data-class-funcs.q
q
Definition: data-class-funcs.py:169
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
HFQIE10Info::charge
constexpr float charge() const
Definition: HFQIE10Info.h:79
dqmdumpme.first
first
Definition: dqmdumpme.py:55
HFPreRecHit::id_
HcalDetId id_
Definition: HFPreRecHit.h:82
q1
double q1[4]
Definition: TauolaWrapper.h:87
StorageManager_cfg.e1
e1
Definition: StorageManager_cfg.py:16
HFPreRecHit::hasInfo_
bool hasInfo_[2]
Definition: HFPreRecHit.h:85
HFPreRecHit::hfQIE10Info_
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:84
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
mps_fire.result
result
Definition: mps_fire.py:303
ClusterTask_cfi.energyThreshold
energyThreshold
Definition: ClusterTask_cfi.py:3
SiStripMonitorCluster_cfi.q0
q0
Definition: SiStripMonitorCluster_cfi.py:241
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37