36 Double_t
x = (a-b-c)*(a+b+c)*(a-b+c)*(a+b-c);
46 Double_t aa = * ((Double_t *) a);
47 Double_t bb = * ((Double_t *) b);
48 if (aa > bb)
return 1;
49 if (aa < bb)
return -1;
65 for (Int_t i=0;i<
fNt;i++) {
77 TObject::operator=(gen);
84 for (Int_t i=0;i<
fNt;i++) {
105 qsort(rno+1 ,fNt-2 ,
sizeof(Double_t) ,
DoubleMax);
109 Double_t invMas[
kMAXP], sum=0;
110 for (n=0; n<
fNt; n++) {
112 invMas[n] = rno[n]*
fTeCmTm + sum;
120 for (n=0; n<fNt-1; n++) {
121 pd[n] =
PDK(invMas[n+1],invMas[n],
fMass[n+1]);
140 for (j=0; j<=i; j++) {
142 Double_t
x = v->
Px();
143 Double_t
y = v->
Py();
144 v->
SetPx( cZ*x - sZ*y );
145 v->
SetPy( sZ*x + cZ*y );
147 Double_t
z = v->
Pz();
148 v->
SetPx( cY*x - sY*z );
149 v->
SetPz( sY*x + cY*z );
152 if (i == (fNt-1))
break;
154 Double_t
beta = pd[i] /
sqrt(pd[i]*pd[i] + invMas[i]*invMas[i]);
155 for (j=0; j<=i; j++)
fDecPro[j].Boost(0,beta,0);
193 const Double_t *mass, Option_t *opt)
197 if (fNt<2 || fNt>18)
return kFALSE;
203 for (n=0;n<
fNt;n++) {
215 if (strcasecmp(opt,
"fermi")==0) {
218 ,3.141592, 19.73921, 62.01255, 129.8788, 204.0131
219 ,256.3704, 268.4705, 240.9780, 189.2637
220 ,132.1308, 83.0202, 47.4210, 24.8295
221 ,12.0006, 5.3858, 2.2560, 0.8859 };
228 for (n=1; n<
fNt; n++) {
231 wtmax *=
PDK(emmax, emmin, fMass[n]);
void SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t e)
Double_t Generate()
Generate a random final state.
you should not use this method at all Int_t y
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
double beta(double x, double y)
Calculates the beta function.
TGenPhaseSpace & operator=(const TGenPhaseSpace &gen)
Assignment operator.
TLorentzVector fDecPro[18]
Int_t DoubleMax(const void *a, const void *b)
Special max function.
virtual Double_t Rndm()
Machine independent random number generator.
TLorentzVector is a general four-vector class, which can be used either for the description of positi...
R__EXTERN TRandom * gRandom
Utility class to generate n-body event, with constant cross-section (default) or with Fermi energy de...
* x
Deprecated and error prone model selection interface.
Bool_t SetDecay(TLorentzVector &P, Int_t nt, const Double_t *mass, Option_t *opt="")
Input:
you should not use this method at all Int_t Int_t z
Double_t PDK(Double_t a, Double_t b, Double_t c)
The PDK function.
TLorentzVector * GetDecay(Int_t n)
Return Lorentz vector corresponding to decay n.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Double_t Sqrt(Double_t x)