CMS 3D CMS Logo

List of all members | Static Public Member Functions
heppy::AlphaT Struct Reference

#include <AlphaT.h>

Static Public Member Functions

static double getAlphaT (const std::vector< double > &et, const std::vector< double > &px, const std::vector< double > &py)
 

Detailed Description

Definition at line 18 of file AlphaT.h.

Member Function Documentation

◆ getAlphaT()

double AlphaT::getAlphaT ( const std::vector< double > &  et,
const std::vector< double > &  px,
const std::vector< double > &  py 
)
static

Definition at line 9 of file AlphaT.cc.

11  {
12  // Momentum sums in transverse plane
13  const double sum_et = accumulate(et.begin(), et.end(), 0.);
14  const double sum_px = accumulate(px.begin(), px.end(), 0.);
15  const double sum_py = accumulate(py.begin(), py.end(), 0.);
16 
17  // Minimum Delta Et for two pseudo-jets
18  double min_delta_sum_et = -1.;
19  for (unsigned i = 0; i < unsigned(1 << (et.size() - 1)); i++) { //@@ iterate through different combinations
20  double delta_sum_et = 0.;
21  std::vector<bool> jet;
22  for (unsigned j = 0; j < et.size(); j++) { //@@ iterate through jets
23  delta_sum_et += et[j] * (1 - 2 * (int(i >> j) & 1));
24  }
25  if ((fabs(delta_sum_et) < min_delta_sum_et || min_delta_sum_et < 0.)) {
26  min_delta_sum_et = fabs(delta_sum_et);
27  }
28  }
29  if (min_delta_sum_et < 0.) {
30  return 0.;
31  }
32 
33  // Alpha_T
34  return (0.5 * (sum_et - min_delta_sum_et) / sqrt(sum_et * sum_et - (sum_px * sum_px + sum_py * sum_py)));
35  }

References EgHLTOffHistBins_cfi::et, mps_fire::i, createfilelist::int, dqmiolumiharvest::j, metsig::jet, multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, and mathSSE::sqrt().

mps_fire.i
i
Definition: mps_fire.py:428
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
createfilelist.int
int
Definition: createfilelist.py:10
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
metsig::jet
Definition: SignAlgoResolutions.h:47
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66