Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//$Id: G4GeneralPhaseSpaceDecay.hh,v 1.1 1997/05/21
|
||||
// ----------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, A. Feliciello, 20th May 1998
|
||||
//
|
||||
// Note: this class is a generalization of the
|
||||
// G4PhaseSpaceDecayChannel one
|
||||
// ----------------------------------------------------------------
|
||||
#ifndef G4GeneralPhaseSpaceDecay_h
|
||||
#define G4GeneralPhaseSpaceDecay_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4VDecayChannel.hh"
|
||||
|
||||
class G4GeneralPhaseSpaceDecay : public G4VDecayChannel
|
||||
{
|
||||
public:
|
||||
//Constructors
|
||||
G4GeneralPhaseSpaceDecay(G4int Verbose = 1);
|
||||
|
||||
G4GeneralPhaseSpaceDecay(const G4String& theParentName,
|
||||
G4double theBR,
|
||||
G4int theNumberOfDaughters,
|
||||
const G4String& theDaughterName1,
|
||||
const G4String& theDaughterName2 = "",
|
||||
const G4String& theDaughterName3 = "");
|
||||
|
||||
G4GeneralPhaseSpaceDecay(const G4String& theParentName,
|
||||
G4double theParentMass,
|
||||
G4double theBR,
|
||||
G4int theNumberOfDaughters,
|
||||
const G4String& theDaughterName1,
|
||||
const G4String& theDaughterName2 = "",
|
||||
const G4String& theDaughterName3 = "");
|
||||
|
||||
// Destructor
|
||||
virtual ~G4GeneralPhaseSpaceDecay();
|
||||
|
||||
public:
|
||||
G4double GetParentMass() const;
|
||||
void SetParentMass(const G4double aParentMass);
|
||||
virtual G4DecayProducts* DecayIt(G4double mass=0.0);
|
||||
static G4double Pmx(G4double e, G4double p1, G4double p2);
|
||||
|
||||
protected:
|
||||
G4DecayProducts* OneBodyDecayIt();
|
||||
G4DecayProducts* TwoBodyDecayIt();
|
||||
G4DecayProducts* ThreeBodyDecayIt();
|
||||
G4DecayProducts* ManyBodyDecayIt();
|
||||
|
||||
private:
|
||||
G4double parentmass;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline G4double G4GeneralPhaseSpaceDecay::GetParentMass() const
|
||||
{
|
||||
return parentmass;
|
||||
}
|
||||
|
||||
inline void G4GeneralPhaseSpaceDecay::SetParentMass(const G4double aParentMass)
|
||||
{
|
||||
parentmass = aParentMass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline
|
||||
G4double G4GeneralPhaseSpaceDecay::Pmx(G4double e, G4double p1, G4double p2)
|
||||
{
|
||||
// calculate momentum of daughter particles in two-body decay
|
||||
G4double ppp = (e+p1+p2)*(e+p1-p2)*(e-p1+p2)*(e-p1-p2)/(4.0*e*e);
|
||||
if (ppp>0) return sqrt(ppp);
|
||||
else return -1.;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user