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
 
const HFQIE10InfogetHFQIE10Info (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 17 of file HFPreRecHit.h.

Constructor & Destructor Documentation

HFPreRecHit::HFPreRecHit ( )

Definition at line 3 of file HFPreRecHit.cc.

4  : hasInfo_{false, false}
5 {
6 }
bool hasInfo_[2]
Definition: HFPreRecHit.h:60
HFPreRecHit::HFPreRecHit ( const HcalDetId id,
const HFQIE10Info first,
const HFQIE10Info second 
)

Definition at line 8 of file HFPreRecHit.cc.

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

10  : id_(id), hasInfo_{false, false}
11 {
12  if (first)
13  {
14  hfQIE10Info_[0] = *first;
15  hasInfo_[0] = true;
16  }
17  if (second)
18  {
19  hfQIE10Info_[1] = *second;
20  hasInfo_[1] = true;
21  }
22 }
HcalDetId id_
Definition: HFPreRecHit.h:57
U second(std::pair< T, U > const &p)
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:59
bool hasInfo_[2]
Definition: HFPreRecHit.h:60

Member Function Documentation

float HFPreRecHit::charge ( ) const

Definition at line 24 of file HFPreRecHit.cc.

References HFQIE10Info::charge(), hasInfo_, hfQIE10Info_, mps_fire::i, and lumiQueryAPI::q.

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

25 {
26  float q = 0.f;
27  for (unsigned i=0; i<2; ++i)
28  if (hasInfo_[i])
29  q += hfQIE10Info_[i].charge();
30  return q;
31 }
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:59
bool hasInfo_[2]
Definition: HFPreRecHit.h:60
float charge() const
Definition: HFQIE10Info.h:34
std::pair< float, bool > HFPreRecHit::chargeAsymmetry ( float  chargeThreshold) const

Definition at line 50 of file HFPreRecHit.cc.

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

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

51 {
52  std::pair<float,bool> result(0.f, false);
53  if (hasInfo_[0] && hasInfo_[1])
54  {
55  const float q0 = hfQIE10Info_[0].charge();
56  const float q1 = hfQIE10Info_[1].charge();
57  const float qsum = q0 + q1;
58  if (qsum > 0.f && qsum >= chargeThreshold)
59  {
60  result.first = (q1 - q0)/qsum;
61  result.second = true;
62  }
63  }
64  return result;
65 }
double f[11][100]
double q1[4]
Definition: TauolaWrapper.h:87
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:59
bool hasInfo_[2]
Definition: HFPreRecHit.h:60
float charge() const
Definition: HFQIE10Info.h:34
float HFPreRecHit::energy ( ) const

Definition at line 33 of file HFPreRecHit.cc.

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

Referenced by id(), and Jet.Jet::rawEnergy().

34 {
35  float e = 0.f;
36  for (unsigned i=0; i<2; ++i)
37  if (hasInfo_[i])
38  e += hfQIE10Info_[i].energy();
39  return e;
40 }
float energy() const
Definition: HFQIE10Info.h:35
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:59
bool hasInfo_[2]
Definition: HFPreRecHit.h:60
std::pair< float, bool > HFPreRecHit::energyAsymmetry ( float  energyThreshold) const

Definition at line 67 of file HFPreRecHit.cc.

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

Referenced by id().

68 {
69  std::pair<float,bool> result(0.f, false);
70  if (hasInfo_[0] && hasInfo_[1])
71  {
72  const float e0 = hfQIE10Info_[0].energy();
73  const float e1 = hfQIE10Info_[1].energy();
74  const float esum = e0 + e1;
75  if (esum > 0.f && esum >= energyThreshold)
76  {
77  result.first = (e1 - e0)/esum;
78  result.second = true;
79  }
80  }
81  return result;
82 }
double f[11][100]
float energy() const
Definition: HFQIE10Info.h:35
Float e1
Definition: deltaR.h:20
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:59
bool hasInfo_[2]
Definition: HFPreRecHit.h:60
const HFQIE10Info * HFPreRecHit::getHFQIE10Info ( unsigned  index) const

Definition at line 42 of file HFPreRecHit.cc.

References hasInfo_, and hfQIE10Info_.

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

43 {
44  if (index < 2 && hasInfo_[index])
45  return &hfQIE10Info_[index];
46  else
47  return nullptr;
48 }
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:59
bool hasInfo_[2]
Definition: HFPreRecHit.h:60
HcalDetId HFPreRecHit::id ( ) const
inline

Member Data Documentation

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

Definition at line 57 of file HFPreRecHit.h.

Referenced by id().