Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 ////////////////////////////////////////////// << 26 // $Id: G4AdjointProcessEquivalentToDirectProcess.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $ 27 // Class: G4AdjointProcessEquivalentToDire << 27 // GEANT4 tag $Name: geant4-09-03-patch-02 $ 28 // Author: L. Desorgher << 29 // Organisation: SpaceIT GmbH << 30 // 28 // 31 // Adjoint process equivalent to direct proce << 32 // scattering. << 33 // A virtual class for wrapper process object << 34 ////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////////////// >> 30 // Class: G4AdjointProcessEquivalentToDirectProcess >> 31 // Author: L. Desorgher >> 32 // Organisation: SpaceIT GmbH >> 33 // Contract: ESA contract 21435/08/NL/AT >> 34 // Customer: ESA/ESTEC >> 35 ///////////////////////////////////////////////////////////////////////////////// >> 36 // >> 37 // CHANGE HISTORY >> 38 // -------------- >> 39 // ChangeHistory: >> 40 // 25 Sept. 2009 Created by L.Desorgher. Inspired from G4WrapperProcess >> 41 // >> 42 //------------------------------------------------------------- >> 43 // Documentation: >> 44 // Adjoint process equivalent to direct process, used for some multiple scattering >> 45 // >> 46 // 35 47 36 #ifndef G4AdjointProcessEquivalentToDirectProc << 48 >> 49 #ifndef G4AdjointProcessEquivalentToDirectProcess_h 37 #define G4AdjointProcessEquivalentToDirectProc 50 #define G4AdjointProcessEquivalentToDirectProcess_h 1 38 51 >> 52 #include "globals.hh" >> 53 #include "G4ios.hh" 39 #include "G4VProcess.hh" 54 #include "G4VProcess.hh" 40 55 41 class G4AdjointProcessEquivalentToDirectProces 56 class G4AdjointProcessEquivalentToDirectProcess : public G4VProcess 42 { 57 { 43 public: << 58 // A virtual class for wrapper process objects. 44 explicit G4AdjointProcessEquivalentToDirectP << 45 const G4String& aName, G4VProcess* aProces << 46 G4ParticleDefinition* fwd_particle_def); << 47 << 48 ~G4AdjointProcessEquivalentToDirectProcess() << 49 << 50 G4VParticleChange* PostStepDoIt(const G4Trac << 51 const G4Step << 52 << 53 G4VParticleChange* AlongStepDoIt(const G4Tra << 54 const G4Ste << 55 G4VParticleChange* AtRestDoIt(const G4Track& << 56 const G4Step& << 57 << 58 G4double AlongStepGetPhysicalInteractionLeng << 59 const G4Track& track, G4double previousSte << 60 G4double currentMinimumStep, G4double& pro << 61 G4GPILSelection* selection) override; << 62 59 63 G4double AtRestGetPhysicalInteractionLength( << 60 public: // with description 64 const G4Track& track, G4ForceCondition* co << 61 // constructor requires the process name and type >> 62 G4AdjointProcessEquivalentToDirectProcess(const G4String& aName, G4VProcess* aProcess,G4ParticleDefinition* fwd_particle_def); >> 63 >> 64 >> 65 >> 66 public: >> 67 // destructor >> 68 virtual ~G4AdjointProcessEquivalentToDirectProcess(); >> 69 >> 70 >> 71 public: // with description >> 72 //////////////////////////// >> 73 // DoIt ///////////////// >> 74 /////////////////////////// >> 75 virtual G4VParticleChange* PostStepDoIt( >> 76 const G4Track& track, >> 77 const G4Step& stepData >> 78 ); >> 79 >> 80 virtual G4VParticleChange* AlongStepDoIt( >> 81 const G4Track& track, >> 82 const G4Step& stepData >> 83 ); >> 84 virtual G4VParticleChange* AtRestDoIt( >> 85 const G4Track& track, >> 86 const G4Step& stepData >> 87 ); >> 88 ////////////////////////// >> 89 // GPIL ////////////// >> 90 ///////////////////////// >> 91 virtual G4double AlongStepGetPhysicalInteractionLength( >> 92 const G4Track& track, >> 93 G4double previousStepSize, >> 94 G4double currentMinimumStep, >> 95 G4double& proposedSafety, >> 96 G4GPILSelection* selection); >> 97 >> 98 virtual G4double AtRestGetPhysicalInteractionLength( >> 99 const G4Track& track, >> 100 G4ForceCondition* condition >> 101 ); >> 102 >> 103 virtual G4double PostStepGetPhysicalInteractionLength( >> 104 const G4Track& track, >> 105 G4double previousStepSize, >> 106 G4ForceCondition* condition >> 107 ) ; >> 108 >> 109 ////////////////////// >> 110 virtual G4bool IsApplicable(const G4ParticleDefinition&); >> 111 // Returns true if this process object is applicable to >> 112 // the particle type >> 113 // Process will not be registered to a particle if IsApplicable is false >> 114 >> 115 virtual void BuildPhysicsTable(const G4ParticleDefinition&); >> 116 // Messaged by the Particle definition (via the Process manager) >> 117 // whenever cross section tables have to be rebuilt (i.e. if new >> 118 // materials have been defined). >> 119 // It is overloaded by individual processes when they need physics >> 120 // tables. >> 121 >> 122 // Processes which Build (for example in their >> 123 // constructors) physics tables independent of cuts >> 124 // should preferably use a >> 125 // private void BuildThePhysicsTable() >> 126 // function. Not another BuildPhysicsTable, please. >> 127 >> 128 virtual void PreparePhysicsTable(const G4ParticleDefinition&); >> 129 // Messaged by the Particle definition (via the Process manager) >> 130 // whenever cross section tables have to be prepare for rebuilt >> 131 // (i.e. if new materials have been defined). >> 132 // It is overloaded by individual processes when they need physics >> 133 // tables. >> 134 >> 135 // Processes which Build physics tables independent of cuts >> 136 // (for example in their constructors) >> 137 // should preferably use private >> 138 // void BuildThePhysicsTable() and void PreparePhysicsTable(). >> 139 // Not another BuildPhysicsTable, please. >> 140 >> 141 >> 142 virtual G4bool StorePhysicsTable(const G4ParticleDefinition* , >> 143 const G4String& directory, >> 144 G4bool ascii = false); >> 145 // Store PhysicsTable in a file. >> 146 // (return false in case of failure at I/O ) >> 147 >> 148 virtual G4bool RetrievePhysicsTable( const G4ParticleDefinition* , >> 149 const G4String& directory, >> 150 G4bool ascii = false); >> 151 // Retrieve Physics from a file. >> 152 // (return true if the Physics Table can be build by using file) >> 153 // (return false if the process has no functionality or in case of failure) >> 154 // File name should be defined by each process >> 155 // and the file should be placed under the directory specifed by the argument. >> 156 //////////////////////////// >> 157 virtual void StartTracking(G4Track*); >> 158 virtual void EndTracking(); >> 159 // inform Start/End of tracking for each track to the physics process >> 160 >> 161 >> 162 >> 163 public: >> 164 virtual void ResetNumberOfInteractionLengthLeft(); >> 165 // reset (determine the value of)NumberOfInteractionLengthLeft >> 166 private: >> 167 G4ParticleDefinition* theFwdParticleDef; >> 168 G4VProcess* theDirectProcess; 65 169 66 G4double PostStepGetPhysicalInteractionLengt << 67 const G4Track& track, G4double previousSte << 68 G4ForceCondition* condition) override; << 69 << 70 G4bool IsApplicable(const G4ParticleDefiniti << 71 << 72 void BuildPhysicsTable(const G4ParticleDefin << 73 << 74 void PreparePhysicsTable(const G4ParticleDef << 75 << 76 G4bool StorePhysicsTable(const G4ParticleDef << 77 const G4String& dir << 78 G4bool ascii = fals << 79 << 80 G4bool RetrievePhysicsTable(const G4Particle << 81 const G4String& << 82 G4bool ascii = f << 83 << 84 void StartTracking(G4Track*) override; << 85 void EndTracking() override; << 86 << 87 void ResetNumberOfInteractionLengthLeft() ov << 88 << 89 G4AdjointProcessEquivalentToDirectProcess(G4 << 90 delete; << 91 G4AdjointProcessEquivalentToDirectProcess& o << 92 const G4AdjointProcessEquivalentToDirectPr << 93 << 94 private: << 95 G4ParticleDefinition* fFwdParticleDef; << 96 G4VProcess* fDirectProcess; << 97 }; 170 }; >> 171 98 172 99 #endif 173 #endif 100 174