Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
@@ -0,0 +1,132 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
// GEANT4 Class file
//
//
// File name: G4Clebsch
//
// Author: Maria Grazia Pia (MariaGrazia.Pia@genova.infn.it)
//
// Creation date: 15 April 1999
//
// Modifications: February 2015, Jason Detwiler (jasondet@gmail.com)
// - Update variable names to clarify that twice
// the spin value is being used.
// - Add function to obtain raw CG coeffients
// - Speed up Wigner 3j evaluation by removing
// reallocation of vector<double>'s on every call
// - Use G4Pow instead of internal logs variable
// - Add functions for Wigner 6j and 9j symbols,
// Racah coefficients, and d-Matrices
// - Make functions statically available
// - Eliminate unnecessary constructors, destructors,
// operators (class has no members, so default versions
// are adequate)
// 11.06.2015 V.Ivanchenko adopted for Geant4 source
//
// Clebsch-Gordan coefficient and related algebra
//
// -------------------------------------------------------------------
#ifndef G4CLEBSCH_HH
#define G4CLEBSCH_HH
#include "globals.hh"
#include <vector>
class G4Clebsch
{
public:
// Calculates the standard Clebsch-Gordan coefficient with Condon-Shortley
// phase convention.
static
G4double ClebschGordanCoeff(G4int twoJ1, G4int twoM1,
G4int twoJ2, G4int twoM2,
G4int twoJ);
// Calculates the square of the corresponding Clebsch-Gordan coefficient
static
G4double ClebschGordan(G4int twoJ1, G4int twoM1,
G4int twoJ2, G4int twoM2,
G4int twoJ);
static
std::vector<G4double> GenerateIso3(G4int twoJ1, G4int twoM1,
G4int twoJ2, G4int twoM2,
G4int twoJOut1, G4int twoJOut2);
static
G4double Weight(G4int twoJ1, G4int twoM1,
G4int twoJ2, G4int twoM2,
G4int twoJOut1, G4int twoJOut2);
// Deprecated G4double version of Wigner3J that assumes user sent in half-int
// values. Use G4int version instead, which guarantees validity of arguments.
static
G4double Wigner3J(G4double j1, G4double j2, G4double j3,
G4double m1, G4double m2, G4double m3);
// Wigner's 3J symbols (CG-coeffs with a different phase and normalization)
static G4double Wigner3J(G4int twoJ1, G4int twoM1,
G4int twoJ2, G4int twoM2,
G4int twoJ3);
static G4double Wigner3J(G4int twoJ1, G4int twoM1,
G4int twoJ2, G4int twoM2,
G4int twoJ3, G4int twoM3);
// Calculates the normalized Clebsch-Gordan coefficient, that is the prob
// of isospin decomposition of (J,m) into J1, J2, m1, m2
static
G4double NormalizedClebschGordan(G4int twoJ, G4int twom,
G4int twoJ1, G4int twoJ2,
G4int twom1, G4int twom2);
// Triangle coefficient appearing in explicit calculation of CG-coeffs
static G4double TriangleCoeff(G4int twoA, G4int twoB, G4int twoC);
// Wigner's 6J symbols (generalization of CG's for coupling of 3 angular momenta).
static G4double Wigner6J(G4int twoJ1, G4int twoJ2, G4int twoJ3,
G4int twoJ4, G4int twoJ5, G4int twoJ6);
// Racah's W Coeffs (6J's with a different phase and normalization)
static G4double RacahWCoeff(G4int twoJ1, G4int twoJ2,
G4int twoJ, G4int twoJ3,
G4int twoJ12, G4int twoJ23);
// Wigner's 9J symbols (generalization of CG's for coupling of 4 angular momenta).
static G4double Wigner9J(G4int twoJ1, G4int twoJ2, G4int twoJ3,
G4int twoJ4, G4int twoJ5, G4int twoJ6,
G4int twoJ7, G4int twoJ8, G4int twoJ9);
// Wigner's little-d matrix
static G4double WignerLittleD(G4int twoJ, G4int twoM, G4int twoN,
G4double cosTheta);
};
#endif
@@ -0,0 +1,47 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Utility class to process contents of G4KineticTrackVector (input to
// models' ::Propagate() interface) and decay any short-lived resonances.
// Resulting daughters are added to vector (no function or return needed).
//
// Author: Michael Kelsey <kelsey@slac.stanford.edu>
#ifndef G4DecayKineticTracks_hh
#define G4DecayKineticTracks_hh 1
class G4KineticTrackVector;
class G4DecayKineticTracks {
public:
G4DecayKineticTracks(G4KineticTrackVector *tracks=0);
// User may keep object permanently (static) and re-use as needed
void Decay(G4KineticTrackVector *tracks) const;
};
#endif /* G4DecayKineticTracks_hh */
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// File name: G4DecayStrongResonances
//
// Modified:
// 02.11.2010 V.Ivanchenko moved constructor and destructor to source;
// removed unused variable
#ifndef G4DecayStrongResonances_h
#define G4DecayStrongResonances_h 1
#include "G4KineticTrackVector.hh"
#include "G4ReactionProductVector.hh"
class G4V3DNucleus;
class G4DecayStrongResonances
{
public:
G4DecayStrongResonances();
~G4DecayStrongResonances();
private:
G4bool operator==(G4DecayStrongResonances& right) {return (this == &right);}
G4bool operator!=(G4DecayStrongResonances& right) {return (this != &right);}
public:
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries,
G4V3DNucleus* );
};
#endif // G4DecayStrongResonances_h
@@ -0,0 +1,274 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
#ifndef G4ExcitedString_h
#define G4ExcitedString_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4ExcitedString ----------------
// by Gunter Folger, June 1998.
// class for an excited string used by Parton String Models
// ------------------------------------------------------------
#include "G4ios.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4LorentzRotation.hh"
#include "G4Parton.hh"
#include "G4PartonVector.hh"
#include "G4KineticTrack.hh"
#include "G4HadronicException.hh"
#include <algorithm>
class G4ExcitedString
{
public:
enum {
PROJECTILE = 1,
TARGET = -1
};
G4ExcitedString(G4Parton* Color, G4Parton* Gluon, G4Parton* AntiColor, G4int Direction=PROJECTILE);
G4ExcitedString(G4Parton* Color, G4Parton* AntiColor, G4int Direction=PROJECTILE);
G4ExcitedString(G4KineticTrack * atrack);
~G4ExcitedString();
private:
G4ExcitedString(const G4ExcitedString &right);
G4ExcitedString& operator= (const G4ExcitedString &right);
public:
G4bool operator==(const G4ExcitedString &right) const;
G4bool operator!=(const G4ExcitedString &right) const;
public:
G4double GetTimeOfCreation() const;
void SetTimeOfCreation(G4double aTime);
const G4ThreeVector & GetPosition() const;
void SetPosition(const G4ThreeVector &aPosition);
const G4PartonVector * GetPartonList() const;
G4LorentzVector Get4Momentum() const;
void LorentzRotate(const G4LorentzRotation & rotation);
void InsertParton(G4Parton * aParton, const G4Parton * addafter = NULL);
G4LorentzRotation TransformToCenterOfMass();
G4LorentzRotation TransformToAlignedCms();
void Boost(G4ThreeVector& Velocity);
G4Parton* GetColorParton(void) const;
G4Parton* GetGluon(void) const;
G4Parton* GetAntiColorParton(void) const;
G4Parton* GetGluon(G4int GluonPos) const;
G4KineticTrack * GetKineticTrack() const;
G4Parton* GetLeftParton(void) const;
G4Parton* GetRightParton(void) const;
G4bool IsItKinkyString(void) const;
G4int GetDirection(void) const;
G4bool IsExcited() const;
private:
G4int theDirection; // must be 1 or -1 (PROJECTILE or TARGET)
G4double theTimeOfCreation;
G4ThreeVector thePosition;
G4PartonVector thePartons; // would like initial capacity for 3 Partons.
G4KineticTrack* theTrack;
};
inline
G4bool G4ExcitedString::operator==(const G4ExcitedString &right) const
{
return this == &right;
}
inline
G4bool G4ExcitedString::operator!=(const G4ExcitedString &right) const
{
return this != &right;
}
inline
G4double G4ExcitedString::GetTimeOfCreation() const
{
return theTimeOfCreation;
}
inline
void G4ExcitedString::SetTimeOfCreation(G4double aTime)
{
theTimeOfCreation=aTime;
}
inline
const G4ThreeVector & G4ExcitedString::GetPosition() const
{
return thePosition;
}
inline
void G4ExcitedString::SetPosition(const G4ThreeVector &aPosition)
{
thePosition= aPosition;
}
inline
G4LorentzVector G4ExcitedString::Get4Momentum() const
{
G4LorentzVector momentum;
if ( IsExcited() )
{
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
// std::cout << "HPW "<<thePartons[index]->Get4Momentum()<<std::endl;
momentum += thePartons[index]->Get4Momentum();
}
}
else
{
momentum=theTrack->Get4Momentum();
}
return momentum;
}
inline
void G4ExcitedString::LorentzRotate(const G4LorentzRotation & rotation)
{
if ( IsExcited() )
{
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
thePartons[index]->Set4Momentum(rotation*thePartons[index]->Get4Momentum());
}
}
else
{
theTrack->Set4Momentum(rotation*theTrack->Get4Momentum());
}
}
inline
void G4ExcitedString::InsertParton(G4Parton *aParton, const G4Parton * addafter)
{
G4PartonVector::iterator insert_index;
if ( addafter != NULL )
{
insert_index=std::find(thePartons.begin(), thePartons.end(), addafter);
if ( insert_index == thePartons.end() ) // No object addafter in thePartons
{
G4String text = "G4ExcitedString::InsertParton called with invalid second argument";
throw G4HadronicException(__FILE__, __LINE__, text);
}
}
thePartons.insert(insert_index+1, aParton);
}
inline
G4LorentzRotation G4ExcitedString::TransformToCenterOfMass()
{
G4LorentzVector momentum=Get4Momentum();
G4LorentzRotation toCms(-1*momentum.boostVector());
if ( IsExcited() )
{
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
momentum=toCms * thePartons[index]->Get4Momentum();
thePartons[index]->Set4Momentum(momentum);
}
}
else
{
momentum*=toCms;
theTrack->Set4Momentum(momentum);
}
return toCms;
}
inline
G4LorentzRotation G4ExcitedString::TransformToAlignedCms()
{
G4LorentzVector momentum=Get4Momentum();
G4LorentzRotation toAlignedCms(-1*momentum.boostVector());
momentum= toAlignedCms* thePartons[0]->Get4Momentum();
toAlignedCms.rotateZ(-1*momentum.phi());
toAlignedCms.rotateY(-1*momentum.theta());
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
momentum=toAlignedCms * thePartons[index]->Get4Momentum();
thePartons[index]->Set4Momentum(momentum);
}
return toAlignedCms;
}
inline
const G4PartonVector * G4ExcitedString::GetPartonList() const
{
return &thePartons;
}
inline
G4KineticTrack * G4ExcitedString::GetKineticTrack() const
{
return theTrack;
}
inline
G4bool G4ExcitedString::IsExcited() const
{
return theTrack == 0;
}
#endif
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
#ifndef G4ExcitedStringVector_h
#define G4ExcitedStringVector_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4ExcitedStringVector ----------------
// by Gunter Folger, June 1998.
// ------------------------------------------------------------
#include "G4ExcitedString.hh"
#include <vector>
typedef std::vector<G4ExcitedString *> G4ExcitedStringVector;
struct DeleteString { void operator()(G4ExcitedString* aS){delete aS;} };
#endif
@@ -0,0 +1,142 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4Fancy3DNucleus_h
#define G4Fancy3DNucleus_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4Fancy3DNucleus ----------------
// by Gunter Folger, May 1998.
// class for a 3D nucleus, arranging nucleons in space and momentum.
// ------------------------------------------------------------
// 20110805 M. Kelsey -- Remove C-style array (pointer) of G4Nucleons,
// make vector a container of objects. Move testSums,
// places, momentum and fermiM to class data members for
// reuse. Remove args from ReduceSum(), use data members.
#include "globals.hh"
#include "G4DynamicParticle.hh"
#include "G4Nucleon.hh" /* FIXME: This should be forward decl! */
#include "G4V3DNucleus.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
#include <vector>
class G4Fancy3DNucleusHelper;
// to test if we can drop old interface for (A,Z), comment next line..
//#define NON_INTEGER_A_Z 1
class G4Fancy3DNucleus : public G4V3DNucleus
{
public:
G4Fancy3DNucleus();
~G4Fancy3DNucleus();
private:
G4Fancy3DNucleus(const G4Fancy3DNucleus &right);
const G4Fancy3DNucleus & operator=(const G4Fancy3DNucleus &right);
G4bool operator==(const G4Fancy3DNucleus &right) const;
G4bool operator!=(const G4Fancy3DNucleus &right) const;
// Implementation
void ChooseNucleons();
void ChoosePositions();
void ChooseFermiMomenta();
G4double BindingEnergy();
G4bool ReduceSum();
public:
#if defined(NON_INTEGER_A_Z)
void Init(G4double theA, G4double theZ);
#endif
void Init(G4int theA, G4int theZ);
G4bool StartLoop();
G4Nucleon * GetNextNucleon();
const std::vector<G4Nucleon> & GetNucleons();
G4int GetMassNumber();
G4double GetMass();
G4int GetCharge();
G4double GetNuclearRadius();
G4double GetNuclearRadius(const G4double maxRelativeDensity);
G4double GetOuterRadius();
G4double AddExcitationEnergy(G4double);
G4double GetExcitationEnergy();
G4double CoulombBarrier();
void DoLorentzBoost(const G4LorentzVector & theBoost);
void DoLorentzBoost(const G4ThreeVector & theBeta);
void DoLorentzContraction(const G4LorentzVector & theBoost);
void DoLorentzContraction(const G4ThreeVector & theBeta);
void CenterNucleons();
void DoTranslation(const G4ThreeVector & theShift);
const G4VNuclearDensity * GetNuclearDensity() const;
void SortNucleonsIncZ();
void SortNucleonsDecZ();
private:
G4int myA;
G4int myZ;
std::vector<G4Nucleon> theNucleons;
G4int currentNucleon;
G4VNuclearDensity * theDensity;
G4FermiMomentum theFermi;
//const G4double nucleondistance; // Uzhi Dec. 2017
G4double nucleondistance; // Uzhi Dec. 2017
G4double excitationEnergy;
std::vector<G4ThreeVector> places; // For selecting locations
std::vector<G4ThreeVector> momentum; // For selecting nucleon motion
std::vector<G4double> fermiM;
std::vector<G4Fancy3DNucleusHelper> testSums; // For sorting nucleon configs
};
inline G4int G4Fancy3DNucleus::GetCharge()
{
return myZ;
}
inline G4int G4Fancy3DNucleus::GetMassNumber()
{
return myA;
}
inline G4double G4Fancy3DNucleus::AddExcitationEnergy(G4double anE)
{
excitationEnergy +=anE;
return excitationEnergy;
}
inline G4double G4Fancy3DNucleus::GetExcitationEnergy()
{
return excitationEnergy;
}
#endif
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4Fancy3DNucleusHelper_h
#define G4Fancy3DNucleusHelper_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4Fancy3DNucleusHelper ----------------
// by Gunter Folger, May 1998.
// Simple container class to support sorting nucleon configuration
// ------------------------------------------------------------
// 20110805 M. Kelsey -- Extracted from G4Fancy3DNucleus.cc
#include "globals.hh"
#include "G4ThreeVector.hh"
class G4Fancy3DNucleusHelper {
public:
G4Fancy3DNucleusHelper(): Vector(0,0,0), Size(0), Index(0) {}
G4Fancy3DNucleusHelper(const G4ThreeVector &vec, G4double size,
G4int index)
: Vector(vec), Size(size), Index(index) {}
G4Fancy3DNucleusHelper& operator=(const G4Fancy3DNucleusHelper &right)=default;
void Fill(const G4ThreeVector &vec, G4double size, G4int index) {
Vector = vec;
Size = size;
Index = index;
}
// Equality only true for same object (tests by address)
G4bool operator==(const G4Fancy3DNucleusHelper &right) const
{
return (this == &right);
}
// Sorting on size value
G4bool operator<(const G4Fancy3DNucleusHelper &right) const
{
return (Size < right.Size);
}
// Data members are public for simplicity of sorting
G4ThreeVector Vector;
G4double Size;
G4int Index;
};
#endif /* G4Fancy3DNucleusHelper_h */
@@ -0,0 +1,80 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
#ifndef G4FermiMomentum_h
#define G4FermiMomentum_h 1
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "Randomize.hh"
#include "G4Pow.hh"
class G4FermiMomentum
{
public:
G4FermiMomentum();
~G4FermiMomentum();
inline void Init(G4int anA, G4int aZ) {theA = anA; theZ = aZ;}
inline G4double GetFermiMomentum(G4double density)
{
return constofpmax * cbrt(density * theA);
}
inline G4ThreeVector GetMomentum(G4double density,
G4double maxMomentum=-1.)
{
if (maxMomentum < 0 ) maxMomentum=GetFermiMomentum(density);
G4ThreeVector p;
do {
p=G4ThreeVector(2.*G4UniformRand()-1.,
2.*G4UniformRand()-1.,
2.*G4UniformRand()-1.);
} while ( p.mag() > 1. ); /* Loop checking, 30-Oct-2015, G.Folger */
return p*maxMomentum;
}
private:
G4double cbrt(G4double x) { return G4Pow::GetInstance()->A13(x); }
private:
G4int theA;
G4int theZ;
// pmax= hbar * c * ( 3* pi**2 * rho )**(1/3) =
// hbar * c * ( 3* pi**2 )**(1/3) * rho**(1/3)=
// constofpmax * rho**(1/3)
G4double constofpmax;
};
#endif
@@ -0,0 +1,467 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//---------------------------------------------------------------------
//
// Geant4 header G4Fragment
//
// by V. Lara (May 1998)
//
// Modifications:
// 03.05.2010 V.Ivanchenko General cleanup of inline functions: objects
// are accessed by reference; remove double return
// tolerance of excitation energy at modent it is computed;
// safe computation of excitation for exotic fragments
// 18.05.2010 V.Ivanchenko added member theGroundStateMass and inline
// method which allowing to compute this value once and use
// many times
// 26.09.2010 V.Ivanchenko added number of protons, neutrons, proton holes
// and neutron holes as members of the class and Get/Set methods;
// removed not needed 'const'; removed old debug staff and unused
// private methods; add comments and reorder methods for
// better reading
#ifndef G4Fragment_h
#define G4Fragment_h 1
#include "globals.hh"
#include "G4Allocator.hh"
#include "G4LorentzVector.hh"
#include "G4ThreeVector.hh"
#include "G4NuclearPolarization.hh"
#include "G4NucleiProperties.hh"
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include <vector>
class G4ParticleDefinition;
class G4Fragment;
typedef std::vector<G4Fragment*> G4FragmentVector;
class G4Fragment
{
public:
// ============= CONSTRUCTORS ==================
// Default constructor - obsolete
G4Fragment();
// Destructor
~G4Fragment();
// Copy constructor
G4Fragment(const G4Fragment &right);
// A,Z and 4-momentum - main constructor for fragment
G4Fragment(G4int A, G4int Z, const G4LorentzVector& aMomentum, G4bool warning=true);
// 4-momentum and pointer to G4particleDefinition (for gammas, e-)
G4Fragment(const G4LorentzVector& aMomentum,
const G4ParticleDefinition* aParticleDefinition);
// ============= OPERATORS ==================
G4Fragment & operator=(const G4Fragment &right);
G4bool operator==(const G4Fragment &right) const;
G4bool operator!=(const G4Fragment &right) const;
friend std::ostream& operator<<(std::ostream&, const G4Fragment&);
// new/delete operators are overloded to use G4Allocator
inline void *operator new(size_t);
inline void operator delete(void *aFragment);
// ============= GENERAL METHODS ==================
inline G4int GetZ_asInt() const;
inline G4int GetA_asInt() const;
inline void SetZandA_asInt(G4int Znew, G4int Anew);
inline G4double GetExcitationEnergy() const;
inline void SetExcEnergyAndMomentum(G4double eexc, const G4LorentzVector&);
inline G4double GetGroundStateMass() const;
inline G4double GetBindingEnergy() const;
inline const G4LorentzVector& GetMomentum() const;
inline void SetMomentum(const G4LorentzVector& value);
// computation of mass for any Z and A
inline G4double ComputeGroundStateMass(G4int Z, G4int A) const;
// extra methods
inline G4double GetSpin() const;
inline void SetSpin(G4double value);
inline G4int GetCreatorModelType() const;
inline void SetCreatorModelType(G4int value);
// obsolete methods
inline G4double GetZ() const;
inline G4double GetA() const;
inline void SetZ(G4double value);
inline void SetA(G4double value);
// ============= METHODS FOR PRE-COMPOUND MODEL ===============
inline G4int GetNumberOfExcitons() const;
inline G4int GetNumberOfParticles() const;
inline G4int GetNumberOfCharged() const;
inline void SetNumberOfExcitedParticle(G4int valueTot, G4int valueP);
inline G4int GetNumberOfHoles() const;
inline G4int GetNumberOfChargedHoles() const;
inline void SetNumberOfHoles(G4int valueTot, G4int valueP=0);
// these methods will be removed in future
inline void SetNumberOfParticles(G4int value);
inline void SetNumberOfCharged(G4int value);
// ============= METHODS FOR PHOTON EVAPORATION ===============
inline G4int GetNumberOfElectrons() const;
inline void SetNumberOfElectrons(G4int value);
inline G4int GetFloatingLevelNumber() const;
inline void SetFloatingLevelNumber(G4int value);
inline const G4ParticleDefinition * GetParticleDefinition() const;
inline void SetParticleDefinition(const G4ParticleDefinition * p);
inline G4double GetCreationTime() const;
inline void SetCreationTime(G4double time);
// G4Fragment class is not responsible for creation and delition of
// G4NuclearPolarization object
inline G4NuclearPolarization* NuclearPolarization();
inline G4NuclearPolarization* GetNuclearPolarization() const;
inline void SetNuclearPolarization(G4NuclearPolarization*);
void SetAngularMomentum(const G4ThreeVector&);
G4ThreeVector GetAngularMomentum() const;
// ============= PRIVATE METHODS ==============================
private:
void ExcitationEnergyWarning();
void NumberOfExitationWarning(const G4String&);
inline void CalculateExcitationEnergy(G4bool warning=true);
inline void CalculateGroundStateMass();
// ============= DATA MEMBERS ==================
G4int theA;
G4int theZ;
G4double theExcitationEnergy;
G4double theGroundStateMass;
G4LorentzVector theMomentum;
// Nuclear polarisation by default is nullptr
G4NuclearPolarization* thePolarization;
// creator model type
G4int creatorModel;
// Exciton model data members
G4int numberOfParticles;
G4int numberOfCharged;
G4int numberOfHoles;
G4int numberOfChargedHoles;
// Gamma evaporation data members
G4int numberOfShellElectrons;
G4int xLevel;
const G4ParticleDefinition* theParticleDefinition;
G4double spin;
G4double theCreationTime;
static const G4double minFragExcitation;
};
// ============= INLINE METHOD IMPLEMENTATIONS ===================
#if defined G4HADRONIC_ALLOC_EXPORT
extern G4DLLEXPORT G4Allocator<G4Fragment>*& pFragmentAllocator();
#else
extern G4DLLIMPORT G4Allocator<G4Fragment>*& pFragmentAllocator();
#endif
inline void * G4Fragment::operator new(size_t)
{
if (!pFragmentAllocator()) { pFragmentAllocator() = new G4Allocator<G4Fragment>; }
return (void*) pFragmentAllocator()->MallocSingle();
}
inline void G4Fragment::operator delete(void * aFragment)
{
pFragmentAllocator()->FreeSingle((G4Fragment *) aFragment);
}
inline void G4Fragment::CalculateExcitationEnergy(G4bool warning)
{
theExcitationEnergy = theMomentum.mag() - theGroundStateMass;
if(theExcitationEnergy < minFragExcitation) {
if(theExcitationEnergy < -minFragExcitation && warning) { ExcitationEnergyWarning(); }
theExcitationEnergy = 0.0;
}
}
inline G4double
G4Fragment::ComputeGroundStateMass(G4int Z, G4int A) const
{
return G4NucleiProperties::GetNuclearMass(A, Z);
}
inline void G4Fragment::CalculateGroundStateMass()
{
theGroundStateMass = G4NucleiProperties::GetNuclearMass(theA, theZ);
}
inline G4int G4Fragment::GetA_asInt() const
{
return theA;
}
inline G4int G4Fragment::GetZ_asInt() const
{
return theZ;
}
inline void G4Fragment::SetZandA_asInt(G4int Znew, G4int Anew)
{
theZ = Znew;
theA = Anew;
CalculateGroundStateMass();
}
inline G4double G4Fragment::GetExcitationEnergy() const
{
return theExcitationEnergy;
}
inline G4double G4Fragment::GetGroundStateMass() const
{
return theGroundStateMass;
}
inline void G4Fragment::SetExcEnergyAndMomentum(G4double eexc,
const G4LorentzVector& v)
{
theExcitationEnergy = eexc;
theMomentum.set(0.0, 0.0, 0.0, theGroundStateMass + eexc);
theMomentum.boost(v.boostVector());
}
inline G4double G4Fragment::GetBindingEnergy() const
{
return (theA-theZ)*CLHEP::neutron_mass_c2 + theZ*CLHEP::proton_mass_c2
- theGroundStateMass;
}
inline const G4LorentzVector& G4Fragment::GetMomentum() const
{
return theMomentum;
}
inline void G4Fragment::SetMomentum(const G4LorentzVector& value)
{
theMomentum = value;
CalculateExcitationEnergy();
}
inline G4double G4Fragment::GetZ() const
{
return G4double(theZ);
}
inline G4double G4Fragment::GetA() const
{
return G4double(theA);
}
inline void G4Fragment::SetZ(const G4double value)
{
theZ = G4lrint(value);
CalculateGroundStateMass();
}
inline void G4Fragment::SetA(const G4double value)
{
theA = G4lrint(value);
CalculateGroundStateMass();
}
inline G4int G4Fragment::GetNumberOfExcitons() const
{
return numberOfParticles + numberOfHoles;
}
inline G4int G4Fragment::GetNumberOfParticles() const
{
return numberOfParticles;
}
inline G4int G4Fragment::GetNumberOfCharged() const
{
return numberOfCharged;
}
inline
void G4Fragment::SetNumberOfExcitedParticle(G4int valueTot, G4int valueP)
{
numberOfParticles = valueTot;
numberOfCharged = valueP;
if(valueTot < valueP) {
NumberOfExitationWarning("SetNumberOfExcitedParticle");
}
}
inline G4int G4Fragment::GetNumberOfHoles() const
{
return numberOfHoles;
}
inline G4int G4Fragment::GetNumberOfChargedHoles() const
{
return numberOfChargedHoles;
}
inline void G4Fragment::SetNumberOfHoles(G4int valueTot, G4int valueP)
{
numberOfHoles = valueTot;
numberOfChargedHoles = valueP;
if(valueTot < valueP) {
NumberOfExitationWarning("SetNumberOfHoles");
}
}
inline void G4Fragment::SetNumberOfParticles(G4int value)
{
numberOfParticles = value;
}
inline void G4Fragment::SetNumberOfCharged(G4int value)
{
numberOfCharged = value;
if(value > numberOfParticles) {
NumberOfExitationWarning("SetNumberOfCharged");
}
}
inline G4int G4Fragment::GetNumberOfElectrons() const
{
return numberOfShellElectrons;
}
inline void G4Fragment::SetNumberOfElectrons(G4int value)
{
numberOfShellElectrons = value;
}
inline G4int G4Fragment::GetCreatorModelType() const
{
return creatorModel;
}
inline void G4Fragment::SetCreatorModelType(G4int value)
{
creatorModel = value;
}
inline G4double G4Fragment::GetSpin() const
{
return spin;
}
inline void G4Fragment::SetSpin(G4double value)
{
spin = value;
}
inline G4int G4Fragment::GetFloatingLevelNumber() const
{
return xLevel;
}
inline void G4Fragment::SetFloatingLevelNumber(G4int value)
{
xLevel = value;
}
inline
const G4ParticleDefinition* G4Fragment::GetParticleDefinition(void) const
{
return theParticleDefinition;
}
inline void G4Fragment::SetParticleDefinition(const G4ParticleDefinition * p)
{
theParticleDefinition = p;
}
inline G4double G4Fragment::GetCreationTime() const
{
return theCreationTime;
}
inline void G4Fragment::SetCreationTime(G4double time)
{
theCreationTime = time;
}
inline G4NuclearPolarization* G4Fragment::NuclearPolarization()
{
return thePolarization;
}
inline G4NuclearPolarization* G4Fragment::GetNuclearPolarization() const
{
return thePolarization;
}
inline void G4Fragment::SetNuclearPolarization(G4NuclearPolarization* p)
{
thePolarization = p;
}
#endif
@@ -23,19 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4HadronicDeprecate: Utility to generate warning message for classes
// to be deprecated. Implemented as a preprocessor macro.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
#ifndef G4HadronicDeprecate
#ifndef G4FragmentVector_h
#define G4FragmentVector_h 1
#include "G4ios.hh"
#include "G4Types.hh"
#define G4HadronicDeprecate(name) {\
static G4bool dowarn=true;\
if (dowarn) \
G4cout << "WARNING: " << name << " is deprecated and will be removed in GEANT4 version 10.0." \
<< G4endl;\
dowarn=false;\
}
#include "G4Fragment.hh"
#endif /* G4HadronicDeprecate */
#endif
@@ -1,695 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1998
// CERN Geneva Switzerland
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4GHEKinematicsVector utility class ------
// by Larry Felawka (TRIUMF), March 1997
// E-mail: felawka@alph04.triumf.ca
// ************************************************************
//-----------------------------------------------------------------------------
// Store, Retrieve and manipulate particle data.
// Based on "G4GHEVector" class of H. Fesefeldt.
#ifndef G4GHEKinematicsVector_h
#define G4GHEKinematicsVector_h 1
#include <CLHEP/Units/PhysicalConstants.h>
#include "G4ios.hh"
#include "G4ParticleMomentum.hh"
class G4GHEKinematicsVector
{
public:
inline
G4GHEKinematicsVector()
{
momentum.setX( 0.0 );
momentum.setY( 0.0 );
momentum.setZ( 0.0 );
energy = 0.0;
kineticEnergy = 0.0;
mass = 0.0;
charge = 0.0;
timeOfFlight = 0.0;
side = 0;
flag = false;
code = 0;
particleDef = NULL;
}
~G4GHEKinematicsVector() {}
inline
G4GHEKinematicsVector( const G4GHEKinematicsVector & p )
{
momentum.setX( p.momentum.x() );
momentum.setY( p.momentum.y() );
momentum.setZ( p.momentum.z() );
energy = p.energy;
kineticEnergy = p.kineticEnergy;
mass = p.mass;
charge = p.charge;
timeOfFlight = p.timeOfFlight;
side = p.side;
flag = p.flag;
code = p.code;
particleDef = p.particleDef;
}
inline
G4GHEKinematicsVector & operator = ( const G4GHEKinematicsVector & p )
{
if (this != &p)
{
momentum.setX( p.momentum.x() );
momentum.setY( p.momentum.y() );
momentum.setZ( p.momentum.z() );
energy = p.energy;
kineticEnergy = p.kineticEnergy;
mass = p.mass;
charge = p.charge;
timeOfFlight = p.timeOfFlight;
side = p.side;
flag = p.flag;
code = p.code;
particleDef = p.particleDef;
}
return *this;
}
inline
void SetMomentum( G4ParticleMomentum mom ) { momentum = mom; return; };
inline
void SetMomentumAndUpdate( G4ParticleMomentum mom )
{
momentum = mom;
energy = std::sqrt(mass*mass + momentum.mag2());
kineticEnergy = std::max(0.,energy - mass);
return;
}
inline const
G4ParticleMomentum GetMomentum() const { return momentum; }
inline
void SetMomentum( G4double x, G4double y, G4double z)
{
momentum.setX( x );
momentum.setY( y );
momentum.setZ( z );
return;
}
inline
void SetMomentumAndUpdate( G4double x, G4double y, G4double z )
{
momentum.setX( x );
momentum.setY( y );
momentum.setZ( z );
energy = std::sqrt(mass*mass + momentum.mag2());
kineticEnergy = std::max(0.,energy-mass);
return;
}
inline
void SetMomentum( G4double x, G4double y )
{
momentum.setX( x );
momentum.setY( y );
return;
}
inline
void SetMomentumAndUpdate( G4double x, G4double y )
{
momentum.setX( x );
momentum.setY( y );
energy = std::sqrt(mass*mass + momentum.mag2());
kineticEnergy = std::max(0.,energy-mass);
return;
}
inline
void SetMomentum( G4double z )
{
momentum.setZ( z );
return;
}
inline
void SetMomentumAndUpdate( G4double z )
{
momentum.setZ( z );
energy = std::sqrt(mass*mass + momentum.mag2());
kineticEnergy = std::max(0.,energy-mass);
return;
}
inline
void SetEnergy( G4double e ) { energy = e; return; }
inline
void SetEnergyAndUpdate( G4double e )
{
if (e <= mass)
{
energy = mass;
kineticEnergy = 0.;
momentum.setX( 0.);
momentum.setY( 0.);
momentum.setZ( 0.);
}
else
{
energy = e;
kineticEnergy = energy - mass;
G4double momold = momentum.mag();
G4double momnew = std::sqrt(energy*energy - mass*mass);
if (momold == 0.)
{
G4double cost = 1.0- 2.0*G4UniformRand();
G4double sint = std::sqrt(1. - cost*cost);
G4double phi = CLHEP::twopi* G4UniformRand();
momentum.setX( momnew * sint * std::cos(phi));
momentum.setY( momnew * sint * std::sin(phi));
momentum.setZ( momnew * cost);
}
else
{
momnew /= momold;
momentum.setX(momentum.x()*momnew);
momentum.setY(momentum.y()*momnew);
momentum.setZ(momentum.z()*momnew);
}
}
return;
}
inline
void SetKineticEnergy( G4double ekin ) { kineticEnergy = ekin; return; }
inline
void SetKineticEnergyAndUpdate(G4double ekin)
{
if (ekin <= 0.)
{
energy = mass;
kineticEnergy = 0.;
momentum.setX( 0.);
momentum.setY( 0.);
momentum.setZ( 0.);
}
else
{
energy = ekin + mass;
kineticEnergy = ekin;
G4double momold = momentum.mag();
G4double momnew = std::sqrt(energy*energy - mass*mass);
if (momold == 0.)
{
G4double cost = 1.0-2.0*G4UniformRand();
G4double sint = std::sqrt(1. - cost*cost);
G4double phi = CLHEP::twopi* G4UniformRand();
momentum.setX( momnew * sint * std::cos(phi));
momentum.setY( momnew * sint * std::sin(phi));
momentum.setZ( momnew * cost);
}
else
{
momnew /= momold;
momentum.setX(momentum.x()*momnew);
momentum.setY(momentum.y()*momnew);
momentum.setZ(momentum.z()*momnew);
}
}
return;
}
inline
G4double GetEnergy() {return energy;}
inline
G4double GetKineticEnergy() {return kineticEnergy;}
inline
void SetMass( G4double mas ) { mass = mas; return; }
inline
void SetMassAndUpdate( G4double mas )
{
kineticEnergy = std::max(0., energy - mas);
mass = mas;
energy = kineticEnergy + mass;
G4double momnew = std::sqrt(std::max(0., energy*energy - mass*mass));
if ( momnew == 0.0)
{
momentum.setX( 0.0 );
momentum.setY( 0.0 );
momentum.setZ( 0.0 );
}
else
{
G4double momold = momentum.mag();
if (momold == 0.)
{
G4double cost = 1.-2.*G4UniformRand();
G4double sint = std::sqrt(1.-cost*cost);
G4double phi = CLHEP::twopi*G4UniformRand();
momentum.setX( momnew*sint*std::cos(phi));
momentum.setY( momnew*sint*std::sin(phi));
momentum.setZ( momnew*cost);
}
else
{
momnew /= momold;
momentum.setX( momentum.x()*momnew );
momentum.setY( momentum.y()*momnew );
momentum.setZ( momentum.z()*momnew );
}
}
return;
}
inline
G4double GetMass() { return mass; }
inline
void SetCharge( G4double c ) { charge = c; return; }
inline
G4double GetCharge() {return charge; }
inline
void SetTOF( G4double t ) { timeOfFlight = t; return; }
inline
G4double GetTOF() { return timeOfFlight; }
inline
void SetSide( G4int sid ) { side = sid; return; }
inline
G4int GetSide() { return side; }
inline
void setFlag( G4bool f ) { flag = f; return; }
inline
G4bool getFlag() { return flag; }
inline
void SetCode( G4int c ) { code = c; return; }
inline
void SetParticleDef( G4ParticleDefinition * c ) { particleDef = c; return; }
inline
G4int GetCode() { return code; }
inline
G4ParticleDefinition * GetParticleDef() { return particleDef; }
inline
void SetZero()
{
momentum.setX( 0.0 );
momentum.setY( 0.0 );
momentum.setZ( 0.0 );
energy = 0.0;
kineticEnergy = 0.0;
mass = 0.0;
charge = 0.0;
timeOfFlight = 0.0;
side = 0;
flag = false;
code = 0;
particleDef = NULL;
}
inline
void Add( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2 )
{
momentum = p1.momentum + p2.momentum;
energy = p1.energy + p2.energy;
G4double b = energy*energy - momentum.mag2();
if( b < 0 )
mass = -1. * std::sqrt( -b );
else
mass = std::sqrt( b );
kineticEnergy = std::max(0.,energy - mass);
charge = p1.charge + p2.charge;
code = p1.code + p2.code;
particleDef = p1.particleDef;
}
inline
void Sub( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2 )
{
momentum = p1.momentum - p2.momentum;
energy = p1.energy - p2.energy;
G4double b = energy*energy - momentum.mag2();
if( b < 0 )
mass = -1. * std::sqrt( -b );
else
mass = std::sqrt( b );
kineticEnergy = std::max(0.,energy - mass);
charge = p1.charge - p2.charge;
code = p1.code - p2.code;
particleDef = p1.particleDef;
}
inline
void Lor( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2 )
{
G4double a;
a = ( p1.momentum.dot(p2.momentum)/(p2.energy+p2.mass) - p1.energy ) / p2.mass;
momentum.setX( p1.momentum.x()+a*p2.momentum.x() );
momentum.setY( p1.momentum.y()+a*p2.momentum.y() );
momentum.setZ( p1.momentum.z()+a*p2.momentum.z() );
energy = std::sqrt( sqr(p1.mass) + momentum.mag2() );
mass = p1.mass;
kineticEnergy = std::max(0.,energy - mass);
timeOfFlight = p1.timeOfFlight;
side = p1.side;
flag = p1.flag;
code = p1.code;
particleDef = p1.particleDef;
}
inline
G4double CosAng( const G4GHEKinematicsVector & p )
{
G4double a = std::sqrt( momentum.mag2() * p.momentum.mag2() );
if( a != 0.0 )
{
a = (momentum.x()*p.momentum.x() +
momentum.y()*p.momentum.y() +
momentum.z()*p.momentum.z()) / a;
if( std::abs(a) > 1.0 ) a<0.0 ? a=-1.0 : a=1.0;
}
return a;
}
inline
G4double Ang(const G4GHEKinematicsVector & p )
{
G4double a = std::sqrt( momentum.mag2() * p.momentum.mag2() );
if( a != 0.0 )
{
a = (momentum.x()*p.momentum.x() +
momentum.y()*p.momentum.y() +
momentum.z()*p.momentum.z()) / a;
if( std::abs(a) > 1.0 ) a<0.0 ? a=-1.0 : a=1.0;
}
return std::acos(a);
}
inline
G4double Dot4( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2)
{
return ( p1.energy * p2.energy
- p1.momentum.x() * p2.momentum.x()
- p1.momentum.y() * p2.momentum.y()
- p1.momentum.z() * p2.momentum.z() );
}
inline
G4double Impu( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2)
{
return ( - sqr( p1.energy - p2.energy)
+ sqr(p1.momentum.x() - p2.momentum.x())
+ sqr(p1.momentum.y() - p2.momentum.y())
+ sqr(p1.momentum.z() - p2.momentum.z()) );
}
inline
void Add3( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2)
{
momentum.setX( p1.momentum.x() + p2.momentum.x());
momentum.setY( p1.momentum.y() + p2.momentum.y());
momentum.setZ( p1.momentum.z() + p2.momentum.z());
return;
}
inline
void Sub3( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2)
{
momentum.setX( p1.momentum.x() - p2.momentum.x());
momentum.setY( p1.momentum.y() - p2.momentum.y());
momentum.setZ( p1.momentum.z() - p2.momentum.z());
return;
}
inline
void Cross( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2)
{
G4double px, py, pz;
px = p1.momentum.y() * p2.momentum.z() - p1.momentum.z() * p2.momentum.y();
py = p1.momentum.z() * p2.momentum.x() - p1.momentum.x() * p2.momentum.z();
pz = p1.momentum.x() * p2.momentum.y() - p1.momentum.y() * p2.momentum.x();
momentum.setX( px );
momentum.setY( py );
momentum.setZ( pz );
return;
}
inline
G4double Dot( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2)
{
return ( p1.momentum.x() * p2.momentum.x()
+ p1.momentum.y() * p2.momentum.y()
+ p1.momentum.z() * p2.momentum.z() );
}
inline
void Smul( const G4GHEKinematicsVector & p, G4double h)
{
momentum.setX( h * p.momentum.x());
momentum.setY( h * p.momentum.y());
momentum.setZ( h * p.momentum.z());
return;
}
inline
void SmulAndUpdate( const G4GHEKinematicsVector & p, G4double h)
{
momentum.setX( h * p.momentum.x());
momentum.setY( h * p.momentum.y());
momentum.setZ( h * p.momentum.z());
mass = p.mass;
energy = std::sqrt(momentum.mag2() + mass*mass);
kineticEnergy = energy - mass;
charge = p.charge;
timeOfFlight = p.timeOfFlight;
side = p.side;
flag = p.flag;
code = p.code;
particleDef = p.particleDef;
return;
}
inline
void Norz( const G4GHEKinematicsVector & p )
{
G4double a = p.momentum.mag2();
if (a > 0.0) a = 1./std::sqrt(a);
momentum.setX( a * p.momentum.x() );
momentum.setY( a * p.momentum.y() );
momentum.setZ( a * p.momentum.z() );
mass = p.mass;
energy = std::sqrt(momentum.mag2() + mass*mass);
kineticEnergy = energy - mass;
charge = p.charge;
timeOfFlight = p.timeOfFlight;
side = p.side;
flag = p.flag;
code = p.code;
particleDef = p.particleDef;
return;
}
inline
G4double Length()
{
return momentum.mag() ;
}
inline
void Exch( G4GHEKinematicsVector & p1)
{
G4GHEKinematicsVector mx = *this;
// mx.momentum.SetX( momentum.x());
// mx.momentum.SetY( momentum.y());
// mx.momentum.SetZ( momentum.z());
// mx.energy = energy;
// mx.kineticEnergy = kineticEnergy;
// mx.mass = mass;
// mx.charge = charge;
// mx.timeOfFlight = timeOfFlight;
// mx.side = side;
// mx.flag = flag;
// mx.code = code;
// momentum.setX( p1.momentum.x());
// momentum.setY( p1.momentum.y());
// momentum.setZ( p1.momentum.z());
// energy = p1.energy;
// kineticEnergy = p1.kineticEnergy;
// mass = p1.mass;
// charge = p1.charge;
// timeOfFlight = p1.timeOfFlight;
// side = p1.side
// flag = p1.flag;
// code = p1.code;
*this = p1;
p1 = mx;
return;
}
inline
void Defs1( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2)
{
G4double pt2 = sqr(p1.momentum.x()) + sqr(p1.momentum.y());
if (pt2 > 0.0)
{
G4double ph, px, py, pz;
G4double cost = p2.momentum.z()/p2.momentum.mag();
G4double sint = 0.5 * ( std::sqrt(std::abs((1.-cost)*(1.+cost)))
+ std::sqrt(pt2)/p2.momentum.mag());
(p2.momentum.y() < 0.) ? ph = 1.5*CLHEP::pi : ph = CLHEP::halfpi;
if( p2.momentum.x() != 0.0)
ph = std::atan2(p2.momentum.y(),p2.momentum.x());
px = cost*std::cos(ph)*p1.momentum.x() - std::sin(ph)*p1.momentum.y()
+ sint*std::cos(ph)*p1.momentum.z();
py = cost*std::sin(ph)*p1.momentum.x() + std::cos(ph)*p1.momentum.y()
+ sint*std::sin(ph)*p1.momentum.z();
pz = - sint *p1.momentum.x()
+ cost *p1.momentum.z();
momentum.setX( px );
momentum.setY( py );
momentum.setZ( pz );
}
else
{
momentum = p1.momentum;
}
}
inline
void Defs( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & p2,
G4GHEKinematicsVector & my, G4GHEKinematicsVector & mz )
{
my = p1;
mz = p2;
momentum.setX( my.momentum.y()*mz.momentum.z()
- my.momentum.z()*mz.momentum.y());
momentum.setY( my.momentum.z()*mz.momentum.x()
- my.momentum.x()*mz.momentum.z());
momentum.setZ( my.momentum.x()*mz.momentum.y()
- my.momentum.y()*mz.momentum.x());
my.momentum.setX( mz.momentum.y()*momentum.z()
- mz.momentum.z()*momentum.y());
my.momentum.setY( mz.momentum.z()*momentum.x()
- mz.momentum.x()*momentum.z());
my.momentum.setZ( mz.momentum.x()*momentum.y()
- mz.momentum.y()*momentum.x());
G4double pp;
pp = momentum.mag();
if (pp > 0.)
{
pp = 1./pp;
momentum.setX( momentum.x()*pp );
momentum.setY( momentum.y()*pp );
momentum.setZ( momentum.z()*pp );
}
pp = my.momentum.mag();
if (pp > 0.)
{
pp = 1./pp;
my.momentum.setX( my.momentum.x()*pp );
my.momentum.setY( my.momentum.y()*pp );
my.momentum.setZ( my.momentum.z()*pp );
}
pp = mz.momentum.mag();
if (pp > 0.)
{
pp = 1./pp;
mz.momentum.setX( mz.momentum.x()*pp );
mz.momentum.setY( mz.momentum.y()*pp );
mz.momentum.setZ( mz.momentum.z()*pp );
}
return;
}
inline
void Trac( const G4GHEKinematicsVector & p1, const G4GHEKinematicsVector & mx,
const G4GHEKinematicsVector & my, const G4GHEKinematicsVector & mz)
{
double px, py, pz;
px = mx.momentum.x()*p1.momentum.x()
+ mx.momentum.y()*p1.momentum.y()
+ mx.momentum.z()*p1.momentum.z();
py = my.momentum.x()*p1.momentum.x()
+ my.momentum.y()*p1.momentum.y()
+ my.momentum.z()*p1.momentum.z();
pz = mz.momentum.x()*p1.momentum.x()
+ mz.momentum.y()*p1.momentum.y()
+ mz.momentum.z()*p1.momentum.z();
momentum.setX( px );
momentum.setY( py );
momentum.setZ( pz );
return;
}
inline
void Print( G4int LLL)
{
G4cout << "G4GHEKinematicsVector: "
<< LLL << " " << momentum.x() << " " << momentum.y() << " " << momentum.z() << " "
<< energy << " " << kineticEnergy << " " << mass << " " << charge << " "
<< timeOfFlight << " " << side << " " << flag << " " << code << particleDef << G4endl;
return;
}
G4ParticleMomentum momentum;
G4double energy;
G4double kineticEnergy;
G4double mass;
G4double charge;
G4double timeOfFlight;
G4int side;
G4bool flag;
G4int code;
G4ParticleDefinition * particleDef;
};
#endif
@@ -0,0 +1,132 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ----------------------------------------------------------------
// 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"
#include "G4HadronicException.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 = "");
G4GeneralPhaseSpaceDecay(const G4String& theParentName,
G4double theParentMass,
G4double theBR,
G4int theNumberOfDaughters,
const G4String& theDaughterName1,
const G4String& theDaughterName2 ,
const G4String& theDaughterName3 ,
const G4double * masses);
G4GeneralPhaseSpaceDecay(const G4String& theParentName,
G4double theParentMass,
G4double theBR,
G4int theNumberOfDaughters,
const G4String& theDaughterName1,
const G4String& theDaughterName2 ,
const G4String& theDaughterName3 ,
const G4String& theDaughterName4 ,
const G4double * masses);
// 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;
const G4double * theDaughterMasses;
};
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
if (e-p1-p2 < 0 )
{
throw G4HadronicException(__FILE__, __LINE__, "G4GeneralPhaseSpaceDecay::Pmx energy in cms < mass1+mass2");
}
G4double ppp = (e+p1+p2)*(e+p1-p2)*(e-p1+p2)*(e-p1-p2)/(4.0*e*e);
if (ppp>0) return std::sqrt(ppp);
else return -1.;
}
#endif
@@ -0,0 +1,106 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Multibody "phase space" generator, which provides interface to
// algorithms for sampling. Momentum vectors are generated in the
// center-of-mass frame of the decay, and returned in a user-supplied
// buffer.
//
// Sampling algorithm is specified via constructor argument, either by
// code for centrally supplied algorithms (Kopylov, GENBOD, or NBody),
// or by pointer (which is owned by the generator).
//
// Author: Michael Kelsey (SLAC) <kelsey@slac.stanford.edu>
#ifndef G4HadDecayGenerator_HH
#define G4HadDecayGenerator_HH 1
#include "globals.hh"
#include "G4LorentzVector.hh"
#include <vector>
class G4ParticleDefinition;
class G4VHadDecayAlgorithm;
class G4HadDecayGenerator {
public:
// Flags to select algorithm by code in constructor
enum Algorithm { NONE=0, Kopylov=1, GENBOD=2, NBody=3 };
// Specify "standard" algorithm by code or by object (takes ownership)
G4HadDecayGenerator(Algorithm alg=Kopylov, G4int verbose=0);
G4HadDecayGenerator(G4VHadDecayAlgorithm* alg, G4int verbose=0);
virtual ~G4HadDecayGenerator();
// Enable (or disable if 0) diagnostic messages
void SetVerboseLevel(G4int verbose);
const G4String& GetAlgorithmName() const;
// Initial state (rest mass) and list of final masses
G4bool Generate(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
// Initial state particle and list of final masses
G4bool Generate(const G4ParticleDefinition* initialPD,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
// Initial state (frame) and list of final masses
// Final state particles will be boosted to initial-state frame
G4bool Generate(const G4LorentzVector& initialState,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
protected:
// Special case for one-body final state
G4bool GenerateOneBody(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState) const;
// Special function used by constructor for unrecognized algorithm code
void ReportInvalidAlgorithm(Algorithm alg) const;
void ReportMissingAlgorithm() const;
protected:
// SPECIAL FUNCTION FOR SUBCLASSES: A subclass may implement a
// collection of algorithms, to be switched on an event-by-event
// basis. This function allows the subclass to switch the "active"
// algorithm before Generate() is called.
//
// If this function is used by the subclass, then the subclass has
// ownership of _all_ instantiated algorithms, and should delete
// them in its own dtor. The subclass dtor must also call
// UseAlgorithm(0) to set the base algorithm to a null pointer, to
// prevent a double-delete error.
void UseAlgorithm(G4VHadDecayAlgorithm* alg) { theAlgorithm = alg; }
G4int verboseLevel;
G4VHadDecayAlgorithm* theAlgorithm;
};
#endif /* G4HadDecayGenerator_HH */
@@ -0,0 +1,82 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Multibody "phase space" generator using GENBOD (CERNLIB W515) method.
//
// Author: Michael Kelsey (SLAC) <kelsey@slac.stanford.edu>
#ifndef G4HadPhaseSpaceGenbod_HH
#define G4HadPhaseSpaceGenbod_HH 1
#include "G4VHadPhaseSpaceAlgorithm.hh"
class G4HadPhaseSpaceGenbod : public G4VHadPhaseSpaceAlgorithm {
public:
G4HadPhaseSpaceGenbod(G4int verbose=0);
virtual ~G4HadPhaseSpaceGenbod() {;}
protected:
virtual void GenerateMultiBody(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
protected:
void Initialize(G4double initialMass,
const std::vector<G4double>& masses);
void FillRandomBuffer();
void ComputeWeightScale(const std::vector<G4double>& masses);
void FillEnergySteps(G4double initialMass,
const std::vector<G4double>& masses);
void GenerateMomenta(const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
void AccumulateFinalState(size_t i,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
G4bool AcceptEvent() const; // Use accept-reject to generate distribution
G4double ComputeWeight() const;
private:
size_t nFinal; // Number of final state particles
G4double totalMass; // Sum of final state masses
G4double massExcess; // Available kinetic energy
G4double weightMax; // Maximum possible weight
G4int nTrials; // Accept/reject cycles taken
std::vector<G4double> msum; // Cumulative sum of masses
std::vector<G4double> msq; // Final state squared masses
std::vector<G4double> rndm; // Random sequence for effective masses
std::vector<G4double> meff; // Random final-state effective masses
std::vector<G4double> pd; // Random momentum magnitudes
};
#endif /* G4HadPhaseSpaceGenbod_HH */
@@ -0,0 +1,52 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Multibody "phase space" generator using Kopylov's algorithm
//
// Author: Michael Kelsey (SLAC) <kelsey@slac.stanford.edu>
#ifndef G4HadPhaseSpaceKopylov_HH
#define G4HadPhaseSpaceKopylov_HH 1
#include "G4VHadPhaseSpaceAlgorithm.hh"
class G4HadPhaseSpaceKopylov : public G4VHadPhaseSpaceAlgorithm {
public:
G4HadPhaseSpaceKopylov(G4int verbose=0)
: G4VHadPhaseSpaceAlgorithm("G4HadPhaseSpaceKopylov",verbose) {;}
virtual ~G4HadPhaseSpaceKopylov() {;}
protected:
virtual void GenerateMultiBody(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
protected:
G4double BetaKopylov(G4int K) const;
};
#endif /* G4HadPhaseSpaceKopylov_HH */
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Multibody "phase space" generator using Makoto Asai's NBody method.
//
// Author: Michael Kelsey (SLAC) <kelsey@slac.stanford.edu>
#ifndef G4HadPhaseSpaceNBodyAsai_HH
#define G4HadPhaseSpaceNBodyAsai_HH 1
#include "G4VHadPhaseSpaceAlgorithm.hh"
class G4HadPhaseSpaceNBodyAsai : public G4VHadPhaseSpaceAlgorithm {
public:
G4HadPhaseSpaceNBodyAsai(G4int verbose=0)
: G4VHadPhaseSpaceAlgorithm("G4HadPhaseSpaceNBodyAsai",verbose) {;}
virtual ~G4HadPhaseSpaceNBodyAsai() {;}
protected:
virtual void GenerateMultiBody(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
};
#endif /* G4HadPhaseSpaceNBody_HH */
@@ -0,0 +1,428 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
//
// History: first implementation, A. Feliciello, 20th May 1998
// -----------------------------------------------------------------------------
#ifndef G4KineticTrack_h
#define G4KineticTrack_h 1
#include <CLHEP/Units/PhysicalConstants.h>
#include "globals.hh"
#include "G4ios.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4VKineticNucleon.hh"
#include "G4Nucleon.hh"
#include "G4ParticleDefinition.hh"
#include "G4VDecayChannel.hh"
#include "G4Log.hh"
// #include "G4Allocator.hh"
class G4KineticTrackVector;
class G4KineticTrack : public G4VKineticNucleon
{
public:
G4KineticTrack();
G4KineticTrack(const G4KineticTrack& right);
G4KineticTrack(const G4ParticleDefinition* aDefinition,
G4double aFormationTime,
const G4ThreeVector& aPosition,
const G4LorentzVector& a4Momentum);
G4KineticTrack(G4Nucleon * nucleon,
const G4ThreeVector& aPosition,
const G4LorentzVector& a4Momentum);
~G4KineticTrack();
G4KineticTrack& operator=(const G4KineticTrack& right);
G4bool operator==(const G4KineticTrack& right) const;
G4bool operator!=(const G4KineticTrack& right) const;
/*
inline void *operator new(size_t);
inline void operator delete(void *aTrack);
*/
const G4ParticleDefinition* GetDefinition() const;
void SetDefinition(const G4ParticleDefinition* aDefinition);
G4double GetFormationTime() const;
void SetFormationTime(G4double aFormationTime);
const G4ThreeVector& GetPosition() const;
void SetPosition(const G4ThreeVector aPosition);
const G4LorentzVector& Get4Momentum() const;
void Set4Momentum(const G4LorentzVector& a4Momentum);
void Update4Momentum(G4double aEnergy); // update E and p, not changing mass
void Update4Momentum(const G4ThreeVector & aMomentum); // idem
void SetTrackingMomentum(const G4LorentzVector& a4Momentum);
void UpdateTrackingMomentum(G4double aEnergy); // update E and p, not changing mass
void UpdateTrackingMomentum(const G4ThreeVector & aMomentum); // idem
const G4LorentzVector& GetTrackingMomentum() const;
G4double SampleResidualLifetime();
void Hit();
void SetNucleon(G4Nucleon * aN) {theNucleon = aN;}
G4bool IsParticipant() const;
G4KineticTrackVector* Decay();
// LB move to public (before was private) LB
G4double* GetActualWidth() const;
G4double GetActualMass() const;
G4int GetnChannels() const;
// position relativ to nucleus "state"
enum CascadeState {undefined, outside, going_in, inside,
going_out, gone_out, captured, miss_nucleus };
CascadeState SetState(const CascadeState new_state);
CascadeState GetState() const;
void SetProjectilePotential(const G4double aPotential);
G4double GetProjectilePotential() const;
private:
void SetnChannels(const G4int aChannel);
void SetActualWidth(G4double* anActualWidth);
G4double EvaluateTotalActualWidth();
G4double EvaluateCMMomentum (const G4double mass,
const G4double* m_ij) const;
G4double IntegrateCMMomentum(const G4double lowerLimit) const;
G4double IntegrateCMMomentum(const G4double lowerLimit ,const G4double polemass) const;
G4double IntegrateCMMomentum2() const;
public:
G4double BrWig(const G4double Gamma,
const G4double rmass,
const G4double mass) const;
private:
G4double IntegrandFunction1 (G4double xmass) const;
G4double IntegrandFunction2 (G4double xmass) const;
G4double IntegrandFunction3 (G4double xmass) const;
G4double IntegrandFunction4 (G4double xmass) const;
public:
// friend G4double IntegrandFunction3 (G4double xmass);
// friend G4double IntegrandFunction4 (G4double xmass);
private:
const G4ParticleDefinition* theDefinition;
G4double theFormationTime;
G4ThreeVector thePosition;
G4LorentzVector the4Momentum;
G4LorentzVector theFermi3Momentum;
G4LorentzVector theTotal4Momentum;
G4Nucleon * theNucleon;
G4int nChannels;
G4double theActualMass;
G4double* theActualWidth;
// Temporary storage for daughter masses and widths
// (needed because Integrand Function cannot take > 1 argument)
G4double* theDaughterMass;
G4double* theDaughterWidth;
CascadeState theStateToNucleus;
G4double theProjectilePotential;
};
// extern G4Allocator<G4KineticTrack> theKTAllocator;
// Class G4KineticTrack
/*
inline void * G4KineticTrack::operator new(size_t)
{
void * aT;
aT = (void *) theKTAllocator.MallocSingle();
return aT;
}
inline void G4KineticTrack::operator delete(void * aT)
{
theKTAllocator.FreeSingle((G4KineticTrack *) aT);
}
*/
inline const G4ParticleDefinition* G4KineticTrack::GetDefinition() const
{
return theDefinition;
}
inline void G4KineticTrack::SetDefinition(const G4ParticleDefinition* aDefinition)
{
theDefinition = aDefinition;
}
inline G4double G4KineticTrack::GetFormationTime() const
{
return theFormationTime;
}
inline void G4KineticTrack::SetFormationTime(G4double aFormationTime)
{
theFormationTime = aFormationTime;
}
inline const G4ThreeVector& G4KineticTrack::GetPosition() const
{
return thePosition;
}
inline void G4KineticTrack::SetPosition(const G4ThreeVector aPosition)
{
thePosition = aPosition;
}
inline const G4LorentzVector& G4KineticTrack::Get4Momentum() const
{
return theTotal4Momentum;
}
inline const G4LorentzVector& G4KineticTrack::GetTrackingMomentum() const
{
return the4Momentum;
}
inline void G4KineticTrack::Set4Momentum(const G4LorentzVector& a4Momentum)
{
// set the4Momentum and update theTotal4Momentum
theTotal4Momentum=a4Momentum;
the4Momentum = theTotal4Momentum;
theFermi3Momentum=G4LorentzVector(0);
}
inline void G4KineticTrack::Update4Momentum(G4double aEnergy)
{
// update the4Momentum with aEnergy at constant mass (the4Momentum.mag()
// updates theTotal4Momentum as well.
G4double newP(0);
G4double mass2=theTotal4Momentum.mag2();
if ( sqr(aEnergy) > mass2 )
{
newP = std::sqrt(sqr(aEnergy) - mass2 );
} else
{
aEnergy=std::sqrt(mass2);
}
Set4Momentum(G4LorentzVector(newP*the4Momentum.vect().unit(), aEnergy));
}
inline void G4KineticTrack::Update4Momentum(const G4ThreeVector & aMomentum)
{
// update the4Momentum with aMomentum at constant mass (the4Momentum.mag()
// updates theTotal4Momentum as well.
G4double newE=std::sqrt(theTotal4Momentum.mag2() + aMomentum.mag2());
Set4Momentum(G4LorentzVector(aMomentum, newE));
}
inline void G4KineticTrack::SetTrackingMomentum(const G4LorentzVector& aMomentum)
{
// set the4Momentum and update theTotal4Momentum, keep the mass of aMomentum
the4Momentum = aMomentum;
theTotal4Momentum=the4Momentum+theFermi3Momentum;
// keep mass of aMomentum for the total momentum
G4double mass2 = aMomentum.mag2();
G4double p2=theTotal4Momentum.vect().mag2();
theTotal4Momentum.setE(std::sqrt(mass2+p2));
}
inline void G4KineticTrack::UpdateTrackingMomentum(G4double aEnergy)
{
// update the4Momentum with aEnergy at constant mass (the4Momentum.mag()
// updates theTotal4Momentum as well.
G4double newP(0);
G4double mass2=theTotal4Momentum.mag2();
if ( sqr(aEnergy) > mass2 )
{
newP = std::sqrt(sqr(aEnergy) - mass2 );
} else
{
aEnergy=std::sqrt(mass2);
}
SetTrackingMomentum(G4LorentzVector(newP*the4Momentum.vect().unit(), aEnergy));
}
inline void G4KineticTrack::UpdateTrackingMomentum(const G4ThreeVector & aMomentum)
{
// update the4Momentum with aMomentum at constant mass (the4Momentum.mag()
// updates theTotal4Momentum as well.
G4double newE=std::sqrt(theTotal4Momentum.mag2() + aMomentum.mag2());
SetTrackingMomentum(G4LorentzVector(aMomentum, newE));
}
inline G4double G4KineticTrack::GetActualMass() const
{
return std::sqrt(std::abs(the4Momentum.mag2()));
}
inline G4int G4KineticTrack::GetnChannels() const
{
return nChannels;
}
inline void G4KineticTrack::SetnChannels(const G4int numberOfChannels)
{
nChannels = numberOfChannels;
}
inline G4double* G4KineticTrack::GetActualWidth() const
{
return theActualWidth;
}
inline void G4KineticTrack::SetActualWidth(G4double* anActualWidth)
{
theActualWidth = anActualWidth;
}
inline G4double G4KineticTrack::EvaluateTotalActualWidth()
{
G4int index;
G4double theTotalActualWidth = 0.0;
for (index = nChannels - 1; index >= 0; index--)
{
theTotalActualWidth += theActualWidth[index];
}
return theTotalActualWidth;
}
inline G4double G4KineticTrack::SampleResidualLifetime()
{
G4double theTotalActualWidth = this->EvaluateTotalActualWidth();
G4double tau = CLHEP::hbar_Planck * (-1.0 / theTotalActualWidth);
G4double theResidualLifetime = tau * G4Log(G4UniformRand());
return theResidualLifetime*the4Momentum.gamma();
}
inline G4double G4KineticTrack::EvaluateCMMomentum(const G4double mass,
const G4double* m_ij) const
{
G4double theCMMomentum;
if((m_ij[0]+m_ij[1])<mass)
theCMMomentum = 1 / (2 * mass) *
std::sqrt (((mass * mass) - (m_ij[0] + m_ij[1]) * (m_ij[0] + m_ij[1])) *
((mass * mass) - (m_ij[0] - m_ij[1]) * (m_ij[0] - m_ij[1])));
else
theCMMomentum=0.;
return theCMMomentum;
}
inline G4double G4KineticTrack::BrWig(const G4double Gamma, const G4double rmass, const G4double mass) const
{
G4double Norm = CLHEP::twopi;
return (Gamma/((mass-rmass)*(mass-rmass)+Gamma*Gamma/4.))/Norm;
}
inline
void G4KineticTrack::Hit()
{
if(theNucleon)
{
theNucleon->Hit(1);
}
}
inline
G4bool G4KineticTrack::IsParticipant() const
{
if(!theNucleon) return true;
return theNucleon->AreYouHit();
}
inline
G4KineticTrack::CascadeState G4KineticTrack::GetState() const
{
return theStateToNucleus;
}
inline
G4KineticTrack::CascadeState G4KineticTrack::SetState(const CascadeState new_state)
{
CascadeState old_state=theStateToNucleus;
theStateToNucleus=new_state;
return old_state;
}
inline
void G4KineticTrack::SetProjectilePotential(G4double aPotential)
{
theProjectilePotential = aPotential;
}
inline
G4double G4KineticTrack::GetProjectilePotential() const
{
return theProjectilePotential;
}
#endif
@@ -23,39 +23,30 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4HadSignalHandler_hh
#define G4HadSignalHandler_hh
//
//#ifndef G4HadSignalHandler_off
#if 0
#include <iostream>
#include <signal.h>
// Modified at 8-Oct-1998 by Maxim Komogorov. Methods BoostBeam,Boost,Shift
// were added.
#ifndef G4KineticTrackVector_h
#define G4KineticTrackVector_h 1
#include "globals.hh"
#include "G4KineticTrack.hh"
#include <vector>
#include "G4Types.hh"
// A simple, reasonably portable, but at present
// semantic-wise totally unsafe signalhandler prototype meant for SEGFAULT.
// Being rushed into production or various reasons.
class G4KineticTrackVector : public std::vector<G4KineticTrack *>
{
public:
G4KineticTrackVector();
extern "C"
{
typedef void (*sighandler_t)(int);
}
public:
void BoostBeam(G4ThreeVector& BeamMom);
void Boost(G4ThreeVector& Velocity);
void Shift(G4ThreeVector& Pos);
};
class G4HadSignalHandler
{
public:
G4HadSignalHandler(sighandler_t aNew);
~G4HadSignalHandler();
static G4ThreadLocal std::vector<sighandler_t> *theCache;
static G4ThreadLocal bool registered;
};
struct DeleteKineticTrack{void operator()(G4KineticTrack * aT){delete aT;}};
#endif
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
// GEANT4 Class file
//
//
// File name: G4LegendrePolynomial
//
// Author: Jason Detwiler (jasondet@gmail.com)
//
// Creation date: February 2015
//
// Modifications:
//
// Legendre Polynomial
//
// -------------------------------------------------------------------
#ifndef G4LEGENDREPOLYNOMIAL_HH
#define G4LEGENDREPOLYNOMIAL_HH
#include "globals.hh"
#include <vector>
#include <map>
class G4LegendrePolynomial
{
public:
// Access to coefficients
static size_t GetNCoefficients(size_t order) { return order+1; }
G4double GetCoefficient(size_t i, size_t order);
// Evaluation functions
G4double EvalLegendrePoly(G4int order, G4double x);
G4double EvalAssocLegendrePoly(G4int l, G4int m, G4double x,
std::map<G4int, std::map<G4int, G4double> >* cache = NULL);
protected: // Cache coefficients for speed
void BuildUpToOrder(size_t order);
std::vector< std::vector<G4double> > fCoefficients;
};
#endif
@@ -1,153 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// Hadronic Process: Light Media Charge and/or Strangeness Exchange
// J.L. Chuma, TRIUMF, 21-Feb-1997
// Last modified: 21-Feb-1997
#ifndef G4LightMedia_h
#define G4LightMedia_h 1
#include "globals.hh"
#include "G4DynamicParticle.hh"
#include "G4Nucleus.hh"
#include "G4ParticleTypes.hh"
class G4LightMedia
{
public:
G4LightMedia() { }
G4LightMedia( const G4LightMedia &right )
{ *this = right; }
~G4LightMedia() { }
G4LightMedia & operator=( const G4LightMedia &)
{ return *this; }
G4bool operator==( const G4LightMedia &right ) const
{ return ( this == (G4LightMedia *) &right ); }
G4bool operator!=( const G4LightMedia &right ) const
{ return ( this != (G4LightMedia *) &right ); }
G4DynamicParticle * PionPlusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * PionMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * KaonPlusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * KaonZeroShortExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * KaonZeroLongExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * KaonMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * ProtonExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiProtonExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * NeutronExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiNeutronExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * LambdaExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiLambdaExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * SigmaPlusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * SigmaMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiSigmaPlusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiSigmaMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * XiZeroExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * XiMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiXiZeroExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiXiMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * OmegaMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
G4DynamicParticle * AntiOmegaMinusExchange(
const G4HadProjectile *incidentParticle,
const G4Nucleus &aNucleus );
private:
};
#endif
@@ -0,0 +1,71 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#ifndef G4NuclearFermiDensity_h
#define G4NuclearFermiDensity_h 1
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4VNuclearDensity.hh"
#include <CLHEP/Units/PhysicalConstants.h> // pi, fermi,..
#include "G4Exp.hh"
#include "G4Log.hh"
//#include <cmath> // pow
class G4NuclearFermiDensity : public G4VNuclearDensity
{
public:
G4NuclearFermiDensity(G4int anA, G4int aZ);
~G4NuclearFermiDensity();
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const
{
return 1./(1.+G4Exp((aPosition.mag()-theR)/a));
}
G4double GetRadius(const G4double maxRelativeDenisty) const
{
return (maxRelativeDenisty>0 && maxRelativeDenisty <= 1 ) ?
(theR + a*G4Log((1-maxRelativeDenisty+G4Exp(-1*theR/a))/maxRelativeDenisty)) : DBL_MAX;
}
G4double GetDeriv(const G4ThreeVector & aPosition) const
{
G4double currentR=aPosition.mag();
if (currentR > 40*theR ) {return 0;}
else return -G4Exp((currentR-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
}
private:
G4int theA;
G4double theR; // Nuclear Radius
const G4double a; // Determines the nuclear surface thickness
};
#endif
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Created:
// 03 July 2017 V.Ivanchenko
//
// Class Description
// This is a thread local singleton class to store all G4NuclearPolarization
// objects
//
// Class Description - End
#ifndef G4NuclearPolarizationStore_h
#define G4NuclearPolarizationStore_h 1
#include "globals.hh"
#include "G4NuclearPolarization.hh"
#include "G4ThreadLocalSingleton.hh"
const G4int maxNumStates = 10;
class G4NuclearPolarizationStore
{
friend class G4ThreadLocalSingleton<G4NuclearPolarizationStore>;
public:
static G4NuclearPolarizationStore* GetInstance();
// access
~G4NuclearPolarizationStore();
void Register(G4NuclearPolarization* ptr);
// register new G4NuclearPolarization object
G4NuclearPolarization* FindOrBuild(G4int Z, G4int A, G4double Eexc);
// find G4NuclearPolarization object or build new
void RemoveMe(G4NuclearPolarization* ptr);
// deregister and delete G4NuclearPolarization object
private:
G4NuclearPolarizationStore();
static G4ThreadLocal G4NuclearPolarizationStore* instance;
G4NuclearPolarization* nuclist[maxNumStates];
G4int oldIdx;
};
#endif
@@ -0,0 +1,97 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Geant4 header G4NuclearRadii
//
// Author V.Ivanchenko 27.05.2019
//
// Collection of parameterisations of nuclear radii selected from
// different classes in cross section and model sub-libraries
//
#ifndef G4NuclearRadii_h
#define G4NuclearRadii_h 1
#include "globals.hh"
class G4Pow;
class G4ParticleDefinition;
class G4NuclearRadii
{
public:
// explicit radii for light nuclei
static G4double ExplicitRadius(G4int Z, G4int A);
// algorithm from diffuse-elastic parameterisation (V.Grichine)
static G4double Radius(G4int Z, G4int A);
// algorithm from e-A scattering data (V.Grichine)
static G4double RadiusRMS(G4int Z, G4int A);
// algorithm from Glauber-Gribov nucluear-nuclear model (V.Grichine)
static G4double RadiusNNGG(G4int Z, G4int A);
// algorithm of Edward Simpsons & Dousatsu Sakata
static G4double RadiusECS(G4int Z, G4int A);
// algorithm from Glauber-Gribov hadron-nuclear model (V.Grichine)
static G4double RadiusHNGG(G4int A);
// algorithm from Glauber-Gribov kaon-nuclear model (V.Grichine)
static G4double RadiusKNGG(G4int A);
// algorithm from nuclear de-excitation module
static G4double RadiusND(G4int A);
// algorithm from computation of Coulomb barrier in the nuclear
// de-excitation module
static G4double RadiusCB(G4int Z, G4int A);
// algorithm from computation of Coulomb barrier
static G4double ParticleRadius(const G4ParticleDefinition*);
// algorithm for hadron-nucleon x-section
static G4double CoulombFactor(
const G4ParticleDefinition* theParticle,
const G4ParticleDefinition* nucleon,
G4double ekin);
// algorithm for hadron-nucleus x-section
static G4double CoulombFactor(
G4int Z, G4int A,
const G4ParticleDefinition* theParticle,
G4double ekin);
static G4Pow* fG4pow;
static const G4double r0[93];
};
#endif
@@ -23,41 +23,35 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4IsoResult_h
#define G4IsoResult_h
//
//
#ifndef G4NuclearShellModelDensity_h
#define G4NuclearShellModelDensity_h 1
#include "globals.hh"
#include "G4Nucleus.hh"
// Class Description
// Communication class for isotope production;
// Only interesting, if you want to implement your own isotope production model.
// Class Description - End
#include "G4ThreeVector.hh"
#include "G4VNuclearDensity.hh"
#include <CLHEP/Units/PhysicalConstants.h> // pi, fermi,..
//#include <cmath> // pow,..
class G4IsoResult
class G4NuclearShellModelDensity : public G4VNuclearDensity
{
public:
public:
G4NuclearShellModelDensity(G4int anA, G4int aZ);
~G4NuclearShellModelDensity();
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const;
G4double GetRadius(const G4double maxRelativeDenisty) const;
G4double GetDeriv(const G4ThreeVector & aPosition) const;
G4IsoResult(const G4String & anIso, const G4Nucleus & aMother)
{
theIsoName = anIso;
theMotherNucleus = aMother;
}
private:
G4int theA;
//G4int theZ;
G4double theRsquare;
~G4IsoResult();
G4String GetIsotope() { return theIsoName; }
G4Nucleus GetMotherNucleus() { return theMotherNucleus; }
private:
G4IsoResult() {}
G4IsoResult & operator = (const G4IsoResult & ) { return *this;}
private:
G4String theIsoName;
G4Nucleus theMotherNucleus;
};
#endif
@@ -0,0 +1,144 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
#ifndef G4Nucleon_h
#define G4Nucleon_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4Nucleon ----------------
// by Gunter Folger, May 1998.
// class for a nucleon (inside a 3D Nucleus)
// ------------------------------------------------------------
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "globals.hh"
#include "G4ParticleDefinition.hh"
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include "G4AntiProton.hh" // Uzhi Feb. 2011
#include "G4AntiNeutron.hh" // Uzhi Feb. 2011
#include "G4VKineticNucleon.hh"
//#include "G4VSplitableHadron.hh"
class G4VSplitableHadron;
class G4Nucleon : public G4VKineticNucleon
{
public:
G4Nucleon();
~G4Nucleon();
inline G4bool operator==(const G4Nucleon &right) const;
inline G4bool operator!=(const G4Nucleon &right) const;
G4Nucleon& operator=(const G4Nucleon& right);
public:
void SetPosition(const G4ThreeVector aPosition);
const G4ThreeVector& GetPosition() const;
inline void SetMomentum(G4LorentzVector & aMomentum) {theMomentum = aMomentum;}
inline const G4LorentzVector& GetMomentum() const {return theMomentum;}
virtual inline const G4LorentzVector & Get4Momentum() const {return theMomentum;}
inline void SetBindingEnergy(G4double anEnergy) {theBindingE = anEnergy;}
inline G4double GetBindingEnergy() const {return theBindingE;}
inline void SetParticleType(G4Proton * aProton) {theParticleType = aProton;}
inline void SetParticleType(G4Neutron *aNeutron){theParticleType = aNeutron;}
inline void SetParticleType(G4AntiProton * aAntiProton) {theParticleType =aAntiProton;}
inline void SetParticleType(G4AntiNeutron *aAntiNeutron){theParticleType =aAntiNeutron;}
inline const G4ParticleDefinition* GetParticleType() const {return theParticleType;}
virtual const G4ParticleDefinition* GetDefinition() const {return theParticleType;}
inline void Boost(const G4ThreeVector & beta){ theMomentum.boost(beta); }
void Boost(const G4LorentzVector & aMomentum);
inline void Hit(G4VSplitableHadron *aHit) { theSplitableHadron=aHit;}
// inline void Hit(G4int ) { isHit=true;}
inline void Hit(G4int )
{
theSplitableHadron=reinterpret_cast<G4VSplitableHadron *>(1111);
}
inline G4VSplitableHadron * GetSplitableHadron() const { return theSplitableHadron;}
inline G4bool AreYouHit() const { return theSplitableHadron!=0;}
private:
G4ThreeVector thePosition;
G4LorentzVector theMomentum;
G4double theBindingE;
const G4ParticleDefinition * theParticleType;
G4VSplitableHadron * theSplitableHadron;
};
std::ostream & operator << (std::ostream &, const G4Nucleon&);
inline G4bool G4Nucleon::operator==(const G4Nucleon &right) const
{
return this==&right;
}
inline G4bool G4Nucleon::operator!=(const G4Nucleon &right) const
{
return this!=&right;
}
inline G4Nucleon& G4Nucleon::operator=(const G4Nucleon& right)
{
if (this != &right)
{
thePosition=right.GetPosition();
theMomentum=right.Get4Momentum();
theBindingE=right.GetBindingEnergy();
theParticleType=right.GetDefinition();
theSplitableHadron=right.GetSplitableHadron();
}
return *this;
}
inline void G4Nucleon::SetPosition(const G4ThreeVector aPosition)
{
thePosition = aPosition;
}
inline const G4ThreeVector& G4Nucleon::GetPosition() const
{
return thePosition;
}
#endif
@@ -1,171 +0,0 @@
#ifndef G4Pair_h
#define G4Pair_h
template <class t1, class t2>
class G4Pair
{
public:
typedef t1 first;
typedef t2 rest;
};
class G4Terminator
{
};
#define GROUP1(t1) G4Pair<t1, G4Terminator >
#define GROUP2(t1,t2) G4Pair<t1, GROUP1(t2) >
#define GROUP3(t1,t2,t3) G4Pair<t1, GROUP2(t2,t3) >
#define GROUP4(t1,t2,t3,t4) G4Pair<t1, GROUP3(t2,t3,t4) >
#define GROUP5(t1,t2,t3,t4,t5) G4Pair<t1, GROUP4(t2,t3,t4,t5) >
#define GROUP6(t1,t2,t3,t4,t5,t6) G4Pair<t1, GROUP5(t2,t3,t4,t5,t6) >
#define GROUP7(t1,t2,t3,t4,t5,t6,t7) G4Pair<t1, GROUP6(t2,t3,t4,t5,t6,t7) >
#define GROUP8(t1,t2,t3,t4,t5,t6,t7,t8) G4Pair<t1, GROUP7(t2,t3,t4,t5,t6,t7,t8) >
#define GROUP9(t1,t2,t3,t4,t5,t6,t7,t8,t9) G4Pair<t1, GROUP8(t2,t3,t4,t5,t6,t7,t8,t9) >
#define GROUP10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) G4Pair<t1, GROUP9(t2,t3,t4,t5,t6,t7,t8,t9,t10) >
#define GROUP11(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11) G4Pair<t1, GROUP10(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11) >
#define GROUP12(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12) G4Pair<t1, GROUP11(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12) >
#define GROUP13(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13) G4Pair<t1, GROUP12(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13) >
#define GROUP14(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) G4Pair<t1, GROUP13(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) >
#define GROUP15(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15) G4Pair<t1, GROUP14(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15) >
#define GROUP16(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16) G4Pair<t1, GROUP15(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16) >
#define GROUP17(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17) G4Pair<t1, GROUP16(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17) >
#define GROUP18(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18) G4Pair<t1, GROUP17(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18) >
#define GROUP19(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19) G4Pair<t1, GROUP18(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19) >
#define GROUP20(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20) G4Pair<t1, GROUP19(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20) >
#define GROUP21(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21) G4Pair<t1, GROUP20(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21) >
#define GROUP22(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22) G4Pair<t1, GROUP21(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22) >
#define GROUP23(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23) G4Pair<t1, GROUP22(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23) >
#define GROUP24(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24) G4Pair<t1, GROUP23(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24) >
#define GROUP25(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25) G4Pair<t1, GROUP24(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25) >
#define GROUP26(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26) G4Pair<t1, GROUP25(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26) >
#define GROUP27(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27) G4Pair<t1, GROUP26(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27) >
#define GROUP28(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28) G4Pair<t1, GROUP27(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28) >
#define GROUP29(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29) G4Pair<t1, GROUP28(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29) >
#define GROUP30(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30) G4Pair<t1, GROUP29(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30) >
#define GROUP31(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31) G4Pair<t1, GROUP30(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31) >
#define GROUP32(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32) G4Pair<t1, GROUP31(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32) >
#define GROUP33(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33) G4Pair<t1, GROUP32(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33) >
#define GROUP34(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34) G4Pair<t1, GROUP33(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34) >
#define GROUP35(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35) G4Pair<t1, GROUP34(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35) >
#define GROUP36(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36) G4Pair<t1, GROUP35(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36) >
#define GROUP37(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37) G4Pair<t1, GROUP36(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37) >
#define GROUP38(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38) G4Pair<t1, GROUP37(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38) >
#define GROUP39(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39) G4Pair<t1, GROUP38(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39) >
#define GROUP40(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40) G4Pair<t1, GROUP39(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40) >
#define GROUP41(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41) G4Pair<t1, GROUP40(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41) >
#define GROUP42(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42) G4Pair<t1, GROUP41(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42) >
#define GROUP43(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43) G4Pair<t1, GROUP42(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43) >
#define GROUP44(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44) G4Pair<t1, GROUP43(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44) >
#define GROUP45(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45) G4Pair<t1, GROUP44(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45) >
#define GROUP46(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46) G4Pair<t1, GROUP45(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46) >
#define GROUP47(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47) G4Pair<t1, GROUP46(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47) >
#define GROUP48(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48) G4Pair<t1, GROUP47(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48) >
#define GROUP49(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49) G4Pair<t1, GROUP48(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49) >
#define GROUP50(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50) G4Pair<t1, GROUP49(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50) >
#define GROUP51(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51) G4Pair<t1, GROUP50(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51) >
#define GROUP52(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52) G4Pair<t1, GROUP51(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52) >
#define GROUP53(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53) G4Pair<t1, GROUP52(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53) >
#define GROUP54(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54) G4Pair<t1, GROUP53(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54) >
#define GROUP55(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55) G4Pair<t1, GROUP54(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55) >
#define GROUP56(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56) G4Pair<t1, GROUP55(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56) >
#define GROUP57(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57) G4Pair<t1, GROUP56(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57) >
#define GROUP58(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58) G4Pair<t1, GROUP57(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58) >
#define GROUP59(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59) G4Pair<t1, GROUP58(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59) >
#define GROUP60(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60) G4Pair<t1, GROUP59(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60) >
#define GROUP61(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61) G4Pair<t1, GROUP60(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61) >
#define GROUP62(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62) G4Pair<t1, GROUP61(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62) >
#define GROUP63(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63) G4Pair<t1, GROUP62(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63) >
#define GROUP64(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64) G4Pair<t1, GROUP63(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64) >
#define GROUP65(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65) G4Pair<t1, GROUP64(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65) >
#define GROUP66(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66) G4Pair<t1, GROUP65(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66) >
#define GROUP67(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67) G4Pair<t1, GROUP66(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67) >
#define GROUP68(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68) G4Pair<t1, GROUP67(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68) >
#define GROUP69(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69) G4Pair<t1, GROUP68(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69) >
#define GROUP70(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70) G4Pair<t1, GROUP69(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70) >
#define GROUP71(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71) G4Pair<t1, GROUP70(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71) >
#define GROUP72(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72) G4Pair<t1, GROUP71(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72) >
#define GROUP73(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73) G4Pair<t1, GROUP72(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73) >
#define GROUP74(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74) G4Pair<t1, GROUP73(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74) >
#define GROUP75(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75) G4Pair<t1, GROUP74(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75) >
#define GROUP76(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76) G4Pair<t1, GROUP75(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76) >
#define GROUP77(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77) G4Pair<t1, GROUP76(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77) >
#define GROUP78(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78) G4Pair<t1, GROUP77(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78) >
#define GROUP79(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79) G4Pair<t1, GROUP78(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79) >
#define GROUP80(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80) G4Pair<t1, GROUP79(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80) >
#define GROUP81(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81) G4Pair<t1, GROUP80(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81) >
#define GROUP82(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82) G4Pair<t1, GROUP81(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82) >
#define GROUP83(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83) G4Pair<t1, GROUP82(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83) >
#define GROUP84(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84) G4Pair<t1, GROUP83(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84) >
#define GROUP85(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85) G4Pair<t1, GROUP84(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85) >
#define GROUP86(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86) G4Pair<t1, GROUP85(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86) >
#define GROUP87(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87) G4Pair<t1, GROUP86(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87) >
#define GROUP88(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88) G4Pair<t1, GROUP87(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88) >
#define GROUP89(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89) G4Pair<t1, GROUP88(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89) >
#define GROUP90(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90) G4Pair<t1, GROUP89(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90) >
#define GROUP91(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91) G4Pair<t1, GROUP90(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91) >
#define GROUP92(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92) G4Pair<t1, GROUP91(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92) >
#define GROUP93(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93) G4Pair<t1, GROUP92(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93) >
#define GROUP94(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94) G4Pair<t1, GROUP93(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94) >
#define GROUP95(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95) G4Pair<t1, GROUP94(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95) >
#define GROUP96(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96) G4Pair<t1, GROUP95(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96) >
#define GROUP97(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97) G4Pair<t1, GROUP96(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97) >
#define GROUP98(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98) G4Pair<t1, GROUP97(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98) >
#define GROUP99(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99) G4Pair<t1, GROUP98(t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99) >
template <class group, class functor>
class G4ForEach
{
private:
template <class T1> static void ActOn(T1* aT1)
{
typename group::first aL;
functor aF;
aF(&aL, aT1);
}
public:
template <class T1> static void Apply(T1* aT1=0)
{
ActOn(aT1);
G4ForEach<typename group::rest, functor>::Apply(aT1);
}
static void Apply()
{
ActOn<int>(0);
G4ForEach<typename group::rest, functor>::Apply();
}
};
template <class functor>
struct G4ForEach<G4Terminator, functor>
{
template <class T1> static void Apply(T1* ){};
static void Apply(){};
};
template <class t1, int i2, class t3>
class G4IntGrp
{
public:
typedef t1 it;
enum {i = i2};
typedef t3 rest;
};
#define INT1(t1,i2) G4IntGrp<t1, i2, G4Terminator >
#define INT2(t1,i2,i3) G4IntGrp<t1, i3, INT1(t1,i2) >
#define INT3(t1,i2,i3,i4) G4IntGrp<t1, i4, INT2(t1,i2,i3) >
#define INT4(t1,i2,i3,i4,i5) G4IntGrp<t1, i5, INT3(t1,i2,i3,i4) >
#define INT5(t1,i2,i3,i4,i5,i6) G4IntGrp<t1, i6, INT4(t1,i2,i3,i4,i5) >
#define INT6(t1,i2,i3,i4,i5,i6,i7) G4IntGrp<t1, i7, INT5(t1,i2,i3,i4,i5,i6) >
#define INT7(t1,i2,i3,i4,i5,i6,i7,i8) G4IntGrp<t1, i8, INT6(t1,i2,i3,i4,i5,i6,i7) >
#define INT8(t1,i2,i3,i4,i5,i6,i7,i8,i9) G4IntGrp<t1, i9, INT7(t1,i2,i3,i4,i5,i6,i7,i8) >
#define INT9(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10) G4IntGrp<t1 i10, INT8(t1,i2,i3,i4,i5,i6,i7,i8,i9) >
#define INT10(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11) G4IntGrp<t1, i11, INT9(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10) >
#define INT11(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12) G4IntGrp<t1, i12, INT10(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11) >
#define INT12(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13) G4IntGrp<t1, i13, INT11(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12) >
#define INT13(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14) G4IntGrp<t1, i14, INT12(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13) >
#define INT14(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15) G4IntGrp<t1, i15, INT13(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14) >
#define INT15(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16) G4IntGrp<t1, i16, INT14(t1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15) >
#endif
@@ -0,0 +1,173 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
#ifndef G4Parton_h
#define G4Parton_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4Parton ----------------
// by Gunter Folger, June 1998.
// class for Parton (inside a string) used by Parton String Models
// ------------------------------------------------------------
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include <iostream>
#include "G4ParticleTable.hh"
#include "Randomize.hh"
class G4Parton
{
public:
G4Parton()
{
// CAUTION:
// this is a preliminary definition yielding u and d quarks only!
//
PDGencoding=(G4int)(2.*G4UniformRand());
theColour = (G4int)(3.*G4UniformRand())+1;
theIsoSpinZ = ((G4int)(G4UniformRand()))-0.5;
theSpinZ = ((G4int)(G4UniformRand()))-0.5;
}
G4Parton(G4int PDGencoding);
G4Parton(const G4Parton &right);
~G4Parton();
G4Parton & operator=(const G4Parton &right);
G4bool operator==(const G4Parton &right) const;
G4bool operator!=(const G4Parton &right) const;
G4int GetPDGcode() const;
G4ParticleDefinition * GetDefinition();
void SetDefinition(G4ParticleDefinition * aDefinition); // Uzhi
void DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection);
void DefineMomentumInZ(G4double aLightConeMomentum,G4double aLightConeE, G4bool aDirection);
const G4ThreeVector & GetPosition()const;
void SetPosition(const G4ThreeVector &aPosition);
const G4LorentzVector & Get4Momentum() const;
void Set4Momentum(const G4LorentzVector & aMomentum);
void SetX(G4double anX) { theX = anX; }
G4double GetX() {return theX;}
void SetColour(G4int aColour) {theColour = aColour;}
G4int GetColour() {return theColour;}
void SetIsoSpinZ(G4double anIsoSpinZ) {theIsoSpinZ = anIsoSpinZ;}
G4double GetIsoSpinZ() {return theIsoSpinZ;}
void SetSpinZ(G4double aSpinZ) {theSpinZ = aSpinZ;}
G4double GetSpinZ() {return theSpinZ;}
private:
G4double GetMass();
public:
G4int PDGencoding;
G4ParticleDefinition * theDefinition;
private:
G4LorentzVector theMomentum;
G4ThreeVector thePosition;
G4int theColour;
G4double theIsoSpinZ;
G4double theSpinZ;
G4double theX;
};
inline G4bool G4Parton::operator==(const G4Parton &right) const
{
return this==&right;
}
inline G4bool G4Parton::operator!=(const G4Parton &right) const
{
return this!=&right;
}
inline G4int G4Parton::GetPDGcode() const
{
return PDGencoding;
}
inline const G4ThreeVector & G4Parton::GetPosition() const
{
return thePosition;
}
inline void G4Parton::SetPosition(const G4ThreeVector &aPosition)
{
thePosition=aPosition;
}
inline const G4LorentzVector & G4Parton::Get4Momentum() const
{
return theMomentum;
}
inline void G4Parton::Set4Momentum(const G4LorentzVector & aMomentum)
{
theMomentum=aMomentum;
}
inline
G4double G4Parton::GetMass()
{
return theDefinition->GetPDGMass();
}
inline
G4ParticleDefinition * G4Parton::GetDefinition()
{
return theDefinition;
}
inline void G4Parton::SetDefinition(G4ParticleDefinition * aDefinition) // Uzhi
{
theDefinition = aDefinition;
PDGencoding = theDefinition->GetPDGEncoding();
}
#endif
@@ -23,25 +23,22 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4HadReentrentException_h
#define G4HadReentrentException_h
//
//
#ifndef G4PartonVector_h
#define G4PartonVector_h 1
#include <exception>
#include <iostream>
#include "G4HadronicException.hh"
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4PartonVector ----------------
// by Gunter Folger, May 1998.
// ------------------------------------------------------------
class G4HadReentrentException : public G4HadronicException
{
public:
G4HadReentrentException(G4String in, G4int at, G4String mess)
: G4HadronicException(in, at, mess) {}
virtual ~G4HadReentrentException() throw () {}
void Report(std::ostream & aS)
{
aS<< "G4HadReentrentException:" <<std::endl;
G4HadronicException::Report(aS);
}
};
#include "G4Parton.hh"
#include <vector>
typedef std::vector<G4Parton *> G4PartonVector;
struct DeleteParton{ void operator()(G4Parton*aP){delete aP;} };
#endif
@@ -0,0 +1,119 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
// GEANT4 Class file
//
//
// File name: G4PolynomialPDF
//
// Author: Jason Detwiler (jasondet@gmail.com)
//
// Creation date: Aug 2012
//
// Description: Evaluates, generates random numbers from, and evaluates
// the inverse of a polynomial PDF, its CDF, and its first and second
// derivative.
//
// -------------------------------------------------------------------
#ifndef G4POLYNOMIALPDF_HH
#define G4POLYNOMIALPDF_HH
#include "globals.hh"
#include <vector>
class G4PolynomialPDF
{
public:
G4PolynomialPDF(size_t n = 0, const double* coeffs = nullptr,
G4double x1=0, G4double x2=1);
~G4PolynomialPDF();
// Setters and Getters for coefficients
inline void SetNCoefficients(size_t n) { fCoefficients.resize(n); fChanged = true; }
inline size_t GetNCoefficients() const { return fCoefficients.size(); }
inline void SetCoefficients(const std::vector<G4double>& v) {
fCoefficients = v; fChanged = true; Simplify();
}
inline G4double GetCoefficient(size_t i) const { return fCoefficients[i]; }
void SetCoefficient(size_t i, G4double value, bool doSimplify);
void SetCoefficients(size_t n, const G4double* coeffs);
void Simplify();
// Set the domain over which random numbers are generated and over which
// the CDF is evaluated
void SetDomain(G4double x1, G4double x2);
// Normalize PDF to 1 over domain fX1 to fX2. Used internally by
// GetRandomX(), but the user may want to call this as well for evaluation
// purposes.
void Normalize();
// Evaluate (d/dx)^ddxPower f(x) (-1 <= ddxPower <= 2)
// ddxPower = -1 -> CDF;
// ddxPower = 0 -> PDF
// ddxPower = 1 -> PDF'
// ddxPower = 2 -> PDF''
G4double Evaluate(G4double x, G4int ddxPower = 0);
// Generate a random number from this PDF
G4double GetRandomX();
// Set the tolerance to within negative minima are checked
inline void SetTolerance(G4double tolerance) { fTolerance = tolerance; }
// Find a value x between x1 and x2 at which ddxPower[PDF](x) = p.
// ddxPower = -1 -> CDF;
// ddxPower = 0 -> PDF
// ddxPower = 1 -> PDF'
// (ddxPower = 2 not implemented)
// Solves analytically when possible, and otherwise uses the Newton-Raphson
// method to find the zero of ddxPower[PDF](x) - p.
// If not found in range, returns the nearest boundary.
// Beware that if x1 and x2 are not set carefully there may be multiple
// solutions, and care is not taken to select a particular one among them.
// Returns x2 on error
G4double GetX( G4double p, G4double x1, G4double x2, G4int ddxPower = 0,
G4double guess = 1.e99, G4bool bisect = true );
inline G4double EvalInverseCDF(G4double p) { return GetX(p, fX1, fX2, -1, fX1 + p*(fX2-fX1)); }
G4double Bisect( G4double p, G4double x1, G4double x2 );
void Dump();
protected:
// Checks for negative values between x1 and x2. Used by GetRandomX()
G4bool HasNegativeMinimum(G4double x1, G4double x2);
G4double fX1;
G4double fX2;
std::vector<G4double> fCoefficients;
G4bool fChanged;
G4double fTolerance;
G4int fVerbose;
};
#endif
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4SampleResonance_h
#define G4SampleResonance_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4SampleResonance ----------------
// by Henning Weber, March 2001.
// helper class for sampling resonance masses
// ------------------------------------------------------------
#include "globals.hh"
#include <map>
#include "G4ParticleDefinition.hh"
#include "G4Log.hh"
class G4SampleResonance
{
public:
G4double GetMinimumMass(const G4ParticleDefinition* p) const;
G4double SampleMass(const G4double poleMass,
const G4double gamma,
const G4double minMass,
const G4double maxMass) const;
G4double SampleMass(const G4ParticleDefinition* p, const G4double maxMass) const;
private:
G4double BrWigInt0(const G4double x, const G4double gamma, const G4double m0) const
{ return 2.0*gamma*std::atan( 2.0 * (x-m0)/ gamma ); }
G4double BrWigInt1(const G4double x, const G4double gamma, const G4double m0) const
{ return 0.5*gamma*gamma*G4Log( (x-m0)*(x-m0)+gamma*gamma/4.0 ) + m0*BrWigInt0(x,gamma,m0); }
G4double BrWigInv(const G4double x, const G4double gamma, const G4double m0) const
{ return 0.5*gamma*std::tan( 0.5*x/gamma )+m0; }
public:
typedef std::map<const G4ParticleDefinition*, G4double, std::less<const G4ParticleDefinition*> >::const_iterator minMassMapIterator;
typedef std::map<const G4ParticleDefinition*, G4double, std::less<const G4ParticleDefinition*> > minMassMapType;
private:
static G4ThreadLocal minMassMapType *minMassCache_G4MT_TLS_;
};
#endif
@@ -0,0 +1,106 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// 20110805 M. Kelsey -- Change nucleon vector to use objects, not pointers
#ifndef G4V3DNucleus_h
#define G4V3DNucleus_h 1
class G4Nucleon;
class G4VNuclearDensity;
#include "G4DynamicParticle.hh"
#include "Randomize.hh"
#include <utility>
#include <vector>
class G4V3DNucleus
{
public:
G4V3DNucleus();
virtual ~G4V3DNucleus();
private:
G4V3DNucleus(const G4V3DNucleus &right);
const G4V3DNucleus & operator=(const G4V3DNucleus &right);
G4bool operator==(const G4V3DNucleus &right) const;
G4bool operator!=(const G4V3DNucleus &right) const;
public:
virtual void Init(G4int theA, G4int theZ) = 0;
virtual G4bool StartLoop() = 0;
virtual G4Nucleon * GetNextNucleon() = 0;
virtual const std::vector<G4Nucleon> & GetNucleons() = 0;
virtual G4int GetMassNumber() = 0;
virtual G4double GetMass() = 0;
virtual G4int GetCharge() = 0;
virtual G4double GetNuclearRadius() = 0;
virtual G4double GetNuclearRadius(const G4double maxRelativeDensity) = 0;
virtual G4double GetOuterRadius() = 0;
virtual G4double CoulombBarrier() = 0;
virtual void DoLorentzBoost(const G4LorentzVector & theBoost) = 0;
virtual void DoLorentzBoost(const G4ThreeVector & theBeta) = 0;
virtual void DoLorentzContraction(const G4LorentzVector & theBoost) = 0;
virtual void DoLorentzContraction(const G4ThreeVector & theBeta) = 0;
virtual void DoTranslation(const G4ThreeVector & theShift) = 0;
virtual const G4VNuclearDensity * GetNuclearDensity() const = 0;
virtual void SortNucleonsIncZ() = 0;
virtual void SortNucleonsDecZ() = 0;
public:
std::pair<G4double, G4double> ChooseImpactXandY(G4double maxImpact);
std::pair<G4double, G4double> RefetchImpactXandY(){return theImpactParameter;}
private:
std::pair<G4double, G4double> theImpactParameter;
};
inline
std::pair<G4double, G4double> G4V3DNucleus::
ChooseImpactXandY(G4double maxImpact)
{
G4double x,y;
do
{
x = 2*G4UniformRand() - 1;
y = 2*G4UniformRand() - 1;
}
while(x*x + y*y > 1); /* Loop checking, 30-Oct-2015, G.Folger */
G4double impactX = x*(maxImpact);
G4double impactY = y*(maxImpact);
theImpactParameter.first = impactX;
theImpactParameter.second = impactY;
return theImpactParameter;
}
#endif
@@ -0,0 +1,89 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Abstract base class for multibody "phase space" generators. Subclasses
// implement a specific algorithm, such as Kopylov, GENBOD, or Makoto's
// NBody. Subclasses are used by G4HadPhaseSpaceGenerator.
//
// Author: Michael Kelsey (SLAC) <kelsey@slac.stanford.edu>
#ifndef G4VHadDecayAlgorithm_HH
#define G4VHadDecayAlgorithm_HH 1
#include "globals.hh"
#include "G4LorentzVector.hh"
#include "G4ThreeVector.hh"
#include <vector>
#include <iosfwd>
class G4VHadDecayAlgorithm {
public:
G4VHadDecayAlgorithm(const G4String& algName, G4int verbose=0)
: name(algName), verboseLevel(verbose) {;}
virtual ~G4VHadDecayAlgorithm() {;}
// Initial state (rest mass) and list of final masses
void Generate(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
// Enable (or disable if 0) diagnostic messages (subclass may overload)
virtual void SetVerboseLevel(G4int verbose) { verboseLevel = verbose; }
G4int GetVerboseLevel() const { return verboseLevel; }
const G4String& GetName() const { return name; }
protected:
// Subclasses MUST implement these functions
virtual void GenerateTwoBody(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState) = 0;
virtual void GenerateMultiBody(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState) = 0;
// Validate kinematics (e.g., limit number of final state particles)
// Subclasses may override or call back to this function
virtual G4bool IsDecayAllowed(G4double initialMass,
const std::vector<G4double>& masses) const;
// Two-body momentum function (c.f. PDK from CERNLIB W505)
G4double TwoBodyMomentum(G4double M0, G4double M1, G4double M2) const;
// Convenience functions for uniform angular distributions
G4double UniformTheta() const;
G4double UniformPhi() const;
// Utility to dump vector contents to line of output
void PrintVector(const std::vector<G4double>& v, const G4String& name,
std::ostream& os) const;
private:
G4String name;
G4int verboseLevel;
};
#endif /* G4VHadDecayAlgorithm_HH */
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// Abstract base class for multibody uniform phase space generators.
// Subclasses implement a specific algorithm, such as Kopylov, GENBOD,
// or Makoto's NBody. Subclasses are used by G4HadDecayGenerator.
//
// Author: Michael Kelsey (SLAC) <kelsey@slac.stanford.edu>
#ifndef G4VHadPhaseSpaceAlgorithm_HH
#define G4VHadPhaseSpaceAlgorithm_HH 1
#include "globals.hh"
#include "G4VHadDecayAlgorithm.hh"
#include "G4LorentzVector.hh"
#include "G4ThreeVector.hh"
#include <vector>
#include <iosfwd>
class G4VHadPhaseSpaceAlgorithm : public G4VHadDecayAlgorithm {
public:
G4VHadPhaseSpaceAlgorithm(const G4String& algName, G4int verbose=0)
: G4VHadDecayAlgorithm(algName, verbose) {;}
virtual ~G4VHadPhaseSpaceAlgorithm() {;}
protected:
// Multi-body function remains pure-virtual from base class
// Two-body uniform distribution is common to all algorithms
virtual void GenerateTwoBody(G4double initialMass,
const std::vector<G4double>& masses,
std::vector<G4LorentzVector>& finalState);
// Sample spherical distribution
G4ThreeVector UniformVector(G4double mag=1.) const;
};
#endif /* G4VHadPhaseSpaceAlgorithm_HH */
@@ -0,0 +1,82 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
#ifndef G4VKineticNucleon_h
#define G4VKineticNucleon_h 1
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4ParticleDefinition.hh"
class G4KineticTrackVector;
class G4VKineticNucleon
{
public:
G4VKineticNucleon();
G4VKineticNucleon(const G4VKineticNucleon &right);
virtual ~G4VKineticNucleon();
const G4VKineticNucleon& operator=(const G4VKineticNucleon& right);
G4bool operator==(const G4VKineticNucleon& right) const;
G4bool operator!=(const G4VKineticNucleon& right) const;
virtual G4KineticTrackVector* Decay();
virtual const G4LorentzVector& Get4Momentum() const =0;
virtual const G4ParticleDefinition* GetDefinition()const =0;
virtual const G4ThreeVector& GetPosition() const =0;
protected:
private:
};
// Class G4VKineticNucleon
inline G4KineticTrackVector* G4VKineticNucleon::Decay()
{
return NULL;
}
inline const G4VKineticNucleon& G4VKineticNucleon::operator=(const G4VKineticNucleon& )
{
return *this;
}
#endif
@@ -23,36 +23,39 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef DumpFrame_h
#define DumpFrame_h
//
//
#ifndef G4VNuclearDensity_h
#define G4VNuclearDensity_h 1
#include "G4FastVector.hh"
#include "G4ReactionProduct.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
class DumpFrames
class G4VNuclearDensity
{
public:
static void DumpFrame(G4FastVector<G4ReactionProduct,128> &vec, G4int vecLen)
{
// cout << vecLen<<G4endl;
// for(G4int i=0; i<vecLen; i++)
// {
// cout << vec[i]->GetDefinition()->GetPDGEncoding()<<" ";
// cout << vec[i]->GetPositionInNucleus()<<" ";
// G4double x,y,z;
// do
// {
// x = G4UniformRand()*10-5;
// y = G4UniformRand()*10-5;
// z = G4UniformRand()*10-5;
// }
// while(std::sqrt(x*x+y*y+z*z)>5); /* Loop checking, 30-Oct-2015, G.Folger :)*/
// cout << x<<" "<<y<<" "<<z;
// cout << vec[i]->GetMomentum()<<" ";
// cout << vec[i]->GetTotalEnergy();
// cout << G4endl;
// }
}
public:
G4VNuclearDensity();
virtual ~G4VNuclearDensity();
inline G4double GetDensity(const G4ThreeVector & aPosition) const
{
return rho0*GetRelativeDensity(aPosition);
};
virtual G4double GetRelativeDensity(const G4ThreeVector & aPosition) const = 0;
virtual G4double GetRadius(const G4double maxRelativeDenisty) const = 0;
virtual G4double GetDeriv(const G4ThreeVector & point) const = 0;
protected:
inline void Setrho0(G4double arho0) { rho0=arho0; };
inline G4double Getrho0() const { return rho0; };
private:
G4double rho0;
};
#endif
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * *
// * Parts of this code which have been developed by QinetiQ Ltd *
// * under contract to the European Space Agency (ESA) are the *
// * intellectual property of ESA. Rights to use, copy, modify and *
// * redistribute this software for general public use are granted *
// * in compliance with any licensing, distribution and development *
// * policy adopted by the Geant4 Collaboration. This code has been *
// * written by QinetiQ Ltd for the European Space Agency, under ESA *
// * contract 17191/03/NL/LvH (Aurora Programme). *
// * *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4WilsonRadius_h
#define G4WilsonRadius_h 1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: G4WilsonRadus.hh
//
// Version: B.1
// Date: 15/04/04
// Author: P R Truscott
// Organisation: QinetiQ Ltd, UK
// Customer: ESA/ESTEC, NOORDWIJK
// Contract: 17191/03/NL/LvH
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// CHANGE HISTORY
// --------------
//
// 6 October 2003, P R Truscott, QinetiQ Ltd, UK
// Created.
//
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
// Beta release
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// Class Description
// Provides functions to calculate the nuclear radius as used in the
// abrasion-ablation model (see Wilson, Tripathi, Cucinotta et al, NASA
// Technical Paper 3533, October 1995), and to determine total nuclear-nuclear
// cross-sections. The Algorithm comes from Tripathi, Cucinnota and Wilson,
// Nucl Instrum Meth Phys Res B, 152, pp425-431, 1999.
//
// Class Description - End
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "globals.hh"
////////////////////////////////////////////////////////////////////////////////
//
class G4WilsonRadius
{
public:
G4WilsonRadius ();
~G4WilsonRadius ();
G4double GetWilsonRMSRadius (G4double A);
G4double GetWilsonRadius (G4double A);
private:
G4double r0sq;
G4double factor;
G4double third;
};
////////////////////////////////////////////////////////////////////////////////
//
#endif