38 #include "CLHEP/Random/RandFlat.h"
39 #include "CLHEP/Random/RandExponential.h"
40 #include "CLHEP/Random/RandBreitWigner.h"
41 #include "CLHEP/Random/RandGauss.h"
42 #include "CLHEP/Units/PhysicalConstants.h"
77 : _t_pt_mean (defs.get_float (
"t_pt_mean")),
78 _mt (defs.get_float (
"mt")),
79 _sigma_mt (defs.get_float (
"sigma_mt")),
80 _mh (defs.get_float (
"mh")),
81 _sigma_mh (defs.get_float (
"sigma_mh")),
82 _recoil_pt_mean (defs.get_float (
"recoil_pt_mean")),
83 _boost_sigma (defs.get_float (
"boost_sigma")),
84 _m_boost (defs.get_float (
"m_boost")),
85 _mb (defs.get_float (
"mb")),
86 _sigma_mb (defs.get_float (
"sigma_mb")),
87 _mw (defs.get_float (
"mw")),
88 _sigma_mw (defs.get_float (
"sigma_mw")),
89 _svx_tageff (defs.get_float (
"svx_tageff")),
90 _smear (defs.get_bool (
"smear")),
91 _smear_dir (defs.get_bool (
"smear_dir")),
92 _muon (defs.get_bool (
"muon")),
93 _ele_res_str (defs.get_string (
"ele_res_str")),
94 _muo_res_str (defs.get_string (
"muo_res_str")),
95 _jet_res_str (defs.get_string (
"jet_res_str")),
96 _kt_res_str (defs.get_string (
"kt_res_str"))
315 Threevec rand_spher (CLHEP::HepRandomEngine& engine)
327 CLHEP::RandFlat
r (engine);
331 double U =
r.fire(0.0,1.0);
332 double V =
r.fire(0.0,1.0);
335 double phi = acos(2*V - 1.0);
337 double x =
sin(theta)*
cos(phi);
338 double y =
sin(theta)*
sin(phi);
339 double z =
cos(theta);
364 CLHEP::HepRandomEngine& engine)
380 CLHEP::RandBreitWigner rbw (engine);
381 double m = rbw.fire (m_true, sigma);
402 void decay (
const Fourvec& v,
double m1,
double m2,
403 CLHEP::HepRandomEngine& engine,
426 double f = m0 / (m1 + m2);
436 p *= 0.5/m0 *
sqrt ( m0_2*m0_2 + m1_2*m1_2 + m2_2*m2_2
437 - 2*m0_2*m1_2 - 2*m0_2*m2_2 - 2*m1_2*m2_2);
438 double p2 = p.mag2();
444 vout1.boost (v.boostVector ());
445 vout2.boost (v.boostVector ());
459 CLHEP::HepRandomEngine& engine)
472 CLHEP::RandExponential rexp (engine);
478 p *= (rexp.fire (pt_mean) / p.perp());
491 Fourvec rand_boost (
const Gentop_Args&
args, CLHEP::HepRandomEngine& engine)
503 CLHEP::RandExponential rexp (engine);
504 CLHEP::RandFlat rflat (engine);
505 CLHEP::RandGauss rgauss (engine);
509 p.rotateZ (rflat.fire (0, 2 *
M_PI));
510 p *= rexp.fire (args.recoil_pt_mean());
511 p.setZ (rgauss.fire (0, args.boost_sigma()));
512 return Fourvec (p,
sqrt (p.mag2() + args.m_boost()*args.m_boost()));
525 void tagsim (
const Gentop_Args& args,
527 CLHEP::HepRandomEngine& engine)
540 CLHEP::RandFlat rflat (engine);
542 int typ = ev.jet(
i).type();
544 if (rflat.fire() < args.svx_tageff())
545 ev.jet(
i).svx_tag() =
true;
560 CLHEP::HepRandomEngine& engine)
572 CLHEP::RandBreitWigner rbw (engine);
573 CLHEP::RandGauss rgauss (engine);
583 Fourvec boost = rand_boost (args, engine);
584 lept.boost (boost.boostVector());
585 hadt.boost (boost.boostVector());
589 double mlb = rgauss.fire (args.
mb(), args.
sigma_mb());
590 double mlw = rbw.fire (args.
mw(), args.
sigma_mw());
600 double mhb = rgauss.fire (args.
mb(), args.
sigma_mb());
601 double mhw = rbw.fire (args.
mw(), args.
sigma_mw());
611 decay (lepw, 0, 0, engine, lep, nu);
615 decay (hadw, 0, 0, engine, q1, q2);
638 tagsim (args, ev, engine);
650 CLHEP::HepRandomEngine& engine)
662 CLHEP::RandBreitWigner rbw (engine);
663 CLHEP::RandGauss rgauss (engine);
678 Fourvec boost = rand_boost (args, engine);
679 lept.boost (boost.boostVector());
680 hadt.boost (boost.boostVector());
681 higgs.boost (boost.boostVector());
703 decay (lepw, 0, 0, engine, lep, nu);
707 decay (hadw, 0, 0, engine, q1, q2);
741 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.