CMS 3D CMS Logo

HFPreRecHit.cc
Go to the documentation of this file.
2 
3 std::pair<float,bool> HFPreRecHit::chargeAsymmetry(const float chargeThreshold) const
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 }
19 
20 std::pair<float,bool> HFPreRecHit::energyAsymmetry(const float energyThreshold) const
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
double q1[4]
Definition: TauolaWrapper.h:87
std::pair< float, bool > energyAsymmetry(float energyThreshold) const
Definition: HFPreRecHit.cc:20
HFQIE10Info hfQIE10Info_[2]
Definition: HFPreRecHit.h:88
std::pair< float, bool > chargeAsymmetry(float chargeThreshold) const
Definition: HFPreRecHit.cc:3
bool hasInfo_[2]
Definition: HFPreRecHit.h:89
float charge() const
Definition: HFQIE10Info.h:70