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

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

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

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

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

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

509 {
510 
511  return fabs(cos_theta_star(hadw1(ev),
512  hadw(ev),
513  hadt(ev)));
514 
515 }
bool ev
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.
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 483 of file Top_Decaykin.cc.

References cos_theta_star().

492 {
493 
494  return cos_theta_star(ev);
495 
496 }
bool ev
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 407 of file Top_Decaykin.cc.

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

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

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

387 {
388  return (ev.sum (hadb_label) + hadw (ev));
389 }
bool ev
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 316 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().

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

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

Referenced by cos_theta_star_hadt().

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

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

357 {
358  return ev.sum (hadw2_label);
359 }
bool ev
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 392 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().

402 {
403  return (ev.sum (lepb_label) + lepw (ev));
404 }
bool ev
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 362 of file Top_Decaykin.cc.

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

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

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

References a, funct::abs(), b, EnergyCorrector::c, ztail::d, HLT_FULL_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), swap(), and x().

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

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

References a, b, EnergyCorrector::c, ztail::d, HLT_FULL_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), swap(), and x().

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

References a, funct::abs(), alpha, b, EnergyCorrector::c, ztail::d, createTree::dd, hitfit::lepb_label, HLT_FULL_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), hitfit::Lepjets_Event::sum(), and swap().

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

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

References a, funct::abs(), alpha, b, EnergyCorrector::c, ztail::d, hitfit::lepb_label, HLT_FULL_cff::leptons, hitfit::Lepjets_Event::met(), mathSSE::sqrt(), hitfit::Lepjets_Event::sum(), and swap().

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