Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -1,95 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4EvtBiasMechanism.hh,v 1.4 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// Class Description
|
||||
// This is a simple example for Event Biasing
|
||||
// This mechanism is applied to only particleToBeBiased.
|
||||
// If a track currently processed is the specifed particle type,
|
||||
// ApplyMath methods multiply all secondaries in particle change
|
||||
// by factor of MultiplicationForSecondaries with their weights of
|
||||
// (parent weight)/(MultiplicationForSecondaries)
|
||||
|
||||
#ifndef G4EvtBiasMechanism_h
|
||||
#define G4EvtBiasMechanism_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VEvtBiasMechanism.hh"
|
||||
|
||||
class G4VParticleChange;
|
||||
|
||||
class G4EvtBiasMechanism :public G4VEvtBiasMechanism
|
||||
{
|
||||
public: //with description
|
||||
// constructors
|
||||
G4EvtBiasMechanism(const G4String& name = "EBSample", G4int mulFactor=10);
|
||||
G4EvtBiasMechanism(const G4EvtBiasMechanism&);
|
||||
|
||||
public:
|
||||
virtual ~G4EvtBiasMechanism();
|
||||
|
||||
public: //with description
|
||||
// virtual methods derived from G4VEvtBiasMechanism
|
||||
virtual G4VParticleChange* ApplyMath( G4VParticleChange*, const G4Step& );
|
||||
virtual G4bool IsApplicable(G4ParticleDefinition*) const;
|
||||
|
||||
// Set/Get particle type to be biased
|
||||
void SetParticleBiased( G4ParticleDefinition* );
|
||||
const G4ParticleDefinition* GetParticleBiased( ) const;
|
||||
|
||||
|
||||
private:
|
||||
G4ParticleDefinition* particleToBeBiased;
|
||||
const G4int MultiplicationForSecondaries;
|
||||
};
|
||||
|
||||
inline
|
||||
G4bool G4EvtBiasMechanism::IsApplicable(G4ParticleDefinition* particle) const
|
||||
{
|
||||
return (particle == particleToBeBiased);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4EvtBiasMechanism::SetParticleBiased(G4ParticleDefinition* particle)
|
||||
{
|
||||
particleToBeBiased = particle;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4ParticleDefinition* G4EvtBiasMechanism::GetParticleBiased() const
|
||||
{
|
||||
return particleToBeBiased;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ForceCondition.hh,v 1.3 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GPILSelection.hh,v 1.3 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -1,314 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4Mars5GeVMechanism.hh,v 1.4 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// First Implemention 17 Nov. 1998 M.Asai, H.Kurahige
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// Class Description
|
||||
// This is a Event Biasing mechanism based on MARS code
|
||||
// This model is applicable to
|
||||
// proton/neutron/pi+-/K+-/gamma/anti_proton
|
||||
// with energy < 5.0GeV
|
||||
//*
|
||||
// Original code is MARS13 written by Nikolai Mokhov (FNAL)
|
||||
//**************************************************************
|
||||
//* MARS13: 9. hA EVENT GENERATOR:
|
||||
//* Copyright Nikolai Mokhov (Fermilab)
|
||||
//*
|
||||
//* LAST CHANGE: 14-NOV-1998
|
||||
//**************************************************************
|
||||
//* Copyright Nikolai Mokhov (Fermilab)
|
||||
//*
|
||||
//* MARS13(98)
|
||||
//*
|
||||
//* INCLUSIVE HADRON(photon)-NUCLEUS VERTEX AT E < 5 GEV !!!
|
||||
//* THREE WEIGHTED HADRONS IN FINAL STATE: !!!
|
||||
//* IP+A -> N/P(CASC)+ PI+/PI-(K+/K-) + PI0
|
||||
//
|
||||
|
||||
#ifndef G4Mars5GeVMechanism_h
|
||||
#define G4Mars5GeVMechanism_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VEvtBiasMechanism.hh"
|
||||
|
||||
class G4Material;
|
||||
class G4DynamicParticle;
|
||||
class G4VParticleChange;
|
||||
class G4ParticleTable;
|
||||
class G4ParticleDefinition;
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4FastVector.hh"
|
||||
|
||||
class G4Mars5GeVMechanism :public G4VEvtBiasMechanism
|
||||
{
|
||||
public: // with description
|
||||
// constructors
|
||||
G4Mars5GeVMechanism(const G4String& name = "MARS5GeV");
|
||||
G4Mars5GeVMechanism(const G4Mars5GeVMechanism&);
|
||||
|
||||
//destructor
|
||||
virtual ~G4Mars5GeVMechanism();
|
||||
|
||||
// virtual methods derived from G4VEvtBiasMechanism
|
||||
virtual G4VParticleChange* ApplyMath( G4VParticleChange*, const G4Step& );
|
||||
virtual G4bool IsApplicable(G4ParticleDefinition*) const;
|
||||
|
||||
private:
|
||||
void Treem5();
|
||||
// This is the mothod which invoke MARS
|
||||
// secondary information will be filled up
|
||||
|
||||
G4bool CoulombBarrier(G4int pType, G4double pE);
|
||||
// Check if coulomb barrier exists
|
||||
|
||||
void CreateNucleon(G4int ib, G4int pType, G4double pE);
|
||||
void CreatePion(G4int ib, G4int pType, G4double pE);
|
||||
void CreatePionZero(G4int ib, G4int pType, G4double pE);
|
||||
// Create secondary particles and add them into the list
|
||||
|
||||
void AddSecondary();
|
||||
// Add a secondary particle into the list
|
||||
|
||||
G4double SelBS(G4int pType, G4double aNucl, G4double zNucl);
|
||||
// Calculate weight of secondary
|
||||
|
||||
G4double D2N2(G4int pType, G4double incidentE,
|
||||
G4double prodE, G4double tin,
|
||||
G4int reacType, G4int proType,
|
||||
G4double ai, G4double z);
|
||||
// Calculate Hadron Inclusive Yield
|
||||
|
||||
G4double Rkaon(G4int ib, G4int jp, G4double eRaw);
|
||||
// Calculate energy dependent K/pi ratio
|
||||
|
||||
void Trans(G4ThreeVector* d1, G4ThreeVector* d2);
|
||||
// Direction cosine transformation using selec2(cs,ss,ch,sh)
|
||||
|
||||
public:
|
||||
enum {FastVectorSize = 16};
|
||||
typedef G4FastVector<G4DynamicParticle ,FastVectorSize> G4MarsSecondaryVector;
|
||||
|
||||
private:
|
||||
|
||||
// information of secondary
|
||||
G4int numberOfSecondaries;
|
||||
G4double weightOfSecondaries[FastVectorSize];
|
||||
G4MarsSecondaryVector secondaries;
|
||||
|
||||
private:
|
||||
const G4double EthForIncident;
|
||||
G4bool IsApplicable(G4int marsEncoding) const;
|
||||
|
||||
private:
|
||||
// Particle Table
|
||||
G4ParticleTable* theParticleTable;
|
||||
|
||||
// particle encoding for MARS
|
||||
enum { MarsUndefined =0,
|
||||
MarsP, MarsN, MarsPIplus, MarsPIminus, MarsKplus, MarsKminus,
|
||||
MarsMUplus, MarsMUminus, MarsGAM, MarsEminus, MarsEplus, MarsAP,
|
||||
MarsPI0, MarsD, MarsT, MarsHe3, MarsHe4 };
|
||||
|
||||
G4int GetMarsEncoding(const G4ParticleDefinition* )const;
|
||||
const G4String& GetParticleName(G4int marsEncoding) const;
|
||||
G4ParticleDefinition* GetParticleDefinition(G4int marsEncoding) const;
|
||||
|
||||
G4double ProtonMass;
|
||||
|
||||
private:
|
||||
// incident information
|
||||
G4double incidentWeight;
|
||||
const G4DynamicParticle* incidentParticle;
|
||||
G4int incidentMarsEncoding;
|
||||
|
||||
void GetTargetNuclei(const G4Material*); //fill up fANucle and fZnucl
|
||||
G4double fANucl, fZNucl; // target nucleus
|
||||
|
||||
private:
|
||||
// these class is to define common blocks in original code
|
||||
|
||||
class Selec1
|
||||
{
|
||||
public:
|
||||
G4double Einc, EN, V, V10;
|
||||
G4int Treac, Tprod;
|
||||
} selec1;
|
||||
class Selec2
|
||||
{
|
||||
public:
|
||||
G4double Cs, Ss, Ch, Sh;
|
||||
} selec2;
|
||||
class Selec3
|
||||
{
|
||||
public:
|
||||
G4double Eth, Emax, Sqs, X, Pt2, Pt, P;
|
||||
} selec3;
|
||||
};
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
inline
|
||||
G4int G4Mars5GeVMechanism::GetMarsEncoding(const G4ParticleDefinition* particle) const{
|
||||
const G4String& name = particle->GetParticleName();
|
||||
G4int encoding = MarsUndefined;
|
||||
if (name == "proton") {
|
||||
encoding = MarsP;
|
||||
} else if (name == "neutron") {
|
||||
encoding = MarsN;
|
||||
} else if (name == "pi+") {
|
||||
encoding = MarsPIplus;
|
||||
} else if (name == "pi-") {
|
||||
encoding = MarsPIminus;
|
||||
} else if (name == "kaon+") {
|
||||
encoding = MarsKplus;
|
||||
} else if (name == "kaon-") {
|
||||
encoding = MarsKminus;
|
||||
} else if (name == "mu+") {
|
||||
encoding = MarsMUplus;
|
||||
} else if (name == "mu-") {
|
||||
encoding = MarsMUminus;
|
||||
} else if (name == "gamma") {
|
||||
encoding = MarsGAM;
|
||||
} else if (name == "e+") {
|
||||
encoding = MarsEplus;
|
||||
} else if (name == "e-") {
|
||||
encoding = MarsEminus;
|
||||
} else if (name == "anti_proton") {
|
||||
encoding = MarsAP;
|
||||
} else if (name == "pi0") {
|
||||
encoding = MarsPI0;
|
||||
} else if (name == "deuteron") {
|
||||
encoding = MarsD;
|
||||
} else if (name == "triton") {
|
||||
encoding = MarsT;
|
||||
} else if (name == "He3") {
|
||||
encoding = MarsHe3;
|
||||
} else if (name == "alpha") {
|
||||
encoding = MarsHe4;
|
||||
}
|
||||
return encoding;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4String& G4Mars5GeVMechanism::GetParticleName(G4int encoding) const
|
||||
{
|
||||
static G4String name;
|
||||
name = "None";
|
||||
switch (encoding)
|
||||
{
|
||||
case MarsP:
|
||||
name = "proton";
|
||||
break;
|
||||
case MarsN:
|
||||
name = "neutron";
|
||||
break;
|
||||
case MarsPIplus:
|
||||
name = "pi+";
|
||||
break;
|
||||
case MarsPIminus:
|
||||
name = "pi-";
|
||||
break;
|
||||
case MarsKplus:
|
||||
name = "kaon+";
|
||||
break;
|
||||
case MarsKminus:
|
||||
name = "kaon-";
|
||||
break;
|
||||
case MarsMUplus:
|
||||
name = "mu+";
|
||||
break;
|
||||
case MarsMUminus:
|
||||
name = "mu-";
|
||||
break;
|
||||
case MarsGAM:
|
||||
name = "gamma";
|
||||
break;
|
||||
case MarsEplus:
|
||||
name = "e+";
|
||||
break;
|
||||
case MarsEminus:
|
||||
name = "e-";
|
||||
break;
|
||||
case MarsAP:
|
||||
name = "anti_proton";
|
||||
break;
|
||||
case MarsPI0:
|
||||
name = "pi0";
|
||||
break;
|
||||
case MarsD:
|
||||
name = "deuteron";
|
||||
break;
|
||||
case MarsT:
|
||||
name = "triton";
|
||||
break;
|
||||
case MarsHe3:
|
||||
name = "He3";
|
||||
break;
|
||||
case MarsHe4:
|
||||
name = "alpha";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
inline
|
||||
G4ParticleDefinition* G4Mars5GeVMechanism::GetParticleDefinition(G4int encoding) const
|
||||
{
|
||||
G4String name = GetParticleName(encoding);
|
||||
G4ParticleDefinition* particle = 0;
|
||||
if (name != "None") {
|
||||
particle = theParticleTable->FindParticle(name);
|
||||
}
|
||||
return particle;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Mars5GeVMechanism::IsApplicable(G4int marsEncoding) const
|
||||
{
|
||||
return ( ((marsEncoding!=MarsUndefined) && (marsEncoding<=MarsKminus) )||
|
||||
(marsEncoding==MarsGAM) ||
|
||||
(marsEncoding==MarsAP) );
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4Mars5GeVMechanism::IsApplicable(G4ParticleDefinition* particle) const
|
||||
{
|
||||
return IsApplicable(GetMarsEncoding(particle));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChange.hh,v 1.9 2001/11/21 14:05:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChange.icc,v 1.9 2001/10/20 08:07:49 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
inline
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForDecay.hh,v 1.5 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForLoss.hh,v 1.4 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForMSC.icc,v 1.4 2001/07/11 10:08:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForRadDecay.hh,v 1.4 2001/10/24 05:41:46 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.hh,v 1.8 2001/10/22 04:19:39 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.icc,v 1.7 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
inline
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Step.hh,v 1.8 2001/07/11 10:08:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Step.icc,v 1.7 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StepPoint.hh,v 1.9 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StepPoint.icc,v 1.5 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
inline const G4ThreeVector& G4StepPoint::GetPosition() const
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StepStatus.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SteppingControl.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Track.hh,v 1.13 2001/11/13 05:13:37 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Track.hh,v 1.15 2001/12/14 09:59:35 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -67,15 +67,19 @@ public: // With description
|
||||
|
||||
// Constructor
|
||||
G4Track();
|
||||
G4Track(const G4Track&);
|
||||
G4Track(G4DynamicParticle* apValueDynamicParticle,
|
||||
G4double aValueTime,
|
||||
const G4ThreeVector& aValuePosition);
|
||||
// aValueTime is a global time
|
||||
|
||||
G4Track(const G4Track&);
|
||||
// Copy Constructor copys members other than tracking information
|
||||
|
||||
private:
|
||||
// Hide assignment operator as private
|
||||
G4Track& operator=(const G4Track&);
|
||||
|
||||
//--------
|
||||
public:
|
||||
public: // With description
|
||||
|
||||
// Destrcutor
|
||||
~G4Track();
|
||||
@@ -86,12 +90,12 @@ public:
|
||||
inline void operator delete(void *aTrack);
|
||||
// Override "delete" for "G4Allocator".
|
||||
|
||||
int operator==( const G4Track& s);
|
||||
// Define "==" operator because "G4TrackVector" uses
|
||||
//"RWPtrOrderdVector" which requires this.
|
||||
|
||||
G4bool operator==( const G4Track& );
|
||||
|
||||
//--------
|
||||
public: // With description
|
||||
// Copy information of the track (w/o tracking information)
|
||||
void CopyTrackInfo(const G4Track&);
|
||||
|
||||
// Get/Set functions
|
||||
// track ID
|
||||
@@ -252,9 +256,7 @@ public: // With description
|
||||
// this will be set equal to 'StepLength' in G4Step.
|
||||
|
||||
G4double fWeight;
|
||||
// This is a weight for this track used by G4VEvtBiasMechanism
|
||||
// to execute inclusive simulation for hadronic/electomagnetic shower
|
||||
// and neutron transportation etc.
|
||||
// This is a weight for this track
|
||||
|
||||
const G4Step* fpStep;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Track.icc,v 1.8 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Track.icc,v 1.9 2001/12/13 15:31:24 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//-----------------------------------------------------------------
|
||||
// Definitions of inline functions
|
||||
@@ -42,8 +42,8 @@
|
||||
{ aTrackAllocator.FreeSingle((G4Track *) aTrack);}
|
||||
// Override "delete" for "G4Allocator".
|
||||
|
||||
inline int G4Track::operator==( const G4Track& s)
|
||||
{ return (this==&s) ? 1 : 0; }
|
||||
inline G4bool G4Track::operator==( const G4Track& s)
|
||||
{ return (this==&s); }
|
||||
// Define "==" operator because "G4TrackVector" uses
|
||||
// "RWPtrOrderdVector" which requires this.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackFastVector.hh,v 1.4 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackStatus.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VEvtBiasMechanism.hh,v 1.4 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------
|
||||
// Class Description
|
||||
// This class is a base class for all "event biasing mechanism".
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// Implemented for the new scheme 17 Nov. 1998 H.Kurahige
|
||||
//
|
||||
|
||||
#ifndef G4VEvtBiasMechanism_h
|
||||
#define G4VEvtBiasMechanism_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
class G4Step;
|
||||
class G4VParticleChange;
|
||||
class G4ParticleDefinition;
|
||||
|
||||
class G4VEvtBiasMechanism
|
||||
{
|
||||
public: // with description
|
||||
|
||||
// constructors
|
||||
G4VEvtBiasMechanism(const G4String& name = "");
|
||||
G4VEvtBiasMechanism(const G4VEvtBiasMechanism& right);
|
||||
|
||||
public:
|
||||
//destructors
|
||||
virtual ~G4VEvtBiasMechanism();
|
||||
|
||||
|
||||
public: // with description
|
||||
// pure virtual functions
|
||||
|
||||
// ApplyMath method will be invoked in G4VParticleChange::UpdateStepInfo()
|
||||
// if G4VParticleChange::fUseEB is set
|
||||
virtual G4VParticleChange* ApplyMath( G4VParticleChange*, const G4Step& ) =0;
|
||||
|
||||
// IsApplicable method returns 'true' if this Event Bias Mechanism is
|
||||
// valid for the particle type
|
||||
virtual G4bool IsApplicable(G4ParticleDefinition*) const = 0;
|
||||
|
||||
|
||||
// name of the biasing mechanism
|
||||
const G4String& GetName(){ return theEBName;}
|
||||
|
||||
// Set/Get Verbose level
|
||||
G4int GetVerboseLevel() const { return verboseLevel; }
|
||||
void SetVerboseLevel(G4int value) { verboseLevel = value; }
|
||||
|
||||
private:
|
||||
G4String theEBName;
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VParticleChange.hh,v 1.7 2001/11/13 05:13:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VParticleChange.icc,v 1.8 2001/11/13 05:13:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4VParticleChange.icc,v 1.9 2001/12/24 05:14:39 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//----------------------------------------------------------------
|
||||
// Virtual methods for updating G4Step
|
||||
@@ -50,7 +50,8 @@ inline
|
||||
G4Step* G4VParticleChange::UpdateStepForAlongStep(G4Step* Step)
|
||||
{
|
||||
if (!fSetParentWeightByProcess){
|
||||
Step->GetPostStepPoint()->SetWeight( theParentWeight );
|
||||
G4double newWeight= theParentWeight/(Step->GetPreStepPoint()->GetWeight())*(Step->GetPostStepPoint()->GetWeight());
|
||||
Step->GetPostStepPoint()->SetWeight( newWeight );
|
||||
}
|
||||
return UpdateStepInfo(Step);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserTrackInformation.hh,v 1.3 2001/07/11 10:08:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user