00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "BaBar.hh"
00026 #include "BgsGentleGenocide.hh"
00027
00028
00029
00030
00031
00032 BgsGentleGenocide::BgsGentleGenocide( G4double theMaxKineticEnergy,
00033 G4int theMinNumberSteps,
00034 const G4String &name,
00035 G4ProcessType type )
00036 : BgsGenocide( name, type ),
00037 maxKineticEnergy(theMaxKineticEnergy),
00038 minNumberSteps(theMinNumberSteps)
00039 {;}
00040
00041
00042
00043
00044
00045 BgsGentleGenocide::~BgsGentleGenocide() {;}
00046
00047
00048
00049
00050
00051 G4double BgsGentleGenocide::PostStepGetPhysicalInteractionLength(
00052 const G4Track& track,
00053 G4double previousStepSize,
00054 G4ForceCondition* condition )
00055 {
00056 *condition = NotForced;
00057
00058
00059
00060
00061 if (track.GetCurrentStepNumber() < minNumberSteps) return DBL_MAX;
00062
00063
00064
00065
00066 const G4DynamicParticle *particle = track.GetDynamicParticle();
00067
00068 if (particle->GetKineticEnergy() > maxKineticEnergy) return DBL_MAX;
00069
00070
00071
00072
00073
00074
00075 const G4VProcess *creator = track.GetCreatorProcess();
00076 G4String creatorProcessName = "(none?)";
00077 if (creator) creatorProcessName = creator->GetProcessName();
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 *condition = NotForced;
00094 return 0;
00095 }
00096