Import Geant4 4.0.0 source tree
This commit is contained in:
+36
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.28 2001/03/06 09:59:14 kurasige Exp $
|
||||
$Id: History,v 1.40 2001/12/10 08:39:57 kurasige Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,41 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
Dec. 10, 01 H.Kurashige (track-V03-02-08)
|
||||
- Modified assignment operator so that fCurrentStepNumber is set to 0
|
||||
|
||||
Nov.27, 01 J. Apostolakis (track-V03-02-07) for H. Kurashige
|
||||
- Modified G4ParticleChange::AddSecondary to use touchable handle - by Hisaya
|
||||
(only one of the AddSecondary methods has been modified - to date)
|
||||
|
||||
Nov.10, 01 (track-V03-02-06)
|
||||
- Fixed bugs in assignment operators in G4Track
|
||||
- Added SetParentWeightByProcess
|
||||
- Added SetSecondaryWeightByProcess
|
||||
|
||||
Nov. 08, 01 G.Cosmo (track-V03-02-05)
|
||||
- Merge changes included in "track-V03-02-02a".
|
||||
|
||||
Oct. 22, 01 H.Kurashige (track-V03-02-04)
|
||||
- Modify to intorduce TouchableHandle (Radovan)
|
||||
|
||||
Oct. 20, 01 H.Kurashige (track-V03-02-03)
|
||||
- Remove "static inline methods"
|
||||
- Disable EventBiasingMechanism
|
||||
|
||||
Oct. 26, 01 G.Cosmo (track-V03-02-02a)
|
||||
- Added implementation to assignment operator in G4ParticleChangeForRadDecay.hh
|
||||
(H.Kurasige)
|
||||
|
||||
Sep. 20, 01 H.Kurashige (track-V03-02-02)
|
||||
- Update to G4Mars5GeVMechanism for STL migration of materials
|
||||
|
||||
Sep. 20, 01 H.Kurashige (track-V03-02-01)
|
||||
- Modify G4Mars5GeVMechanism for STL migration of materials
|
||||
|
||||
Aug. 16, 01 H.Kurashige (track-V03-02-00)
|
||||
- Clean up codes
|
||||
|
||||
Mar 7, 01 H.Kurashige (track-V03-00-04)
|
||||
- Add protection for the zero-momentum case
|
||||
for UpdateStepForAlongStep in ParticleChange (J.A)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EvtBiasMechanism.hh,v 1.3.10.2 2001/06/28 20:20:14 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4EvtBiasMechanism.hh,v 1.4 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ForceCondition.hh,v 1.2.10.1 2001/06/28 19:15:22 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ForceCondition.hh,v 1.3 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GPILSelection.hh,v 1.2.10.1 2001/06/28 19:15:22 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4GPILSelection.hh,v 1.3 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Mars5GeVMechanism.hh,v 1.3.10.2 2001/06/28 20:20:14 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Mars5GeVMechanism.hh,v 1.4 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChange.hh,v 1.6.4.2 2001/06/28 20:20:14 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChange.hh,v 1.9 2001/11/21 14:05:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -73,7 +73,7 @@ class G4ParticleChange: public G4VParticleChange
|
||||
public:
|
||||
// default constructor
|
||||
G4ParticleChange();
|
||||
G4ParticleChange(G4bool useEB);
|
||||
// G4ParticleChange(G4bool useEB);
|
||||
|
||||
// destructor
|
||||
virtual ~G4ParticleChange();
|
||||
@@ -239,14 +239,15 @@ class G4ParticleChange: public G4VParticleChange
|
||||
G4double theChargeChange;
|
||||
// The Changed (final) charge of a given track
|
||||
|
||||
|
||||
const G4Track* theCurrentTrack;
|
||||
|
||||
public:
|
||||
// these methods is used for switch on/off EB in all ParticleChange objects
|
||||
static void SwOnAllEB();
|
||||
static void SwOffAllEB();
|
||||
// these methods is used for switch on/off EB in all ParticleChange objects
|
||||
// static void SwOnAllEB();
|
||||
// static void SwOffAllEB();
|
||||
|
||||
private:
|
||||
static G4bool fUseEBForAll;
|
||||
// static G4bool fUseEBForAll;
|
||||
|
||||
public:
|
||||
// for Debug
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChange.icc,v 1.7.4.1 2001/06/28 19:15:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChange.icc,v 1.9 2001/10/20 08:07:49 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
inline
|
||||
G4Step* G4ParticleChange::UpdateStepInfo(G4Step* pStep)
|
||||
{
|
||||
// use fUseEBForAll instead of fUseEB
|
||||
fUseEB = fUseEBForAll;
|
||||
// fUseEB = fUseEBForAll;
|
||||
return G4VParticleChange::UpdateStepInfo(pStep);
|
||||
}
|
||||
|
||||
@@ -220,16 +220,20 @@ inline
|
||||
return direction*tMomentum;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChange::SwOnAllEB()
|
||||
{
|
||||
fUseEBForAll = true;
|
||||
}
|
||||
//inline
|
||||
// void G4ParticleChange::SwOnAllEB()
|
||||
//{
|
||||
// fUseEBForAll = true;
|
||||
//}
|
||||
|
||||
//inline void G4ParticleChange::SwOffAllEB()
|
||||
//{
|
||||
// fUseEBForAll = false;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
inline void G4ParticleChange::SwOffAllEB()
|
||||
{
|
||||
fUseEBForAll = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForDecay.hh,v 1.4.10.2 2001/06/28 20:20:14 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForDecay.hh,v 1.5 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForLoss.hh,v 1.3.10.2 2001/06/28 20:20:14 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForLoss.hh,v 1.4 2001/07/11 10:08:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForMSC.hh,v 1.4.10.2 2001/06/28 20:20:14 gunter Exp $
|
||||
// $Id: G4ParticleChangeForMSC.hh,v 1.5 2001/07/11 10:08:36 gunter Exp $
|
||||
// GEANT4 tag $ $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForMSC.icc,v 1.3.4.1 2001/06/28 19:15:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForMSC.icc,v 1.4 2001/07/11 10:08:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForRadDecay.hh,v 1.2.4.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForRadDecay.hh,v 1.4 2001/10/24 05:41:46 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -55,7 +55,8 @@ class G4ParticleChangeForRadDecay: public G4ParticleChange
|
||||
protected:
|
||||
// hide copy constructor and assignment operaor as protected
|
||||
G4ParticleChangeForRadDecay(const G4ParticleChangeForRadDecay &right){}
|
||||
G4ParticleChangeForRadDecay & operator=(const G4ParticleChangeForRadDecay &right){}
|
||||
G4ParticleChangeForRadDecay & operator=(const G4ParticleChangeForRadDecay &right){return *this;}
|
||||
|
||||
|
||||
public: // with description
|
||||
void AddSecondary(G4Track* aSecondary);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.hh,v 1.6.2.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForTransport.hh,v 1.8 2001/10/22 04:19:39 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -32,7 +32,8 @@
|
||||
// ------------------------------------------------------------
|
||||
// Implemented for the new scheme 10 May. 1998 H.Kurahige
|
||||
// Added theMaterialChange 16 FEb. 2000 H.Kurahige
|
||||
// Remove thePolarizationChange 12 Feb. 2001 H.Kurashige
|
||||
// Remove thePolarizationChange 12 Feb. 2001 H.Kurashige
|
||||
// Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek
|
||||
//
|
||||
// Class Description
|
||||
// This class is a concrete class for ParticleChange for transportation
|
||||
@@ -42,7 +43,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
class G4VTouchable;
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
|
||||
class G4ParticleChangeForTransport: public G4ParticleChange
|
||||
@@ -80,8 +81,8 @@ class G4ParticleChangeForTransport: public G4ParticleChange
|
||||
// "Change", what it stores (and returns in get) are the "FINAL"
|
||||
// values of the Position, Momentum, etc.
|
||||
|
||||
const G4VTouchable* GetTouchableChange() const;
|
||||
void SetTouchableChange(const G4VTouchable* fTouchable);
|
||||
const G4TouchableHandle& GetTouchableHandle() const;
|
||||
void SetTouchableHandle(const G4TouchableHandle& fTouchable);
|
||||
// Get/Set the touchable of the current particle.
|
||||
// Note: Touchable in PostStepPoint will be updated only after PostStepDoIt
|
||||
|
||||
@@ -96,7 +97,7 @@ class G4ParticleChangeForTransport: public G4ParticleChange
|
||||
virtual void DumpInfo() const;
|
||||
|
||||
protected:
|
||||
const G4VTouchable* theTouchableChange;
|
||||
G4TouchableHandle theTouchableHandle;
|
||||
// The changed touchable of a given particle.
|
||||
|
||||
private:
|
||||
|
||||
@@ -21,23 +21,24 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.icc,v 1.5.4.1 2001/06/28 19:15:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForTransport.icc,v 1.7 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForTransport::SetTouchableChange(const G4VTouchable* fTouchable)
|
||||
void G4ParticleChangeForTransport::SetTouchableHandle(const G4TouchableHandle&
|
||||
fTouchable)
|
||||
{
|
||||
theTouchableChange = fTouchable;
|
||||
theTouchableHandle = fTouchable;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4VTouchable* G4ParticleChangeForTransport::GetTouchableChange() const
|
||||
const G4TouchableHandle& G4ParticleChangeForTransport::GetTouchableHandle() const
|
||||
{
|
||||
return theTouchableChange;
|
||||
return theTouchableHandle;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForTransport::SetMaterialChange(G4Material* fMaterial)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Step.hh,v 1.7.4.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Step.hh,v 1.8 2001/07/11 10:08:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Step.icc,v 1.4.2.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Step.icc,v 1.7 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -179,7 +179,7 @@ inline
|
||||
fpPreStepPoint->SetMomentumDirection(fpTrack->GetMomentumDirection());
|
||||
fpPreStepPoint->SetKineticEnergy(fpTrack->GetKineticEnergy());
|
||||
fpPreStepPoint->SetVelocity(fpTrack->GetVelocity());
|
||||
fpPreStepPoint->SetTouchable(fpTrack->GetTouchable());
|
||||
fpPreStepPoint->SetTouchableHandle(fpTrack->GetTouchableHandle());
|
||||
fpPreStepPoint->SetMaterial( fpTrack->GetTouchable()->GetVolume()->GetLogicalVolume()->GetMaterial());
|
||||
fpPreStepPoint->SetPolarization(fpTrack->GetPolarization());
|
||||
fpPreStepPoint->SetSafety(0.);
|
||||
@@ -214,9 +214,12 @@ inline
|
||||
fpTrack->SetStepLength(fStepLength);
|
||||
// NextTouchable is updated
|
||||
// (G4Track::Touchable points touchable of Pre-StepPoint)
|
||||
fpTrack->SetNextTouchable(fpPostStepPoint->GetTouchable());
|
||||
fpTrack->SetNextTouchableHandle(fpPostStepPoint->GetTouchableHandle());
|
||||
fpTrack->SetWeight(fpPostStepPoint->GetWeight());
|
||||
}
|
||||
|
||||
// set velocity
|
||||
fpPostStepPoint->SetVelocity(fpTrack->GetVelocity());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StepPoint.hh,v 1.7.2.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4StepPoint.hh,v 1.9 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -52,7 +52,7 @@
|
||||
class G4VProcess;
|
||||
#include "G4SteppingControl.hh"
|
||||
#include "G4StepStatus.hh" // Include from 'track'
|
||||
#include "G4VTouchable.hh" // Include from 'geometry'
|
||||
#include "G4TouchableHandle.hh" // Include from 'geometry'
|
||||
#include "G4Material.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
@@ -124,7 +124,8 @@ class G4StepPoint
|
||||
G4VPhysicalVolume* GetPhysicalVolume() const;
|
||||
|
||||
const G4VTouchable* GetTouchable() const;
|
||||
void SetTouchable(const G4VTouchable* apValue);
|
||||
const G4TouchableHandle& GetTouchableHandle() const;
|
||||
void SetTouchableHandle(const G4TouchableHandle& apValue);
|
||||
|
||||
G4Material* GetMaterial() const;
|
||||
void SetMaterial(G4Material*);
|
||||
@@ -176,7 +177,9 @@ class G4StepPoint
|
||||
G4ThreeVector fMomentumDirection;
|
||||
G4double fKineticEnergy;
|
||||
G4double fVelocity;
|
||||
const G4VTouchable* fpTouchable;
|
||||
// Momentum,energy and velocity
|
||||
G4TouchableHandle fpTouchable;
|
||||
// Touchable Handle
|
||||
G4Material* fpMaterial;
|
||||
// Material of the volmue
|
||||
G4double fSafety;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StepPoint.icc,v 1.3.2.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4StepPoint.icc,v 1.5 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
inline const G4ThreeVector& G4StepPoint::GetPosition() const
|
||||
@@ -116,8 +116,10 @@
|
||||
{ return fpTouchable->GetVolume(); }
|
||||
|
||||
inline const G4VTouchable* G4StepPoint::GetTouchable() const
|
||||
{ return fpTouchable(); }
|
||||
inline const G4TouchableHandle& G4StepPoint::GetTouchableHandle() const
|
||||
{ return fpTouchable; }
|
||||
inline void G4StepPoint::SetTouchable(const G4VTouchable* apValue)
|
||||
inline void G4StepPoint::SetTouchableHandle(const G4TouchableHandle& apValue)
|
||||
{ fpTouchable = apValue; }
|
||||
|
||||
inline G4double G4StepPoint::GetSafety() const
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StepStatus.hh,v 1.2.10.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4StepStatus.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SteppingControl.hh,v 1.2.10.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SteppingControl.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Track.hh,v 1.10.2.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Track.hh,v 1.13 2001/11/13 05:13:37 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -35,14 +35,10 @@
|
||||
// 1) current position/time of the particle,
|
||||
// 2) static particle information,
|
||||
// 3) the pointer to the physical volume where currently
|
||||
// the particle exists,
|
||||
//
|
||||
// Contact:
|
||||
// Questions and comments to this code should be sent to
|
||||
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
||||
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
||||
// the particle exists
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek
|
||||
|
||||
#ifndef G4Track_h
|
||||
#define G4Track_h 1
|
||||
@@ -54,7 +50,7 @@
|
||||
#include "G4Allocator.hh" // Include from 'particle+matter'
|
||||
#include "G4DynamicParticle.hh" // Include from 'particle+matter'
|
||||
#include "G4TrackStatus.hh" // Include from 'tracking'
|
||||
#include "G4VTouchable.hh" // Include from 'geometry'
|
||||
#include "G4TouchableHandle.hh" // Include from 'geometry'
|
||||
#include "G4VUserTrackInformation.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
@@ -134,11 +130,13 @@ public: // With description
|
||||
G4Material* GetMaterial() const;
|
||||
G4Material* GetNextMaterial() const;
|
||||
|
||||
const G4VTouchable* GetTouchable() const;
|
||||
void SetTouchable(const G4VTouchable* apValue);
|
||||
const G4VTouchable* GetTouchable() const;
|
||||
const G4TouchableHandle& GetTouchableHandle() const;
|
||||
void SetTouchableHandle( const G4TouchableHandle& apValue);
|
||||
|
||||
const G4VTouchable* GetNextTouchable() const;
|
||||
void SetNextTouchable(const G4VTouchable* apValue);
|
||||
const G4VTouchable* GetNextTouchable() const;
|
||||
const G4TouchableHandle& GetNextTouchableHandle() const;
|
||||
void SetNextTouchableHandle( const G4TouchableHandle& apValue);
|
||||
|
||||
// energy
|
||||
G4double GetKineticEnergy() const;
|
||||
@@ -212,10 +210,7 @@ public: // With description
|
||||
void SetCreatorProcess(G4VProcess* aValue);
|
||||
|
||||
// track weight
|
||||
// These are methods for manipulating a weight for this track.
|
||||
// The track weight is used by G4VEvtBiasMechanism
|
||||
// to execute inclusive simulation for hadronic/electomagnetic shower
|
||||
// and neutron transportation etc.
|
||||
// These are methods for manipulating a weight for this track.
|
||||
G4double GetWeight() const;
|
||||
void SetWeight(G4double aValue);
|
||||
|
||||
@@ -236,8 +231,9 @@ public: // With description
|
||||
G4int fParentID;
|
||||
G4int fTrackID;
|
||||
|
||||
const G4VTouchable* fpTouchable;
|
||||
const G4VTouchable* fpNextTouchable;
|
||||
G4TouchableHandle fpTouchable;
|
||||
G4TouchableHandle fpNextTouchable;
|
||||
// Touchable Handle
|
||||
|
||||
G4DynamicParticle* fpDynamicParticle;
|
||||
G4TrackStatus fTrackStatus;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Track.icc,v 1.6.4.1 2001/06/28 19:15:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Track.icc,v 1.8 2001/10/22 04:19:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//-----------------------------------------------------------------
|
||||
// Definitions of inline functions
|
||||
@@ -117,17 +117,36 @@
|
||||
|
||||
|
||||
// touchable
|
||||
inline const G4VTouchable* G4Track::GetTouchable() const
|
||||
{ return fpTouchable; }
|
||||
inline const G4VTouchable* G4Track::GetTouchable() const
|
||||
{
|
||||
return fpTouchable();
|
||||
}
|
||||
|
||||
inline void G4Track::SetTouchable(const G4VTouchable* apValue)
|
||||
{ fpTouchable = apValue; }
|
||||
inline const G4TouchableHandle& G4Track::GetTouchableHandle() const
|
||||
{
|
||||
return fpTouchable;
|
||||
}
|
||||
|
||||
inline const G4VTouchable* G4Track::GetNextTouchable() const
|
||||
{ return fpNextTouchable; }
|
||||
inline void G4Track::SetTouchableHandle( const G4TouchableHandle& apValue)
|
||||
{
|
||||
fpTouchable = apValue;
|
||||
}
|
||||
|
||||
inline const G4VTouchable* G4Track::GetNextTouchable() const
|
||||
{
|
||||
return fpNextTouchable();
|
||||
}
|
||||
|
||||
inline const G4TouchableHandle& G4Track::GetNextTouchableHandle() const
|
||||
{
|
||||
return fpNextTouchable;
|
||||
}
|
||||
|
||||
inline void G4Track::SetNextTouchableHandle( const G4TouchableHandle& apValue)
|
||||
{
|
||||
fpNextTouchable = apValue;
|
||||
}
|
||||
|
||||
inline void G4Track::SetNextTouchable(const G4VTouchable* apValue)
|
||||
{ fpNextTouchable = apValue; }
|
||||
|
||||
// kinetic energy
|
||||
inline G4double G4Track::GetKineticEnergy() const
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackFastVector.hh,v 1.3.10.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4TrackFastVector.hh,v 1.4 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackStatus.hh,v 1.2.10.1 2001/06/28 19:15:25 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4TrackStatus.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VEvtBiasMechanism.hh,v 1.3.10.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VEvtBiasMechanism.hh,v 1.4 2001/07/11 10:08:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VParticleChange.hh,v 1.4.10.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VParticleChange.hh,v 1.7 2001/11/13 05:13:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -73,7 +73,6 @@
|
||||
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4VEvtBiasMechanism;
|
||||
|
||||
#include "G4TrackFastVector.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
@@ -85,7 +84,6 @@ class G4VParticleChange
|
||||
public:
|
||||
// default constructor
|
||||
G4VParticleChange();
|
||||
G4VParticleChange(G4bool useEvtBiasing);
|
||||
|
||||
// destructor
|
||||
virtual ~G4VParticleChange();
|
||||
@@ -178,6 +176,21 @@ class G4VParticleChange
|
||||
// ------------------------------------------------------
|
||||
|
||||
G4double GetParentWeight() const ;
|
||||
// Get weight of the parent (i.e. current) track
|
||||
|
||||
void SetParentWeight(G4double);
|
||||
void SetParentWeightByProcess(G4bool);
|
||||
G4bool IsParentWeightSetByProcess() const;
|
||||
// If fParentWeightByProcess flag is false (true in default),
|
||||
// G4VParticleChange can change the weight of the parent track,
|
||||
// in any DoIt by using SetParentWeight(G4double)
|
||||
|
||||
|
||||
void SetSecondaryWeightByProcess(G4bool);
|
||||
G4bool IsSecondaryWeightSetByProcess() const;
|
||||
// If fSecondaryWeightByProcess flag is false (false in default),
|
||||
// G4VParticleChange set the weight of the secondary tracks
|
||||
// equal to the parent weight when the secondary tracks are added.
|
||||
|
||||
virtual void DumpInfo() const;
|
||||
// Print out information
|
||||
@@ -234,24 +247,15 @@ class G4VParticleChange
|
||||
static const G4double accuracyForWarning;
|
||||
static const G4double accuracyForException;
|
||||
|
||||
public: // with description
|
||||
//---- following methods and members are used for Event Biasing
|
||||
virtual void RegisterEBMechanism(G4VEvtBiasMechanism* );
|
||||
virtual void SwOnEB();
|
||||
virtual void SwOffEB();
|
||||
virtual G4bool IsEBActive() const;
|
||||
virtual G4VEvtBiasMechanism* GetEBMechanism();
|
||||
|
||||
protected:
|
||||
G4VEvtBiasMechanism* theEBMechanism;
|
||||
G4bool fUseEB;
|
||||
G4double theParentWeight;
|
||||
|
||||
G4bool fSetSecondaryWeightByProcess;
|
||||
G4bool fSetParentWeightByProcess;
|
||||
};
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VEvtBiasMechanism.hh"
|
||||
#include "G4VParticleChange.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VParticleChange.icc,v 1.5.4.1 2001/06/28 19:15:26 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VParticleChange.icc,v 1.8 2001/11/13 05:13:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//----------------------------------------------------------------
|
||||
// Virtual methods for updating G4Step
|
||||
@@ -30,9 +30,6 @@
|
||||
|
||||
inline G4Step* G4VParticleChange::UpdateStepInfo(G4Step* pStep)
|
||||
{
|
||||
// Apply math fomula if Event Biasing is active
|
||||
if (fUseEB) theEBMechanism->ApplyMath( this, *pStep);
|
||||
|
||||
// Update the G4Step specific attributes
|
||||
pStep->SetStepLength( theTrueStepLength );
|
||||
pStep->AddTotalEnergyDeposit( theLocalEnergyDeposit );
|
||||
@@ -43,18 +40,27 @@ inline G4Step* G4VParticleChange::UpdateStepInfo(G4Step* pStep)
|
||||
inline
|
||||
G4Step* G4VParticleChange::UpdateStepForAtRest(G4Step* Step)
|
||||
{
|
||||
if (!fSetParentWeightByProcess){
|
||||
Step->GetPostStepPoint()->SetWeight( theParentWeight );
|
||||
}
|
||||
return UpdateStepInfo(Step);
|
||||
}
|
||||
|
||||
inline
|
||||
G4Step* G4VParticleChange::UpdateStepForAlongStep(G4Step* Step)
|
||||
{
|
||||
if (!fSetParentWeightByProcess){
|
||||
Step->GetPostStepPoint()->SetWeight( theParentWeight );
|
||||
}
|
||||
return UpdateStepInfo(Step);
|
||||
}
|
||||
|
||||
inline
|
||||
G4Step* G4VParticleChange::UpdateStepForPostStep(G4Step* Step)
|
||||
{
|
||||
if (!fSetParentWeightByProcess){
|
||||
Step->GetPostStepPoint()->SetWeight( theParentWeight );
|
||||
}
|
||||
return UpdateStepInfo(Step);
|
||||
}
|
||||
|
||||
@@ -219,9 +225,11 @@ inline void G4VParticleChange::InitializeSecondaries(const G4Track&)
|
||||
|
||||
inline void G4VParticleChange::AddSecondary(G4Track *aTrack)
|
||||
{
|
||||
// pass the weight of parent track
|
||||
aTrack->SetWeight(theParentWeight);
|
||||
|
||||
if (!fSetSecondaryWeightByProcess){
|
||||
// pass the weight of parent track
|
||||
aTrack->SetWeight(theParentWeight);
|
||||
}
|
||||
|
||||
// add a secondary after size check
|
||||
if (theSizeOftheListOfSecondaries > theNumberOfSecondaries) {
|
||||
theListOfSecondaries->SetElement(theNumberOfSecondaries, aTrack);
|
||||
@@ -271,36 +279,6 @@ inline void G4VParticleChange::Initialize(const G4Track& track)
|
||||
InitializeParentWeight(track);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VParticleChange::RegisterEBMechanism(G4VEvtBiasMechanism* pEB)
|
||||
{
|
||||
theEBMechanism = pEB;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VParticleChange::SwOnEB()
|
||||
{
|
||||
if (theEBMechanism!=0) fUseEB = true;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VParticleChange::SwOffEB()
|
||||
{
|
||||
fUseEB = false;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VParticleChange::IsEBActive() const
|
||||
{
|
||||
return fUseEB;
|
||||
}
|
||||
|
||||
inline
|
||||
G4VEvtBiasMechanism* G4VParticleChange::GetEBMechanism()
|
||||
{
|
||||
return theEBMechanism;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VParticleChange::ClearDebugFlag()
|
||||
{
|
||||
@@ -318,3 +296,35 @@ inline
|
||||
{
|
||||
return debugFlag;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VParticleChange::SetSecondaryWeightByProcess(G4bool flag)
|
||||
{
|
||||
fSetSecondaryWeightByProcess = flag;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VParticleChange::IsSecondaryWeightSetByProcess() const
|
||||
{
|
||||
return fSetSecondaryWeightByProcess;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VParticleChange::SetParentWeight(G4double w)
|
||||
{
|
||||
theParentWeight = w;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VParticleChange::SetParentWeightByProcess(G4bool flag)
|
||||
{
|
||||
fSetParentWeightByProcess = flag;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VParticleChange::IsParentWeightSetByProcess() const
|
||||
{
|
||||
return fSetParentWeightByProcess;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserTrackInformation.hh,v 1.2.4.1 2001/06/28 19:15:26 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VUserTrackInformation.hh,v 1.3 2001/07/11 10:08:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EvtBiasMechanism.cc,v 1.3.4.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4EvtBiasMechanism.cc,v 1.5 2001/08/16 08:17:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
G4EvtBiasMechanism::G4EvtBiasMechanism(const G4String& name, G4int mulFactor):
|
||||
G4VEvtBiasMechanism(name),
|
||||
MultiplicationForSecondaries(mulFactor),
|
||||
particleToBeBiased(0)
|
||||
particleToBeBiased(0),
|
||||
MultiplicationForSecondaries(mulFactor)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Mars5GeVMechanism.cc,v 1.4.4.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Mars5GeVMechanism.cc,v 1.7 2001/09/19 11:05:29 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -107,12 +107,12 @@ void G4Mars5GeVMechanism::GetTargetNuclei(const G4Material* material)
|
||||
G4double totNumAtoms = 0.0;
|
||||
for (G4int iel=0; iel < numberOfElements; iel +=1) {
|
||||
totNumAtoms += theAtomicNumDensityVector[iel];
|
||||
fZNucl += theAtomicNumDensityVector[iel]*((*theElementVector)(iel)->GetZ());
|
||||
fANucl += theAtomicNumDensityVector[iel]*((*theElementVector)(iel)->GetN());
|
||||
fZNucl += theAtomicNumDensityVector[iel]*((*theElementVector)[iel]->GetZ());
|
||||
fANucl += theAtomicNumDensityVector[iel]*((*theElementVector)[iel]->GetN());
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 2) {
|
||||
G4cout << iel << ": " << theAtomicNumDensityVector[iel];
|
||||
G4cout << " Z=" << (*theElementVector)(iel)->GetZ() << " A=" << (*theElementVector)(iel)->GetN();
|
||||
G4cout << " Z=" << (*theElementVector)[iel]->GetZ() << " A=" << (*theElementVector)[iel]->GetN();
|
||||
G4cout << G4endl;
|
||||
}
|
||||
#endif
|
||||
@@ -131,8 +131,6 @@ void G4Mars5GeVMechanism::GetTargetNuclei(const G4Material* material)
|
||||
|
||||
void G4Mars5GeVMechanism::Treem5()
|
||||
{
|
||||
|
||||
G4double pMass = incidentParticle->GetDefinition()->GetPDGMass();
|
||||
G4double pE = incidentParticle->GetKineticEnergy();
|
||||
G4int pType = incidentMarsEncoding;
|
||||
|
||||
@@ -248,8 +246,7 @@ void G4Mars5GeVMechanism::CreatePion(G4int ib, G4int pType, G4double pE)
|
||||
G4cout << " G4Mars5GeVMechanism::CreatePion()" << G4endl;
|
||||
}
|
||||
#endif
|
||||
static const G4double PionProductionEth = 0.28*GeV;
|
||||
static const G4double KaonProductionEth = 2.0*GeV;
|
||||
static const G4double PionProductionEth = 0.28*GeV;
|
||||
|
||||
if ( pE<PionProductionEth ) {
|
||||
if ((ib==MarsP)||(ib==MarsN)) return;
|
||||
@@ -715,17 +712,17 @@ G4double G4Mars5GeVMechanism::D2N2(G4int pType, G4double incidentE,
|
||||
if(i==4) i = 1;
|
||||
G4bool condA = a<2. && i==2;
|
||||
G4bool condB = a<2.;
|
||||
G4double az;
|
||||
G4double pn;
|
||||
G4double pr;
|
||||
|
||||
G4double pr =0.;
|
||||
if(!condB)
|
||||
{
|
||||
G4double az;
|
||||
if(i==2)
|
||||
{ az = (z+1.)/(a-z); }
|
||||
else
|
||||
{ az = (a+1.-z)/z; }
|
||||
x1 = 0.5*e1ge;
|
||||
pn = az;
|
||||
G4double pn = az;
|
||||
if(x1<60.) pn *= 1. + exp(-x1);
|
||||
if(i==j)
|
||||
{ pr = bn*pn/(1.+pn); }
|
||||
@@ -734,8 +731,9 @@ G4double G4Mars5GeVMechanism::D2N2(G4int pType, G4double incidentE,
|
||||
}
|
||||
if(condA || !condB)
|
||||
{
|
||||
G4double az;
|
||||
if(i==1) az = z/(a-z);
|
||||
if(i==2) az = (a-z)/z;
|
||||
else az = (a-z)/z;
|
||||
G4double bp = 1.0;
|
||||
G4double e0g = e1ge*e2ge;
|
||||
if(e0g<60.) bp -= 0.5*exp(-e0g);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChange.cc,v 1.12.2.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChange.cc,v 1.18 2001/11/21 14:05:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -44,21 +44,11 @@
|
||||
#include "G4TrackFastVector.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
|
||||
G4bool G4ParticleChange::fUseEBForAll = false;
|
||||
|
||||
G4ParticleChange::G4ParticleChange():G4VParticleChange(false)
|
||||
G4ParticleChange::G4ParticleChange():G4VParticleChange()
|
||||
{
|
||||
}
|
||||
|
||||
G4ParticleChange::G4ParticleChange(G4bool useEB):G4VParticleChange(useEB)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cout << "G4ParticleChange::G4ParticleChange() " << G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
G4ParticleChange::~G4ParticleChange()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
@@ -139,7 +129,7 @@ void G4ParticleChange::AddSecondary(G4DynamicParticle* aParticle,
|
||||
if (IsGoodForTracking) aTrack->SetGoodForTrackingFlag();
|
||||
|
||||
// Touchable is a temporary object, so you cannot keep the pointer
|
||||
aTrack->SetTouchable(0);
|
||||
aTrack->SetTouchableHandle((G4VTouchable*)0);
|
||||
|
||||
// add a secondary
|
||||
G4VParticleChange::AddSecondary(aTrack);
|
||||
@@ -156,7 +146,7 @@ void G4ParticleChange::AddSecondary(G4DynamicParticle* aParticle,
|
||||
if (IsGoodForTracking) aTrack->SetGoodForTrackingFlag();
|
||||
|
||||
// Touchable is a temporary object, so you cannot keep the pointer
|
||||
aTrack->SetTouchable(0);
|
||||
aTrack->SetTouchableHandle((G4VTouchable*)0);
|
||||
|
||||
// add a secondary
|
||||
G4VParticleChange::AddSecondary(aTrack);
|
||||
@@ -172,8 +162,8 @@ void G4ParticleChange::AddSecondary(G4DynamicParticle* aParticle,
|
||||
// set IsGoodGorTrackingFlag
|
||||
if (IsGoodForTracking) aTrack->SetGoodForTrackingFlag();
|
||||
|
||||
// Touchable is a temporary object, so you cannot keep the pointer
|
||||
aTrack->SetTouchable(0);
|
||||
// Touchable handle is copied to keep the pointer
|
||||
aTrack->SetTouchableHandle(theCurrentTrack->GetTouchableHandle());
|
||||
|
||||
// add a secondary
|
||||
G4VParticleChange::AddSecondary(aTrack);
|
||||
@@ -193,6 +183,7 @@ void G4ParticleChange::Initialize(const G4Track& track)
|
||||
{
|
||||
// use base class's method at first
|
||||
G4VParticleChange::Initialize(track);
|
||||
theCurrentTrack= &track;
|
||||
|
||||
// set Energy/Momentum etc. equal to those of the parent particle
|
||||
const G4DynamicParticle* pParticle = track.GetDynamicParticle();
|
||||
@@ -276,7 +267,7 @@ G4Step* G4ParticleChange::UpdateStepForAlongStep(G4Step* pStep)
|
||||
pPostStepPoint->AddProperTime( theProperTimeChange
|
||||
- pPreStepPoint->GetProperTime());
|
||||
|
||||
// update weight if use EB
|
||||
// update weight
|
||||
pPostStepPoint->SetWeight( theWeightChange );
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
@@ -295,10 +286,8 @@ G4Step* G4ParticleChange::UpdateStepForPostStep(G4Step* pStep)
|
||||
// pointer to G4ParticleMometum. Also it is a normalized
|
||||
// momentum vector.
|
||||
|
||||
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
|
||||
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
|
||||
G4Track* aTrack = pStep->GetTrack();
|
||||
G4double mass = theMassChange;
|
||||
|
||||
// Set Mass/Charge
|
||||
pPostStepPoint->SetMass(theMassChange);
|
||||
@@ -318,7 +307,7 @@ G4Step* G4ParticleChange::UpdateStepForPostStep(G4Step* pStep)
|
||||
- aTrack->GetGlobalTime());
|
||||
pPostStepPoint->SetProperTime( theProperTimeChange );
|
||||
|
||||
// update weight if use EB
|
||||
// update weight
|
||||
pPostStepPoint->SetWeight( theWeightChange );
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
@@ -334,10 +323,8 @@ G4Step* G4ParticleChange::UpdateStepForAtRest(G4Step* pStep)
|
||||
{
|
||||
// A physics process always calculates the final state of the particle
|
||||
|
||||
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
|
||||
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
|
||||
G4Track* aTrack = pStep->GetTrack();
|
||||
G4double mass = theMassChange;
|
||||
|
||||
// Set Mass/Charge
|
||||
pPostStepPoint->SetMass(theMassChange);
|
||||
@@ -357,7 +344,7 @@ G4Step* G4ParticleChange::UpdateStepForAtRest(G4Step* pStep)
|
||||
- aTrack->GetGlobalTime());
|
||||
pPostStepPoint->SetProperTime( theProperTimeChange );
|
||||
|
||||
// update weight if use EB
|
||||
// update weight
|
||||
pPostStepPoint->SetWeight( theWeightChange );
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForDecay.cc,v 1.5.4.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForDecay.cc,v 1.7 2001/08/16 08:17:59 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -110,9 +110,6 @@ void G4ParticleChangeForDecay::Initialize(const G4Track& track)
|
||||
|
||||
G4Step* G4ParticleChangeForDecay::UpdateStepForPostStep(G4Step* pStep)
|
||||
{
|
||||
// A physics process always calculates the final state of the particle
|
||||
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
|
||||
|
||||
// Update the G4Step specific attributes
|
||||
return UpdateStepInfo(pStep);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForLoss.cc,v 1.5.4.2 2001/06/28 20:20:15 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForLoss.cc,v 1.6 2001/07/11 10:08:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForMSC.cc,v 1.6.4.2 2001/06/28 20:20:16 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForMSC.cc,v 1.8 2001/08/16 08:17:59 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -131,7 +131,6 @@ G4Step* G4ParticleChangeForMSC::UpdateStepForPostStep(G4Step* pStep)
|
||||
// pointer to G4ParticleMometum. Also it is a normalized
|
||||
// momentum vector.
|
||||
|
||||
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
|
||||
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
|
||||
G4Track* aTrack = pStep->GetTrack();
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.cc,v 1.8.2.2 2001/06/28 20:20:16 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4ParticleChangeForTransport.cc,v 1.11 2001/10/22 04:19:41 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -36,7 +36,7 @@
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4ParticleChangeForTransport.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4TrackFastVector.hh"
|
||||
@@ -62,7 +62,7 @@ G4ParticleChangeForTransport::G4ParticleChangeForTransport(const G4ParticleChang
|
||||
if (verboseLevel>0) {
|
||||
G4cout << "G4ParticleChangeForTransport:: copy constructor is called " << G4endl;
|
||||
}
|
||||
theTouchableChange = right.theTouchableChange;
|
||||
theTouchableHandle = right.theTouchableHandle;
|
||||
}
|
||||
|
||||
// assignemnt operator
|
||||
@@ -77,7 +77,7 @@ G4ParticleChangeForTransport & G4ParticleChangeForTransport::operator=(const G4P
|
||||
theSizeOftheListOfSecondaries = right.theSizeOftheListOfSecondaries;
|
||||
theNumberOfSecondaries = right.theNumberOfSecondaries;
|
||||
theStatusChange = right.theStatusChange;
|
||||
theTouchableChange = right.theTouchableChange;
|
||||
theTouchableHandle = right.theTouchableHandle;
|
||||
theMaterialChange = right.theMaterialChange;
|
||||
theMomentumDirectionChange = right.theMomentumDirectionChange;
|
||||
thePolarizationChange = right.thePolarizationChange;
|
||||
@@ -188,13 +188,11 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForPostStep(G4Step* pStep)
|
||||
{
|
||||
// A physics process always calculates the final state of the particle
|
||||
|
||||
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
|
||||
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
|
||||
G4Track* aTrack = pStep->GetTrack();
|
||||
|
||||
// update next touchable
|
||||
// (touchable can be changed only at PostStepDoIt)
|
||||
pPostStepPoint->SetTouchable( theTouchableChange );
|
||||
pPostStepPoint->SetTouchableHandle( theTouchableHandle );
|
||||
|
||||
pPostStepPoint->SetMaterial( theMaterialChange );
|
||||
|
||||
@@ -220,10 +218,14 @@ void G4ParticleChangeForTransport::DumpInfo() const
|
||||
|
||||
G4cout.precision(3);
|
||||
G4cout << " Touchable (pointer) : "
|
||||
<< G4std::setw(20) << theTouchableChange
|
||||
<< G4std::setw(20) << theTouchableHandle()
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Step.cc,v 1.4.4.1 2001/06/28 19:15:28 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Step.cc,v 1.5 2001/07/11 10:08:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StepPoint.cc,v 1.5.2.1 2001/06/28 19:15:28 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4StepPoint.cc,v 1.7 2001/08/16 08:17:59 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -60,6 +60,7 @@ G4StepPoint::G4StepPoint(const G4StepPoint &right):
|
||||
fProperTime(right.fProperTime),
|
||||
fMomentumDirection(right.fMomentumDirection),
|
||||
fKineticEnergy(right.fKineticEnergy),
|
||||
fVelocity(right.fVelocity),
|
||||
fpTouchable(right.fpTouchable),
|
||||
fpMaterial(right.fpMaterial),
|
||||
fSafety(right.fSafety),
|
||||
@@ -68,8 +69,7 @@ G4StepPoint::G4StepPoint(const G4StepPoint &right):
|
||||
fpProcessDefinedStep(right.fpProcessDefinedStep),
|
||||
fMass(right.fMass),
|
||||
fCharge(right.fCharge),
|
||||
fWeight(right.fWeight),
|
||||
fVelocity(right.fVelocity)
|
||||
fWeight(right.fWeight)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
+48
-63
@@ -21,23 +21,18 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Track.cc,v 1.11.2.1 2001/06/28 19:15:28 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4Track.cc,v 1.15 2001/12/10 08:36:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4Track.cc
|
||||
//
|
||||
// Contact:
|
||||
// Questions and comments to this code should be sent to
|
||||
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
||||
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// Add copy constructor Hisaya Feb. 07 01
|
||||
// Fix GetVelocity Hisaya Feb. 17 01
|
||||
//
|
||||
// Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek//
|
||||
#include "G4Track.hh"
|
||||
|
||||
G4Allocator<G4Track> aTrackAllocator;
|
||||
@@ -47,53 +42,35 @@ G4Track::G4Track(G4DynamicParticle* apValueDynamicParticle,
|
||||
G4double aValueTime,
|
||||
const G4ThreeVector& aValuePosition)
|
||||
///////////////////////////////////////////////////////////
|
||||
{
|
||||
fpDynamicParticle = apValueDynamicParticle;
|
||||
fCurrentStepNumber = 0;
|
||||
fGlobalTime = aValueTime;
|
||||
fLocalTime = 0.;
|
||||
fTrackLength = 0.;
|
||||
fPosition = aValuePosition;
|
||||
fpTouchable = 0;
|
||||
fpNextTouchable = 0;
|
||||
fpStep=0;
|
||||
|
||||
fpLVAtVertex = 0;
|
||||
fpCreatorProcess = 0;
|
||||
|
||||
fTrackStatus = fAlive;
|
||||
|
||||
fBelowThreshold = false;
|
||||
fGoodForTracking = false;
|
||||
fWeight = 1.0;
|
||||
|
||||
fpUserInformation = 0;
|
||||
: fCurrentStepNumber(0), fPosition(aValuePosition),
|
||||
fGlobalTime(aValueTime), fLocalTime(0.),
|
||||
fTrackLength(0.),
|
||||
fParentID(0), fTrackID(0),
|
||||
fpDynamicParticle(apValueDynamicParticle),
|
||||
fTrackStatus(fAlive),
|
||||
fBelowThreshold(false), fGoodForTracking(false),
|
||||
fWeight(1.0),
|
||||
fpStep(0),
|
||||
fpLVAtVertex(0), fpCreatorProcess(0),
|
||||
fpUserInformation(0)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////
|
||||
G4Track::G4Track()
|
||||
//////////////////
|
||||
: fCurrentStepNumber(0),
|
||||
fGlobalTime(0), fLocalTime(0.),
|
||||
fTrackLength(0.),
|
||||
fParentID(0), fTrackID(0),
|
||||
fpDynamicParticle(0),
|
||||
fTrackStatus(fAlive),
|
||||
fBelowThreshold(false), fGoodForTracking(false),
|
||||
fWeight(1.0),
|
||||
fpStep(0),
|
||||
fpLVAtVertex(0), fpCreatorProcess(0),
|
||||
fpUserInformation(0)
|
||||
{
|
||||
fCurrentStepNumber = 0;
|
||||
fGlobalTime = 0.;
|
||||
fLocalTime = 0.;
|
||||
fTrackLength = 0.;
|
||||
fParentID = 0;
|
||||
fTrackID = 0;
|
||||
fpTouchable = 0;
|
||||
fpNextTouchable = 0;
|
||||
fpStep=0;
|
||||
|
||||
fpDynamicParticle = 0;
|
||||
fpLVAtVertex = 0;
|
||||
fpCreatorProcess = 0;
|
||||
|
||||
fTrackStatus = fAlive;
|
||||
fBelowThreshold = false;
|
||||
fGoodForTracking = false;
|
||||
fWeight = 1.0;
|
||||
|
||||
fpUserInformation = 0;
|
||||
}
|
||||
//////////////////
|
||||
G4Track::G4Track(const G4Track& right)
|
||||
@@ -115,32 +92,40 @@ G4Track & G4Track::operator=(const G4Track &right)
|
||||
//////////////////
|
||||
{
|
||||
if (this != &right) {
|
||||
fCurrentStepNumber = right.fCurrentStepNumber;
|
||||
fPosition = right.fPosition;
|
||||
fGlobalTime = right.fGlobalTime;
|
||||
fLocalTime = right.fLocalTime;
|
||||
fTrackLength = right.fTrackLength;
|
||||
fParentID = right.fParentID;
|
||||
fWeight = right.fWeight;
|
||||
|
||||
// Track ID is not copied and set to zero for new track
|
||||
// Track ID (and Parent ID) is not copied and set to zero for new track
|
||||
fTrackID = 0;
|
||||
fParentID =0;
|
||||
|
||||
// pointers to Touchables or Step are not copied
|
||||
fpTouchable = 0;
|
||||
fpNextTouchable = 0;
|
||||
fpStep=0;
|
||||
// CurrentStepNumber is set to be 0
|
||||
fCurrentStepNumber = 0;
|
||||
|
||||
// dynamic particle information
|
||||
fpDynamicParticle = new G4DynamicParticle(*(right.fpDynamicParticle));
|
||||
|
||||
fVtxKineticEnergy = right.fVtxKineticEnergy;
|
||||
fVtxPosition = right.fVtxPosition;
|
||||
fpLVAtVertex = right.fpLVAtVertex;
|
||||
fpCreatorProcess = right.fpCreatorProcess;
|
||||
|
||||
|
||||
// track status and flags for tracking
|
||||
fTrackStatus = right.fTrackStatus;
|
||||
fBelowThreshold = right.fBelowThreshold;
|
||||
fGoodForTracking = right.fGoodForTracking;
|
||||
fWeight = right.fWeight;
|
||||
|
||||
// Step information (Step Length, Step Number, pointer to the Step,)
|
||||
// are not copied
|
||||
fpStep=0;
|
||||
|
||||
// vertex information
|
||||
fVtxPosition = right.fVtxPosition;
|
||||
fpLVAtVertex = right.fpLVAtVertex;
|
||||
fVtxKineticEnergy = right.fVtxKineticEnergy;
|
||||
fVtxMomentumDirection = right.fVtxMomentumDirection;
|
||||
|
||||
// CreatorProcess is not copied
|
||||
fpCreatorProcess = 0;
|
||||
|
||||
fpUserInformation = right.fpUserInformation;
|
||||
}
|
||||
return *this;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VEvtBiasMechanism.cc,v 1.2.4.2 2001/06/28 20:20:16 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VEvtBiasMechanism.cc,v 1.3 2001/07/11 10:08:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VParticleChange.cc,v 1.5.4.2 2001/06/28 20:20:16 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VParticleChange.cc,v 1.9 2001/11/13 05:13:39 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -48,10 +48,10 @@ G4VParticleChange::G4VParticleChange():
|
||||
theStatusChange(fAlive),
|
||||
theSteppingControlFlag(NormalCondition),
|
||||
theLocalEnergyDeposit(0.0),
|
||||
verboseLevel(1),
|
||||
theParentWeight(1.0),
|
||||
theEBMechanism(0),
|
||||
fUseEB(false),
|
||||
verboseLevel(1)
|
||||
fSetSecondaryWeightByProcess(false),
|
||||
fSetParentWeightByProcess(true)
|
||||
{
|
||||
debugFlag = false;
|
||||
#ifdef G4VERBOSE
|
||||
@@ -61,27 +61,6 @@ G4VParticleChange::G4VParticleChange():
|
||||
theListOfSecondaries = new G4TrackFastVector();
|
||||
}
|
||||
|
||||
G4VParticleChange::G4VParticleChange(G4bool useEB):
|
||||
theNumberOfSecondaries(0),
|
||||
theSizeOftheListOfSecondaries(G4TrackFastVectorSize),
|
||||
theStatusChange(fAlive),
|
||||
theSteppingControlFlag(NormalCondition),
|
||||
theLocalEnergyDeposit(0.0),
|
||||
theParentWeight(1.0),
|
||||
verboseLevel(1)
|
||||
{
|
||||
fUseEB = useEB;
|
||||
// debug flag (activate CheckIt() )
|
||||
debugFlag = false;
|
||||
#ifdef G4VERBOSE
|
||||
// activate CHeckIt if in VERBOSE mode
|
||||
debugFlag = true;
|
||||
#endif
|
||||
theListOfSecondaries = new G4TrackFastVector();
|
||||
// register G4EvtBiasMechanism as a default
|
||||
theEBMechanism = new G4Mars5GeVMechanism();
|
||||
}
|
||||
|
||||
G4VParticleChange::~G4VParticleChange() {
|
||||
// check if tracks still exist in theListOfSecondaries
|
||||
if (theNumberOfSecondaries>0) {
|
||||
@@ -95,7 +74,6 @@ G4VParticleChange::~G4VParticleChange() {
|
||||
if ( (*theListOfSecondaries)[index] ) delete (*theListOfSecondaries)[index] ;
|
||||
}
|
||||
}
|
||||
if (theEBMechanism !=0) delete theEBMechanism;
|
||||
delete theListOfSecondaries;
|
||||
}
|
||||
|
||||
@@ -106,9 +84,9 @@ G4VParticleChange::G4VParticleChange(const G4VParticleChange &right):
|
||||
theStatusChange(fAlive),
|
||||
theSteppingControlFlag(NormalCondition),
|
||||
theLocalEnergyDeposit(0.0),
|
||||
verboseLevel(1),
|
||||
theParentWeight(1.0),
|
||||
fUseEB(false),
|
||||
verboseLevel(1)
|
||||
fSetSecondaryWeightByProcess(false)
|
||||
{
|
||||
debugFlag = false;
|
||||
#ifdef G4VERBOSE
|
||||
@@ -123,6 +101,7 @@ G4VParticleChange::G4VParticleChange(const G4VParticleChange &right):
|
||||
theTrueStepLength = right.theTrueStepLength;
|
||||
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
|
||||
theSteppingControlFlag = right.theSteppingControlFlag;
|
||||
fSetParentWeightByProcess = right.fSetParentWeightByProcess;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +121,7 @@ G4VParticleChange & G4VParticleChange::operator=(const G4VParticleChange &right)
|
||||
theTrueStepLength = right.theTrueStepLength;
|
||||
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
|
||||
theSteppingControlFlag = right.theSteppingControlFlag;
|
||||
fSetParentWeightByProcess = right.fSetParentWeightByProcess;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -212,12 +192,6 @@ void G4VParticleChange::DumpInfo() const
|
||||
G4cout << " Stepping Control : "
|
||||
<< G4std::setw(20) << theSteppingControlFlag
|
||||
<< G4endl;
|
||||
G4cout << " Event Biasing : ";
|
||||
if (fUseEB) {
|
||||
G4cout << G4std::setw(20) << theEBMechanism->GetName();
|
||||
} else {
|
||||
G4cout << " not used ";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
@@ -226,7 +200,6 @@ G4bool G4VParticleChange::CheckIt(const G4Track& aTrack)
|
||||
|
||||
G4bool exitWithError = false;
|
||||
G4double accuracy;
|
||||
G4double newEnergyDeposit;
|
||||
|
||||
// Energy deposit should not be negative
|
||||
G4bool itsOKforEnergy = true;
|
||||
@@ -279,3 +252,13 @@ G4bool G4VParticleChange::CheckIt(const G4Track& aTrack)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user