Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#ifndef G4DecayStrongResonances_h
|
||||
#define G4DecayStrongResonances_h 1
|
||||
|
||||
#include "G4Fancy3DNucleus.hh"
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4HadFinalState.hh"
|
||||
#include "G4DynamicParticleVector.hh"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
class G4DecayStrongResonances
|
||||
{
|
||||
public:
|
||||
G4DecayStrongResonances(){}
|
||||
~G4DecayStrongResonances(){}
|
||||
|
||||
private:
|
||||
G4int operator==(G4DecayStrongResonances& right) {return (this == &right);}
|
||||
G4int operator!=(G4DecayStrongResonances& right) {return (this != &right);}
|
||||
|
||||
G4double theEnergy;
|
||||
|
||||
public:
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* )
|
||||
{
|
||||
// decay the strong resonances
|
||||
G4ReactionProductVector * theResult = new G4ReactionProductVector;
|
||||
G4KineticTrackVector *result1, *secondaries, *result;
|
||||
result1=theSecondaries;
|
||||
result=new G4KineticTrackVector();
|
||||
|
||||
size_t aResult=0;
|
||||
for (aResult=0; aResult < result1->size(); aResult++)
|
||||
{
|
||||
G4ParticleDefinition * pdef;
|
||||
pdef=result1->operator[](aResult)->GetDefinition();
|
||||
secondaries=NULL;
|
||||
if ( pdef->GetPDGWidth() > 0 && pdef->GetPDGLifeTime() < 5E-17*s )
|
||||
{
|
||||
secondaries = result1->operator[](aResult)->Decay();
|
||||
}
|
||||
if ( secondaries == NULL )
|
||||
{
|
||||
result->push_back(result1->operator[](aResult));
|
||||
result1->operator[](aResult)=NULL; //protect for clearAndDestroy
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
|
||||
{
|
||||
result1->push_back(secondaries->operator[](aSecondary));
|
||||
}
|
||||
delete secondaries;
|
||||
}
|
||||
}
|
||||
std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
|
||||
delete result1;
|
||||
|
||||
// translate to ReactionProducts
|
||||
G4ReactionProduct * it = NULL;
|
||||
for(aResult=0; aResult < result->size(); aResult++)
|
||||
{
|
||||
it = new G4ReactionProduct();
|
||||
it->SetDefinition((*result)[aResult]->GetDefinition());
|
||||
it->SetMass((*result)[aResult]->GetDefinition()->GetPDGMass());
|
||||
it->SetTotalEnergy((*result)[aResult]->Get4Momentum().t());
|
||||
it->SetMomentum((*result)[aResult]->Get4Momentum().vect());
|
||||
|
||||
theResult->push_back(it);
|
||||
}
|
||||
std::for_each(result->begin(), result->end(), DeleteKineticTrack());
|
||||
delete result;
|
||||
return theResult;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // G4DecayStrongResonances_h
|
||||
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#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(const G4ExcitedString &right);
|
||||
|
||||
~G4ExcitedString();
|
||||
|
||||
int operator==(const G4ExcitedString &right) const;
|
||||
|
||||
int operator!=(const G4ExcitedString &right) const;
|
||||
|
||||
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)
|
||||
G4ThreeVector thePosition;
|
||||
G4PartonVector thePartons; // would like initial capacity for 3 Partons.
|
||||
G4KineticTrack* theTrack;
|
||||
|
||||
};
|
||||
|
||||
inline
|
||||
int G4ExcitedString::operator==(const G4ExcitedString &right) const
|
||||
{
|
||||
return this == &right;
|
||||
}
|
||||
|
||||
inline
|
||||
int G4ExcitedString::operator!=(const G4ExcitedString &right) const
|
||||
{
|
||||
return this != &right;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4ThreeVector & G4ExcitedString::GetPosition() const
|
||||
{
|
||||
return thePosition;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ExcitedString::SetPosition(const G4ThreeVector &aPosition)
|
||||
{
|
||||
thePosition= aPosition;
|
||||
}
|
||||
|
||||
inline
|
||||
G4LorentzVector G4ExcitedString::Get4Momentum() const
|
||||
{
|
||||
G4LorentzVector momentum;
|
||||
for ( unsigned int index=0; index < thePartons.size() ; index++ )
|
||||
{
|
||||
momentum += thePartons[index]->Get4Momentum();
|
||||
}
|
||||
return momentum;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ExcitedString::LorentzRotate(const G4LorentzRotation & rotation)
|
||||
{
|
||||
for ( unsigned int index=0; index < thePartons.size() ; index++ )
|
||||
{
|
||||
thePartons[index]->Set4Momentum(rotation*thePartons[index]->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());
|
||||
|
||||
for ( unsigned int index=0; index < thePartons.size() ; index++ )
|
||||
{
|
||||
momentum=toCms * thePartons[index]->Get4Momentum();
|
||||
thePartons[index]->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,41 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#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,109 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#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.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4Fancy3DNucleus : public G4V3DNucleus
|
||||
{
|
||||
|
||||
public:
|
||||
G4Fancy3DNucleus();
|
||||
~G4Fancy3DNucleus();
|
||||
|
||||
private:
|
||||
G4Fancy3DNucleus(const G4Fancy3DNucleus &right);
|
||||
const G4Fancy3DNucleus & operator=(const G4Fancy3DNucleus &right);
|
||||
int operator==(const G4Fancy3DNucleus &right) const;
|
||||
int operator!=(const G4Fancy3DNucleus &right) const;
|
||||
|
||||
|
||||
// Implementation
|
||||
void ChooseNucleons();
|
||||
void ChoosePositions();
|
||||
void ChooseFermiMomenta();
|
||||
G4double BindingEnergy();
|
||||
G4bool ReduceSum(G4ThreeVector * momentum, G4double *);
|
||||
|
||||
public:
|
||||
void Init(G4double theA, G4double 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 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;
|
||||
|
||||
private:
|
||||
|
||||
G4int myA;
|
||||
G4int myZ;
|
||||
G4Nucleon * theNucleons;
|
||||
std::vector<G4Nucleon *> theRWNucleons; // should not have two...
|
||||
struct DeleteNucleon{ void operator()(G4Nucleon *aN){delete aN;} };
|
||||
G4int currentNucleon;
|
||||
G4VNuclearDensity * theDensity;
|
||||
G4FermiMomentum theFermi;
|
||||
const G4double nucleondistance;
|
||||
};
|
||||
|
||||
inline G4int G4Fancy3DNucleus::GetCharge()
|
||||
{
|
||||
return myZ;
|
||||
}
|
||||
|
||||
inline G4int G4Fancy3DNucleus::GetMassNumber()
|
||||
{
|
||||
return myA;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef G4FermiMomentum_h
|
||||
#define G4FermiMomentum_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
class G4FermiMomentum
|
||||
{
|
||||
|
||||
public:
|
||||
G4FermiMomentum();
|
||||
~G4FermiMomentum();
|
||||
|
||||
inline void Init(G4double anA, G4double 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. );
|
||||
return p*maxMomentum;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4double cbrt(G4double x) { return pow(x,1./3.); }
|
||||
|
||||
private:
|
||||
|
||||
G4double theA;
|
||||
G4double 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,308 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (May 1998)
|
||||
|
||||
#ifndef G4Fragment_h
|
||||
#define G4Fragment_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LorentzVector.hh"
|
||||
#include "G4ParticleMomentum.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
|
||||
class G4ParticleDefinition;
|
||||
|
||||
class G4Fragment; // Forward deckaration
|
||||
typedef std::vector<G4Fragment*> G4FragmentVector;
|
||||
|
||||
class G4Fragment
|
||||
{
|
||||
public:
|
||||
|
||||
// ============= CONSTRUCTORS ==================
|
||||
|
||||
// Default constructor
|
||||
G4Fragment();
|
||||
|
||||
// Destructor
|
||||
~G4Fragment();
|
||||
|
||||
// Copy constructor
|
||||
G4Fragment(const G4Fragment &right);
|
||||
|
||||
// Several constructors
|
||||
|
||||
// A,Z and 4-momentum
|
||||
G4Fragment(const G4int A, const G4int Z, const G4LorentzVector aMomentum);
|
||||
|
||||
// 4-momentum and pointer to G4particleDefinition (for gammas)
|
||||
G4Fragment(const G4LorentzVector aMomentum, G4ParticleDefinition * aParticleDefinition);
|
||||
|
||||
// ============= OPERATORS ==================
|
||||
|
||||
const 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*);
|
||||
friend std::ostream& operator<<(std::ostream&, const G4Fragment&);
|
||||
|
||||
// ============= METHODS ==================
|
||||
|
||||
inline G4double GetA(void) const;
|
||||
void SetA(const G4double value);
|
||||
|
||||
G4double GetZ(void) const;
|
||||
void SetZ(const G4double value);
|
||||
|
||||
G4double GetExcitationEnergy(void) const;
|
||||
void SetExcitationEnergy(const G4double value);
|
||||
|
||||
const G4LorentzVector GetMomentum(void) const;
|
||||
void SetMomentum(const G4LorentzVector value);
|
||||
|
||||
const G4ThreeVector GetAngularMomentum(void) const;
|
||||
void SetAngularMomentum(const G4ThreeVector value);
|
||||
|
||||
G4int GetNumberOfExcitons(void) const;
|
||||
// void SetNumberOfExcitons(const G4int value);
|
||||
|
||||
G4int GetNumberOfHoles(void) const;
|
||||
void SetNumberOfHoles(const G4int value);
|
||||
|
||||
G4int GetNumberOfCharged(void) const;
|
||||
void SetNumberOfCharged(const G4int value);
|
||||
|
||||
G4int GetNumberOfParticles(void) const;
|
||||
void SetNumberOfParticles(const G4int value);
|
||||
|
||||
inline G4ParticleDefinition * GetParticleDefinition(void) const;
|
||||
void SetParticleDefinition(G4ParticleDefinition * aParticleDefinition);
|
||||
|
||||
G4double GetCreationTime(void) const;
|
||||
void SetCreationTime(const G4double time);
|
||||
|
||||
|
||||
// Some utility methods
|
||||
|
||||
inline G4double GetGroundStateMass(void) const;
|
||||
|
||||
inline G4double GetBindingEnergy(void) const;
|
||||
|
||||
#ifdef PRECOMPOUND_TEST
|
||||
G4String GetCreatorModel() const { return theCreatorModel; }
|
||||
void SetCreatorModel(const G4String & aModel)
|
||||
{ theCreatorModel = aModel; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
G4double CalculateExcitationEnergy(const G4LorentzVector value) const;
|
||||
|
||||
G4ThreeVector IsotropicRandom3Vector(const G4double Magnitude = 1.0) const;
|
||||
|
||||
|
||||
// ============= DATA MEMBERS ==================
|
||||
|
||||
G4double theA;
|
||||
|
||||
G4double theZ;
|
||||
|
||||
G4double theExcitationEnergy;
|
||||
|
||||
G4LorentzVector theMomentum;
|
||||
|
||||
G4ThreeVector theAngularMomentum;
|
||||
|
||||
G4int numberOfParticles;
|
||||
|
||||
G4int numberOfHoles;
|
||||
|
||||
G4int numberOfCharged;
|
||||
|
||||
|
||||
// Gamma evaporation requeriments
|
||||
|
||||
G4ParticleDefinition * theParticleDefinition;
|
||||
|
||||
G4double theCreationTime;
|
||||
|
||||
#ifdef PRECOMPOUND_TEST
|
||||
G4String theCreatorModel;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Class G4Fragment
|
||||
|
||||
inline G4double G4Fragment::GetA() const
|
||||
{
|
||||
return theA;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetA(const G4double value)
|
||||
{
|
||||
theA = value;
|
||||
}
|
||||
|
||||
inline G4double G4Fragment::GetZ() const
|
||||
{
|
||||
return theZ;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetZ(const G4double value)
|
||||
{
|
||||
theZ = value;
|
||||
}
|
||||
|
||||
inline G4double G4Fragment::GetExcitationEnergy() const
|
||||
{
|
||||
// temporary fix for what seems to be
|
||||
// a problem with rounding errors for on-shell lorentz-vectors in CLHEP.
|
||||
// HPW Apr 1999 @@@@@@@
|
||||
|
||||
if(abs(theExcitationEnergy)<10*eV) return 0;
|
||||
return theExcitationEnergy;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetExcitationEnergy(const G4double )
|
||||
{
|
||||
// theExcitationEnergy = value;
|
||||
G4cout << "Warning: G4Fragment::SetExcitationEnergy() is a dummy method. Please, avoid to use it." << G4endl;
|
||||
}
|
||||
|
||||
inline const G4LorentzVector G4Fragment::GetMomentum() const
|
||||
{
|
||||
return theMomentum;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetMomentum(const G4LorentzVector value)
|
||||
{
|
||||
theMomentum = value;
|
||||
theExcitationEnergy = CalculateExcitationEnergy(value);
|
||||
}
|
||||
|
||||
inline const G4ThreeVector G4Fragment::GetAngularMomentum() const
|
||||
{
|
||||
return theAngularMomentum;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetAngularMomentum(const G4ThreeVector value)
|
||||
{
|
||||
theAngularMomentum = value;
|
||||
}
|
||||
|
||||
inline G4int G4Fragment::GetNumberOfExcitons() const
|
||||
{
|
||||
return numberOfParticles + numberOfHoles;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetNumberOfParticles(const G4int value)
|
||||
{
|
||||
numberOfParticles = value;
|
||||
}
|
||||
|
||||
inline G4int G4Fragment::GetNumberOfHoles() const
|
||||
{
|
||||
return numberOfHoles;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetNumberOfHoles(const G4int value)
|
||||
{
|
||||
numberOfHoles = value;
|
||||
}
|
||||
|
||||
inline G4int G4Fragment::GetNumberOfCharged() const
|
||||
{
|
||||
return numberOfCharged;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetNumberOfCharged(const G4int value)
|
||||
{
|
||||
if (value <= numberOfParticles) numberOfCharged = value;
|
||||
else
|
||||
{
|
||||
G4String text = "G4Fragment::SetNumberOfCharged: Number of charged particles can't be greater than number of particles";
|
||||
throw G4HadronicException(__FILE__, __LINE__, text);
|
||||
}
|
||||
}
|
||||
|
||||
inline G4int G4Fragment::GetNumberOfParticles() const
|
||||
{
|
||||
return numberOfParticles;
|
||||
}
|
||||
|
||||
|
||||
inline G4ParticleDefinition * G4Fragment::GetParticleDefinition(void) const
|
||||
{
|
||||
return theParticleDefinition;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetParticleDefinition(G4ParticleDefinition * aParticleDefinition)
|
||||
{
|
||||
theParticleDefinition = aParticleDefinition;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4Fragment::GetCreationTime(void) const
|
||||
{
|
||||
return theCreationTime;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetCreationTime(const G4double time)
|
||||
{
|
||||
theCreationTime = time;
|
||||
}
|
||||
|
||||
inline G4double G4Fragment::GetGroundStateMass(void) const
|
||||
{
|
||||
if (theA == 0) return 0.0; // photon
|
||||
else return G4ParticleTable::GetParticleTable()->
|
||||
GetIonTable()->GetIonMass(G4lrint(theZ),G4lrint(theA));
|
||||
}
|
||||
|
||||
inline G4double G4Fragment::GetBindingEnergy(void) const
|
||||
{
|
||||
return -GetGroundStateMass()+(theA-theZ)*G4Neutron::Neutron()->GetPDGMass()
|
||||
+ theZ*G4Proton::Proton()->GetPDGMass();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (May 1998)
|
||||
|
||||
#ifndef G4FragmentVector_h
|
||||
#define G4FragmentVector_h 1
|
||||
|
||||
#include "G4Fragment.hh"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//$Id: G4GeneralPhaseSpaceDecay.hh,v 1.1 1997/05/21
|
||||
// ----------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, A. Feliciello, 20th May 1998
|
||||
//
|
||||
// Note: this class is a generalization of the
|
||||
// G4PhaseSpaceDecayChannel one
|
||||
// ----------------------------------------------------------------
|
||||
#ifndef G4GeneralPhaseSpaceDecay_h
|
||||
#define G4GeneralPhaseSpaceDecay_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4VDecayChannel.hh"
|
||||
|
||||
class G4GeneralPhaseSpaceDecay : public G4VDecayChannel
|
||||
{
|
||||
public:
|
||||
//Constructors
|
||||
G4GeneralPhaseSpaceDecay(G4int Verbose = 1);
|
||||
|
||||
G4GeneralPhaseSpaceDecay(const G4String& theParentName,
|
||||
G4double theBR,
|
||||
G4int theNumberOfDaughters,
|
||||
const G4String& theDaughterName1,
|
||||
const G4String& theDaughterName2 = "",
|
||||
const G4String& theDaughterName3 = "");
|
||||
|
||||
G4GeneralPhaseSpaceDecay(const G4String& theParentName,
|
||||
G4double theParentMass,
|
||||
G4double theBR,
|
||||
G4int theNumberOfDaughters,
|
||||
const G4String& theDaughterName1,
|
||||
const G4String& theDaughterName2 = "",
|
||||
const G4String& theDaughterName3 = "");
|
||||
|
||||
// Destructor
|
||||
virtual ~G4GeneralPhaseSpaceDecay();
|
||||
|
||||
public:
|
||||
G4double GetParentMass() const;
|
||||
void SetParentMass(const G4double aParentMass);
|
||||
virtual G4DecayProducts* DecayIt(G4double mass=0.0);
|
||||
static G4double Pmx(G4double e, G4double p1, G4double p2);
|
||||
|
||||
protected:
|
||||
G4DecayProducts* OneBodyDecayIt();
|
||||
G4DecayProducts* TwoBodyDecayIt();
|
||||
G4DecayProducts* ThreeBodyDecayIt();
|
||||
G4DecayProducts* ManyBodyDecayIt();
|
||||
|
||||
private:
|
||||
G4double parentmass;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline G4double G4GeneralPhaseSpaceDecay::GetParentMass() const
|
||||
{
|
||||
return parentmass;
|
||||
}
|
||||
|
||||
inline void G4GeneralPhaseSpaceDecay::SetParentMass(const G4double aParentMass)
|
||||
{
|
||||
parentmass = aParentMass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline
|
||||
G4double G4GeneralPhaseSpaceDecay::Pmx(G4double e, G4double p1, G4double p2)
|
||||
{
|
||||
// calculate momentum of daughter particles in two-body decay
|
||||
G4double ppp = (e+p1+p2)*(e+p1-p2)*(e-p1+p2)*(e-p1-p2)/(4.0*e*e);
|
||||
if (ppp>0) return sqrt(ppp);
|
||||
else return -1.;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,451 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// $Id: G4KineticTrack.hh,v 1.0 1998/05/20
|
||||
// -----------------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, A. Feliciello, 20th May 1998
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4KineticTrack_h
|
||||
#define G4KineticTrack_h 1
|
||||
|
||||
#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 "G4Allocator.hh"
|
||||
|
||||
class G4KineticTrackVector;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class G4KineticTrack : public G4VKineticNucleon
|
||||
{
|
||||
public:
|
||||
|
||||
G4KineticTrack();
|
||||
|
||||
G4KineticTrack(const G4KineticTrack& right);
|
||||
|
||||
G4KineticTrack(G4ParticleDefinition* aDefinition,
|
||||
G4double aFormationTime,
|
||||
G4ThreeVector aPosition,
|
||||
G4LorentzVector& a4Momentum);
|
||||
G4KineticTrack(G4Nucleon * nucleon,
|
||||
G4ThreeVector aPosition,
|
||||
G4LorentzVector& a4Momentum);
|
||||
|
||||
~G4KineticTrack();
|
||||
|
||||
const G4KineticTrack& operator=(const G4KineticTrack& right);
|
||||
|
||||
G4int operator==(const G4KineticTrack& right) const;
|
||||
|
||||
G4int operator!=(const G4KineticTrack& right) const;
|
||||
/*
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aTrack);
|
||||
*/
|
||||
G4ParticleDefinition* GetDefinition() const;
|
||||
void SetDefinition(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);
|
||||
|
||||
// LB new variable created LB
|
||||
G4int chosench;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
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 G4ParticleDefinition* G4KineticTrack::GetDefinition() const
|
||||
{
|
||||
return theDefinition;
|
||||
}
|
||||
|
||||
inline void G4KineticTrack::SetDefinition(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 = sqrt(sqr(aEnergy) - mass2 );
|
||||
} else
|
||||
{
|
||||
aEnergy=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=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 m2 = aMomentum.mag2();
|
||||
G4double p2=theTotal4Momentum.vect().mag2();
|
||||
theTotal4Momentum.setE(sqrt(m2+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 = sqrt(sqr(aEnergy) - mass2 );
|
||||
} else
|
||||
{
|
||||
aEnergy=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=sqrt(theTotal4Momentum.mag2() + aMomentum.mag2());
|
||||
SetTrackingMomentum(G4LorentzVector(aMomentum, newE));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
inline G4double G4KineticTrack::GetActualMass() const
|
||||
{
|
||||
G4ThreeVector theMomentum = the4Momentum.vect();
|
||||
G4double theMomentum2 = theMomentum.mag2();
|
||||
G4double theTotalEnergy = the4Momentum.e();
|
||||
G4double theMass = sqrt(abs(theTotalEnergy * theTotalEnergy - theMomentum2));
|
||||
return theMass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
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 = hbar_Planck * (-1.0 / theTotalActualWidth);
|
||||
G4double theResidualLifetime = tau * log(G4UniformRand());
|
||||
return theResidualLifetime*the4Momentum.gamma();
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline G4double G4KineticTrack::EvaluateCMMomentum(const G4double m,
|
||||
const G4double* m_ij) const
|
||||
{
|
||||
G4double theCMMomentum;
|
||||
if((m_ij[0]+m_ij[1])<m)
|
||||
theCMMomentum = 1 / (2 * m) *
|
||||
sqrt (((m * m) - (m_ij[0] + m_ij[1]) * (m_ij[0] + m_ij[1])) *
|
||||
((m * m) - (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 = 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
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
|
||||
// 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>
|
||||
|
||||
class G4KineticTrackVector : public std::vector<G4KineticTrack *>
|
||||
{
|
||||
public:
|
||||
G4KineticTrackVector();
|
||||
|
||||
public:
|
||||
void BoostBeam(G4ThreeVector& BeamMom);
|
||||
void Boost(G4ThreeVector& Velocity);
|
||||
void Shift(G4ThreeVector& Pos);
|
||||
};
|
||||
|
||||
struct DeleteKineticTrack{void operator()(G4KineticTrack * aT){delete aT;}};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef G4NuclearFermiDensity_h
|
||||
#define G4NuclearFermiDensity_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h> // pi, fermi,..
|
||||
#include <math.h> // pow
|
||||
|
||||
class G4NuclearFermiDensity : public G4VNuclearDensity
|
||||
{
|
||||
|
||||
public:
|
||||
G4NuclearFermiDensity(G4double anA, G4double aZ);
|
||||
~G4NuclearFermiDensity();
|
||||
|
||||
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const
|
||||
{
|
||||
return 1./(1.+exp((aPosition.mag()-theR)/a));
|
||||
}
|
||||
|
||||
G4double GetRadius(const G4double maxRelativeDenisty) const
|
||||
{
|
||||
return (maxRelativeDenisty>0 && maxRelativeDenisty <= 1 ) ?
|
||||
(theR + a*log((1-maxRelativeDenisty+exp(-1*theR/a))/maxRelativeDenisty)) : DBL_MAX;
|
||||
}
|
||||
|
||||
G4double GetDeriv(const G4ThreeVector & aPosition) const
|
||||
{
|
||||
return -exp((aPosition.mag()-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4int theA;
|
||||
G4int theZ;
|
||||
G4double theR; // Nuclear Radius
|
||||
const G4double a; // Determines the nuclear surface thickness
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef G4NuclearShellModelDensity_h
|
||||
#define G4NuclearShellModelDensity_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h> // pi, fermi,..
|
||||
#include <math.h> // pow,..
|
||||
|
||||
class G4NuclearShellModelDensity : public G4VNuclearDensity
|
||||
{
|
||||
|
||||
public:
|
||||
G4NuclearShellModelDensity(G4double anA, G4double aZ);
|
||||
~G4NuclearShellModelDensity();
|
||||
|
||||
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const;
|
||||
G4double GetRadius(const G4double maxRelativeDenisty) const;
|
||||
G4double GetDeriv(const G4ThreeVector & aPosition) const;
|
||||
|
||||
private:
|
||||
G4int theA;
|
||||
G4int theZ;
|
||||
G4double theRsquare;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#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 "G4VKineticNucleon.hh"
|
||||
|
||||
//#include "G4VSplitableHadron.hh"
|
||||
class G4VSplitableHadron;
|
||||
|
||||
class G4Nucleon : public G4VKineticNucleon
|
||||
{
|
||||
|
||||
public:
|
||||
G4Nucleon();
|
||||
~G4Nucleon();
|
||||
|
||||
inline int operator==(const G4Nucleon &right) const;
|
||||
inline int operator!=(const G4Nucleon &right) const;
|
||||
const G4Nucleon& operator=(const G4Nucleon& right);
|
||||
|
||||
public:
|
||||
|
||||
inline void SetPosition(G4ThreeVector & aPosition) {thePosition = aPosition;}
|
||||
virtual inline const G4ThreeVector & GetPosition() const {return thePosition;}
|
||||
|
||||
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 G4ParticleDefinition * GetParticleType() const {return theParticleType;}
|
||||
virtual 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 )
|
||||
{
|
||||
theSplitableHadron=reinterpret_cast<G4VSplitableHadron *>(1111);
|
||||
// G4cout << "$%$#%@%$#@%@%%% "<<theSplitableHadron<<G4endl;
|
||||
}
|
||||
inline G4VSplitableHadron * GetSplitableHadron() const { return theSplitableHadron;}
|
||||
|
||||
inline G4bool AreYouHit() const
|
||||
{
|
||||
G4bool result = true;
|
||||
if (theSplitableHadron==NULL) result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4ThreeVector thePosition;
|
||||
G4LorentzVector theMomentum;
|
||||
G4double theBindingE;
|
||||
G4ParticleDefinition * theParticleType;
|
||||
G4VSplitableHadron * theSplitableHadron;
|
||||
|
||||
|
||||
};
|
||||
|
||||
std::ostream & operator << (std::ostream &, const G4Nucleon&);
|
||||
|
||||
inline int G4Nucleon::operator==(const G4Nucleon &right) const
|
||||
{
|
||||
return this==&right;
|
||||
}
|
||||
inline int G4Nucleon::operator!=(const G4Nucleon &right) const
|
||||
{
|
||||
return this!=&right;
|
||||
}
|
||||
|
||||
inline const G4Nucleon& G4Nucleon::operator=(const G4Nucleon& right)
|
||||
{
|
||||
thePosition=right.GetPosition();
|
||||
theMomentum=right.Get4Momentum();
|
||||
theBindingE=right.GetBindingEnergy();
|
||||
theParticleType=right.GetDefinition();
|
||||
theSplitableHadron=right.GetSplitableHadron();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#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();
|
||||
|
||||
const G4Parton & operator=(const G4Parton &right);
|
||||
|
||||
int operator==(const G4Parton &right) const;
|
||||
|
||||
int operator!=(const G4Parton &right) const;
|
||||
|
||||
G4int GetPDGcode() const;
|
||||
|
||||
G4ParticleDefinition * GetDefinition();
|
||||
|
||||
void DefineMomentumInZ(G4double aLightConeMomentum, 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();
|
||||
|
||||
private:
|
||||
G4int PDGencoding;
|
||||
G4ParticleDefinition * theDefinition;
|
||||
G4LorentzVector theMomentum;
|
||||
G4ThreeVector thePosition;
|
||||
|
||||
G4int theColour;
|
||||
G4double theIsoSpinZ;
|
||||
G4double theSpinZ;
|
||||
|
||||
G4double theX;
|
||||
|
||||
};
|
||||
|
||||
inline int G4Parton::operator==(const G4Parton &right) const
|
||||
{
|
||||
return this==&right;
|
||||
}
|
||||
|
||||
inline int 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;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef G4PartonVector_h
|
||||
#define G4PartonVector_h 1
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// ---------------- G4PartonVector ----------------
|
||||
// by Gunter Folger, May 1998.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4Parton.hh"
|
||||
#include <vector>
|
||||
|
||||
typedef std::vector<G4Parton *> G4PartonVector;
|
||||
struct DeleteParton{ void operator()(G4Parton*aP){delete aP;} };
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
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*atan( 2.0 * (x-m0)/ gamma ); }
|
||||
|
||||
G4double BrWigInt1(const G4double x, const G4double gamma, const G4double m0) const
|
||||
{ return 0.5*gamma*gamma*log( (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*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 minMassMapType minMassCache;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user