Geant4  10.03
XWrapperDiscreteProcess.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 //
28 //
29 
30 #ifndef XWrapperDiscreteProcess_h
31 #define XWrapperDiscreteProcess_h 1
32 
33 #include "G4ios.hh"
34 #include "globals.hh"
35 #include "G4VDiscreteProcess.hh"
38 
39 class G4Material;
40 
42 {
43 public:
44 
45  XWrapperDiscreteProcess(const G4String& processName =
46  "XWrapperDiscreteProcess" );
48 
49  G4int ItHasToWork(const G4Track&);
50 
51  virtual ~XWrapperDiscreteProcess();
52 
53 public:
56 
57  G4double GetDensity(const G4Track&);
59 
62 
63 private:
64  // hide assignment operator as private
67 
68  //private data members
70  //density to change parameter
75 
76 
80 public:
81  // DO IT
82  virtual G4VParticleChange* PostStepDoIt(const G4Track&,
83  const G4Step& );
84  virtual G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
85  const G4Step& aStep){
86  return fRegisteredProcess->AtRestDoIt(aTrack,aStep);
87  }
88 
89  // GPIL
94  return fRegisteredProcess->AtRestGetPhysicalInteractionLength(aTrack,
95  condition);
96  };
97 
98  // GENERAL
99  void StartTracking(G4Track*);
100  virtual G4bool IsApplicable(const G4ParticleDefinition&);
101 
102  // PHYSICS TABLE
103  virtual void BuildPhysicsTable(const G4ParticleDefinition&);
104  virtual void PreparePhysicsTable(const G4ParticleDefinition&);
106  const G4String&, G4bool);
108  const G4String&, G4bool);
109 
110 protected:
111  // MFP
112  virtual G4double GetMeanFreePath(const G4Track&,
113  G4double,
115 
116 public:
117  virtual void EndTracking() {fRegisteredProcess->EndTracking();};
118 
119  virtual void SetProcessManager(const G4ProcessManager* aPM)
120  {fRegisteredProcess->SetProcessManager(aPM);};
122  {return fRegisteredProcess->GetProcessManager();};
124  {fRegisteredProcess->ResetNumberOfInteractionLengthLeft();};
125 
126  virtual void DumpInfo() const {fRegisteredProcess->DumpInfo();};
127 
128  virtual void SetMasterProcess(G4VProcess* masterP){
129  fRegisteredProcess->SetMasterProcess(
130  static_cast<XWrapperDiscreteProcess*>(masterP)->fRegisteredProcess
131  );
132  };
134  {fRegisteredProcess->BuildWorkerPhysicsTable(aPD);};
136  {fRegisteredProcess->PrepareWorkerPhysicsTable(aPD);};
137 
141 
142 };
143 
144 #endif
145 
virtual void SetMasterProcess(G4VProcess *masterP)
Definition: G4VProcess.cc:212
G4double condition(const G4ErrorSymMatrix &m)
G4VDiscreteProcess * fRegisteredProcess
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double, G4ForceCondition *)
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)
virtual void SetProcessManager(const G4ProcessManager *)
Definition: G4VProcess.hh:508
G4int ItHasToWork(const G4Track &)
virtual const G4ProcessManager * GetProcessManager()
virtual void ResetNumberOfInteractionLengthLeft()
Definition: G4VProcess.cc:95
int G4int
Definition: G4Types.hh:78
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
virtual G4bool IsApplicable(const G4ParticleDefinition &)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &aTrack, G4ForceCondition *condition)
G4double GetDensityPreviousStep(const G4Track &)
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition &part)
Definition: G4VProcess.cc:202
Definition of the ExExChParticleUserInfo class.
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition &aPD)
bool G4bool
Definition: G4Types.hh:79
virtual void PreparePhysicsTable(const G4ParticleDefinition &)
Definition: G4Step.hh:76
virtual void SetProcessManager(const G4ProcessManager *aPM)
G4int bBothOrCrystalOrDetectorPhysics
Decide whether to use nuclei (+1) or electron (-1) or both (0)
virtual const G4ProcessManager * GetProcessManager()
Definition: G4VProcess.hh:514
G4double GetDensity(const G4Track &)
XWrapperDiscreteProcess & operator=(const XWrapperDiscreteProcess &)
virtual G4VParticleChange * AtRestDoIt(const G4Track &aTrack, const G4Step &aStep)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
virtual G4double GetMeanFreePath(const G4Track &, G4double, G4ForceCondition *)
virtual void ResetNumberOfInteractionLengthLeft()
virtual void DumpInfo() const
Definition: G4VProcess.cc:178
void RegisterProcess(G4VDiscreteProcess *)
virtual void SetMasterProcess(G4VProcess *masterP)
virtual void DumpInfo() const
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition &)
Definition: G4VProcess.cc:207
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
double G4double
Definition: G4Types.hh:76
virtual void EndTracking()
Definition: G4VProcess.cc:113
XWrapperDiscreteProcess(const G4String &processName="XWrapperDiscreteProcess")
G4ForceCondition
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition &aPD)
G4ParticleChangeForNothing * fParticleChangeForNothing
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)