Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4ParallelWorldProcess.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id$
28// GEANT4 tag $Name: geant4-09-04-ref-00 $
29//
30//
31//---------------------------------------------------------------
32//
33// G4ParallelWorldProcess.hh
34//
35// Description:
36// This procss takes a parallel world and limits a step
37// on the boundaries of volumes in the parallel world.
38// It invokes sensitive detectors assigned in the parallel
39// world.
40// It switches a material (and a region if defined) in the
41// assigned parallel world over the material (and the region)
42// in the mass world.
43//
44//---------------------------------------------------------------
45
46
47#ifndef G4ParallelWorldProcess_h
48#define G4ParallelWorldProcess_h 1
49
50#include "globals.hh"
51class G4Step;
52class G4StepPoint;
53class G4Navigator;
55class G4PathFinder;
56class G4VTouchable;
59#include "G4VProcess.hh"
60#include "G4FieldTrack.hh"
61#include "G4TouchableHandle.hh"
62#include "G4MultiNavigator.hh"
63
64//------------------------------------------
65//
66// G4ParallelWorldProcess class
67//
68//------------------------------------------
69
70
71// Class Description:
72
74{
75public: // with description
76
77 //------------------------
78 // Constructor/Destructor
79 //------------------------
80
81 G4ParallelWorldProcess(const G4String& processName = "ParaWorld",
84
85 //--------------------------------------------------------------
86 // Set Paralle World
87 //--------------------------------------------------------------
88
89 void SetParallelWorld(G4String parallelWorldName);
90 void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
91
92 //--------------------------------------------------------------
93 // Process interface
94 //--------------------------------------------------------------
95
97
98 //------------------------------------------------------------------------
99 // GetPhysicalInteractionLength() and DoIt() methods for AtRest
100 //------------------------------------------------------------------------
101
104
105 //------------------------------------------------------------------------
106 // GetPhysicalInteractionLength() and DoIt() methods for AlongStep
107 //------------------------------------------------------------------------
108
112
113 //-----------------------------------------------------------------------
114 // GetPhysicalInteractionLength() and DoIt() methods for PostStep
115 //-----------------------------------------------------------------------
116
120
121 //-----------------------------------------------------------------------
122 // Flag for material switching
123 //-----------------------------------------------------------------------
124
125 inline void SetLayeredMaterialFlag(G4bool flg=true)
126 { layeredMaterialFlag = flg; }
128 { return layeredMaterialFlag; }
129
130private:
131 void CopyStep(const G4Step & step);
132 void SwitchMaterial(G4StepPoint*);
133
134public: // with description
135 //--------------------------------------------------------------------
136 // Returns whether a particular particle type requires AtRest process
137 //--------------------------------------------------------------------
139
140private:
141 G4Step * fGhostStep;
142 G4StepPoint * fGhostPreStepPoint;
143 G4StepPoint * fGhostPostStepPoint;
144
145 G4VParticleChange aDummyParticleChange;
146 G4ParticleChange xParticleChange;
147
148 G4TransportationManager* fTransportationManager;
149 G4PathFinder* fPathFinder;
150
151 // -------------------------------
152 // Navigation in the Ghost World:
153 // -------------------------------
154 G4String fGhostWorldName;
155 G4VPhysicalVolume* fGhostWorld;
156 G4Navigator* fGhostNavigator;
157 G4int fNavigatorID;
158 G4TouchableHandle fOldGhostTouchable;
159 G4TouchableHandle fNewGhostTouchable;
160 G4FieldTrack fFieldTrack;
161 G4double fGhostSafety;
162 G4bool fOnBoundary;
163
164 //-----------------------------------------------------------------------
165 // Flag for material switching
166 //-----------------------------------------------------------------------
167 G4bool layeredMaterialFlag;
168
169 //-----------------------------------------------------------------------
170 // Static G4Step object for "Hyper-step"
171 //-----------------------------------------------------------------------
172public:
173 static const G4Step* GetHyperStep();
174 static G4int GetHypNavigatorID();
175private:
176 static G4Step* fpHyperStep;
177 static G4int nParallelWorlds;
178 static G4int fNavIDHyp;
179 G4int iParallelWorld;
180};
181
182#endif
G4ForceCondition
G4GPILSelection
G4ProcessType
@ fParameterisation
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
void SetLayeredMaterialFlag(G4bool flg=true)
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
static const G4Step * GetHyperStep()
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
void SetParallelWorld(G4String parallelWorldName)
G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double, G4ForceCondition *)
G4bool IsAtRestRequired(G4ParticleDefinition *)
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
Definition: G4Step.hh:78