<commit_before>// @(#)root/physics:$Name:  $:$Id: TGenPhaseSpace.cxx,v 1.5 2001/07/09 10:57:05 brun Exp $
// Author: <NAME> , <NAME>  06/09/2000 

//_____________________________________________________________________________________
//
//  Utility class to generate n-body event,
//  with constant cross-section (default)
//  or with Fermi energy dependence (opt="Fermi").
//  The event is generated in the center-of-mass frame, 
//  but the decay products are finally boosted
//  using the betas of the original particle.
//
// see example of use in $ROOTSYS/tutorials/PhaseSpace.C

#include "TGenPhaseSpace.h"
#include "TRandom.h"
#include "TMath.h"
#include <stdlib.h>

const Int_t kMAXP = 18;

ClassImp(TGenPhaseSpace)

//_____________________________________________________________________________________
Double_t TGenPhaseSpace::pdk(Double_t a, Double_t b, Double_t c) 
{
  Double_t x = (a-b-c)*(a+b+c)*(a-b+c)*(a+b-c);
  x = TMath::Sqrt(x)/(2*a);
  return x;
}

//_____________________________________________________________________________________<commit_msg>Add references to the GENBOD routine from CERNLIB<commit_after>// @(#)root/physics:$Name:  $:$Id: TGenPhaseSpace.cxx,v 1.6 2002/05/18 08:22:00 brun Exp $
// Author: <NAME> , <NAME>  06/09/2000 

//_____________________________________________________________________________________
//
//  Utility class to generate n-body event,
//  with constant cross-section (default)
//  or with Fermi energy dependence (opt="Fermi").
//  The event is generated in the center-of-mass frame, 
//  but the decay products are finally boosted
//  using the betas of the original particle.
//
//  The code is based on the GENBOD function (W515 from CERNLIB)
//  using the Raubold and Lynch method
//      <NAME>, Monte Carlo Phase Space, CERN 68-15 (1968)
//
// see example of use in $ROOTSYS/tutorials/PhaseSpace.C

#include "TGenPhaseSpace.h"
#include "TRandom.h"
#include "TMath.h"
#include <stdlib.h>

const Int_t kMAXP = 18;

ClassImp(TGenPhaseSpace)

//_____________________________________________________________________________________
Double_t TGenPhaseSpace::pdk(Double_t a, Double_t b, Double_t c) 
{
  Double_t x = (a-b-c)*(a+b+c)*(a-b+c)*(a+b-c);
  x = TMath::Sqrt(x)/(2*a);
  return x;
}

//_____________________________________________________________________________________
{'fraction_non_alphanumeric': 0.12489343563512362, 'fraction_numerical': 0.027706734867860187, 'mean_word_length': 4.7104622871046224, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4768770', 'n_tokens_mistral': 788, 'n_tokens_neox': 714, 'n_words': 200}