CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
BgsGentleGenocide Class Reference

#include <BgsGentleGenocide.hh>

+ Inheritance diagram for BgsGentleGenocide:

Public Member Functions

 BgsGentleGenocide (G4double theMaxKineticEnergy, G4int theMinNumberSteps, const G4String &name="BgsGentleGenocide", G4ProcessType type=fUserDefined)
 
virtual ~BgsGentleGenocide ()
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
- Public Member Functions inherited from BgsGenocide
 BgsGenocide (const G4String &name="BgsGenocide", G4ProcessType type=fUserDefined)
 
virtual ~BgsGenocide ()
 
virtual G4VParticleChange * PostStepDoIt (const G4Track &track, const G4Step &step)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety, G4GPILSelection *selection)
 
virtual G4VParticleChange * AlongStepDoIt (const G4Track &track, const G4Step &step)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *force)
 
virtual G4VParticleChange * AtRestDoIt (const G4Track &track, const G4Step &step)
 

Protected Attributes

G4double maxKineticEnergy
 
G4int minNumberSteps
 

Detailed Description

Definition at line 30 of file BgsGentleGenocide.hh.

Constructor & Destructor Documentation

◆ BgsGentleGenocide()

BgsGentleGenocide::BgsGentleGenocide ( G4double theMaxKineticEnergy,
G4int theMinNumberSteps,
const G4String & name = "BgsGentleGenocide",
G4ProcessType type = fUserDefined )

Definition at line 32 of file BgsGentleGenocide.cc.

36 : BgsGenocide( name, type ),
37 maxKineticEnergy(theMaxKineticEnergy),
38 minNumberSteps(theMinNumberSteps)
39{;}
BgsGenocide(const G4String &name="BgsGenocide", G4ProcessType type=fUserDefined)
Definition BgsGenocide.cc:7

◆ ~BgsGentleGenocide()

BgsGentleGenocide::~BgsGentleGenocide ( )
virtual

Definition at line 45 of file BgsGentleGenocide.cc.

45{;}

Member Function Documentation

◆ PostStepGetPhysicalInteractionLength()

G4double BgsGentleGenocide::PostStepGetPhysicalInteractionLength ( const G4Track & track,
G4double previousStepSize,
G4ForceCondition * condition )
virtual

Reimplemented from BgsGenocide.

Definition at line 51 of file BgsGentleGenocide.cc.

55{
56 *condition = NotForced;
57
58 //
59 // Do nothing if we haven't reached the minimum number of steps
60 //
61 if (track.GetCurrentStepNumber() < minNumberSteps) return DBL_MAX;
62
63 //
64 // Do nothing if we are above the threshold kinetic energy
65 //
66 const G4DynamicParticle *particle = track.GetDynamicParticle();
67
68 if (particle->GetKineticEnergy() > maxKineticEnergy) return DBL_MAX;
69
70 //
71 // Die!
72 //
73 // const G4ThreeVector &pos = track.GetPosition();
74
75 const G4VProcess *creator = track.GetCreatorProcess();
76 G4String creatorProcessName = "(none?)";
77 if (creator) creatorProcessName = creator->GetProcessName();
78
79 /*
80 G4cout << "BgsGentleGenocide: rogue "
81 << particle->GetDefinition()->GetParticleName()
82 << " terminated, created by "
83 << creatorProcessName << G4endl;
84
85 G4cout << " KE = "
86 << particle->GetKineticEnergy()/keV << " keV, "
87 << " global coords (cm): ("
88 << pos.x()/cm << ","
89 << pos.y()/cm << ","
90 << pos.z()/cm << ")" << G4endl;
91 */
92
93 *condition = NotForced;
94 return 0;
95}
#define DBL_MAX
Definition KalFitAlg.h:13

Member Data Documentation

◆ maxKineticEnergy

G4double BgsGentleGenocide::maxKineticEnergy
protected

Definition at line 47 of file BgsGentleGenocide.hh.

Referenced by PostStepGetPhysicalInteractionLength().

◆ minNumberSteps

G4int BgsGentleGenocide::minNumberSteps
protected

Definition at line 48 of file BgsGentleGenocide.hh.

Referenced by PostStepGetPhysicalInteractionLength().


The documentation for this class was generated from the following files: