Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.0 1998/07/02 16:39:35 gunter Exp $
|
||||
# $Id: GNUmakefile,v 1.1 1999/01/07 16:13:52 gunter Exp $
|
||||
# --------------------------------------------------------------------
|
||||
# GNUmakefile for process management library. Gabriele Cosmo, 4/4/97.
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
$Id: History,v 1.6 1999/06/17 09:06:22 kurasige Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Category History file
|
||||
---------------------
|
||||
This file should be used by G4 developers and category coordinators
|
||||
to briefly summarize all major modifications introduced in the code
|
||||
and keep track of all category-tags.
|
||||
It DOES NOT substitute the CVS log-message one should put at every
|
||||
committal in the CVS repository !
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
- June 17, 99 H.Kurashige (procman-01-00-04)
|
||||
- Disable Activate/InactivateProcess methods in G4ProcessManager
|
||||
(and related UI commands) in "Init" state
|
||||
|
||||
- May 3, 99 H.Kurashige (procman-01-00-03a)
|
||||
- Add G4ProcessManager::GetProcessActivation
|
||||
|
||||
- Apr 30, 99 H.Kurashige (procman-01-00-03)
|
||||
- Remove G4EnergyLossTable from G4IVRestDiscreteProcess and
|
||||
G4IVContinousDiscreteProcess (Laszlo)
|
||||
|
||||
- Apr 17, 99 H.Kurashige (procman-01-00-02a)
|
||||
- correct G4IVContinousDiscreteProcess.cc
|
||||
|
||||
- Apr 13, 99 H.Kurashige (procman-01-00-02)
|
||||
- clean up codes (Hisaya)
|
||||
|
||||
- Feb 6, 99 H.Kurashige (procman-01-00-01)
|
||||
- Add G4ParticleTypes.hh (migrated from particles/management) (Hisaya)
|
||||
- Allow registration of processes to shortlived particles (Hisaya)
|
||||
|
||||
|
||||
Feb 6, 99 H.Kurashige -
|
||||
- Created.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IVContinuousDiscreteProcess.hh,v 2.5 1998/10/16 13:21:31 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IVContinuousDiscreteProcess.hh,v 1.4 1999/04/30 08:01:53 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
@@ -41,20 +41,20 @@ class G4IVContinuousDiscreteProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4IVContinuousDiscreteProcess(G4IVContinuousDiscreteProcess &);
|
||||
|
||||
~G4IVContinuousDiscreteProcess();
|
||||
virtual ~G4IVContinuousDiscreteProcess();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track&,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
@@ -62,22 +62,22 @@ class G4IVContinuousDiscreteProcess : public G4VProcess
|
||||
G4GPILSelection* selection
|
||||
) ;
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
// no operation in AtRestDoIt
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
) { return -1.0; };
|
||||
|
||||
// no operation in AtRestDoIt
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
protected:
|
||||
virtual G4double GetContinuousStepLimit(const G4Track& aTrack,
|
||||
@@ -109,14 +109,13 @@ class G4IVContinuousDiscreteProcess : public G4VProcess
|
||||
protected:
|
||||
G4PhysicsTable* theNlambdaTable ;
|
||||
G4PhysicsTable* theInverseNlambdaTable ;
|
||||
G4double BIGSTEP ;
|
||||
const G4double BIGSTEP ;
|
||||
};
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
|
||||
|
||||
@@ -129,97 +128,6 @@ inline void G4IVContinuousDiscreteProcess::
|
||||
;
|
||||
}
|
||||
|
||||
inline G4double G4IVContinuousDiscreteProcess::
|
||||
PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
G4double nl,nlold,range,rangeold,rangenext,
|
||||
KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
|
||||
if(nlold < nl) {
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>2) {
|
||||
G4cout << GetProcessName() << " PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << endl;
|
||||
|
||||
G4cout << " correction : Nlambda old=new ........." << endl;
|
||||
}
|
||||
#endif
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
if(nl <= theNumberOfInteractionLengthLeft){
|
||||
value = BIGSTEP ;
|
||||
} else {
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext) {
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>2) {
|
||||
G4cout << GetProcessName() << " PostStepGPIL: Step < 0.!, Step=" <<
|
||||
value << endl;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << endl ;
|
||||
G4cout << "correction : rangenext=range ....." << endl;
|
||||
}
|
||||
#endif
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline G4VParticleChange* G4IVContinuousDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IVRestDiscreteProcess.hh,v 2.5 1998/10/16 13:21:32 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IVRestDiscreteProcess.hh,v 1.4 1999/04/30 08:01:55 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
@@ -38,20 +38,20 @@ class G4IVRestDiscreteProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4IVRestDiscreteProcess(G4IVRestDiscreteProcess &);
|
||||
|
||||
~G4IVRestDiscreteProcess();
|
||||
virtual ~G4IVRestDiscreteProcess();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
);
|
||||
@@ -62,19 +62,19 @@ class G4IVRestDiscreteProcess : public G4VProcess
|
||||
);
|
||||
|
||||
// no operation in AlongStepDoIt
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*
|
||||
){ return -1.0; };
|
||||
){ return -1.0; }
|
||||
|
||||
// no operation in AlongStepDoIt
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;}
|
||||
|
||||
protected:
|
||||
virtual void SubtractNumberOfInteractionLengthLeft(
|
||||
@@ -96,9 +96,8 @@ class G4IVRestDiscreteProcess : public G4VProcess
|
||||
protected:
|
||||
G4PhysicsTable* theNlambdaTable ;
|
||||
G4PhysicsTable* theInverseNlambdaTable ;
|
||||
G4double BIGSTEP ;
|
||||
|
||||
|
||||
const G4double BIGSTEP;
|
||||
};
|
||||
|
||||
// -----------------------------------------
|
||||
@@ -109,7 +108,6 @@ class G4IVRestDiscreteProcess : public G4VProcess
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
|
||||
inline
|
||||
void G4IVRestDiscreteProcess::SubtractNumberOfInteractionLengthLeft(
|
||||
@@ -119,99 +117,6 @@ inline
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4IVRestDiscreteProcess::
|
||||
PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
G4double nl,nlold,range,rangeold,rangenext,
|
||||
KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
|
||||
if(nlold < nl) {
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>2) {
|
||||
G4cout << GetProcessName() << " PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << endl;
|
||||
|
||||
G4cout << " correction : Nlambda old=new ........." << endl;
|
||||
|
||||
}
|
||||
#endif
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
if(nl <= theNumberOfInteractionLengthLeft){
|
||||
value = BIGSTEP ;
|
||||
} else {
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext) {
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>2) {
|
||||
G4cout << GetProcessName() << " PostStepGPIL: Step < 0.!, Step=" <<
|
||||
value << endl;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << endl ;
|
||||
G4cout << "correction : rangenext=range ....." << endl;
|
||||
}
|
||||
#endif
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
inline G4VParticleChange* G4IVRestDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
@@ -266,3 +171,15 @@ inline G4VParticleChange* G4IVRestDiscreteProcess::AtRestDoIt(
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4ParticleTypes.hh,v 1.2 1999/04/13 09:44:52 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// History: first implementation, based on object model of
|
||||
// 4-th April 1996, G.Cosmo
|
||||
// ----------------- G4ParticleTypes.hh -----------------
|
||||
// Files including all existing particle definitions GEANT4 classes
|
||||
// ****************************************************************
|
||||
// Created, G.Cosmo, 19 September 1996
|
||||
// Modified H.Kurashige 8 Mar. 1997
|
||||
// Modified H.Kurashige 18 June 1997
|
||||
// Moved from global/management, G.Cosmo, 1 December 1998
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
#ifndef G4ParticleTypes_h
|
||||
#define G4ParticleTypes_h 1
|
||||
|
||||
// Bosons
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
|
||||
// Leptons
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4TauMinus.hh"
|
||||
#include "G4TauPlus.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4NeutrinoTau.hh"
|
||||
#include "G4AntiNeutrinoTau.hh"
|
||||
#include "G4NeutrinoMu.hh"
|
||||
#include "G4AntiNeutrinoMu.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4AntiNeutrinoE.hh"
|
||||
|
||||
// Mesons
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4Eta.hh"
|
||||
#include "G4EtaPrime.hh"
|
||||
#include "G4RhoZero.hh"
|
||||
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4KaonZero.hh"
|
||||
#include "G4AntiKaonZero.hh"
|
||||
#include "G4KaonZeroLong.hh"
|
||||
#include "G4KaonZeroShort.hh"
|
||||
|
||||
#include "G4DMesonPlus.hh"
|
||||
#include "G4DMesonMinus.hh"
|
||||
#include "G4DMesonZero.hh"
|
||||
#include "G4AntiDMesonZero.hh"
|
||||
#include "G4DsMesonPlus.hh"
|
||||
#include "G4DsMesonMinus.hh"
|
||||
#include "G4JPsi.hh"
|
||||
|
||||
#include "G4BMesonPlus.hh"
|
||||
#include "G4BMesonMinus.hh"
|
||||
#include "G4BMesonZero.hh"
|
||||
#include "G4AntiBMesonZero.hh"
|
||||
#include "G4BsMesonZero.hh"
|
||||
#include "G4AntiBsMesonZero.hh"
|
||||
|
||||
|
||||
// Barions
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4AntiNeutron.hh"
|
||||
|
||||
#include "G4Lambda.hh"
|
||||
#include "G4SigmaPlus.hh"
|
||||
#include "G4SigmaZero.hh"
|
||||
#include "G4SigmaMinus.hh"
|
||||
#include "G4XiMinus.hh"
|
||||
#include "G4XiZero.hh"
|
||||
#include "G4OmegaMinus.hh"
|
||||
|
||||
#include "G4AntiLambda.hh"
|
||||
#include "G4AntiSigmaPlus.hh"
|
||||
#include "G4AntiSigmaZero.hh"
|
||||
#include "G4AntiSigmaMinus.hh"
|
||||
#include "G4AntiXiMinus.hh"
|
||||
#include "G4AntiXiZero.hh"
|
||||
#include "G4AntiOmegaMinus.hh"
|
||||
|
||||
#include "G4LambdacPlus.hh"
|
||||
#include "G4SigmacPlusPlus.hh"
|
||||
#include "G4SigmacPlus.hh"
|
||||
#include "G4SigmacZero.hh"
|
||||
#include "G4XicPlus.hh"
|
||||
#include "G4XicZero.hh"
|
||||
#include "G4OmegacZero.hh"
|
||||
|
||||
#include "G4AntiLambdacPlus.hh"
|
||||
#include "G4AntiSigmacPlusPlus.hh"
|
||||
#include "G4AntiSigmacPlus.hh"
|
||||
#include "G4AntiSigmacZero.hh"
|
||||
#include "G4AntiXicPlus.hh"
|
||||
#include "G4AntiXicZero.hh"
|
||||
#include "G4AntiOmegacZero.hh"
|
||||
|
||||
// Nuclei
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Triton.hh"
|
||||
|
||||
//ions
|
||||
#include "G4GenericIon.hh"
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcTblElement.hh,v 2.3 1998/08/16 02:36:48 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcTblElement.hh,v 1.3 1999/06/01 14:52:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -32,7 +32,8 @@
|
||||
class G4ProcTblElement
|
||||
{
|
||||
// this class is used by G4ProcessTable ONLY for booking !!!
|
||||
private:
|
||||
friend class G4ProcessTable;
|
||||
protected:
|
||||
G4ProcTblElement();
|
||||
|
||||
public:
|
||||
@@ -50,20 +51,21 @@ class G4ProcTblElement
|
||||
G4int operator!=(const G4ProcTblElement &right) const;
|
||||
// equal / unequal operator
|
||||
|
||||
protected:
|
||||
typedef RWTPtrOrderedVector<G4ProcessManager> G4ProcMgrVector;
|
||||
|
||||
G4int Length() const ;
|
||||
void Insert(G4ProcessManager* aProcMgr);
|
||||
void Remove(G4ProcessManager* aProcMgr);
|
||||
inline G4int Length() const ;
|
||||
inline void Insert(G4ProcessManager* aProcMgr);
|
||||
inline void Remove(G4ProcessManager* aProcMgr);
|
||||
|
||||
G4VProcess* GetProcess() const;
|
||||
G4String GetProcessName() const;
|
||||
inline G4VProcess* GetProcess() const;
|
||||
inline const G4String& GetProcessName() const;
|
||||
|
||||
G4ProcessManager* GetProcessManager(G4int index) const;
|
||||
G4ProcMgrVector* GetProcMgrVector() const;
|
||||
inline G4ProcessManager* GetProcessManager(G4int index) const;
|
||||
const G4ProcMgrVector* GetProcMgrVector() const { return pProcMgrVector; }
|
||||
|
||||
G4int GetIndex(const G4ProcessManager* pManager) const ;
|
||||
G4bool Contains(const G4ProcessManager* pManager) const ;
|
||||
inline G4int GetIndex(const G4ProcessManager* pManager) const ;
|
||||
inline G4bool Contains(const G4ProcessManager* pManager) const ;
|
||||
|
||||
private:
|
||||
G4VProcess* pProcess;
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
//////////////////////////
|
||||
inline
|
||||
G4ProcTblElement::G4ProcMgrVector* G4ProcTblElement::GetProcMgrVector() const
|
||||
{
|
||||
return pProcMgrVector;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////
|
||||
inline
|
||||
G4bool G4ProcTblElement::Contains(const G4ProcessManager* pManager) const
|
||||
@@ -26,7 +18,7 @@ inline
|
||||
inline
|
||||
G4int G4ProcTblElement::Length() const
|
||||
{
|
||||
if (pProcMgrVector != NULL) return pProcMgrVector->length();
|
||||
if (pProcMgrVector != 0) return pProcMgrVector->length();
|
||||
else return -1;
|
||||
}
|
||||
|
||||
@@ -34,14 +26,14 @@ inline
|
||||
inline
|
||||
G4ProcessManager* G4ProcTblElement::GetProcessManager(G4int index) const
|
||||
{
|
||||
if (pProcMgrVector != NULL) {
|
||||
if (pProcMgrVector != 0) {
|
||||
if ((index < pProcMgrVector->length()) && (index>=0)){
|
||||
return (*pProcMgrVector)(index);
|
||||
} else {
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,19 +50,19 @@ inline
|
||||
inline
|
||||
void G4ProcTblElement::Insert(G4ProcessManager* aProcMgr)
|
||||
{
|
||||
if (pProcMgrVector != NULL) pProcMgrVector->insert(aProcMgr);
|
||||
if (pProcMgrVector != 0) pProcMgrVector->insert(aProcMgr);
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
inline
|
||||
void G4ProcTblElement::Remove(G4ProcessManager* aProcMgr)
|
||||
{
|
||||
if (pProcMgrVector != NULL) pProcMgrVector->remove(aProcMgr);
|
||||
if (pProcMgrVector != 0) pProcMgrVector->remove(aProcMgr);
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
inline
|
||||
G4String G4ProcTblElement::GetProcessName() const
|
||||
const G4String& G4ProcTblElement::GetProcessName() const
|
||||
{
|
||||
return pProcess->GetProcessName();
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessAttribute.hh,v 2.1 1998/07/13 17:27:35 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessAttribute.hh,v 1.2 1999/04/13 09:44:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -33,6 +33,7 @@
|
||||
class G4ProcessAttribute
|
||||
{
|
||||
// this class is used by G4ProcessManager ONLY for booking !!!
|
||||
friend class G4ProcessManager;
|
||||
public:
|
||||
G4ProcessAttribute();
|
||||
G4ProcessAttribute(const G4VProcess* aProcess);
|
||||
@@ -49,6 +50,8 @@ class G4ProcessAttribute
|
||||
G4int operator!=(const G4ProcessAttribute &right) const;
|
||||
// equal / unequal operator
|
||||
|
||||
|
||||
protected:
|
||||
G4VProcess* pProcess;
|
||||
// pointer to G4VProcess
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessManager.hh,v 2.4 1998/10/17 04:58:56 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessManager.hh,v 1.3 1999/05/03 01:52:36 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -22,10 +22,9 @@
|
||||
// Added vector of processes at rest, 06 May 1996
|
||||
// ------------------------------------------------------------
|
||||
// New Physics scheme 8 Jan. 1997 H.Kurahige
|
||||
// 20 Apr. 1997 M.Asai
|
||||
// 14 June 1997 H.Kurahige
|
||||
// Add SetProcessOrdering methods 27 Mar 1998 H.Kurahige
|
||||
// Add copy constructor (deep copy) 28 June 1998 H.Kurashige
|
||||
// Add copy constructor (deep copy) 28 June 1998 H.Kurashige
|
||||
// Add GetProcessActivation 3 May. 1999 H.Kurashige
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4ProcessManager_h
|
||||
@@ -42,22 +41,26 @@
|
||||
class G4ProcessManagerMessenger;
|
||||
class G4ProcessAttribute;
|
||||
|
||||
// Indexes for ProcessVector
|
||||
enum G4ProcessVectorTypeIndex
|
||||
{
|
||||
typeGPIL = 0, typeDoIt =1
|
||||
typeGPIL = 0, // for GetPhysicalInteractionLength
|
||||
typeDoIt =1 // for DoIt
|
||||
};
|
||||
|
||||
enum G4ProcessVectorDoItIndex
|
||||
{
|
||||
idxAll = -1,
|
||||
idxAtRest = 0, idxAlongStep = 1, idxPostStep =2
|
||||
idxAll = -1, // for all DoIt/GPIL
|
||||
idxAtRest = 0, // for AtRestDoIt/GPIL
|
||||
idxAlongStep = 1, // for AlongStepDoIt/GPIL
|
||||
idxPostStep =2 // for AlongSTepDoIt/GPIL
|
||||
};
|
||||
|
||||
|
||||
// enumeration for Ordering Parameter
|
||||
enum G4ProcessVectorOrdering
|
||||
{
|
||||
ordInActive = -1,
|
||||
ordDefault = INT_MAX/2,
|
||||
ordLast = INT_MAX
|
||||
ordInActive = -1, // ordering parameter to indicate InActive DoIt
|
||||
ordDefault = INT_MAX/2, // default ordering parameter
|
||||
ordLast = INT_MAX // ordering parameter to indicate the last DoIt
|
||||
};
|
||||
|
||||
class G4ProcessManager
|
||||
@@ -222,13 +225,17 @@ class G4ProcessManager
|
||||
G4VProcess* RemoveProcess(G4int index);
|
||||
// Removes a process from the process List.
|
||||
// return value is pointer to the removed process.
|
||||
// (NULL value will be returned in case of errors)
|
||||
// (0 value will be returned in case of errors)
|
||||
|
||||
G4VProcess* SetProcessActivation(G4VProcess *aProcess, G4bool fActive);
|
||||
G4VProcess* SetProcessActivation(G4int index, G4bool fActive);
|
||||
// Set activation flag.
|
||||
// return value is pointer to the applied process.
|
||||
// (NULL value will be returned in case of errors)
|
||||
// (0 value will be returned in case of errors)
|
||||
|
||||
G4bool GetProcessActivation(G4VProcess *aProcess) const;
|
||||
G4bool GetProcessActivation(G4int index) const;
|
||||
// Get activation flag.
|
||||
|
||||
G4ParticleDefinition* GetParticleType() const;
|
||||
// get the particle type
|
||||
@@ -362,7 +369,7 @@ inline
|
||||
if ( ivec >=0 ) {
|
||||
return theProcVector[ivec];
|
||||
} else {
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.hh,v 2.2 1998/07/12 03:43:41 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessManagerMessenger.hh,v 1.2 1999/04/13 09:45:01 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -51,11 +51,11 @@ class G4UIcommand;
|
||||
class G4ProcessManagerMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
G4ProcessManagerMessenger(G4ParticleTable* pTable = NULL);
|
||||
~G4ProcessManagerMessenger();
|
||||
G4ProcessManagerMessenger(G4ParticleTable* pTable = 0);
|
||||
virtual ~G4ProcessManagerMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
G4String GetCurrentValue(G4UIcommand * command);
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
|
||||
private:
|
||||
G4ProcessManagerMessenger(const G4ProcessManagerMessenger&){};
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTable.hh,v 2.5 1998/08/17 03:35:36 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessTable.hh,v 1.2 1999/04/13 09:45:02 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -108,9 +108,7 @@ class G4ProcessTable
|
||||
typedef RWTPtrOrderedVector<G4ProcTblElement> G4ProcTableVector;
|
||||
typedef RWTValOrderedVector<G4String> G4ProcNameVector;
|
||||
|
||||
G4ProcNameVector* GetNameList() const;
|
||||
|
||||
|
||||
G4ProcNameVector* GetNameList();
|
||||
G4ProcTableVector* GetProcTableVector();
|
||||
|
||||
private:
|
||||
@@ -124,7 +122,7 @@ class G4ProcessTable
|
||||
G4ProcessVector* ExtractProcesses( G4ProcTableVector* procTableVector);
|
||||
|
||||
public:
|
||||
void DumpInfo(G4VProcess* process, G4ParticleDefinition* particle=NULL);
|
||||
void DumpInfo(G4VProcess* process, G4ParticleDefinition* particle=0);
|
||||
|
||||
public:
|
||||
G4UImessenger* CreateMessenger();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
//////////////////////////
|
||||
inline
|
||||
G4ProcessTable::G4ProcNameVector* G4ProcessTable::GetNameList() const
|
||||
G4ProcessTable::G4ProcNameVector* G4ProcessTable::GetNameList()
|
||||
{
|
||||
return fProcNameVector;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ inline
|
||||
const G4ParticleDefinition* particle)
|
||||
const
|
||||
{
|
||||
if ( particle == NULL ) return NULL;
|
||||
if ( particle == 0 ) return 0;
|
||||
else return FindProcess(processName, particle->GetProcessManager());
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ inline
|
||||
G4ParticleDefinition* particle,
|
||||
G4bool fActive)
|
||||
{
|
||||
if ( particle != NULL ) {
|
||||
if ( particle != 0 ) {
|
||||
SetProcessActivation(processName, particle->GetProcessManager(), fActive);
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ inline
|
||||
G4ParticleDefinition* particle,
|
||||
G4bool fActive)
|
||||
{
|
||||
if ( particle != NULL ) {
|
||||
if ( particle != 0 ) {
|
||||
SetProcessActivation( processType, particle->GetProcessManager(), fActive);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.hh,v 2.2 1998/08/17 03:35:37 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessTableMessenger.hh,v 1.2 1999/04/13 09:45:05 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -48,10 +48,10 @@ class G4ProcessTableMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
G4ProcessTableMessenger(G4ProcessTable* pTable);
|
||||
~G4ProcessTableMessenger();
|
||||
virtual ~G4ProcessTableMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
G4String GetCurrentValue(G4UIcommand * command);
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
|
||||
private:
|
||||
G4String GetProcessTypeName(G4ProcessType aType) const;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessType.hh,v 2.1 1998/08/16 02:36:50 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessType.hh,v 1.2 1999/04/13 09:45:06 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessVector.hh,v 2.1 1998/07/13 17:27:37 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessVector.hh,v 1.2 1999/04/13 09:45:07 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VContinuousDiscreteProcess.hh,v 2.4 1998/10/16 13:21:35 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VContinuousDiscreteProcess.hh,v 1.2 1999/04/13 09:45:09 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -41,20 +41,20 @@ class G4VContinuousDiscreteProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4VContinuousDiscreteProcess(G4VContinuousDiscreteProcess &);
|
||||
|
||||
~G4VContinuousDiscreteProcess();
|
||||
virtual ~G4VContinuousDiscreteProcess();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track&,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
@@ -62,22 +62,22 @@ class G4VContinuousDiscreteProcess : public G4VProcess
|
||||
G4GPILSelection* selection
|
||||
);
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
// no operation in AtRestDoIt
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
) { return -1.0; };
|
||||
|
||||
// no operation in AtRestDoIt
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
protected:
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VContinuousProcess.hh,v 2.4 1998/10/16 13:21:35 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VContinuousProcess.hh,v 1.2 1999/04/13 09:45:10 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -46,9 +46,9 @@ class G4VContinuousProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4VContinuousProcess(G4VContinuousProcess &);
|
||||
|
||||
~G4VContinuousProcess();
|
||||
virtual ~G4VContinuousProcess();
|
||||
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
@@ -56,33 +56,33 @@ class G4VContinuousProcess : public G4VProcess
|
||||
G4GPILSelection* selection
|
||||
);
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
// no operation in AtRestDoIt and PostStepDoIt
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track&,
|
||||
G4double,
|
||||
G4ForceCondition*
|
||||
){ return -1.0; };
|
||||
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
) { return -1.0; };
|
||||
|
||||
// no operation in AtRestDoIt and PostStepDoIt
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
protected:
|
||||
virtual G4double GetContinuousStepLimit(const G4Track& aTrack,
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VDiscreteProcess.hh,v 2.5 1998/10/17 07:04:16 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VDiscreteProcess.hh,v 1.2 1999/04/13 09:45:11 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -46,21 +46,21 @@ class G4VDiscreteProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4VDiscreteProcess(G4VDiscreteProcess &);
|
||||
|
||||
~G4VDiscreteProcess();
|
||||
virtual ~G4VDiscreteProcess();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
// no operation in AtRestDoIt and AlongStepDoIt
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
@@ -68,21 +68,21 @@ class G4VDiscreteProcess : public G4VProcess
|
||||
G4GPILSelection*
|
||||
){ return -1.0; };
|
||||
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
) { return -1.0; };
|
||||
|
||||
// no operation in AtRestDoIt and AlongStepDoIt
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
protected:
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VProcess.hh,v 2.4 1998/08/10 13:12:32 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VProcess.hh,v 1.3 1999/04/14 10:50:42 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -61,7 +61,7 @@ class G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
|
||||
// copy constructor copys the name but does not copy the
|
||||
// physics table (NULL pointer is assigned)
|
||||
// physics table (0 pointer is assigned)
|
||||
G4VProcess(G4VProcess &right);
|
||||
|
||||
virtual ~G4VProcess();
|
||||
@@ -153,7 +153,7 @@ class G4VProcess
|
||||
// private void BuildThePhysicsTable()
|
||||
// function. Not another BuildPhysicsTable, please.
|
||||
|
||||
G4String GetProcessName() const;
|
||||
const G4String& GetProcessName() const;
|
||||
// Returns the name of the process.
|
||||
|
||||
G4ProcessType GetProcessType() const;
|
||||
@@ -162,20 +162,15 @@ class G4VProcess
|
||||
void SetProcessType(G4ProcessType );
|
||||
// Set the process type.
|
||||
|
||||
static G4String GetProcessTypeName(G4ProcessType );
|
||||
static const G4String& GetProcessTypeName(G4ProcessType );
|
||||
// Returns the process type name
|
||||
|
||||
virtual void StartTracking();
|
||||
virtual void EndTracking();
|
||||
// inform Start/End of tracking for each track to the physics process
|
||||
|
||||
|
||||
protected:
|
||||
//--- Removed ----//
|
||||
// G4PhysicsTable* thePhysicsTable;
|
||||
// A Physics Table can be either a cross-sections table or
|
||||
// an energy table (or can be used for other specific
|
||||
// purposes).
|
||||
|
||||
G4VParticleChange* pParticleChange;
|
||||
// The pointer to G4VParticleChange object
|
||||
// which is modified and returned by address by the DoIt() method.
|
||||
@@ -237,7 +232,8 @@ class G4VProcess
|
||||
// -----------------------------------------
|
||||
#include "Randomize.hh"
|
||||
|
||||
inline G4String G4VProcess::GetProcessName() const
|
||||
inline
|
||||
const G4String& G4VProcess::GetProcessName() const
|
||||
{
|
||||
return theProcessName;
|
||||
}
|
||||
@@ -275,3 +271,23 @@ inline void G4VProcess::ClearNumberOfInteractionLengthLeft()
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestContinuousDiscreteProcess.hh,v 2.4 1998/10/16 13:21:37 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestContinuousDiscreteProcess.hh,v 1.2 1999/04/13 09:45:14 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -42,20 +42,20 @@ class G4VRestContinuousDiscreteProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4VRestContinuousDiscreteProcess(G4VRestContinuousDiscreteProcess &);
|
||||
|
||||
~G4VRestContinuousDiscreteProcess();
|
||||
virtual ~G4VRestContinuousDiscreteProcess();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
@@ -63,17 +63,17 @@ class G4VRestContinuousDiscreteProcess : public G4VProcess
|
||||
G4GPILSelection* selection
|
||||
);
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
);
|
||||
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestContinuousProcess.hh,v 2.5 1998/10/16 13:21:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestContinuousProcess.hh,v 1.2 1999/04/13 09:45:15 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -42,19 +42,19 @@ class G4VRestContinuousProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4VRestContinuousProcess(G4VRestContinuousProcess &);
|
||||
|
||||
~G4VRestContinuousProcess();
|
||||
virtual ~G4VRestContinuousProcess();
|
||||
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
);
|
||||
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
@@ -62,23 +62,23 @@ class G4VRestContinuousProcess : public G4VProcess
|
||||
G4GPILSelection* selection
|
||||
);
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
// no operation in PostStepDoIt
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4double ,
|
||||
G4ForceCondition*
|
||||
){ return -1.0; };
|
||||
|
||||
// no operation in PostStepDoIt
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
protected:
|
||||
virtual G4double GetContinuousStepLimit(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestDiscreteProcess.hh,v 2.4 1998/10/16 13:21:39 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestDiscreteProcess.hh,v 1.2 1999/04/13 09:45:16 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -42,31 +42,31 @@ class G4VRestDiscreteProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4VRestDiscreteProcess(G4VRestDiscreteProcess &);
|
||||
|
||||
~G4VRestDiscreteProcess();
|
||||
virtual ~G4VRestDiscreteProcess();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4ForceCondition*
|
||||
);
|
||||
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
// no operation in AlongStepDoIt
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
@@ -75,10 +75,10 @@ class G4VRestDiscreteProcess : public G4VProcess
|
||||
){ return -1.0; };
|
||||
|
||||
// no operation in AlongStepDoIt
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
protected:
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestProcess.hh,v 2.4 1998/10/16 13:21:40 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestProcess.hh,v 1.2 1999/04/13 09:45:17 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -46,20 +46,20 @@ class G4VRestProcess : public G4VProcess
|
||||
G4ProcessType aType = fNotDefined );
|
||||
G4VRestProcess(G4VRestProcess& );
|
||||
|
||||
~G4VRestProcess();
|
||||
virtual ~G4VRestProcess();
|
||||
|
||||
G4double AtRestGetPhysicalInteractionLength(
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
G4VParticleChange* AtRestDoIt(
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
);
|
||||
|
||||
// no operation in PostStepDoIt and AlongStepDoIt
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
virtual G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
@@ -67,22 +67,22 @@ class G4VRestProcess : public G4VProcess
|
||||
G4GPILSelection*
|
||||
){ return -1.0; };
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4double ,
|
||||
G4ForceCondition*
|
||||
) { return -1.0; };
|
||||
|
||||
// no operation in PostStepDoIt and AlongStepDoIt
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
virtual G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
) {return NULL;};
|
||||
) {return 0;};
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IVContinuousDiscreteProcess.cc,v 2.0 1998/07/02 16:39:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IVContinuousDiscreteProcess.cc,v 1.4 1999/04/30 08:02:30 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
#include "G4IVContinuousDiscreteProcess.hh"
|
||||
G4IVContinuousDiscreteProcess::G4IVContinuousDiscreteProcess()
|
||||
:G4VProcess("No Name Discrete Process")
|
||||
:G4VProcess("No Name Discrete Process"), BIGSTEP(1.e10)
|
||||
{
|
||||
G4Exception("G4IVContinuousDiscreteProcess:: default constructor is called");
|
||||
}
|
||||
|
||||
G4IVContinuousDiscreteProcess::G4IVContinuousDiscreteProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
: G4VProcess(aName, aType),BIGSTEP(1.e10)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -37,17 +37,26 @@ G4IVContinuousDiscreteProcess::~G4IVContinuousDiscreteProcess()
|
||||
}
|
||||
|
||||
G4IVContinuousDiscreteProcess::G4IVContinuousDiscreteProcess(G4IVContinuousDiscreteProcess& right)
|
||||
: G4VProcess(right)
|
||||
: G4VProcess(right),BIGSTEP(1.e10)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
G4double G4IVContinuousDiscreteProcess::
|
||||
PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
G4double value = DBL_MAX ;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IVRestDiscreteProcess.cc,v 2.0 1998/07/02 16:39:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IVRestDiscreteProcess.cc,v 1.4 1999/04/30 08:02:31 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
@@ -22,13 +22,14 @@
|
||||
|
||||
#include "G4IVRestDiscreteProcess.hh"
|
||||
G4IVRestDiscreteProcess::G4IVRestDiscreteProcess()
|
||||
:G4VProcess("No Name Discrete Process")
|
||||
:G4VProcess("No Name Discrete Process"),BIGSTEP(1.e10)
|
||||
|
||||
{
|
||||
G4Exception("G4IVRestDiscreteProcess:: default constructor is called");
|
||||
}
|
||||
|
||||
G4IVRestDiscreteProcess::G4IVRestDiscreteProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
: G4VProcess(aName, aType),BIGSTEP(1.e10)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -37,17 +38,17 @@ G4IVRestDiscreteProcess::~G4IVRestDiscreteProcess()
|
||||
}
|
||||
|
||||
G4IVRestDiscreteProcess::G4IVRestDiscreteProcess(G4IVRestDiscreteProcess& right)
|
||||
: G4VProcess(right)
|
||||
: G4VProcess(right),BIGSTEP(1.e10)
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4IVRestDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
G4double value = DBL_MAX ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcTblElement.cc,v 2.3 1998/08/16 02:36:56 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcTblElement.cc,v 1.2 1999/04/13 09:47:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -24,8 +24,8 @@
|
||||
// default constructor ////////////////////////
|
||||
G4ProcTblElement::G4ProcTblElement()
|
||||
{
|
||||
pProcess = NULL;
|
||||
pProcMgrVector=NULL;
|
||||
pProcess = 0;
|
||||
pProcMgrVector=0;
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
@@ -50,7 +50,7 @@ G4ProcTblElement::G4ProcTblElement(const G4ProcTblElement &right)
|
||||
// destructor ////////////////////////
|
||||
G4ProcTblElement::~G4ProcTblElement()
|
||||
{
|
||||
if (pProcMgrVector != NULL) {
|
||||
if (pProcMgrVector != 0) {
|
||||
pProcMgrVector->clear();
|
||||
delete pProcMgrVector;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ G4ProcTblElement & G4ProcTblElement::operator=(G4ProcTblElement &right)
|
||||
if (this != &right) {
|
||||
pProcess = right.pProcess;
|
||||
// copy all contents in pProcMgrVector
|
||||
if (pProcMgrVector != NULL) {
|
||||
if (pProcMgrVector != 0) {
|
||||
pProcMgrVector->clear();
|
||||
delete pProcMgrVector;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessAttribute.cc,v 2.0 1998/07/02 16:39:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessAttribute.cc,v 1.2 1999/04/13 09:47:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -26,7 +26,7 @@
|
||||
G4ProcessAttribute::G4ProcessAttribute():
|
||||
isActive(true)
|
||||
{
|
||||
pProcess = NULL;
|
||||
pProcess = 0;
|
||||
idxProcessList = -1;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ G4ProcessAttribute & G4ProcessAttribute::operator=(G4ProcessAttribute &right)
|
||||
if (this != &right) {
|
||||
pProcess = right.pProcess;
|
||||
idxProcessList = right.idxProcessList;
|
||||
isActive = right.isActive;
|
||||
// copy all contents in idxProcVector[] and ordProcVector[]
|
||||
// deep copy
|
||||
for (G4int idx=0; idx<G4ProcessManager::SizeOfProcVectorArray; idx++){
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessManager.cc,v 2.11 1998/10/17 14:17:29 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessManager.cc,v 1.8 1999/06/17 09:02:12 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -25,14 +25,23 @@
|
||||
|
||||
#include "G4ProcessManagerMessenger.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4StateManager.hh"
|
||||
#include <iomanip.h>
|
||||
#include "G4ProcessTable.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#ifdef WIN32
|
||||
# include <Strstrea.h>
|
||||
#else
|
||||
# include <strstream.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// ---------------------------------
|
||||
// function members implementation
|
||||
// ---------------------------------
|
||||
G4ProcessManagerMessenger* G4ProcessManager::fProcessManagerMessenger = NULL;
|
||||
G4ProcessManagerMessenger* G4ProcessManager::fProcessManagerMessenger = 0;
|
||||
G4int G4ProcessManager::counterOfObjects = 0;
|
||||
// ///////////////////////////////////////
|
||||
G4ProcessManager::G4ProcessManager(const G4ParticleDefinition* aParticleType):
|
||||
@@ -41,41 +50,34 @@ G4ProcessManager::G4ProcessManager(const G4ParticleDefinition* aParticleType):
|
||||
duringTracking(false),
|
||||
verboseLevel(1)
|
||||
{
|
||||
char errMsg[1024];
|
||||
ostrstream errOs(errMsg,1024);
|
||||
// create the process List
|
||||
theProcessList = new G4ProcessVector();
|
||||
if ( theProcessList == NULL) {
|
||||
const G4String aErrorMessage("G4ProcessManager::G4ProcessManager():");
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << aErrorMessage;
|
||||
G4cerr << " can not create G4ProcessVector " << endl;
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
if ( theProcessList == 0) {
|
||||
errOs << "G4ProcessManager::G4ProcessManager():";
|
||||
errOs << " can not create G4ProcessVector " << endl;
|
||||
G4Exception(errMsg);
|
||||
}
|
||||
|
||||
//create process vector
|
||||
for (G4int i=0; i<SizeOfProcVectorArray; ++i) {
|
||||
theProcVector[i] = new G4ProcessVector();
|
||||
if ( theProcVector[i] == NULL) {
|
||||
G4String aErrorMessage("G4ProcessManager::G4ProcessManager():");
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << aErrorMessage;
|
||||
G4cerr << " can not create G4ProcessVector " << endl;
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
if ( theProcVector[i] == 0) {
|
||||
errOs << "G4ProcessManager::G4ProcessManager():";
|
||||
errOs << " can not create G4ProcessVector " << endl;
|
||||
G4Exception(errMsg);
|
||||
}
|
||||
}
|
||||
|
||||
// create Process Attribute vector
|
||||
theAttrVector = new G4ProcessAttrVector();
|
||||
if (fProcessManagerMessenger == NULL){
|
||||
|
||||
// create Process Manager Messenger
|
||||
if (fProcessManagerMessenger == 0){
|
||||
fProcessManagerMessenger = new G4ProcessManagerMessenger();
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 1) {
|
||||
G4cerr << "G4ProcessManagerMessenger is created" << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Increment counter of G4ProcessManager objects
|
||||
counterOfObjects+=1;
|
||||
}
|
||||
@@ -87,19 +89,18 @@ G4ProcessManager::G4ProcessManager(G4ProcessManager &right)
|
||||
verboseLevel = right.verboseLevel;
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 2) {
|
||||
G4cerr << "G4ProcessManagerMessenger:: copy constructor " <<endl;
|
||||
G4cout << "G4ProcessManagerMessenger:: copy constructor " <<endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
theParticleType = right.theParticleType;
|
||||
numberOfProcesses = right.numberOfProcesses;
|
||||
|
||||
// create the process List
|
||||
// create the process List and ProcessAttr Vector
|
||||
theProcessList = new G4ProcessVector();
|
||||
theAttrVector = new G4ProcessAttrVector();
|
||||
if ( ( theProcessList == NULL) || (theAttrVector == NULL) ){
|
||||
G4String aErrorMessage("G4ProcessManager::G4ProcessManager():");
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
if ( ( theProcessList == 0) || (theAttrVector == 0) ){
|
||||
G4Exception("G4ProcessManager : can not create ProcessVector");
|
||||
}
|
||||
|
||||
for (G4int idx=0; idx < right.numberOfProcesses; idx++) {
|
||||
@@ -114,13 +115,13 @@ G4ProcessManager::G4ProcessManager(G4ProcessManager &right)
|
||||
}
|
||||
|
||||
|
||||
//create theProcVector
|
||||
// fill up theProcVector
|
||||
for (G4int i=0; i<SizeOfProcVectorArray; ++i) {
|
||||
// create i-th ProcessVector in theProcVector
|
||||
theProcVector[i] = new G4ProcessVector();
|
||||
if ( theProcVector[i] == NULL) {
|
||||
if ( theProcVector[i] == 0) {
|
||||
G4String aErrorMessage("G4ProcessManager::G4ProcessManager():");
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
G4Exception((const char*)(aErrorMessage));
|
||||
}
|
||||
G4ProcessVector* src = right.theProcVector[i];
|
||||
for (G4int j=0; j< src->entries() ; j++){
|
||||
@@ -128,17 +129,18 @@ G4ProcessManager::G4ProcessManager(G4ProcessManager &right)
|
||||
theProcVector[i]->insert((*src)[j]);
|
||||
}
|
||||
}
|
||||
|
||||
// Increment counter of G4ProcessManager objects
|
||||
counterOfObjects+=1;
|
||||
}
|
||||
|
||||
// ///////////////////////////////////////
|
||||
G4ProcessManager::G4ProcessManager():
|
||||
theParticleType(NULL),
|
||||
theParticleType(0),
|
||||
numberOfProcesses(0)
|
||||
{
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << "G4ProcessManager: default constructor is called !!" <<endl;
|
||||
G4cout << "G4ProcessManager: default constructor is called !!" <<endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,8 +155,12 @@ G4ProcessManager & G4ProcessManager::operator=(G4ProcessManager &)
|
||||
G4ProcessManager::~G4ProcessManager()
|
||||
{
|
||||
for (G4int i=0; i<SizeOfProcVectorArray; i++) {
|
||||
if (theProcVector[i]) delete theProcVector[i];
|
||||
if (theProcVector[i]) {
|
||||
theProcVector[i]->clear();
|
||||
delete theProcVector[i];
|
||||
}
|
||||
}
|
||||
theProcessList->clear();
|
||||
delete theProcessList;
|
||||
|
||||
theAttrVector->clearAndDestroy();
|
||||
@@ -162,13 +168,14 @@ G4ProcessManager::~G4ProcessManager()
|
||||
|
||||
counterOfObjects-=1;
|
||||
|
||||
// delete messenger if this object is last one
|
||||
if ( counterOfObjects == 0 ){
|
||||
if (fProcessManagerMessenger != NULL){
|
||||
if (fProcessManagerMessenger != 0){
|
||||
delete fProcessManagerMessenger;
|
||||
fProcessManagerMessenger = NULL;
|
||||
fProcessManagerMessenger = 0;
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 1) {
|
||||
G4cerr << "G4ProcessManagerMessenger is deleted" << endl;
|
||||
G4cout << "G4ProcessManagerMessenger is deleted" << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -184,22 +191,23 @@ G4int G4ProcessManager::GetProcessVectorIndex(
|
||||
G4int idxVect = -1;
|
||||
G4int idxProc = GetProcessIndex(aProcess);
|
||||
G4int ivec = GetProcessVectorId(idx, typ);
|
||||
|
||||
if ( ( idxProc >=0) && (ivec >=0) ){
|
||||
idxVect = GetAttribute(idxProc)->idxProcVector[ivec];
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0) {
|
||||
G4cerr << " G4ProcessManager::GetProcessVectorIndex:";
|
||||
G4cerr << "particle[" << theParticleType->GetParticleName() << "] " ;
|
||||
G4cerr << "process[" << aProcess->GetProcessName() << "]" ;
|
||||
G4cerr << endl;
|
||||
G4cout << " G4ProcessManager::GetProcessVectorIndex:";
|
||||
G4cout << "particle[" << theParticleType->GetParticleName() << "] " ;
|
||||
G4cout << "process[" << aProcess->GetProcessName() << "]" ;
|
||||
G4cout << endl;
|
||||
if (idxProc <0) {
|
||||
G4cerr << " is not registered yet ";
|
||||
G4cout << " is not registered yet ";
|
||||
}
|
||||
if (ivec <0) {
|
||||
G4cerr << " illegal DoIt Index [= " << idx << "," << typ << "]";
|
||||
G4cout << " illegal DoIt Index [= " << idx << "," << typ << "]";
|
||||
}
|
||||
G4cerr << endl;
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -213,48 +221,43 @@ G4ProcessAttribute* G4ProcessManager::GetAttribute(G4int index) const
|
||||
if ((index<0) || (index>=numberOfProcesses)) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << "G4ProcessManager::GetAttribute():";
|
||||
G4cerr << " particle[" << theParticleType->GetParticleName() << "]";
|
||||
G4cerr << endl;
|
||||
G4cerr << " index out of range " << endl;
|
||||
G4cerr << " #processes[" << numberOfProcesses << "]";
|
||||
G4cerr << " index [" << index << "]" << endl;
|
||||
G4cout << "G4ProcessManager::GetAttribute():";
|
||||
G4cout << " particle[" << theParticleType->GetParticleName() << "]";
|
||||
G4cout << endl;
|
||||
G4cout << " index out of range " << endl;
|
||||
G4cout << " #processes[" << numberOfProcesses << "]";
|
||||
G4cout << " index [" << index << "]" << endl;
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// check process pointer is not NULL
|
||||
// check process pointer is not 0
|
||||
G4VProcess* aProcess = (*theProcessList)[index];
|
||||
if (aProcess == NULL) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << "G4ProcessManager::GetAttribute():";
|
||||
G4cerr << " particle[" << theParticleType->GetParticleName() << "]";
|
||||
G4cerr << endl;
|
||||
G4cerr << "process is not defined at " << index << endl;
|
||||
}
|
||||
#endif
|
||||
if (aProcess == 0) {
|
||||
G4String aErrorMessage("G4ProcessManager::GetAttribute():");
|
||||
aErrorMessage += " particle[" + theParticleType->GetParticleName() + "]";
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return NULL;
|
||||
G4Exception((const char*)(aErrorMessage));
|
||||
return 0;
|
||||
}
|
||||
|
||||
//find the process attribute
|
||||
if ( ((*theAttrVector)[index])->idxProcessList == index ){
|
||||
return (*theAttrVector)[index];
|
||||
} else {
|
||||
// !! Error !!
|
||||
// attribute vector index is inconsistent with process List index
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << "G4ProcessManager::GetAttribute():";
|
||||
G4cerr << " particle[" << theParticleType->GetParticleName() << "]";
|
||||
G4cerr << endl;
|
||||
G4cerr << "Warning:: attribute vector index is inconsistent with process List index" << endl;
|
||||
G4cout << "G4ProcessManager::GetAttribute():";
|
||||
G4cout << " particle[" << theParticleType->GetParticleName() << "]";
|
||||
G4cout << endl;
|
||||
G4cout << "Warning:: attribute vector index is inconsistent with process List index" << endl;
|
||||
}
|
||||
#endif
|
||||
G4ProcessAttribute *pAttr = NULL;
|
||||
for (G4int i=0; i<theAttrVector->length(); i++){
|
||||
// re-ordering attribute vector
|
||||
G4ProcessAttribute *pAttr = 0;
|
||||
for (G4int i=0; i<theAttrVector->entries(); i++){
|
||||
if ( ((*theAttrVector)[i])->idxProcessList == index) {
|
||||
pAttr = (*theAttrVector)[i];
|
||||
break;
|
||||
@@ -275,20 +278,22 @@ G4int G4ProcessManager::InsertAt(G4int ip, G4VProcess* process, G4int ivec)
|
||||
{
|
||||
G4ProcessVector* pVector = theProcVector[ivec];
|
||||
// check position
|
||||
if ( (ip<0) || (ip > pVector->length()) ) return -1;
|
||||
if ( (ip<0) || (ip > pVector->entries()) ) return -1;
|
||||
|
||||
// insert in pVector
|
||||
pVector->insertAt(ip, process);
|
||||
|
||||
//correct index in ProcessAttributes of processes
|
||||
for (G4int iproc=0; iproc<numberOfProcesses; iproc++) {
|
||||
G4ProcessAttribute* aAttr = (*theAttrVector)[iproc];
|
||||
if (aAttr != NULL) {
|
||||
if (aAttr != 0) {
|
||||
if (aAttr->idxProcVector[ivec] >= ip){
|
||||
aAttr->idxProcVector[ivec] += 1;
|
||||
}
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << " G4ProcessManager::InsertAt : No Process Attribute " << endl;
|
||||
G4cout << " G4ProcessManager::InsertAt : No Process Attribute " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -301,17 +306,19 @@ G4int G4ProcessManager::RemoveAt(G4int ip, G4VProcess* process, G4int ivec)
|
||||
{
|
||||
G4ProcessVector* pVector = theProcVector[ivec];
|
||||
// check position
|
||||
if ( (ip<0) || (ip >= pVector->length()) ) return -1;
|
||||
if ( (ip<0) || (ip >= pVector->entries()) ) return -1;
|
||||
|
||||
//check pointer and remove
|
||||
if ((*pVector)[ip]== process) {
|
||||
pVector->removeAt(ip);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// correct index
|
||||
for(G4int iproc=0; iproc<numberOfProcesses; iproc++) {
|
||||
G4ProcessAttribute* aAttr = (*theAttrVector)[iproc];
|
||||
if (aAttr != NULL) {
|
||||
if (aAttr != 0) {
|
||||
if (ip < aAttr->idxProcVector[ivec]) {
|
||||
aAttr->idxProcVector[ivec] -=1;
|
||||
} else if (ip == aAttr->idxProcVector[ivec]) {
|
||||
@@ -321,7 +328,7 @@ G4int G4ProcessManager::RemoveAt(G4int ip, G4VProcess* process, G4int ivec)
|
||||
}else {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << " G4ProcessManager::RemoveAt : No Process Attribute " << endl;
|
||||
G4cout << " G4ProcessManager::RemoveAt : No Process Attribute " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -333,8 +340,9 @@ G4int G4ProcessManager::RemoveAt(G4int ip, G4VProcess* process, G4int ivec)
|
||||
G4int G4ProcessManager::FindInsertPosition(G4int ord, G4int ivec)
|
||||
{
|
||||
G4ProcessVector* pVector = theProcVector[ivec];
|
||||
G4int ip = pVector->length();
|
||||
G4int ip = pVector->entries();
|
||||
G4int tmp = INT_MAX;
|
||||
|
||||
// find insert position
|
||||
for (G4int iproc=0; iproc<numberOfProcesses; iproc++) {
|
||||
G4ProcessAttribute* aAttr = (*theAttrVector)[iproc];
|
||||
@@ -359,11 +367,12 @@ G4int G4ProcessManager::AddProcess(
|
||||
aErrorMessage += " particle[" + theParticleType->GetParticleName() + "]";
|
||||
|
||||
//check the process is applicable to this particle type
|
||||
if ( !aProcess->IsApplicable(*theParticleType) ) {
|
||||
if ( ( !aProcess->IsApplicable(*theParticleType) ) ||
|
||||
(theParticleType->IsShortLived() ) ){
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << aErrorMessage << endl;
|
||||
G4cerr << "This process is not applicable to this particle";
|
||||
G4cout << aErrorMessage << endl;
|
||||
G4cout << "This process is not applicable to this particle";
|
||||
}
|
||||
#endif
|
||||
// --comment out for alpha version ----
|
||||
@@ -373,7 +382,7 @@ G4int G4ProcessManager::AddProcess(
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>2) {
|
||||
G4cerr << aErrorMessage << endl;
|
||||
G4cout << aErrorMessage << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -383,17 +392,12 @@ G4int G4ProcessManager::AddProcess(
|
||||
|
||||
//add aProcess to process List
|
||||
theProcessList->insert(aProcess);
|
||||
G4int idx = (theProcessList->length()) - 1;
|
||||
G4int idx = (theProcessList->entries()) - 1;
|
||||
|
||||
// check size of the ProcessVector[0]
|
||||
if (numberOfProcesses != idx){
|
||||
theProcessList->removeLast();
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << aErrorMessage << endl;
|
||||
G4cerr << "inconsistent process List size" << numberOfProcesses << endl;
|
||||
}
|
||||
#endif
|
||||
aErrorMessage += "inconsistent process List size";
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return -1;
|
||||
}
|
||||
@@ -433,11 +437,11 @@ G4int G4ProcessManager::AddProcess(
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cerr << aErrorMessage << endl;
|
||||
G4cerr << aProcess->GetProcessName() << " is inserted at "<< ip;
|
||||
G4cerr << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cerr << " with Ordering parameter = " << pAttr->ordProcVector[ivec] ;
|
||||
G4cerr << endl;
|
||||
G4cout << aErrorMessage << endl;
|
||||
G4cout << aProcess->GetProcessName() << " is inserted at "<< ip;
|
||||
G4cout << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cout << " with Ordering parameter = " ;
|
||||
G4cout << pAttr->ordProcVector[ivec] << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -459,7 +463,7 @@ G4VProcess* G4ProcessManager::RemoveProcess(G4int index)
|
||||
{
|
||||
//find the process attribute
|
||||
G4ProcessAttribute* pAttr = GetAttribute(index);
|
||||
if (pAttr == NULL) return NULL;
|
||||
if (pAttr == 0) return 0;
|
||||
|
||||
// remove process
|
||||
G4VProcess* removedProcess = (*theProcessList)[index];
|
||||
@@ -471,7 +475,7 @@ G4VProcess* G4ProcessManager::RemoveProcess(G4int index)
|
||||
for (G4int ivec=0; ivec<SizeOfProcVectorArray; ivec++) {
|
||||
G4ProcessVector* pVector = theProcVector[ivec];
|
||||
G4int idx = pAttr->idxProcVector[ivec];
|
||||
if ((idx >= 0) && (idx < pVector->length())) {
|
||||
if ((idx >= 0) && (idx < pVector->entries())) {
|
||||
//remove
|
||||
if (RemoveAt(idx, removedProcess, ivec) <0) {
|
||||
#ifdef G4VERBOSE
|
||||
@@ -483,8 +487,8 @@ G4VProcess* G4ProcessManager::RemoveProcess(G4int index)
|
||||
G4cerr << idx << "->" << pVector->index(removedProcess) << endl;
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return NULL;
|
||||
G4Exception((const char*)(aErrorMessage));
|
||||
return 0;
|
||||
}
|
||||
} else if (idx<0) {
|
||||
// corresponding DoIt is not active
|
||||
@@ -496,11 +500,11 @@ G4VProcess* G4ProcessManager::RemoveProcess(G4int index)
|
||||
G4cerr << "particle["<<theParticleType->GetParticleName()<<"] " ;
|
||||
G4cerr << "process["<<removedProcess->GetProcessName()<< "] " ;
|
||||
G4cerr << "index(=" << idx << ") of process vector";
|
||||
G4cerr << "[size:" << pVector->length() << "] out of range" <<endl;
|
||||
G4cerr << "[size:" << pVector->entries() << "] out of range" <<endl;
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return NULL;
|
||||
G4Exception((const char*)(aErrorMessage));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pAttr->isActive = false;
|
||||
@@ -540,18 +544,22 @@ G4int G4ProcessManager::GetProcessOrdering(
|
||||
G4ProcessVectorDoItIndex idDoIt
|
||||
)
|
||||
{
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
// get Process Vector Id
|
||||
G4int ivec = GetProcessVectorId(idDoIt, typeDoIt);
|
||||
if (ivec <0 ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0) {
|
||||
G4cerr << "G4ProcessManager::SetProcessOrdering: ";
|
||||
G4cerr << " illegal DoIt Index [= " << idDoIt << "]";
|
||||
G4cerr << endl;
|
||||
return -1;
|
||||
G4cout << "G4ProcessManager::SetProcessOrdering: ";
|
||||
G4cout << " illegal DoIt Index [= " << idDoIt << "]";
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
} else if (pAttr != NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// get attribute
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
if (pAttr != 0) {
|
||||
return pAttr->ordProcVector[ivec];
|
||||
} else {
|
||||
return -1;
|
||||
@@ -571,35 +579,45 @@ void G4ProcessManager::SetProcessOrdering(
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>2) {
|
||||
G4cerr << aErrorMessage ;
|
||||
G4cerr << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cerr <<"process[" + aProcess->GetProcessName() + "]"<< endl;
|
||||
G4cout << aErrorMessage ;
|
||||
G4cout << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cout <<"process[" + aProcess->GetProcessName() + "]"<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
// get Process Vector Id
|
||||
G4int ivec = GetProcessVectorId(idDoIt, typeDoIt);
|
||||
|
||||
if (ivec <0 ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0) {
|
||||
G4cerr << aErrorMessage << endl;
|
||||
G4cerr << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cerr << "process[" + aProcess->GetProcessName() + "]"<< endl;
|
||||
G4cerr << " illegal DoIt Index [= " << idDoIt << "]";
|
||||
G4cerr << endl;
|
||||
G4cout << aErrorMessage << endl;
|
||||
G4cout << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cout << "process[" + aProcess->GetProcessName() + "]"<< endl;
|
||||
G4cout << " illegal DoIt Index [= " << idDoIt << "]";
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
} else if (pAttr != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get attribute
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
if (pAttr == 0) {
|
||||
// can not get process attribute
|
||||
return;
|
||||
|
||||
} else {
|
||||
G4int ip = pAttr->idxProcVector[ivec];
|
||||
// remove a process from the process vector
|
||||
if ( ip >=0 ) {
|
||||
RemoveAt(ip, aProcess, ivec);
|
||||
}
|
||||
|
||||
// set ordering parameter to non-zero
|
||||
if (ordDoIt == 0) ordDoIt = 1;
|
||||
pAttr->ordProcVector[ivec-1] = ordDoIt;
|
||||
pAttr->ordProcVector[ivec] = ordDoIt;
|
||||
|
||||
// insert in process vector if ordDoIt >0
|
||||
if (ordDoIt >0) {
|
||||
// find insert position
|
||||
@@ -610,16 +628,17 @@ void G4ProcessManager::SetProcessOrdering(
|
||||
pAttr->idxProcVector[ivec] = ip;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cerr << aErrorMessage << endl;
|
||||
G4cerr << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cerr <<"process[" + aProcess->GetProcessName() + "]"<< endl;
|
||||
G4cerr << aProcess->GetProcessName() << " is inserted at "<< ip;
|
||||
G4cerr << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cerr << " with Ordering parameter = " << ordDoIt ;
|
||||
G4cerr << endl;
|
||||
G4cout << aErrorMessage << endl;
|
||||
G4cout << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cout <<"process[" + aProcess->GetProcessName() + "]"<< endl;
|
||||
G4cout << aProcess->GetProcessName() << " is inserted at "<< ip;
|
||||
G4cout << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cout << " with Ordering parameter = " << ordDoIt ;
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
// create GPIL vectors
|
||||
CreateGPILvectors();
|
||||
@@ -632,38 +651,51 @@ void G4ProcessManager::SetProcessOrderingToFirst(
|
||||
G4ProcessVectorDoItIndex idDoIt
|
||||
)
|
||||
{
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
// get Process Vector Id(
|
||||
G4int ivec = GetProcessVectorId(idDoIt, typeDoIt);
|
||||
if (ivec <0 ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0) {
|
||||
G4cerr << "G4ProcessManager::SetProcessOrdering: ";
|
||||
G4cerr << " illegal DoIt Index [= " << idDoIt << "]";
|
||||
G4cerr << endl;
|
||||
G4cout << "G4ProcessManager::SetProcessOrdering: ";
|
||||
G4cout << " illegal DoIt Index [= " << idDoIt << "]";
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
} else if (pAttr != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get attribute
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
if (pAttr == 0) {
|
||||
return;
|
||||
} else {
|
||||
G4int ip = pAttr->idxProcVector[ivec];
|
||||
|
||||
// remove a process from the process vector
|
||||
if ( ip >=0 ) {
|
||||
RemoveAt(ip, aProcess, ivec);
|
||||
}
|
||||
|
||||
// set ordering parameter to zero
|
||||
pAttr->ordProcVector[ivec] = 0;
|
||||
pAttr->ordProcVector[ivec-1] = 0;
|
||||
|
||||
// insert
|
||||
InsertAt(0, aProcess, ivec);
|
||||
|
||||
// set index in Process Attribute
|
||||
pAttr->idxProcVector[ivec] = 0;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cerr << "G4ProcessManager::SetProcessOrdering: ";
|
||||
G4cerr << aProcess->GetProcessName() << " is inserted at top ";
|
||||
G4cerr << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cerr << endl;
|
||||
G4cout << "G4ProcessManager::SetProcessOrdering: ";
|
||||
G4cout << aProcess->GetProcessName() << " is inserted at top ";
|
||||
G4cout << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// create GPIL vectors
|
||||
CreateGPILvectors();
|
||||
|
||||
@@ -681,9 +713,26 @@ void G4ProcessManager::SetProcessOrderingToLast(
|
||||
// ///////////////////////////////////////
|
||||
G4VProcess* G4ProcessManager::InActivateProcess(G4int index)
|
||||
{
|
||||
G4ApplicationState currentState
|
||||
= G4StateManager::GetStateManager()->GetCurrentState();
|
||||
if ( (currentState == PreInit) || (currentState == Init) ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>1) {
|
||||
G4cout << "G4ProcessManager::InActivateProcess is not valid in ";
|
||||
if (currentState == PreInit ) {
|
||||
G4cout << "PreInit ";
|
||||
} else if (currentState == Init ) {
|
||||
G4cout << "Init ";
|
||||
}
|
||||
G4cout << "state !" << endl;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
//find the process attribute
|
||||
G4ProcessAttribute* pAttr = GetAttribute(index);
|
||||
if (pAttr == NULL) return NULL;
|
||||
if (pAttr == 0) return 0;
|
||||
|
||||
// remove process
|
||||
G4VProcess* pProcess = (*theProcessList)[index];
|
||||
@@ -691,16 +740,18 @@ G4VProcess* G4ProcessManager::InActivateProcess(G4int index)
|
||||
const G4String aErrorMessage(" G4ProcessManager::InactivateProcess():");
|
||||
|
||||
if (pAttr->isActive) {
|
||||
|
||||
// remove process from vectors if the process is active
|
||||
for (G4int i=0; i<SizeOfProcVectorArray; i++) {
|
||||
G4ProcessVector* pVector = theProcVector[i];
|
||||
G4int idx = pAttr->idxProcVector[i];
|
||||
|
||||
if (idx<0) {
|
||||
// corresponding DoIt is not active
|
||||
} else if ((idx >= 0) && (idx < pVector->length())) {
|
||||
//check pointer and set to NULL
|
||||
} else if ((idx >= 0) && (idx < pVector->entries())) {
|
||||
//check pointer and set to 0
|
||||
if ((*pVector)[idx]== pProcess) {
|
||||
(*pVector)[idx]= NULL;
|
||||
(*pVector)[idx]= 0;
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
@@ -712,7 +763,7 @@ G4VProcess* G4ProcessManager::InActivateProcess(G4int index)
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
// idx is out of range
|
||||
@@ -722,21 +773,22 @@ G4VProcess* G4ProcessManager::InActivateProcess(G4int index)
|
||||
G4cerr << "particle["<<theParticleType->GetParticleName()<<"] " ;
|
||||
G4cerr << "process["<<pProcess->GetProcessName()<<"] " ;
|
||||
G4cerr << "index(=" << idx << ") of process vector";
|
||||
G4cerr << "[size:" << pVector->length() << "] out of range" << endl;
|
||||
G4cerr << "[size:" << pVector->entries() << "] out of range" << endl;
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pAttr->isActive = false;
|
||||
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << aErrorMessage;
|
||||
G4cerr << "particle["<<theParticleType->GetParticleName()<<"] " ;
|
||||
G4cerr << "process["<<pProcess->GetProcessName()<<"] " ;
|
||||
G4cerr << "The process is already inactive" << endl;
|
||||
G4cout << aErrorMessage;
|
||||
G4cout << "particle["<<theParticleType->GetParticleName()<<"] " ;
|
||||
G4cout << "process["<<pProcess->GetProcessName()<<"] " ;
|
||||
G4cout << "The process is already inactive" << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -746,9 +798,26 @@ G4VProcess* G4ProcessManager::InActivateProcess(G4int index)
|
||||
// ///////////////////////////////////////
|
||||
G4VProcess* G4ProcessManager::ActivateProcess(G4int index)
|
||||
{
|
||||
G4ApplicationState currentState
|
||||
= G4StateManager::GetStateManager()->GetCurrentState();
|
||||
if ( (currentState == PreInit) || (currentState == Init) ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>1) {
|
||||
G4cout << "G4ProcessManager::ActivateProcess is not valid in ";
|
||||
if (currentState == PreInit ) {
|
||||
G4cout << "PreInit ";
|
||||
} else if (currentState == Init ) {
|
||||
G4cout << "Init ";
|
||||
}
|
||||
G4cout << "state !" << endl;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
//find the process attribute
|
||||
G4ProcessAttribute* pAttr = GetAttribute(index);
|
||||
if (pAttr == NULL) return NULL;
|
||||
if (pAttr == 0) return 0;
|
||||
|
||||
// remove process
|
||||
G4VProcess* pProcess = (*theProcessList)[index];
|
||||
@@ -758,8 +827,8 @@ G4VProcess* G4ProcessManager::ActivateProcess(G4int index)
|
||||
if (pAttr->isActive) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << aErrorMessage << endl;
|
||||
G4cerr << "The process is already active" << endl;
|
||||
G4cout << aErrorMessage << endl;
|
||||
G4cout << "The process is already active" << endl;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
@@ -769,9 +838,9 @@ G4VProcess* G4ProcessManager::ActivateProcess(G4int index)
|
||||
G4int idx = pAttr->idxProcVector[i];
|
||||
if (idx<0) {
|
||||
// corresponding DoIt is not active
|
||||
} else if ((idx >= 0) && (idx < pVector->length())) {
|
||||
} else if ((idx >= 0) && (idx < pVector->entries())) {
|
||||
//check pointer and set
|
||||
if ((*pVector)[idx]== NULL) {
|
||||
if ((*pVector)[idx]== 0) {
|
||||
(*pVector)[idx] = pProcess;
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
@@ -784,7 +853,7 @@ G4VProcess* G4ProcessManager::ActivateProcess(G4int index)
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
// idx is out of range
|
||||
@@ -794,11 +863,11 @@ G4VProcess* G4ProcessManager::ActivateProcess(G4int index)
|
||||
G4cerr << "particle["<<theParticleType->GetParticleName()<<"] " ;
|
||||
G4cerr << "process["<<pProcess->GetProcessName()<<"] " ;
|
||||
G4cerr << "index(=" << idx <<")of process vector";
|
||||
G4cerr << "[size:" << pVector->length() << "] out of range" << endl;
|
||||
G4cerr << "[size:" << pVector->entries() << "] out of range" << endl;
|
||||
}
|
||||
#endif
|
||||
G4Exception((const char*)aErrorMessage);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pAttr->isActive = true;
|
||||
@@ -830,7 +899,7 @@ void G4ProcessManager::DumpInfo()
|
||||
delete aMessage;
|
||||
|
||||
// loop over all processes
|
||||
for (G4int idx=0; idx <theProcessList->length(); idx++){
|
||||
for (G4int idx=0; idx <theProcessList->entries(); idx++){
|
||||
// process name/type
|
||||
G4cout << "[" << idx << "]";
|
||||
G4cout << "=== process[" << ((*theProcessList)(idx))->GetProcessName()<< " :";
|
||||
@@ -838,7 +907,7 @@ void G4ProcessManager::DumpInfo()
|
||||
|
||||
// process attribute
|
||||
G4ProcessAttribute* pAttr = (*theAttrVector)(idx);
|
||||
// staus
|
||||
// status
|
||||
if ( pAttr-> isActive ) {
|
||||
G4cout << " Active ";
|
||||
} else {
|
||||
@@ -875,11 +944,12 @@ void G4ProcessManager::CreateGPILvectors()
|
||||
{
|
||||
//-- create GetPhysicalInteractionLength process vectors just as the inverse
|
||||
//-- order of DoIt process vector
|
||||
for(G4int k=0; k<theProcessList->length(); k++) {
|
||||
for(G4int k=0; k<theProcessList->entries(); k++) {
|
||||
GetAttribute((*theProcessList)(k))->idxProcVector[0]=-1;
|
||||
GetAttribute((*theProcessList)(k))->idxProcVector[2]=-1;
|
||||
GetAttribute((*theProcessList)(k))->idxProcVector[4]=-1;
|
||||
}
|
||||
|
||||
for(G4int i=0; i<SizeOfProcVectorArray; i += 2) {
|
||||
G4ProcessVector* procGPIL = theProcVector[i];
|
||||
G4ProcessVector* procDoIt = theProcVector[i+1];
|
||||
@@ -891,6 +961,7 @@ void G4ProcessManager::CreateGPILvectors()
|
||||
GetAttribute(aProc)->idxProcVector[i] = procGPIL->entries()-1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -901,7 +972,7 @@ void G4ProcessManager::CreateGPILvectors()
|
||||
//////////////////////////////////////////
|
||||
void G4ProcessManager::StartTracking()
|
||||
{
|
||||
for (G4int idx = 0; idx<theProcessList->length(); idx++){
|
||||
for (G4int idx = 0; idx<theProcessList->entries(); idx++){
|
||||
if (GetAttribute(idx)->isActive)
|
||||
((*theProcessList)[idx])->StartTracking();
|
||||
}
|
||||
@@ -911,7 +982,7 @@ void G4ProcessManager::StartTracking()
|
||||
/////////////////////////////////////////////
|
||||
void G4ProcessManager::EndTracking()
|
||||
{
|
||||
for (G4int idx = 0; idx<theProcessList->length(); idx++){
|
||||
for (G4int idx = 0; idx<theProcessList->entries(); idx++){
|
||||
if (GetAttribute(idx)->isActive)
|
||||
((*theProcessList)[idx])->EndTracking();
|
||||
}
|
||||
@@ -933,3 +1004,40 @@ void G4ProcessManager::EndTracking()
|
||||
if (fActive) return ActivateProcess(index);
|
||||
else return InActivateProcess(index);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
G4bool G4ProcessManager::GetProcessActivation(G4VProcess *aProcess) const
|
||||
{
|
||||
return GetProcessActivation(GetProcessIndex(aProcess));
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
G4bool G4ProcessManager::GetProcessActivation(G4int index) const
|
||||
{
|
||||
if (index <0) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cout << "G4ProcessManager::GetProcessActivation ";
|
||||
G4cout << " process (or its index) not found ";
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
// process attribute
|
||||
G4ProcessAttribute* pAttr = (*theAttrVector)(index);
|
||||
// status
|
||||
return pAttr-> isActive;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.cc,v 2.4 1998/07/17 06:20:06 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessManagerMessenger.cc,v 1.3 1999/06/17 09:02:14 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -46,12 +46,12 @@
|
||||
|
||||
G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
:theParticleTable(pTable),
|
||||
currentParticle(NULL),
|
||||
currentProcess(NULL),
|
||||
theManager(NULL),
|
||||
theProcessList(NULL)
|
||||
currentParticle(0),
|
||||
currentProcess(0),
|
||||
theManager(0),
|
||||
theProcessList(0)
|
||||
{
|
||||
if ( theParticleTable == NULL) theParticleTable = G4ParticleTable::GetParticleTable();
|
||||
if ( theParticleTable == 0) theParticleTable = G4ParticleTable::GetParticleTable();
|
||||
|
||||
//Commnad /particle/process
|
||||
thisDirectory = new G4UIdirectory("/particle/process/");
|
||||
@@ -76,6 +76,7 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
param = new G4UIparameter("index",'i',true);
|
||||
param->SetDefaultValue(-1);
|
||||
verboseCmd->SetParameter(param);
|
||||
verboseCmd->AvailableForStates(PreInit,Init,Idle,GeomClosed,EventProc);
|
||||
|
||||
//Commnad /particle/process/Activate
|
||||
activateCmd = new G4UIcmdWithAnInteger("/particle/process/activate",this);
|
||||
@@ -84,6 +85,7 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
activateCmd->SetParameterName("index", false);
|
||||
activateCmd->SetDefaultValue(0);
|
||||
activateCmd->SetRange("index >=0");
|
||||
activateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
|
||||
//Commnad /particle/process/inactivate
|
||||
inactivateCmd = new G4UIcmdWithAnInteger("/particle/process/inactivate",this);
|
||||
@@ -92,6 +94,8 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
inactivateCmd->SetParameterName("index", false);
|
||||
inactivateCmd->SetDefaultValue(0);
|
||||
inactivateCmd->SetRange("index >=0");
|
||||
inactivateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
|
||||
}
|
||||
|
||||
G4ProcessManagerMessenger::~G4ProcessManagerMessenger()
|
||||
@@ -110,8 +114,8 @@ G4ParticleDefinition* G4ProcessManagerMessenger::SetCurrentParticle()
|
||||
G4String particleName = G4UImanager::GetUIpointer()->GetCurrentStringValue("/particle/select");
|
||||
|
||||
currentParticle = theParticleTable->FindParticle(particleName);
|
||||
if (currentParticle == NULL) {
|
||||
theManager = NULL;
|
||||
if (currentParticle == 0) {
|
||||
theManager = 0;
|
||||
G4cout << "G4ProcessManagerMessenger::SetCurrentParticle() ";
|
||||
G4cout << particleName << " not found " << endl;
|
||||
} else {
|
||||
@@ -123,7 +127,7 @@ G4ParticleDefinition* G4ProcessManagerMessenger::SetCurrentParticle()
|
||||
|
||||
void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
{
|
||||
if (SetCurrentParticle()==NULL) {
|
||||
if (SetCurrentParticle()==0) {
|
||||
G4cout << "Particle is not selected yet !! Command ignored." << endl;
|
||||
return;
|
||||
}
|
||||
@@ -134,7 +138,7 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
theManager->DumpInfo();
|
||||
} else if ( index < theManager->GetProcessListLength()){
|
||||
currentProcess = (*theProcessList)(index);
|
||||
if (currentProcess == NULL) {
|
||||
if (currentProcess == 0) {
|
||||
G4cout << " no process at index of " << index;
|
||||
G4cout << "in the Process Vector" << endl;
|
||||
} else {
|
||||
@@ -142,7 +146,7 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
}
|
||||
} else {
|
||||
G4cout << " illegal index !!! " << endl;
|
||||
currentProcess = NULL;
|
||||
currentProcess = 0;
|
||||
}
|
||||
|
||||
} else if( command==activateCmd ) {
|
||||
@@ -155,7 +159,7 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
} else if( command==verboseCmd ) {
|
||||
//Commnad /particle/process/Verbose
|
||||
// inputstream for newValues
|
||||
const char* temp = newValue;
|
||||
const char* temp = (const char*)(newValue);
|
||||
istrstream is((char*)temp);
|
||||
G4int Verbose, index;
|
||||
is >>Verbose >>index;
|
||||
@@ -164,7 +168,7 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
|
||||
} else if ( index < theManager->GetProcessListLength()){
|
||||
currentProcess = (*theProcessList)(index);
|
||||
if (currentProcess == NULL) {
|
||||
if (currentProcess == 0) {
|
||||
G4cout << " no process at index of " << index;
|
||||
G4cout << "in the Process Vector" << endl;
|
||||
} else {
|
||||
@@ -172,7 +176,7 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
}
|
||||
} else {
|
||||
G4cout << " illegal index !!! " << endl;
|
||||
currentProcess = NULL;
|
||||
currentProcess = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,7 +185,7 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
G4String G4ProcessManagerMessenger::GetCurrentValue(G4UIcommand * command)
|
||||
{
|
||||
G4String returnValue('\0');
|
||||
if(SetCurrentParticle() == NULL) {
|
||||
if(SetCurrentParticle() == 0) {
|
||||
// no particle is selected. return null strings
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTable.cc,v 2.5 1998/09/14 12:02:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessTable.cc,v 1.3 1999/04/14 10:50:45 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -26,13 +26,13 @@ G4ProcessTable::G4ProcessTable():verboseLevel(1)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "-- G4ProcessTable constructor --" << endl;
|
||||
G4cout << "-- G4ProcessTable constructor --" << endl;
|
||||
}
|
||||
#endif
|
||||
fProcTblVector = new G4ProcTableVector();
|
||||
fProcNameVector = new G4ProcNameVector();
|
||||
tmpTblVector = new G4ProcTableVector();
|
||||
fProcTblMessenger = NULL;
|
||||
fProcTblMessenger = 0;
|
||||
}
|
||||
|
||||
// copy constructor //////////////////////////
|
||||
@@ -40,7 +40,7 @@ G4ProcessTable::G4ProcessTable(const G4ProcessTable &right)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "-- G4ProcessTable copy constructor --" << endl;
|
||||
G4cout << "-- G4ProcessTable copy constructor --" << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -50,7 +50,7 @@ G4ProcessTable::~G4ProcessTable()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "-- G4ProcessTable destructor --" << endl;
|
||||
G4cout << "-- G4ProcessTable destructor --" << endl;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -59,15 +59,15 @@ G4ProcessTable::~G4ProcessTable()
|
||||
delete ((*fProcTblVector)(idxTbl))->GetProcess();
|
||||
}
|
||||
|
||||
if ( tmpTblVector != NULL) {
|
||||
if ( tmpTblVector != 0) {
|
||||
tmpTblVector ->clear();
|
||||
delete tmpTblVector;
|
||||
}
|
||||
if ( fProcTblVector != NULL) {
|
||||
if ( fProcTblVector != 0) {
|
||||
fProcTblVector ->clearAndDestroy();
|
||||
delete fProcTblVector;
|
||||
}
|
||||
if ( fProcNameVector != NULL) {
|
||||
if ( fProcNameVector != 0) {
|
||||
fProcNameVector ->clear();
|
||||
delete fProcNameVector;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ G4ProcessTable::~G4ProcessTable()
|
||||
/////////////////////////
|
||||
G4UImessenger* G4ProcessTable::CreateMessenger()
|
||||
{
|
||||
if (fProcTblMessenger == NULL) {
|
||||
if (fProcTblMessenger == 0) {
|
||||
fProcTblMessenger = new G4ProcessTableMessenger(this);
|
||||
}
|
||||
return fProcTblMessenger;
|
||||
@@ -85,7 +85,7 @@ G4UImessenger* G4ProcessTable::CreateMessenger()
|
||||
/////////////////////////
|
||||
void G4ProcessTable::DeleteMessenger()
|
||||
{
|
||||
if (fProcTblMessenger != NULL) {
|
||||
if (fProcTblMessenger != 0) {
|
||||
delete fProcTblMessenger;
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,11 @@ G4ProcessTable & G4ProcessTable::operator=(const G4ProcessTable &right)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "-- G4ProcessTable assignment operator --" << endl;
|
||||
G4cout << "-- G4ProcessTable assignment operator --" << endl;
|
||||
}
|
||||
#endif
|
||||
return *this;
|
||||
if (&right == this) return *this;
|
||||
else return *this;
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
@@ -132,10 +133,10 @@ G4ProcessTable* G4ProcessTable::GetProcessTable()
|
||||
G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
G4ProcessManager* aProcMgr)
|
||||
{
|
||||
if ( (aProcess == NULL) || ( aProcMgr == NULL ) ){
|
||||
if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "G4ProcessTable::Insert : arguments are NULL pointer "<<endl;
|
||||
G4cout << "G4ProcessTable::Insert : arguments are 0 pointer "<<endl;
|
||||
}
|
||||
#endif
|
||||
return -1;
|
||||
@@ -143,10 +144,10 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "G4ProcessTable::Insert ";
|
||||
G4cerr << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cerr << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]";
|
||||
G4cerr << endl;
|
||||
G4cout << "G4ProcessTable::Insert ";
|
||||
G4cout << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cout << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]";
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -162,8 +163,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
isFoundInTbl = true;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process has been already registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process has been already registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
//
|
||||
@@ -174,8 +174,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
isFound = true;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " This Process Manager has been already registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process Manager has been already registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
@@ -186,8 +185,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
anElement->Insert(aProcMgr);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process Manager is registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process Manager is registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -205,8 +203,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process is registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process is registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -217,10 +214,10 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
G4ProcessManager* aProcMgr)
|
||||
{
|
||||
if ( (aProcess == NULL) || ( aProcMgr == NULL ) ){
|
||||
if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "G4ProcessTable::Remove : arguments are NULL pointer "<<endl;
|
||||
G4cout << "G4ProcessTable::Remove : arguments are 0 pointer "<< endl;
|
||||
}
|
||||
#endif
|
||||
return -1;
|
||||
@@ -228,10 +225,9 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "G4ProcessTable::Remove ";
|
||||
G4cerr << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cerr << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]";
|
||||
G4cerr << endl;
|
||||
G4cout << "G4ProcessTable::Remove ";
|
||||
G4cout << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cout << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -259,8 +255,7 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
anElement->Remove(aProcMgr);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process Manager is removed !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process Manager is removed !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -286,8 +281,7 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " This Process is removed !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process is removed !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -295,8 +289,7 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << " This Process is not registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process is not registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -324,15 +317,14 @@ G4VProcess* G4ProcessTable::FindProcess(const G4String& processName,
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (!isFound && verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::FindProcess :" ;
|
||||
G4cerr << " The Process[" << processName << "] is not found ";
|
||||
G4cerr << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cerr << endl;
|
||||
G4cout << " G4ProcessTable::FindProcess :" ;
|
||||
G4cout << " The Process[" << processName << "] is not found ";
|
||||
G4cout << " for " << processManager->GetParticleType()->GetParticleName() << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (isFound) return anElement->GetProcess();
|
||||
else return NULL;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
///////////////
|
||||
@@ -356,9 +348,8 @@ G4ProcessTable::G4ProcTableVector* G4ProcessTable::Find(
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (!isFound && verboseLevel>0){
|
||||
G4cerr << " G4ProcessTable::Find :" ;
|
||||
G4cerr << " The Process[" << processName << "] is not found ";
|
||||
G4cerr << endl;
|
||||
G4cout << " G4ProcessTable::Find :" ;
|
||||
G4cout << " The Process[" << processName << "] is not found " << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -386,9 +377,8 @@ G4ProcessTable::G4ProcTableVector* G4ProcessTable::Find(
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (!isFound && verboseLevel>0){
|
||||
G4cerr << " G4ProcessTable::Find :" ;
|
||||
G4cerr << " The Process[" << anElement->GetProcessName() << "] is not found ";
|
||||
G4cerr << endl;
|
||||
G4cout << " G4ProcessTable::Find :" ;
|
||||
G4cout << " The Process[" << anElement->GetProcessName() << "] is not found " << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -441,8 +431,8 @@ void G4ProcessTable::SetProcessActivation( const G4String& processName,
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The Process[" << processName << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The Process[" << processName << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -457,9 +447,9 @@ void G4ProcessTable::SetProcessActivation( const G4String& processName,
|
||||
manager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << manager->GetProcessIndex(process);
|
||||
G4cerr << endl;
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << manager->GetProcessIndex(process);
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -474,19 +464,18 @@ void G4ProcessTable::SetProcessActivation(
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The Process[" << processName << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The Process[" << processName << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
G4VProcess* process = FindProcess( processName, processManager);
|
||||
if ( process != NULL) {
|
||||
if ( process != 0) {
|
||||
processManager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << processManager->GetProcessIndex(process);
|
||||
G4cerr << endl;
|
||||
G4cout << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << processManager->GetProcessIndex(process) << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -499,8 +488,8 @@ void G4ProcessTable::SetProcessActivation( G4ProcessType processType,
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The ProcessType[" << processType << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The ProcessType[" << processType << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -512,7 +501,7 @@ void G4ProcessTable::SetProcessActivation( G4ProcessType processType,
|
||||
G4VProcess* process = anElement->GetProcess();
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
G4cout << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
for (G4int idx = 0 ; idx < anElement->Length(); idx++) {
|
||||
@@ -520,9 +509,8 @@ void G4ProcessTable::SetProcessActivation( G4ProcessType processType,
|
||||
manager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << manager->GetProcessIndex(process);
|
||||
G4cerr << endl;
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << manager->GetProcessIndex(process) << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -537,8 +525,8 @@ void G4ProcessTable::SetProcessActivation(
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The ProcessType[" << processType << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The ProcessType[" << processType << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -549,10 +537,9 @@ void G4ProcessTable::SetProcessActivation(
|
||||
processManager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
G4cerr << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << idx;
|
||||
G4cerr << endl;
|
||||
G4cout << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
G4cout << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << idx << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -573,7 +560,7 @@ void G4ProcessTable::DumpInfo(G4VProcess* process,
|
||||
for (idxTbl =0; idxTbl <fProcTblVector->length(); idxTbl++){
|
||||
anElement = (*fProcTblVector)(idxTbl);
|
||||
if (process == anElement->GetProcess() ){
|
||||
if (particle==NULL) {
|
||||
if (particle==0) {
|
||||
isFoundInTbl = true;
|
||||
break;
|
||||
} else {
|
||||
@@ -593,7 +580,7 @@ void G4ProcessTable::DumpInfo(G4VProcess* process,
|
||||
process->SetVerboseLevel(verboseLevel);
|
||||
process->DumpInfo();
|
||||
process->SetVerboseLevel(tmpVerbose);
|
||||
if (particle==NULL) {
|
||||
if (particle==0) {
|
||||
for (idx=0; idx<anElement->Length(); idx++){
|
||||
manager = anElement->GetProcessManager(idx);
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.cc,v 2.3 1998/08/17 03:35:44 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessTableMessenger.cc,v 1.3 1999/06/17 09:02:15 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -51,12 +51,11 @@ G4int G4ProcessTableMessenger::NumberOfProcessType = 10;
|
||||
|
||||
//////////////////////////
|
||||
G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
:theProcessTable(pTable)
|
||||
{
|
||||
currentProcessTypeName = "all";
|
||||
currentProcessName = "all";
|
||||
currentParticleName = "all";
|
||||
|
||||
:theProcessTable(pTable),
|
||||
currentProcessTypeName("all"),
|
||||
currentProcessName("all"),
|
||||
currentParticleName("all")
|
||||
{
|
||||
//Commnad /particle/process
|
||||
thisDirectory = new G4UIdirectory("/process/");
|
||||
thisDirectory->SetGuidance("Process Table control commands.");
|
||||
@@ -71,12 +70,12 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
listCmd->SetDefaultValue("all");
|
||||
SetNumberOfProcessType();
|
||||
|
||||
G4String candidates = "all";
|
||||
G4String candidates("all");
|
||||
for (G4int idx = 0; idx < NumberOfProcessType ; idx ++ ) {
|
||||
candidates += " " +
|
||||
G4VProcess::GetProcessTypeName(G4ProcessType(idx));
|
||||
}
|
||||
listCmd->SetCandidates(candidates);
|
||||
listCmd->SetCandidates((const char*)(candidates));
|
||||
|
||||
//Commnad /particle/process/Verbose
|
||||
verboseCmd = new G4UIcmdWithAnInteger("/process/verbose",this);
|
||||
@@ -86,6 +85,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
verboseCmd->SetParameterName("verbose", true);
|
||||
verboseCmd->SetDefaultValue(1);
|
||||
verboseCmd->SetRange("verbose >=0");
|
||||
verboseCmd->AvailableForStates(PreInit,Init,Idle,GeomClosed,EventProc);
|
||||
|
||||
//Commnad /particle/process/dump
|
||||
dumpCmd = new G4UIcommand("/process/dump",this);
|
||||
@@ -98,6 +98,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
dumpCmd->SetParameter(param);
|
||||
dumpCmd->AvailableForStates(Init,Idle,GeomClosed,EventProc);
|
||||
|
||||
//Commnad /particle/process/activate
|
||||
activateCmd = new G4UIcommand("/process/activate",this);
|
||||
@@ -110,6 +111,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
activateCmd->SetParameter(param);
|
||||
activateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
|
||||
//Commnad /particle/process/inactivate
|
||||
inactivateCmd = new G4UIcommand("/process/inactivate",this);
|
||||
@@ -123,6 +125,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
inactivateCmd->SetParameter(param);
|
||||
inactivateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
}
|
||||
|
||||
//////////////////
|
||||
@@ -186,7 +189,7 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
RWCTokenizer next( newValue );
|
||||
|
||||
// check 1st argument
|
||||
currentProcessName = next();
|
||||
currentProcessName = G4String(next());
|
||||
G4bool isNameFound = false;
|
||||
G4bool isProcName = false;
|
||||
if ( procNameVector->contains(currentProcessName) ){
|
||||
@@ -205,9 +208,9 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
}
|
||||
|
||||
// check 2nd argument
|
||||
currentParticleName = next();
|
||||
currentParticleName = G4String(next());
|
||||
G4bool isParticleFound = false;
|
||||
G4ParticleDefinition* currentParticle = NULL;
|
||||
G4ParticleDefinition* currentParticle = 0;
|
||||
if ( currentParticleName == "all" ) {
|
||||
isParticleFound = true;
|
||||
|
||||
@@ -243,7 +246,7 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
// process/activate , inactivate
|
||||
G4bool fActive = (command==activateCmd);
|
||||
if (isProcName) {
|
||||
if ( currentParticle == NULL ) {
|
||||
if ( currentParticle == 0 ) {
|
||||
theProcessTable->SetProcessActivation(currentProcessName,
|
||||
fActive);
|
||||
} else {
|
||||
@@ -252,7 +255,7 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
fActive);
|
||||
}
|
||||
} else {
|
||||
if ( currentParticle == NULL ) {
|
||||
if ( currentParticle == 0 ) {
|
||||
theProcessTable->SetProcessActivation(G4ProcessType(type),
|
||||
fActive);
|
||||
} else {
|
||||
@@ -294,7 +297,7 @@ G4String G4ProcessTableMessenger::GetCurrentValue(G4UIcommand * command)
|
||||
candidates += " " +
|
||||
G4VProcess::GetProcessTypeName(G4ProcessType(idx));
|
||||
}
|
||||
listCmd->SetCandidates(candidates);
|
||||
listCmd->SetCandidates((const char*)(candidates));
|
||||
returnValue = currentProcessTypeName;
|
||||
|
||||
} else {
|
||||
@@ -305,7 +308,7 @@ G4String G4ProcessTableMessenger::GetCurrentValue(G4UIcommand * command)
|
||||
for (idx = 0; idx < procNameVector->length() ; idx ++ ) {
|
||||
candidates += " " + (*procNameVector)(idx);
|
||||
}
|
||||
param->SetParameterCandidates(candidates);
|
||||
param->SetParameterCandidates((const char*)(candidates));
|
||||
// particle name
|
||||
param = command->GetParameter(1);
|
||||
candidates = "all";
|
||||
@@ -316,7 +319,7 @@ G4String G4ProcessTableMessenger::GetCurrentValue(G4UIcommand * command)
|
||||
G4ParticleDefinition *particle = piter->value();
|
||||
candidates += " " + particle->GetParticleName();
|
||||
}
|
||||
param->SetParameterCandidates(candidates);
|
||||
param->SetParameterCandidates((const char*)(candidates));
|
||||
|
||||
returnValue = currentProcessName + " " + currentParticleName;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VContinuousDiscreteProcess.cc,v 2.0 1998/07/02 16:39:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VContinuousDiscreteProcess.cc,v 1.1 1999/01/07 16:13:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VContinuousProcess.cc,v 2.0 1998/07/02 16:39:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VContinuousProcess.cc,v 1.1 1999/01/07 16:13:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VDiscreteProcess.cc,v 2.0 1998/07/02 16:39:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VDiscreteProcess.cc,v 1.1 1999/01/07 16:13:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VProcess.cc,v 2.5 1998/08/16 02:36:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VProcess.cc,v 1.3 1999/04/14 10:50:46 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -28,15 +28,10 @@
|
||||
#include "G4ElementVector.hh"
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
//G4VProcess::G4VProcess()
|
||||
//{
|
||||
// G4Exception("G4VProcess:: default constructor is called");
|
||||
//}
|
||||
|
||||
G4VProcess::G4VProcess(const G4String& aName, G4ProcessType aType )
|
||||
: theProcessName(aName),
|
||||
theProcessType(aType),
|
||||
pParticleChange(NULL),
|
||||
pParticleChange(0),
|
||||
theNumberOfInteractionLengthLeft(-1.0),
|
||||
currentInteractionLength(-1.0),
|
||||
verboseLevel(0)
|
||||
@@ -49,7 +44,7 @@ G4VProcess::~G4VProcess()
|
||||
}
|
||||
|
||||
G4VProcess::G4VProcess(G4VProcess& right):
|
||||
pParticleChange(NULL),
|
||||
pParticleChange(0),
|
||||
theProcessName(right.theProcessName),
|
||||
theProcessType(right.theProcessType),
|
||||
theNumberOfInteractionLengthLeft(-1.0),
|
||||
@@ -83,7 +78,7 @@ void G4VProcess::StartTracking()
|
||||
theNumberOfInteractionLengthLeft = -1.0;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cerr << "G4VProcess::StartTracking() [" << theProcessName << "]" <<endl;
|
||||
G4cout << "G4VProcess::StartTracking() [" << theProcessName << "]" <<endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -92,7 +87,7 @@ void G4VProcess::EndTracking()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cerr << "G4VProcess::EndTracking() [" << theProcessName << "]" <<endl;
|
||||
G4cout << "G4VProcess::EndTracking() [" << theProcessName << "]" <<endl;
|
||||
}
|
||||
#endif
|
||||
theNumberOfInteractionLengthLeft = -1.0;
|
||||
@@ -100,30 +95,42 @@ void G4VProcess::EndTracking()
|
||||
}
|
||||
|
||||
|
||||
G4String G4VProcess::GetProcessTypeName(G4ProcessType aType )
|
||||
const G4String& G4VProcess::GetProcessTypeName(G4ProcessType aType )
|
||||
{
|
||||
static G4String typeNotDefined= "NotDefined";
|
||||
static G4String typeTransportation = "Transportation";
|
||||
static G4String typeElectromagnetic = "Electromagnetic";
|
||||
static G4String typeOptical = "Optical";
|
||||
static G4String typeHadronic = "Hadronic";
|
||||
static G4String typePhotolepton_hadron = "Photolepton_hadron";
|
||||
static G4String typeDecay = "Decay";
|
||||
static G4String typeGeneral = "General";
|
||||
static G4String typeParameterisation = "Parameterisation";
|
||||
static G4String typeUserDefined = "UserDefined";
|
||||
static G4String noType = "------"; // Do not modify this !!!!
|
||||
|
||||
if (aType == fNotDefined) {
|
||||
return "NotDefined";
|
||||
return typeNotDefined;
|
||||
} else if (aType == fTransportation ) {
|
||||
return "Transportation";
|
||||
return typeTransportation;
|
||||
} else if (aType == fElectromagnetic ) {
|
||||
return "Electromagnetic";
|
||||
return typeElectromagnetic;
|
||||
} else if (aType == fOptical ) {
|
||||
return "Optical";
|
||||
return typeOptical;
|
||||
} else if (aType == fHadronic ) {
|
||||
return "Hadronic";
|
||||
return typeHadronic;
|
||||
} else if (aType == fPhotolepton_hadron ) {
|
||||
return "Photolepton_hadron";
|
||||
return typePhotolepton_hadron;
|
||||
} else if (aType == fDecay ) {
|
||||
return "Decay";
|
||||
return typeDecay;
|
||||
} else if (aType == fGeneral ) {
|
||||
return "General";
|
||||
return typeGeneral;
|
||||
} else if (aType == fParameterisation ) {
|
||||
return "Parameterisation";
|
||||
return typeParameterisation;
|
||||
} else if (aType == fUserDefined ) {
|
||||
return "UserDefined";
|
||||
return typeUserDefined;
|
||||
} else {
|
||||
return "------"; // Do not modify this end mark !!!!
|
||||
return noType;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,12 +142,12 @@ G4VProcess & G4VProcess::operator=(const G4VProcess &)
|
||||
|
||||
G4int G4VProcess::operator==(const G4VProcess &right) const
|
||||
{
|
||||
return (this == (G4VProcess *) &right);
|
||||
return (this == &right);
|
||||
}
|
||||
|
||||
G4int G4VProcess::operator!=(const G4VProcess &right) const
|
||||
{
|
||||
return (this != (G4VProcess *) &right);
|
||||
return (this != &right);
|
||||
}
|
||||
|
||||
void G4VProcess::DumpInfo() const
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestContinuousDiscreteProcess.cc,v 2.0 1998/07/02 16:39:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestContinuousDiscreteProcess.cc,v 1.1 1999/01/07 16:14:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestContinuousProcess.cc,v 2.0 1998/07/02 16:39:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestContinuousProcess.cc,v 1.1 1999/01/07 16:14:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestDiscreteProcess.cc,v 2.0 1998/07/02 16:40:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestDiscreteProcess.cc,v 1.1 1999/01/07 16:14:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestProcess.cc,v 2.0 1998/07/02 16:40:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRestProcess.cc,v 1.1 1999/01/07 16:14:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user