ACTARSim
ACTAR TPC Simulation Reference Guide
G4StepLimiterPerRegion.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * DISCLAIMER *
4 // * *
5 // * The following disclaimer summarizes all the specific disclaimers *
6 // * of contributors to this software. The specific disclaimers,which *
7 // * govern, are listed with their locations in: *
8 // * http://cern.ch/geant4/license *
9 // * *
10 // * Neither the authors of this software system, nor their employing *
11 // * institutes,nor the agencies providing financial support for this *
12 // * work make any representation or warranty, express or implied, *
13 // * regarding this software system or assume any liability for its *
14 // * use. *
15 // * *
16 // * This code implementation is the intellectual property of the *
17 // * GEANT4 collaboration. *
18 // * By copying, distributing or modifying the Program (or any work *
19 // * based on the Program) you indicate your acceptance of this *
20 // * statement, and all its terms. *
21 // ********************************************************************
22 //
23 // $Id: G4StepLimiterPerRegion.cc,v 1.1 2004/12/13 16:38:56 gcosmo Exp $
24 // GEANT4 tag $Name: geant4-08-00-patch-01 $
25 //
26 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
27 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
28 
31 #include "G4VPhysicalVolume.hh"
32 
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
36  : G4VDiscreteProcess(processName),
37  MaxChargedStep(DBL_MAX)
38 {
39  pMess = new G4StepLimiterMessenger(this);
40 }
41 
42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
45 {
46  delete pMess;
47 }
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
51 G4bool G4StepLimiterPerRegion::IsApplicable(const G4ParticleDefinition& particle)
52 {
53  return (particle.GetPDGCharge() != 0. && !(particle.IsShortLived()));
54 }
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57 
59 {
60  MaxChargedStep = step;
61 }
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64 
66  const G4Track&,
67  G4double,
68  G4ForceCondition* condition )
69 {
70  // condition is set to "Not Forced"
71  *condition = NotForced;
73 
74  return ProposedStep;
75 }
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
78 
79 G4VParticleChange* G4StepLimiterPerRegion::PostStepDoIt(const G4Track& aTrack, const G4Step&)
80 {
81  aParticleChange.Initialize(aTrack);
82  return &aParticleChange;
83 }
84 
85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4StepLimiterPerRegion(const G4String &processName="UserMaxStep")
G4StepLimiterMessenger * pMess
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
G4bool IsApplicable(const G4ParticleDefinition &)
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)