2 #include "PythiaJetGun.hh"
7 bool QCDSmear::passesCut(
const double prob,
const unsigned recoNum,
8 const unsigned ihard,
const unsigned isoft,
10 const PseudoJet& soft)
const
12 const double softPt = soft.pt();
14 std::cout <<
"QCDCut " << prob/alphaS_.alphaS(softPt*softPt) << std::endl;
16 return prob/alphaS_.alphaS(softPt*softPt) >= cutoff_;
19 bool QCDSmear::operator()(
const double prob,
const unsigned recoNum,
20 const unsigned ihard,
const unsigned isoft,
21 PseudoJet& hard, PseudoJet& soft)
23 if (passesCut(prob, recoNum, ihard, isoft, hard, soft))
25 const rk::P4 hardP4(geom3::Vector3(hard.px(),hard.py(),hard.pz()),hard.m());
26 const rk::P4 softP4(geom3::Vector3(soft.px(),soft.py(),soft.pz()),soft.m());
30 const rk::P4& mother = hardP4 + softP4;
31 const double rnd0 = PythiaJetGun::pyrandom();
34 if (uniformPhaseSpace_)
37 const rk::P4 parent(mother.momentum(), mother.m());
38 const double rnd1 = PythiaJetGun::pyrandom();
39 rk::phaseSpaceDecay(parent, hard.m(), soft.m(),
40 rnd0, rnd1, &dau1, &dau2);
46 const rk::Boost& motherBoost = mother.restBoost();
47 const rk::P4& boostedHard = motherBoost*hardP4;
48 const rk::P4& boostedSoft = motherBoost*hardP4;
49 geom3::Rotation3 rot(motherBoost.direction(), 2.0*M_PI*rnd0);
50 dau1 = rk::P4(rot*boostedHard.momentum(), hard.m());
51 dau2 = rk::P4(rot*boostedSoft.momentum(), soft.m());
54 const rk::Boost& labBoost = motherBoost.inverse();
59 if (dau1.pt() < dau2.pt())
61 hard = PseudoJet(dau2.px(),dau2.py(),dau2.pz(), dau2.e());
62 soft = PseudoJet(dau1.px(),dau1.py(),dau1.pz(), dau1.e());
66 hard = PseudoJet(dau1.px(),dau1.py(),dau1.pz(), dau1.e());
67 soft = PseudoJet(dau2.px(),dau2.py(),dau2.pz(), dau2.e());