39 #include "CLHEP/Random/RandFlat.h"
40 #include "CLHEP/Random/RandExponential.h"
41 #include "CLHEP/Random/RandBreitWigner.h"
42 #include "CLHEP/Random/RandGauss.h"
43 #include "CLHEP/Units/PhysicalConstants.h"
78 : _t_pt_mean (defs.get_float (
"t_pt_mean")),
79 _mt (defs.get_float (
"mt")),
80 _sigma_mt (defs.get_float (
"sigma_mt")),
81 _mh (defs.get_float (
"mh")),
82 _sigma_mh (defs.get_float (
"sigma_mh")),
83 _recoil_pt_mean (defs.get_float (
"recoil_pt_mean")),
84 _boost_sigma (defs.get_float (
"boost_sigma")),
85 _m_boost (defs.get_float (
"m_boost")),
86 _mb (defs.get_float (
"mb")),
87 _sigma_mb (defs.get_float (
"sigma_mb")),
88 _mw (defs.get_float (
"mw")),
89 _sigma_mw (defs.get_float (
"sigma_mw")),
90 _svx_tageff (defs.get_float (
"svx_tageff")),
91 _smear (defs.get_bool (
"smear")),
92 _smear_dir (defs.get_bool (
"smear_dir")),
93 _muon (defs.get_bool (
"muon")),
94 _ele_res_str (defs.get_string (
"ele_res_str")),
95 _muo_res_str (defs.get_string (
"muo_res_str")),
96 _jet_res_str (defs.get_string (
"jet_res_str")),
97 _kt_res_str (defs.get_string (
"kt_res_str"))
316 Threevec rand_spher (CLHEP::HepRandomEngine& engine)
328 CLHEP::RandFlat
r (engine);
332 double U =
r.fire(0.0,1.0);
333 double V =
r.fire(0.0,1.0);
336 double phi = acos(2*V - 1.0);
338 double x =
sin(theta)*
cos(phi);
339 double y =
sin(theta)*
sin(phi);
340 double z =
cos(theta);
365 CLHEP::HepRandomEngine& engine)
381 CLHEP::RandBreitWigner rbw (engine);
382 double m = rbw.fire (m_true, sigma);
403 void decay (
const Fourvec& v,
double m1,
double m2,
404 CLHEP::HepRandomEngine& engine,
427 double f = m0 / (m1 + m2);
437 p *= 0.5/m0 *
sqrt ( m0_2*m0_2 + m1_2*m1_2 + m2_2*m2_2
438 - 2*m0_2*m1_2 - 2*m0_2*m2_2 - 2*m1_2*m2_2);
439 double p2 = p.mag2();
445 vout1.boost (v.boostVector ());
446 vout2.boost (v.boostVector ());
460 CLHEP::HepRandomEngine& engine)
473 CLHEP::RandExponential rexp (engine);
479 p *= (rexp.fire (pt_mean) / p.perp());
492 Fourvec rand_boost (
const Gentop_Args&
args, CLHEP::HepRandomEngine& engine)
504 CLHEP::RandExponential rexp (engine);
505 CLHEP::RandFlat rflat (engine);
506 CLHEP::RandGauss rgauss (engine);
510 p.rotateZ (rflat.fire (0, 2 *
M_PI));
511 p *= rexp.fire (args.recoil_pt_mean());
512 p.setZ (rgauss.fire (0, args.boost_sigma()));
513 return Fourvec (p,
sqrt (p.mag2() + args.m_boost()*args.m_boost()));
526 void tagsim (
const Gentop_Args& args,
528 CLHEP::HepRandomEngine& engine)
541 CLHEP::RandFlat rflat (engine);
543 int typ = ev.jet(
i).type();
545 if (rflat.fire() < args.svx_tageff())
546 ev.jet(
i).svx_tag() =
true;
561 CLHEP::HepRandomEngine& engine)
573 CLHEP::RandBreitWigner rbw (engine);
574 CLHEP::RandGauss rgauss (engine);
584 Fourvec boost = rand_boost (args, engine);
585 lept.boost (boost.boostVector());
586 hadt.boost (boost.boostVector());
590 double mlb = rgauss.fire (args.
mb(), args.
sigma_mb());
591 double mlw = rbw.fire (args.
mw(), args.
sigma_mw());
601 double mhb = rgauss.fire (args.
mb(), args.
sigma_mb());
602 double mhw = rbw.fire (args.
mw(), args.
sigma_mw());
612 decay (lepw, 0, 0, engine, lep, nu);
616 decay (hadw, 0, 0, engine, q1, q2);
639 tagsim (args, ev, engine);
651 CLHEP::HepRandomEngine& engine)
663 CLHEP::RandBreitWigner rbw (engine);
664 CLHEP::RandGauss rgauss (engine);
679 Fourvec boost = rand_boost (args, engine);
680 lept.boost (boost.boostVector());
681 hadt.boost (boost.boostVector());
682 higgs.boost (boost.boostVector());
704 decay (lepw, 0, 0, engine, lep, nu);
708 decay (hadw, 0, 0, engine, q1, q2);
742 tagsim (args, ev, engine);
bool muon() const
Return the value of muon parameter.
std::string muo_res_str() const
Return the value of muon_res_str parameter.
Define an abstract interface for getting parameter settings.
Represent a lepton in an instance of Lepjets_Event class. This class hold the following information: ...
double boost_sigma() const
Return the value of boost_sigma parameter.
Define three-vector and four-vector classes for the HitFit package, and supply a few additional opera...
Calculate and represent resolution for a physical quantity.
double mh() const
Return the value of mh parameter.
Gentop_Args(const Defaults &defs)
Constructor, initialize an instance of Gentop_Args from an instance of Defaults object.
Resolution & kt_res()
Return a reference to the resolution.
double mw() const
Return the value of mw parameter.
void add_lep(const Lepjets_Event_Lep &lep)
Add a new lepton to the event.
Sin< T >::type sin(const T &t)
Lepjets_Event gentth(const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
Generate a event.
Geom::Theta< T > theta() const
std::string jet_res_str() const
Return the value of jet_res_str parameter.
double sigma_mt() const
Return the value of sigma_mt parameter.
double sigma_mh() const
Return the value of sigma_mh parameter.
double sigma_mb() const
Return the value of sigma_mb parameter.
Represent a simple event consisting of lepton(s) and jet(s).
std::string kt_res_str() const
Return the value of kt_res_str parameter.
double recoil_pt_mean() const
Return the value of recoil_pt_mean parameter.
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
double mb() const
Return the value of mb parameter.
Lepjets_Event gentop(const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
Generate a event.
Cos< T >::type cos(const T &t)
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
A class to represent a jet in an instance of Lepjets_Event class. The class is derived from the Lepje...
double sigma_mw() const
Return the value of sigma_mw parameter.
bool smear_dir() const
Return the value of smear_dir parameter.
Hold on to parameters for the toy event generator.
double mt() const
Return the value of mt parameter.
Fourvec & met()
Return a reference to the missing transverse energy.
double m_boost() const
Return the value of m_boost parameter.
CLHEP::Hep3Vector Threevec
Typedef for a Hep3Vector.
std::string ele_res_str() const
Return the value of ele_res_str parameter.
void add_jet(const Lepjets_Event_Jet &jet)
Add a new jet to the event.
Define an interface for getting parameter settings.
bool smear() const
Return the value of smear parameter.
Calculate and represent resolution for a vector of , pseudorapidity , and azimuthal angle ...
A toy event generator for events.
void smear(CLHEP::HepRandomEngine &engine, bool smear_dir=false)
Smear the objects in the event according to their resolutions.
double svx_tageff() const
Return the value of svx_tageff parameter.
double t_pt_mean() const
Return the value of t_pt_mean parameter.