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

Constructor & Destructor Documentation

HFPreRecHit::HFPreRecHit ( )
inline

Definition at line 19 of file HFPreRecHit.h.

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

Definition at line 25 of file HFPreRecHit.h.

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

27  : id_(id), hasInfo_{false, false} {
28  if (first) {
29  hfQIE10Info_[0] = *first;
30  hasInfo_[0] = true;
31  }
32  if (second) {
33  hfQIE10Info_[1] = *second;
34  hasInfo_[1] = true;
35  }
36  }
HcalDetId id_
Definition: HFPreRecHit.h:86
U second(std::pair< T, U > const &p)
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:88
bool hasInfo_[2]
Definition: HFPreRecHit.h:89

Member Function Documentation

float HFPreRecHit::charge ( ) const
inline

Definition at line 51 of file HFPreRecHit.h.

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

Referenced by HFFlexibleTimeCheck::reconstruct().

51  {
52  float q = 0.f;
53  for (unsigned i=0; i<2; ++i)
54  if (hasInfo_[i])
55  q += hfQIE10Info_[i].charge();
56  return q;
57  }
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:88
bool hasInfo_[2]
Definition: HFPreRecHit.h:89
float charge() const
Definition: HFQIE10Info.h:70
std::pair< float, bool > HFPreRecHit::chargeAsymmetry ( float  chargeThreshold) const

Definition at line 3 of file HFPreRecHit.cc.

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

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

4 {
5  std::pair<float,bool> result(0.f, false);
6  if (hasInfo_[0] && hasInfo_[1])
7  {
8  const float q0 = hfQIE10Info_[0].charge();
9  const float q1 = hfQIE10Info_[1].charge();
10  const float qsum = q0 + q1;
11  if (qsum > 0.f && qsum >= chargeThreshold)
12  {
13  result.first = (q1 - q0)/qsum;
14  result.second = true;
15  }
16  }
17  return result;
18 }
double f[11][100]
double q1[4]
Definition: TauolaWrapper.h:87
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:88
bool hasInfo_[2]
Definition: HFPreRecHit.h:89
float charge() const
Definition: HFQIE10Info.h:70
float HFPreRecHit::energy ( ) const
inline

Definition at line 58 of file HFPreRecHit.h.

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

Referenced by Jet.Jet::rawEnergy().

58  {
59  float e = 0.f;
60  for (unsigned i=0; i<2; ++i)
61  if (hasInfo_[i])
62  e += hfQIE10Info_[i].energy();
63  return e;
64  }
float energy() const
Definition: HFQIE10Info.h:71
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:88
bool hasInfo_[2]
Definition: HFPreRecHit.h:89
std::pair< float, bool > HFPreRecHit::energyAsymmetry ( float  energyThreshold) const

Definition at line 20 of file HFPreRecHit.cc.

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

Referenced by energy().

21 {
22  std::pair<float,bool> result(0.f, false);
23  if (hasInfo_[0] && hasInfo_[1])
24  {
25  const float e0 = hfQIE10Info_[0].energy();
26  const float e1 = hfQIE10Info_[1].energy();
27  const float esum = e0 + e1;
28  if (esum > 0.f && esum >= energyThreshold)
29  {
30  result.first = (e1 - e0)/esum;
31  result.second = true;
32  }
33  }
34  return result;
35 }
double f[11][100]
float energy() const
Definition: HFQIE10Info.h:71
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:88
bool hasInfo_[2]
Definition: HFPreRecHit.h:89
HFQIE10Info const* HFPreRecHit::getHFQIE10Info ( unsigned  index) const
inline

Definition at line 43 of file HFPreRecHit.h.

References hasInfo_, and hfQIE10Info_.

Referenced by 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:88
bool hasInfo_[2]
Definition: HFPreRecHit.h:89
HcalDetId HFPreRecHit::id ( ) const
inline

Definition at line 38 of file HFPreRecHit.h.

References id_.

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

38 {return id_;}
HcalDetId id_
Definition: HFPreRecHit.h:86

Member Data Documentation

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

Definition at line 86 of file HFPreRecHit.h.

Referenced by id().