37 #include "CLHEP/Random/RandFlat.h" 38 #include "CLHEP/Random/RandExponential.h" 39 #include "CLHEP/Random/RandBreitWigner.h" 40 #include "CLHEP/Random/RandGauss.h" 41 #include "CLHEP/Units/PhysicalConstants.h" 71 : _t_pt_mean(defs.get_float(
"t_pt_mean")),
72 _mt(defs.get_float(
"mt")),
73 _sigma_mt(defs.get_float(
"sigma_mt")),
74 _mh(defs.get_float(
"mh")),
75 _sigma_mh(defs.get_float(
"sigma_mh")),
76 _recoil_pt_mean(defs.get_float(
"recoil_pt_mean")),
77 _boost_sigma(defs.get_float(
"boost_sigma")),
78 _m_boost(defs.get_float(
"m_boost")),
79 _mb(defs.get_float(
"mb")),
80 _sigma_mb(defs.get_float(
"sigma_mb")),
81 _mw(defs.get_float(
"mw")),
82 _sigma_mw(defs.get_float(
"sigma_mw")),
83 _svx_tageff(defs.get_float(
"svx_tageff")),
84 _smear(defs.get_bool(
"smear")),
85 _smear_dir(defs.get_bool(
"smear_dir")),
86 _muon(defs.get_bool(
"muon")),
87 _ele_res_str(defs.get_string(
"ele_res_str")),
88 _muo_res_str(defs.get_string(
"muo_res_str")),
89 _jet_res_str(defs.get_string(
"jet_res_str")),
90 _kt_res_str(defs.get_string(
"kt_res_str")) {}
284 Threevec rand_spher(CLHEP::HepRandomEngine& engine)
296 CLHEP::RandFlat
r(engine);
300 double U =
r.fire(0.0, 1.0);
301 double V =
r.fire(0.0, 1.0);
304 double phi = acos(2 *
V - 1.0);
329 Fourvec make_massive(
const Threevec&
p,
double m_true,
double sigma, CLHEP::HepRandomEngine& engine)
345 CLHEP::RandBreitWigner rbw(engine);
346 double m = rbw.fire(m_true, sigma);
389 double f = m0 / (m1 +
m2);
394 double m0_2 = m0 * m0;
395 double m1_2 = m1 * m1;
396 double m2_2 =
m2 *
m2;
400 sqrt(m0_2 * m0_2 + m1_2 * m1_2 + m2_2 * m2_2 - 2 * m0_2 * m1_2 - 2 * m0_2 * m2_2 - 2 * m1_2 * m2_2);
401 double p2 =
p.mag2();
407 vout1.boost(
v.boostVector());
408 vout2.boost(
v.boostVector());
420 Threevec rand_pt(
double pt_mean, CLHEP::HepRandomEngine& engine)
433 CLHEP::RandExponential rexp(engine);
439 p *= (rexp.fire(pt_mean) /
p.perp());
451 Fourvec rand_boost(
const Gentop_Args&
args, CLHEP::HepRandomEngine& engine)
463 CLHEP::RandExponential rexp(engine);
464 CLHEP::RandFlat rflat(engine);
465 CLHEP::RandGauss rgauss(engine);
469 p.rotateZ(rflat.fire(0, 2 *
M_PI));
470 p *= rexp.fire(
args.recoil_pt_mean());
471 p.setZ(rgauss.fire(0,
args.boost_sigma()));
484 void tagsim(
const Gentop_Args&
args, Lepjets_Event&
ev, CLHEP::HepRandomEngine& engine)
497 CLHEP::RandFlat rflat(engine);
499 int typ =
ev.jet(
i).type();
501 if (rflat.fire() <
args.svx_tageff())
502 ev.jet(
i).svx_tag() =
true;
525 CLHEP::RandBreitWigner rbw(engine);
526 CLHEP::RandGauss rgauss(engine);
537 lept.boost(
boost.boostVector());
538 hadt.boost(
boost.boostVector());
542 double mlb = rgauss.fire(
args.mb(),
args.sigma_mb());
543 double mlw = rbw.fire(
args.mw(),
args.sigma_mw());
544 decay(lept, mlb, mlw, engine, lepb, lepw);
548 double mhb = rgauss.fire(
args.mb(),
args.sigma_mb());
549 double mhw = rbw.fire(
args.mw(),
args.sigma_mw());
550 decay(hadt, mhb, mhw, engine, hadb, hadw);
554 decay(lepw, 0, 0, engine, lep, nu);
558 decay(hadw, 0, 0, engine, q1, q2);
574 ev.kt_res() = kt_res;
581 ev.smear(engine,
args.smear_dir());
599 CLHEP::RandBreitWigner rbw(engine);
600 CLHEP::RandGauss rgauss(engine);
616 lept.boost(
boost.boostVector());
617 hadt.boost(
boost.boostVector());
618 higgs.boost(
boost.boostVector());
622 decay(lept, rgauss.fire(
args.mb(),
args.sigma_mb()), rbw.fire(
args.mw(),
args.sigma_mw()), engine, lepb, lepw);
626 decay(hadt, rgauss.fire(
args.mb(),
args.sigma_mb()), rbw.fire(
args.mw(),
args.sigma_mw()), engine, hadb, hadw);
630 decay(lepw, 0, 0, engine, lep, nu);
634 decay(hadw, 0, 0, engine, q1, q2);
638 decay(higgs, rgauss.fire(
args.mb(),
args.sigma_mb()), rgauss.fire(
args.mb(),
args.sigma_mb()), engine, hb1, hb2);
656 ev.kt_res() = kt_res;
663 ev.smear(engine,
args.smear_dir());
Define an abstract interface for getting parameter settings.
Represent a lepton in an instance of Lepjets_Event class. This class hold the following information: ...
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 mw() const
Return the value of mw parameter.
Gentop_Args(const Defaults &defs)
Constructor, initialize an instance of Gentop_Args from an instance of Defaults object.
double boost_sigma() const
Return the value of boost_sigma parameter.
Sin< T >::type sin(const T &t)
Lepjets_Event gentth(const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
Generate a event.
double m_boost() const
Return the value of m_boost parameter.
bool muon() const
Return the value of muon parameter.
std::string ele_res_str() const
Return the value of ele_res_str parameter.
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
Represent a simple event consisting of lepton(s) and jet(s).
double sigma_mt() const
Return the value of sigma_mt parameter.
double mt() const
Return the value of mt parameter.
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
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...
bool smear_dir() const
Return the value of smear_dir parameter.
Hold on to parameters for the toy event generator.
bool smear() const
Return the value of smear parameter.
CLHEP::Hep3Vector Threevec
Typedef for a Hep3Vector.
std::string jet_res_str() const
Return the value of jet_res_str parameter.
double recoil_pt_mean() const
Return the value of recoil_pt_mean parameter.
double t_pt_mean() const
Return the value of t_pt_mean parameter.
double sigma_mw() const
Return the value of sigma_mw parameter.
Define an interface for getting parameter settings.
std::string kt_res_str() const
Return the value of kt_res_str parameter.
double sigma_mb() const
Return the value of sigma_mb parameter.
double sigma_mh() const
Return the value of sigma_mh parameter.
Calculate and represent resolution for a vector of , pseudorapidity , and azimuthal angle ...
double mb() const
Return the value of mb parameter.
double svx_tageff() const
Return the value of svx_tageff parameter.
double mh() const
Return the value of mh parameter.
Geom::Theta< T > theta() const
A toy event generator for events.
std::string muo_res_str() const
Return the value of muon_res_str parameter.