Geant4  10.02
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 //
26 
27 #ifndef XWrapperDiscreteProcess_h
28 #define XWrapperDiscreteProcess_h 1
29 
30 #include "G4ios.hh"
31 #include "globals.hh"
32 #include "G4VDiscreteProcess.hh"
35 
36 class G4Material;
37 
39 {
40 public:
41 
42  XWrapperDiscreteProcess(const G4String& processName =
43  "XWrapperDiscreteProcess" );
45 
46  G4int ItHasToWork(const G4Track&);
47 
48  virtual ~XWrapperDiscreteProcess();
49 
50 public:
53 
54  G4double GetDensity(const G4Track&);
56 
59 
60 private:
61  // hide assignment operator as private
64 
65  //private data members
67  //density to change parameter
72 
73 
77 public:
78  // DO IT
79  virtual G4VParticleChange* PostStepDoIt(const G4Track&,
80  const G4Step& );
81  virtual G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
82  const G4Step& aStep){
83  return fRegisteredProcess->AtRestDoIt(aTrack,aStep);
84  }
85 
86  // GPIL
91  return fRegisteredProcess->AtRestGetPhysicalInteractionLength(aTrack,
92  condition);
93  };
94 
95  // GENERAL
96  void StartTracking(G4Track*);
98 
99  // PHYSICS TABLE
100  virtual void BuildPhysicsTable(const G4ParticleDefinition&);
101  virtual void PreparePhysicsTable(const G4ParticleDefinition&);
103  const G4String&, G4bool);
105  const G4String&, G4bool);
106 
107 protected:
108  // MFP
109  virtual G4double GetMeanFreePath(const G4Track&,
110  G4double,
112 
113 public:
114  virtual void EndTracking() {fRegisteredProcess->EndTracking();};
115 
116  virtual void SetProcessManager(const G4ProcessManager* aPM)
117  {fRegisteredProcess->SetProcessManager(aPM);};
119  {return fRegisteredProcess->GetProcessManager();};
121  {fRegisteredProcess->ResetNumberOfInteractionLengthLeft();};
122 
123  virtual void DumpInfo() const {fRegisteredProcess->DumpInfo();};
124 
125  virtual void SetMasterProcess(G4VProcess* masterP){
126  fRegisteredProcess->SetMasterProcess(
127  static_cast<XWrapperDiscreteProcess*>(masterP)->fRegisteredProcess
128  );
129  };
131  {fRegisteredProcess->BuildWorkerPhysicsTable(aPD);};
133  {fRegisteredProcess->PrepareWorkerPhysicsTable(aPD);};
134 
138 
139 };
140 
141 #endif
142 
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
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)