Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

RanboDecayer.cxx

Go to the documentation of this file.
00001 // -*- C++ -*-  $Id: RanboDecayer.cxx,v 1.3 2001/02/19 18:29:57 burnett Exp $
00002 //
00003 // This file is part of Gismo 2
00004 //
00005 
00006 #include "RanboDecayer.h"
00007 #include "Ranbo.h"
00008 #include "Random.h"
00009 #include "gismo/GParticle.h"
00010 
00011 // Constructor //
00012 RanboDecayer::RanboDecayer(const char *) : Decayer("Ranbo")
00013 {
00014 }
00015 
00016 
00017 int
00018 RanboDecayer::decay(GParticle* parent)const
00019 {
00020         int n = parent->numChildren();
00021         double W    = parent->mass();
00022         double *mu = new double[n];
00023         int i;
00024         for(i=0; i<n; i++)
00025                 mu[i] = parent->child(i)->mass();
00026 
00027         Ranbo k(W,n,mu, Random::generator());
00028 
00029         for( i=0; i<n; i++)
00030                 parent->child(i)->setMomentum(k[i]);
00031 
00032         weight = k.weight();
00033         delete [] mu;
00034         return 1;
00035 }
00036 
00037 

Generated at Mon Nov 26 18:18:34 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000