CMS 3D CMS Logo

List of all members | Static Public Member Functions
hitfit::Top_Decaykin Class Reference

A class to hold functions to calculate kinematic quantities of interest in $ t\bar{t} \to \ell + 4 \mathrm{jets} $ events. This class has no state, only static member functions. More...

#include <Top_Decaykin.h>

Static Public Member Functions

static double cos_theta_star (const Fourvec &fermion, const Fourvec &W, const Fourvec &top)
 Calculate $ \cos \theta^{*} $ in top quark decay. More...
 
static double cos_theta_star (const Lepjets_Event &ev)
 Calculate the lepton $ \cos \theta^{*} $ in top quark leptonic decay. More...
 
static double cos_theta_star_hadt (const Lepjets_Event &ev)
 Calculate the hadronic $ \cos \theta^{*} $ in top quark leptonic decay. As there is no information on the weak isospin component of the fermion, the absolute value of $ \cos \theta^{*} $ will be returned (the solutions for up-type and down-type fermions will differ only in sign but not in magnitude). More...
 
static double cos_theta_star_lept (const Lepjets_Event &ev)
 Calculate the lepton $ \cos \theta^{*} $ in top quark leptonic decay. More...
 
static std::ostream & dump_ev (std::ostream &s, const Lepjets_Event &ev)
 Print the kinematic information for an event. More...
 
static Fourvec hadt (const Lepjets_Event &ev)
 Sum up the appropriate four-momenta to find the hadronic top quark. More...
 
static Fourvec hadw (const Lepjets_Event &ev)
 Sum up the appropriate four-momenta to find the hadronic $ W- $ boson. More...
 
static Fourvec hadw1 (const Lepjets_Event &ev)
 Return the hadronic $ W- $ boson jet which have higher $ p_{T} $ . More...
 
static Fourvec hadw2 (const Lepjets_Event &ev)
 Return the hadronic $ W- $ boson jet which have lower $ p_{T} $ . More...
 
static Fourvec lept (const Lepjets_Event &ev)
 Sum up the appropriate four-momenta to find the leptonic top quark. More...
 
static Fourvec lepw (const Lepjets_Event &ev)
 Sum up the appropriate four-momenta to find the leptonic $ W- $ boson. More...
 
static bool solve_nu (const Lepjets_Event &ev, double wmass, double &nuz1, double &nuz2)
 Solve for the longitudinal $ z- $ momentum that makes the leptonic $ W $ -boson to have a certain value of mass. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of complex solutions, the real components of the solutions are given. More...
 
static bool solve_nu (const Lepjets_Event &ev, double wmass, double &re_nuz1, double &im_nuz1, double &re_nuz2, double &im_nuz2)
 Solve for the longitudinal $ z- $ momentum that makes the leptonic $ W $ -boson to have a certain value of mass. The complex component of the solutions are also given. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of real solutions, the first solution is the one which have smaller absolute value. In case of imaginary solutions (which are complex conjugate of each other), the first solution is the one which have imaginary component in the lower half of the complex plane, i.e., the one which have negative imaginary component). More...
 
static bool solve_nu_tmass (const Lepjets_Event &ev, double tmass, double &nuz1, double &nuz2)
 Solve for the neutrino longitudinal $ z- $ momentum that makes the leptonic top have a certain value of mass. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of complex solutions, the real components of the solutions are given. More...
 
static bool solve_nu_tmass (const Lepjets_Event &ev, double tmass, double &re_nuz1, double &im_nuz1, double &re_nuz2, double &im_nuz2)
 Solve for the neutrino longitudinal $ z- $ momentum that makes the leptonic top have a certain value of mass. The complex component of the solutions are also given. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of real solutions, the first solution is the one which have smaller absolute value. In case of imaginary solutions (which are complex conjugate of each other), the first solution is the one which have imaginary component in the lower half of the complex plane, i.e., the one which have negative imaginary component). More...
 

Detailed Description

A class to hold functions to calculate kinematic quantities of interest in $ t\bar{t} \to \ell + 4 \mathrm{jets} $ events. This class has no state, only static member functions.

Definition at line 51 of file Top_Decaykin.h.

Member Function Documentation

◆ cos_theta_star() [1/2]

double hitfit::Top_Decaykin::cos_theta_star ( const Fourvec fermion,
const Fourvec W,
const Fourvec top 
)
static

Calculate $ \cos \theta^{*} $ in top quark decay.

Parameters
fermionThe four-momentum of fermion from $ W- $ boson from top decay.
WThe four-momentum of $ W $ boson from top decay.
topThe four-momentum of top.

Definition at line 394 of file Top_Decaykin.cc.

Referenced by cos_theta_star(), cos_theta_star_hadt(), and cos_theta_star_lept().

405  {
406  if (W.isLightlike() || W.isSpacelike()) {
407  return 100.0;
408  }
409 
410  CLHEP::HepBoost BoostWCM(W.findBoostToCM());
411 
412  CLHEP::Hep3Vector boost_v3fermion = BoostWCM(fermion).vect();
413  CLHEP::Hep3Vector boost_v3top = BoostWCM(top).vect();
414 
415  double costhetastar = boost_v3fermion.cosTheta(-boost_v3top);
416 
417  return costhetastar;
418  }

◆ cos_theta_star() [2/2]

double hitfit::Top_Decaykin::cos_theta_star ( const Lepjets_Event ev)
static

Calculate the lepton $ \cos \theta^{*} $ in top quark leptonic decay.

Parameters
evThe event to solve.

Definition at line 420 of file Top_Decaykin.cc.

References cos_theta_star(), makeMEIFBenchmarkPlots::ev, lept(), HLT_2024v11_cff::leptons, and lepw().

429  {
430  return cos_theta_star(leptons(ev), lepw(ev), lept(ev));
431  }
static double cos_theta_star(const Fourvec &fermion, const Fourvec &W, const Fourvec &top)
Calculate in top quark decay.
static Fourvec lept(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the leptonic top quark.
static Fourvec lepw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the leptonic boson.

◆ cos_theta_star_hadt()

double hitfit::Top_Decaykin::cos_theta_star_hadt ( const Lepjets_Event ev)
static

Calculate the hadronic $ \cos \theta^{*} $ in top quark leptonic decay. As there is no information on the weak isospin component of the fermion, the absolute value of $ \cos \theta^{*} $ will be returned (the solutions for up-type and down-type fermions will differ only in sign but not in magnitude).

Parameters
evThe event to solve.

Definition at line 446 of file Top_Decaykin.cc.

References cos_theta_star(), makeMEIFBenchmarkPlots::ev, hadt(), hadw(), and hadw1().

456  {
457  return fabs(cos_theta_star(hadw1(ev), hadw(ev), hadt(ev)));
458  }
static Fourvec hadw1(const Lepjets_Event &ev)
Return the hadronic boson jet which have higher .
static Fourvec hadt(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the hadronic top quark.
static double cos_theta_star(const Fourvec &fermion, const Fourvec &W, const Fourvec &top)
Calculate in top quark decay.
static Fourvec hadw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the hadronic boson.

◆ cos_theta_star_lept()

double hitfit::Top_Decaykin::cos_theta_star_lept ( const Lepjets_Event ev)
static

Calculate the lepton $ \cos \theta^{*} $ in top quark leptonic decay.

Parameters
evThe event to solve.

Definition at line 433 of file Top_Decaykin.cc.

References cos_theta_star(), and makeMEIFBenchmarkPlots::ev.

442  {
443  return cos_theta_star(ev);
444  }
static double cos_theta_star(const Fourvec &fermion, const Fourvec &W, const Fourvec &top)
Calculate in top quark decay.

◆ dump_ev()

ostream & hitfit::Top_Decaykin::dump_ev ( std::ostream &  s,
const Lepjets_Event ev 
)
static

Print the kinematic information for an event.

Parameters
sThe stream of which to write.
evThe event to be printed.

Definition at line 367 of file Top_Decaykin.cc.

References makeMEIFBenchmarkPlots::ev, hadt(), hadw(), lept(), lepw(), AlCaHLTBitMon_ParallelJobs::p, and alignCSCRings::s.

Referenced by hitfit::Top_Fit::fit_one_perm().

378  {
379  s << ev;
380  Fourvec p;
381 
382  p = lepw(ev);
383  s << "lepw " << p << " " << p.m() << "\n";
384  p = lept(ev);
385  s << "lept " << p << " " << p.m() << "\n";
386  p = hadw(ev);
387  s << "hadw " << p << " " << p.m() << "\n";
388  p = hadt(ev);
389  s << "hadt " << p << " " << p.m() << "\n";
390 
391  return s;
392  }
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
static Fourvec hadt(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the hadronic top quark.
static Fourvec lept(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the leptonic top quark.
static Fourvec lepw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the leptonic boson.
static Fourvec hadw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the hadronic boson.

◆ hadt()

Fourvec hitfit::Top_Decaykin::hadt ( const Lepjets_Event ev)
static

Sum up the appropriate four-momenta to find the hadronic top quark.

Parameters
evThe event.

Definition at line 339 of file Top_Decaykin.cc.

References makeMEIFBenchmarkPlots::ev, hitfit::hadb_label, and hadw().

Referenced by cos_theta_star_hadt(), dump_ev(), and hitfit::Top_Fit::fit_one_perm().

349  {
350  return (ev.sum(hadb_label) + hadw(ev));
351  }
static Fourvec hadw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the hadronic boson.

◆ hadw()

Fourvec hitfit::Top_Decaykin::hadw ( const Lepjets_Event ev)
static

Sum up the appropriate four-momenta to find the hadronic $ W- $ boson.

Parameters
evThe event.

Definition at line 282 of file Top_Decaykin.cc.

References makeMEIFBenchmarkPlots::ev, hitfit::hadw1_label, and hitfit::hadw2_label.

Referenced by cos_theta_star_hadt(), dump_ev(), hitfit::Top_Fit::fit_one_perm(), and hadt().

◆ hadw1()

Fourvec hitfit::Top_Decaykin::hadw1 ( const Lepjets_Event ev)
static

Return the hadronic $ W- $ boson jet which have higher $ p_{T} $ .

Parameters
evThe event.

Definition at line 296 of file Top_Decaykin.cc.

References makeMEIFBenchmarkPlots::ev, and hitfit::hadw1_label.

Referenced by cos_theta_star_hadt().

◆ hadw2()

Fourvec hitfit::Top_Decaykin::hadw2 ( const Lepjets_Event ev)
static

Return the hadronic $ W- $ boson jet which have lower $ p_{T} $ .

Parameters
evThe event.

Definition at line 310 of file Top_Decaykin.cc.

References makeMEIFBenchmarkPlots::ev, and hitfit::hadw2_label.

◆ lept()

Fourvec hitfit::Top_Decaykin::lept ( const Lepjets_Event ev)
static

Sum up the appropriate four-momenta to find the leptonic top quark.

Parameters
evThe event.

Definition at line 353 of file Top_Decaykin.cc.

References makeMEIFBenchmarkPlots::ev, hitfit::lepb_label, and lepw().

Referenced by cos_theta_star(), dump_ev(), and hitfit::Top_Fit::fit_one_perm().

363  {
364  return (ev.sum(lepb_label) + lepw(ev));
365  }
static Fourvec lepw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the leptonic boson.

◆ lepw()

Fourvec hitfit::Top_Decaykin::lepw ( const Lepjets_Event ev)
static

Sum up the appropriate four-momenta to find the leptonic $ W- $ boson.

Parameters
evThe event.

Definition at line 325 of file Top_Decaykin.cc.

References makeMEIFBenchmarkPlots::ev, and HLT_2024v11_cff::leptons.

Referenced by cos_theta_star(), dump_ev(), and lept().

335  {
336  return (leptons(ev) + ev.met());
337  }

◆ solve_nu() [1/2]

bool hitfit::Top_Decaykin::solve_nu ( const Lepjets_Event ev,
double  wmass,
double &  nuz1,
double &  nuz2 
)
static

Solve for the longitudinal $ z- $ momentum that makes the leptonic $ W $ -boson to have a certain value of mass. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of complex solutions, the real components of the solutions are given.

Parameters
evInput: The event to solve.
wmassInput: The desired mass of the $ W- $ boson in GeV.
nuz1Output: First solution (smaller absolute value).
nuz2Output: Second solution.

Definition at line 177 of file Top_Decaykin.cc.

References a, funct::abs(), b, HltBtagPostValidation_cff::c, ztail::d, makeMEIFBenchmarkPlots::ev, HLT_2024v11_cff::leptons, mathSSE::sqrt(), edm::swap(), and x.

Referenced by hitfit::Top_Fit::fit_one_perm().

195  {
196  bool discrim_flag = true;
197 
198  const Fourvec& vnu = ev.met();
199  Fourvec vlep = leptons(ev);
200 
201  double x = vlep.x() * vnu.x() + vlep.y() * vnu.y() + wmass * wmass / 2;
202  double a = vlep.z() * vlep.z() - vlep.e() * vlep.e();
203  double b = 2 * x * vlep.z();
204  double c = x * x - vnu.perp2() * vlep.e() * vlep.e();
205 
206  double d = b * b - 4 * a * c;
207  if (d < 0) {
208  d = 0;
209  discrim_flag = false;
210  }
211 
212  nuz1 = (-b + sqrt(d)) / 2 / a;
213  nuz2 = (-b - sqrt(d)) / 2 / a;
214  if (abs(nuz1) > abs(nuz2))
215  swap(nuz1, nuz2);
216 
217  return discrim_flag;
218  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
T sqrt(T t)
Definition: SSEVec.h:19
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
d
Definition: ztail.py:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ solve_nu() [2/2]

bool hitfit::Top_Decaykin::solve_nu ( const Lepjets_Event ev,
double  wmass,
double &  re_nuz1,
double &  im_nuz1,
double &  re_nuz2,
double &  im_nuz2 
)
static

Solve for the longitudinal $ z- $ momentum that makes the leptonic $ W $ -boson to have a certain value of mass. The complex component of the solutions are also given. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of real solutions, the first solution is the one which have smaller absolute value. In case of imaginary solutions (which are complex conjugate of each other), the first solution is the one which have imaginary component in the lower half of the complex plane, i.e., the one which have negative imaginary component).

Parameters
evInput: The event to solve.
wmassInput: The desired mass of the $ W- $ boson in GeV.
re_nuz1Output: Real component of the first solution.
im_nuz1Output: Imaginary component of the first solution.
re_nuz2Output: Real component of the second solution.
im_nuz2Output: Imaginary component of the second solution.

Definition at line 220 of file Top_Decaykin.cc.

References a, b, HltBtagPostValidation_cff::c, ztail::d, makeMEIFBenchmarkPlots::ev, HLT_2024v11_cff::leptons, mathSSE::sqrt(), edm::swap(), and x.

243  {
244  bool discrim_flag = true;
245 
246  const Fourvec& vnu = ev.met();
247  Fourvec vlep = leptons(ev);
248 
249  double x = vlep.x() * vnu.x() + vlep.y() * vnu.y() + wmass * wmass / 2;
250  double a = vlep.z() * vlep.z() - vlep.e() * vlep.e();
251  double b = 2 * x * vlep.z();
252  double c = x * x - vnu.perp2() * vlep.e() * vlep.e();
253 
254  double d = b * b - 4 * a * c;
255  if (d < 0) {
256  discrim_flag = false;
257  }
258 
259  if (discrim_flag) {
260  re_nuz1 = (-b + sqrt(d)) / 2 / a;
261  im_nuz1 = 0.0;
262  re_nuz2 = (-b - sqrt(d)) / 2 / a;
263  im_nuz2 = 0.0;
264  if (fabs(re_nuz1) > fabs(re_nuz2)) {
265  swap(re_nuz1, re_nuz2);
266  }
267 
268  } else {
269  // Take absolute value of the imaginary component of nuz, in case
270  // a is negative, before multiplying by +1 or -1 to get the upper-half
271  // or lower-half imaginary value.
272 
273  re_nuz1 = -b / 2 / a;
274  im_nuz1 = -fabs(sqrt(-d) / a);
275  re_nuz2 = -b / 2 / a;
276  im_nuz2 = fabs(sqrt(-d) / a);
277  }
278 
279  return discrim_flag;
280  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
T sqrt(T t)
Definition: SSEVec.h:19
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
d
Definition: ztail.py:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ solve_nu_tmass() [1/2]

bool hitfit::Top_Decaykin::solve_nu_tmass ( const Lepjets_Event ev,
double  tmass,
double &  nuz1,
double &  nuz2 
)
static

Solve for the neutrino longitudinal $ z- $ momentum that makes the leptonic top have a certain value of mass. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of complex solutions, the real components of the solutions are given.

Parameters
evInput:The event to solve.
tmassInput: The desired value of top quark mass in GeV.
nuz1Output: The first solution (smaller absolute value).
nuz2Output: The second solution.

Definition at line 72 of file Top_Decaykin.cc.

References a, funct::abs(), simBeamSpotPI::alpha, b, HltBtagPostValidation_cff::c, ztail::d, createTree::dd, makeMEIFBenchmarkPlots::ev, hitfit::lepb_label, HLT_2024v11_cff::leptons, mathSSE::sqrt(), and edm::swap().

Referenced by hitfit::Top_Fit::fit_one_perm().

90  {
91  bool discrim_flag = true;
92 
93  const Fourvec& vnu = ev.met();
94  Fourvec cprime = leptons(ev) + ev.sum(lepb_label);
95  double alpha1 = tmass * tmass - cprime.m2();
96  double a = 2 * 4 * (cprime.z() * cprime.z() - cprime.e() * cprime.e());
97  double alpha = alpha1 + 2 * (cprime.x() * vnu.x() + cprime.y() * vnu.y());
98  double b = 4 * alpha * cprime.z();
99  double c = alpha * alpha - 4 * cprime.e() * cprime.e() * vnu.vect().perp2();
100  double d = b * b - 2 * a * c;
101  if (d < 0) {
102  discrim_flag = false;
103  d = 0;
104  }
105 
106  double dd = sqrt(d);
107  nuz1 = (-b + dd) / a;
108  nuz2 = (-b - dd) / a;
109  if (abs(nuz1) > abs(nuz2))
110  swap(nuz1, nuz2);
111 
112  return discrim_flag;
113  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
string dd
Definition: createTree.py:154
T sqrt(T t)
Definition: SSEVec.h:19
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
d
Definition: ztail.py:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ solve_nu_tmass() [2/2]

bool hitfit::Top_Decaykin::solve_nu_tmass ( const Lepjets_Event ev,
double  tmass,
double &  re_nuz1,
double &  im_nuz1,
double &  re_nuz2,
double &  im_nuz2 
)
static

Solve for the neutrino longitudinal $ z- $ momentum that makes the leptonic top have a certain value of mass. The complex component of the solutions are also given. Returns TRUE if there were real solutions. Returns FALSE if there were only complex solutions. In case of real solutions, the first solution is the one which have smaller absolute value. In case of imaginary solutions (which are complex conjugate of each other), the first solution is the one which have imaginary component in the lower half of the complex plane, i.e., the one which have negative imaginary component).

Parameters
evInput:The event to solve.
tmassInput: The desired value of top quark mass in GeV.
re_nuz1Output: Real component of the first solution.
im_nuz1Output: Imaginary component of the first solution.
re_nuz2Output: Real component of the second solution.
im_nuz2Output: Imaginary component of the second solution.

Definition at line 115 of file Top_Decaykin.cc.

References a, funct::abs(), simBeamSpotPI::alpha, b, HltBtagPostValidation_cff::c, ztail::d, makeMEIFBenchmarkPlots::ev, hitfit::lepb_label, HLT_2024v11_cff::leptons, mathSSE::sqrt(), and edm::swap().

138  {
139  bool discrim_flag = true;
140 
141  const Fourvec& vnu = ev.met();
142  Fourvec cprime = leptons(ev) + ev.sum(lepb_label);
143  double alpha1 = tmass * tmass - cprime.m2();
144  double a = 2 * 4 * (cprime.z() * cprime.z() - cprime.e() * cprime.e());
145  // Haryo's note: Here a is equivalent to '2a' in the quadratic
146  // equation ax^2 + bx + c = 0
147  double alpha = alpha1 + 2 * (cprime.x() * vnu.x() + cprime.y() * vnu.y());
148  double b = 4 * alpha * cprime.z();
149  double c = alpha * alpha - 4 * cprime.e() * cprime.e() * vnu.vect().perp2();
150  double d = b * b - 2 * a * c;
151  if (d < 0) {
152  discrim_flag = false;
153  }
154 
155  if (discrim_flag) {
156  re_nuz1 = (-b + sqrt(d)) / a;
157  im_nuz1 = 0;
158  re_nuz2 = (-b - sqrt(d)) / a;
159  im_nuz2 = 0;
160  if (abs(re_nuz1) > abs(re_nuz2)) {
161  swap(re_nuz1, re_nuz2);
162  }
163 
164  } else {
165  // Take absolute value of the imaginary component of nuz, in case
166  // a is negative, before multiplying by +1 or -1 to get the upper-half
167  // or lower-half imaginary value.
168  re_nuz1 = -b / a;
169  im_nuz1 = -fabs(sqrt(-d) / a);
170  re_nuz2 = -b / a;
171  im_nuz2 = fabs(sqrt(-d) / a);
172  }
173 
174  return discrim_flag;
175  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
T sqrt(T t)
Definition: SSEVec.h:19
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
d
Definition: ztail.py:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121