CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 56 of file Top_Decaykin.h.

Member Function Documentation

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 436 of file Top_Decaykin.cc.

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

449 {
450 
451  if (W.isLightlike() || W.isSpacelike()) {
452  return 100.0;
453  }
454 
455  CLHEP::HepBoost BoostWCM(W.findBoostToCM());
456 
457  CLHEP::Hep3Vector boost_v3fermion = BoostWCM(fermion).vect();
458  CLHEP::Hep3Vector boost_v3top = BoostWCM(top).vect();
459 
460  double costhetastar = boost_v3fermion.cosTheta(-boost_v3top);
461 
462  return costhetastar;
463 }
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 466 of file Top_Decaykin.cc.

References cos_theta_star(), lept(), EgammaValidation_Wenu_cff::leptons, and lepw().

475 {
476 
477  return cos_theta_star(leptons(ev),
478  lepw(ev),
479  lept(ev));
480 
481 }
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.
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 500 of file Top_Decaykin.cc.

References cos_theta_star(), hadt(), hadw(), and hadw1().

510 {
511 
512  return fabs(cos_theta_star(hadw1(ev),
513  hadw(ev),
514  hadt(ev)));
515 
516 }
static double cos_theta_star(const Fourvec fermion, const Fourvec W, const Fourvec top)
Calculate in top quark decay.
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 Fourvec hadw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the hadronic boson.
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 484 of file Top_Decaykin.cc.

References cos_theta_star().

493 {
494 
495  return cos_theta_star(ev);
496 
497 }
static double cos_theta_star(const Fourvec fermion, const Fourvec W, const Fourvec top)
Calculate in top quark decay.
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 408 of file Top_Decaykin.cc.

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

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

419 {
420  s << ev;
421  Fourvec p;
422 
423  p = lepw (ev);
424  s << "lepw " << p << " " << p.m() << "\n";
425  p = lept (ev);
426  s << "lept " << p << " " << p.m() << "\n";
427  p = hadw (ev);
428  s << "hadw " << p << " " << p.m() << "\n";
429  p = hadt (ev);
430  s << "hadt " << p << " " << p.m() << "\n";
431 
432  return s;
433 }
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
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.
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 378 of file Top_Decaykin.cc.

References hitfit::hadb_label, hadw(), and hitfit::Lepjets_Event::sum().

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

388 {
389  return (ev.sum (hadb_label) + hadw (ev));
390 }
static Fourvec hadw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the hadronic boson.
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 317 of file Top_Decaykin.cc.

References hitfit::hadw1_label, hitfit::hadw2_label, and hitfit::Lepjets_Event::sum().

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

327 {
328  return (ev.sum (hadw1_label) + ev.sum (hadw2_label));
329 }
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 332 of file Top_Decaykin.cc.

References hitfit::hadw1_label, and hitfit::Lepjets_Event::sum().

Referenced by cos_theta_star_hadt().

342 {
343  return ev.sum (hadw1_label);
344 }
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 347 of file Top_Decaykin.cc.

References hitfit::hadw2_label, and hitfit::Lepjets_Event::sum().

358 {
359  return ev.sum (hadw2_label);
360 }
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 393 of file Top_Decaykin.cc.

References hitfit::lepb_label, lepw(), and hitfit::Lepjets_Event::sum().

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

403 {
404  return (ev.sum (lepb_label) + lepw (ev));
405 }
static Fourvec lepw(const Lepjets_Event &ev)
Sum up the appropriate four-momenta to find the leptonic boson.
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 363 of file Top_Decaykin.cc.

References EgammaValidation_Wenu_cff::leptons, and hitfit::Lepjets_Event::met().

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

373 {
374  return (leptons (ev) + ev.met ());
375 }
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 200 of file Top_Decaykin.cc.

References a, abs, b, trackerHits::c, EgammaValidation_Wenu_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), swap(), and x.

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

221 {
222  bool discrim_flag = true;
223 
224  Fourvec vnu = ev.met();
225  Fourvec vlep = leptons (ev);
226 
227  double x = vlep.x()*vnu.x() + vlep.y()*vnu.y() + wmass*wmass/2;
228  double a = vlep.z()*vlep.z() - vlep.e()*vlep.e();
229  double b = 2*x*vlep.z();
230  double c = x*x - vnu.perp2() * vlep.e()*vlep.e();
231 
232  double d = b*b - 4*a*c;
233  if (d < 0) {
234  d = 0;
235  discrim_flag = false;
236  }
237 
238  nuz1 = (-b + sqrt (d))/2/a;
239  nuz2 = (-b - sqrt (d))/2/a;
240  if (abs (nuz1) > abs (nuz2))
241  swap (nuz1, nuz2);
242 
243  return discrim_flag;
244 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:46
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
Definition: DDAxes.h:10
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 247 of file Top_Decaykin.cc.

References a, b, trackerHits::c, EgammaValidation_Wenu_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), swap(), and x.

274 {
275  bool discrim_flag = true;
276 
277  Fourvec vnu = ev.met();
278  Fourvec vlep = leptons (ev);
279 
280  double x = vlep.x()*vnu.x() + vlep.y()*vnu.y() + wmass*wmass/2;
281  double a = vlep.z()*vlep.z() - vlep.e()*vlep.e();
282  double b = 2*x*vlep.z();
283  double c = x*x - vnu.perp2() * vlep.e()*vlep.e();
284 
285  double d = b*b - 4*a*c;
286  if (d < 0) {
287  discrim_flag = false;
288  }
289 
290  if (discrim_flag) {
291 
292  re_nuz1 = (-b + sqrt(d))/2/a ;
293  im_nuz1 = 0.0 ;
294  re_nuz2 = (-b - sqrt(d))/2/a ;
295  im_nuz2 = 0.0 ;
296  if (fabs(re_nuz1) > fabs(re_nuz2)) {
297  swap(re_nuz1,re_nuz2);
298  }
299 
300  } else {
301 
302  // Take absolute value of the imaginary component of nuz, in case
303  // a is negative, before multiplying by +1 or -1 to get the upper-half
304  // or lower-half imaginary value.
305 
306  re_nuz1 = -b /2/a ;
307  im_nuz1 = -fabs(sqrt(-d)/a);
308  re_nuz2 = -b /2/a ;
309  im_nuz2 = fabs(sqrt(-d)/a);
310 
311  }
312 
313  return discrim_flag;
314 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
T sqrt(T t)
Definition: SSEVec.h:46
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
Definition: DDAxes.h:10
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 82 of file Top_Decaykin.cc.

References a, abs, alpha, b, trackerHits::c, createTree::dd, hitfit::lepb_label, EgammaValidation_Wenu_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), hitfit::Lepjets_Event::sum(), and swap().

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

102 {
103  bool discrim_flag = true;
104 
105  const Fourvec& vnu = ev.met ();
106  Fourvec cprime = leptons (ev) + ev.sum (lepb_label);
107  double alpha1 = tmass*tmass - cprime.m2();
108  double a = 2 * 4 * (cprime.z()*cprime.z() - cprime.e()*cprime.e());
109  double alpha = alpha1 + 2*(cprime.x()*vnu.x() + cprime.y()*vnu.y());
110  double b = 4 * alpha * cprime.z();
111  double c = alpha*alpha - 4 * cprime.e()*cprime.e() * vnu.vect().perp2();
112  double d = b*b - 2*a*c;
113  if (d < 0) {
114  discrim_flag = false;
115  d = 0;
116  }
117 
118  double dd = sqrt (d);
119  nuz1 = (-b + dd)/a;
120  nuz2 = (-b - dd)/a;
121  if (abs (nuz1) > abs (nuz2))
122  swap (nuz1, nuz2);
123 
124  return discrim_flag;
125 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
float alpha
Definition: AMPTWrapper.h:95
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:46
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
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 128 of file Top_Decaykin.cc.

References a, abs, alpha, b, trackerHits::c, hitfit::lepb_label, EgammaValidation_Wenu_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), hitfit::Lepjets_Event::sum(), and swap().

155 {
156  bool discrim_flag = true;
157 
158  const Fourvec& vnu = ev.met ();
159  Fourvec cprime = leptons (ev) + ev.sum (lepb_label);
160  double alpha1 = tmass*tmass - cprime.m2();
161  double a = 2 * 4 * (cprime.z()*cprime.z() - cprime.e()*cprime.e());
162  // Haryo's note: Here a is equivalent to '2a' in the quadratic
163  // equation ax^2 + bx + c = 0
164  double alpha = alpha1 + 2*(cprime.x()*vnu.x() + cprime.y()*vnu.y());
165  double b = 4 * alpha * cprime.z();
166  double c = alpha*alpha - 4 * cprime.e()*cprime.e() * vnu.vect().perp2();
167  double d = b*b - 2*a*c;
168  if (d < 0) {
169  discrim_flag = false;
170  }
171 
172  if (discrim_flag) {
173 
174  re_nuz1 = (-b + sqrt(d))/a ;
175  im_nuz1 = 0 ;
176  re_nuz2 = (-b - sqrt(d))/a ;
177  im_nuz2 = 0 ;
178  if (abs(re_nuz1) > abs(re_nuz2)) {
179  swap(re_nuz1,re_nuz2);
180  }
181 
182  } else {
183 
184  // Take absolute value of the imaginary component of nuz, in case
185  // a is negative, before multiplying by +1 or -1 to get the upper-half
186  // or lower-half imaginary value.
187  re_nuz1 = -b / a;
188  im_nuz1 = -fabs(sqrt(-d)/a );
189  re_nuz2 = -b / a;
190  im_nuz2 = fabs(sqrt(-d)/a );
191 
192 
193  }
194 
195 
196  return discrim_flag;
197 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
float alpha
Definition: AMPTWrapper.h:95
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:46
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121