3 Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna
4 amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru
9 #include "TLorentzVector.h"
13 #ifndef PARTICLE_INCLUDED
16 #ifndef UKUTILITY_INCLUDED
17 #include "UKUtility.h"
20 const Double_t GeV = 1.;
21 const Double_t fermi = 1.;
22 const Double_t hbarc = 0.197 * GeV * fermi;
23 const Double_t w = 1.0 / 0.1973;
24 const Double_t hbarc_squared = hbarc * hbarc;
26 void IsotropicR3(Double_t r, Double_t *x, Double_t *y, Double_t *z) {
27 Double_t pZ = 1. - 2.*(gRandom->Rndm());
28 Double_t st = TMath::Sqrt((1.-pZ)*(1.+pZ)) * r;
29 Double_t phi = 2. * TMath::Pi() * (gRandom->Rndm());
36 void IsotropicR3(Double_t r, TVector3 &pos) {
37 Double_t pZ = 1. - 2.* (gRandom->Rndm());
38 Double_t st = TMath::Sqrt((1.-pZ)*(1.+pZ)) * r;
39 Double_t phi = 2. * TMath::Pi() * (gRandom->Rndm());
41 pos.SetX(st * TMath::Cos(phi));
42 pos.SetY(st * TMath::Sin(phi));
46 void MomAntiMom(TLorentzVector &mom, Double_t mass, TLorentzVector &antiMom,
47 Double_t antiMass, Double_t initialMass) {
48 Double_t r = initialMass * initialMass - mass * mass - antiMass * antiMass;
49 if (r * r - 4 * mass * mass * antiMass * antiMass < 0.) throw "MomAntiMom";
51 Double_t pAbs = .5 * TMath::Sqrt(r * r - 4 * mass * mass * antiMass * antiMass) / initialMass;
53 IsotropicR3(pAbs, mom3);
54 mom.SetVectM(mom3, mass);
55 antiMom.SetVectM(- mom3, antiMass);