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

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

Definition at line 16 of file HFPreRecHit.h.

Constructor & Destructor Documentation

HFPreRecHit::HFPreRecHit ( )
inline

Definition at line 18 of file HFPreRecHit.h.

18 : hasInfo_{false, false} {}
bool hasInfo_[2]
Definition: HFPreRecHit.h:85
HFPreRecHit::HFPreRecHit ( const HcalDetId id,
const HFQIE10Info first,
const HFQIE10Info second 
)
inline

Definition at line 22 of file HFPreRecHit.h.

References dqmdumpme::first, hasInfo_, hfQIE10Info_, and edm::second().

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  }
HcalDetId id_
Definition: HFPreRecHit.h:82
U second(std::pair< T, U > const &p)
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:84
bool hasInfo_[2]
Definition: HFPreRecHit.h:85

Member Function Documentation

float HFPreRecHit::charge ( ) const
inline

Definition at line 47 of file HFPreRecHit.h.

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

Referenced by HFFlexibleTimeCheck::reconstruct().

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  }
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:84
bool hasInfo_[2]
Definition: HFPreRecHit.h:85
float charge() const
Definition: HFQIE10Info.h:79
std::pair< float, bool > HFPreRecHit::chargeAsymmetry ( float  chargeThreshold) const

Definition at line 3 of file HFPreRecHit.cc.

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

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

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 }
double f[11][100]
double q1[4]
Definition: TauolaWrapper.h:87
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:84
bool hasInfo_[2]
Definition: HFPreRecHit.h:85
float charge() const
Definition: HFQIE10Info.h:79
float HFPreRecHit::energy ( ) const
inline

Definition at line 54 of file HFPreRecHit.h.

References chargeAsymmetry(), MillePedeFileConverter_cfg::e, HFQIE10Info::energy(), energyAsymmetry(), ClusterTask_cfi::energyThreshold, hasInfo_, hfQIE10Info_, and mps_fire::i.

Referenced by Jet.Jet::rawEnergy().

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  }
float energy() const
Definition: HFQIE10Info.h:80
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:84
bool hasInfo_[2]
Definition: HFPreRecHit.h:85
std::pair< float, bool > HFPreRecHit::energyAsymmetry ( float  energyThreshold) const

Definition at line 17 of file HFPreRecHit.cc.

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

Referenced by energy().

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 }
double f[11][100]
float energy() const
Definition: HFQIE10Info.h:80
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:84
bool hasInfo_[2]
Definition: HFPreRecHit.h:85
HFQIE10Info const* HFPreRecHit::getHFQIE10Info ( unsigned  index) const
inline

Definition at line 39 of file HFPreRecHit.h.

References hasInfo_, and hfQIE10Info_.

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

39  {
40  if (index < 2 && hasInfo_[index])
41  return &hfQIE10Info_[index];
42  else
43  return nullptr;
44  }
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:84
bool hasInfo_[2]
Definition: HFPreRecHit.h:85
HcalDetId HFPreRecHit::id ( ) const
inline

Definition at line 34 of file HFPreRecHit.h.

References id_.

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

34 { return id_; }
HcalDetId id_
Definition: HFPreRecHit.h:82

Member Data Documentation

bool HFPreRecHit::hasInfo_[2]
private
HFQIE10Info HFPreRecHit::hfQIE10Info_[2]
private
HcalDetId HFPreRecHit::id_
private

Definition at line 82 of file HFPreRecHit.h.

Referenced by id().