ACTARSim
ACTAR TPC Simulation Reference Guide
ActarSimStepLimiterBuilder.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 //
24 
25 //
26 //---------------------------------------------------------------------------
27 //
28 // ClassName: ActarSimStepLimiterBuilder
29 //
30 // Author: V.Ivanchenko 24.11.2004
31 //
32 // Modified:
33 //
34 //----------------------------------------------------------------------------
35 //
36 //
37 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39 
41 #include "G4ParticleDefinition.hh"
42 #include "G4ParticleTable.hh"
43 #include "G4ProcessManager.hh"
45 
46 #include "G4Electron.hh"
47 #include "G4Positron.hh"
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
52  : G4VPhysicsConstructor(name)
53 {
55 }
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58 
60 {}
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 {}
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68 
70 {
71  G4ParticleTable::G4PTblDicIterator* theParticleIterator = G4ParticleTable::GetParticleTable()->GetIterator();
72  theParticleIterator->reset();
73  while( (*theParticleIterator)() ){
74  G4ParticleDefinition* particle = theParticleIterator->value();
75  G4ProcessManager* pmanager = particle->GetProcessManager();
76 
77  if (stepMax->IsApplicable(*particle) && !particle->IsShortLived()) {
78 
79  pmanager->AddProcess(stepMax, -1,-1,6);
80  }
81  }
82 }
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool IsApplicable(const G4ParticleDefinition &)
ActarSimStepLimiterBuilder(const G4String &name="stepLimiter")