81 Double_t phi, pt,
y, mt, px, py, pz;
84 for (Int_t k = 0; k <
fMult; k++) {
86 phi = gRandom->Uniform(0, TMath::TwoPi());
91 px = pt * TMath::Cos(phi);
92 py = pt * TMath::Sin(phi);
98 pz = mt * TMath::SinH(
y);
114 part = TDatabasePDG::Instance()->GetParticle(
"mu+");
116 part = TDatabasePDG::Instance()->GetParticle(
"e+");
118 LOG(fatal) << GetName() <<
"::GenerateDaughters: Polarized dilepton decay only implemented";
121 Double_t m = part->Mass();
123 Double_t p = TMath::Sqrt(e * e - m * m);
125 Double_t cost =
fPol->GetRandom();
126 Double_t sint = TMath::Sqrt(1. - cost * cost);
127 Double_t phi = TMath::TwoPi() * gRandom->Rndm();
128 Double_t px = p * sint * TMath::Cos(phi);
129 Double_t py = p * sint * TMath::Sin(phi);
130 Double_t pz = p * cost;
132 TLorentzVector v1, v2, boosted1, boosted2;
133 v1.SetPxPyPzE(-px, -py, -pz, e);
134 v2.SetPxPyPzE(+px, +py, +pz, e);
139 TVector3
boost =
v.BoostVector();
145 zaxis = pMother.Unit();
151 TLorentzVector proj = TLorentzVector(0., 0.,
fBeamMomentum, ep);
152 TLorentzVector targ = TLorentzVector(0., 0., 0., mp);
155 zaxis = (proj.Vect().Unit() - targ.Vect().Unit()).Unit();
158 zaxis = TVector3(0., 0., 1.);
166 Int_t pdg = part->PdgCode();
167 Info(
"ReadEvent",
"Particle generated: pdg=%3i pt=%7.4f y=%7.4f", pdg, v1.Pt(), v1.Rapidity());
168 Info(
"ReadEvent",
"Particle generated: pdg=%3i pt=%7.4f y=%7.4f", -pdg, v2.Pt(), v2.Rapidity());
169 primGen->AddTrack(pdg, v1[0], v1[1], v1[2], 0, 0, 0);
170 primGen->AddTrack(-pdg, v2[0], v2[1], v2[2], 0, 0, 0);