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 ////////////////////////////////////////////// << 27 // Class: G4AdjointProcessEquivalentToDire << 28 // Author: L. Desorgher << 29 // Organisation: SpaceIT GmbH << 30 // 26 // 31 // Adjoint process equivalent to direct proce << 32 // scattering. << 33 // A virtual class for wrapper process object << 34 ////////////////////////////////////////////// 27 ///////////////////////////////////////////////////////////////////////////////// >> 28 // Class: G4AdjointProcessEquivalentToDirectProcess >> 29 // Author: L. Desorgher >> 30 // Organisation: SpaceIT GmbH >> 31 // Contract: ESA contract 21435/08/NL/AT >> 32 // Customer: ESA/ESTEC >> 33 ///////////////////////////////////////////////////////////////////////////////// >> 34 // >> 35 // CHANGE HISTORY >> 36 // -------------- >> 37 // ChangeHistory: >> 38 // 25 Sept. 2009 Created by L.Desorgher. Inspired from G4WrapperProcess >> 39 // >> 40 //------------------------------------------------------------- >> 41 // Documentation: >> 42 // Adjoint process equivalent to direct process, used for some multiple scattering >> 43 // >> 44 // 35 45 36 #ifndef G4AdjointProcessEquivalentToDirectProc << 46 >> 47 #ifndef G4AdjointProcessEquivalentToDirectProcess_h 37 #define G4AdjointProcessEquivalentToDirectProc 48 #define G4AdjointProcessEquivalentToDirectProcess_h 1 38 49 >> 50 #include "globals.hh" >> 51 #include "G4ios.hh" 39 #include "G4VProcess.hh" 52 #include "G4VProcess.hh" 40 53 41 class G4AdjointProcessEquivalentToDirectProces 54 class G4AdjointProcessEquivalentToDirectProcess : public G4VProcess 42 { 55 { 43 public: << 56 // 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 57 63 G4double AtRestGetPhysicalInteractionLength( << 58 public: // with description 64 const G4Track& track, G4ForceCondition* co << 59 // constructor requires the process name and type >> 60 G4AdjointProcessEquivalentToDirectProcess(const G4String& aName, G4VProcess* aProcess,G4ParticleDefinition* fwd_particle_def); >> 61 >> 62 >> 63 >> 64 public: >> 65 // destructor >> 66 virtual ~G4AdjointProcessEquivalentToDirectProcess(); >> 67 >> 68 >> 69 public: // with description >> 70 //////////////////////////// >> 71 // DoIt ///////////////// >> 72 /////////////////////////// >> 73 virtual G4VParticleChange* PostStepDoIt( >> 74 const G4Track& track, >> 75 const G4Step& stepData >> 76 ); >> 77 >> 78 virtual G4VParticleChange* AlongStepDoIt( >> 79 const G4Track& track, >> 80 const G4Step& stepData >> 81 ); >> 82 virtual G4VParticleChange* AtRestDoIt( >> 83 const G4Track& track, >> 84 const G4Step& stepData >> 85 ); >> 86 ////////////////////////// >> 87 // GPIL ////////////// >> 88 ///////////////////////// >> 89 virtual G4double AlongStepGetPhysicalInteractionLength( >> 90 const G4Track& track, >> 91 G4double previousStepSize, >> 92 G4double currentMinimumStep, >> 93 G4double& proposedSafety, >> 94 G4GPILSelection* selection); >> 95 >> 96 virtual G4double AtRestGetPhysicalInteractionLength( >> 97 const G4Track& track, >> 98 G4ForceCondition* condition >> 99 ); >> 100 >> 101 virtual G4double PostStepGetPhysicalInteractionLength( >> 102 const G4Track& track, >> 103 G4double previousStepSize, >> 104 G4ForceCondition* condition >> 105 ) ; >> 106 >> 107 ////////////////////// >> 108 virtual G4bool IsApplicable(const G4ParticleDefinition&); >> 109 // Returns true if this process object is applicable to >> 110 // the particle type >> 111 // Process will not be registered to a particle if IsApplicable is false >> 112 >> 113 virtual void BuildPhysicsTable(const G4ParticleDefinition&); >> 114 // Messaged by the Particle definition (via the Process manager) >> 115 // whenever cross section tables have to be rebuilt (i.e. if new >> 116 // materials have been defined). >> 117 // It is overloaded by individual processes when they need physics >> 118 // tables. >> 119 >> 120 // Processes which Build (for example in their >> 121 // constructors) physics tables independent of cuts >> 122 // should preferably use a >> 123 // private void BuildThePhysicsTable() >> 124 // function. Not another BuildPhysicsTable, please. >> 125 >> 126 virtual void PreparePhysicsTable(const G4ParticleDefinition&); >> 127 // Messaged by the Particle definition (via the Process manager) >> 128 // whenever cross section tables have to be prepare for rebuilt >> 129 // (i.e. if new materials have been defined). >> 130 // It is overloaded by individual processes when they need physics >> 131 // tables. >> 132 >> 133 // Processes which Build physics tables independent of cuts >> 134 // (for example in their constructors) >> 135 // should preferably use private >> 136 // void BuildThePhysicsTable() and void PreparePhysicsTable(). >> 137 // Not another BuildPhysicsTable, please. >> 138 >> 139 >> 140 virtual G4bool StorePhysicsTable(const G4ParticleDefinition* , >> 141 const G4String& directory, >> 142 G4bool ascii = false); >> 143 // Store PhysicsTable in a file. >> 144 // (return false in case of failure at I/O ) >> 145 >> 146 virtual G4bool RetrievePhysicsTable( const G4ParticleDefinition* , >> 147 const G4String& directory, >> 148 G4bool ascii = false); >> 149 // Retrieve Physics from a file. >> 150 // (return true if the Physics Table can be build by using file) >> 151 // (return false if the process has no functionality or in case of failure) >> 152 // File name should be defined by each process >> 153 // and the file should be placed under the directory specifed by the argument. >> 154 //////////////////////////// >> 155 virtual void StartTracking(G4Track*); >> 156 virtual void EndTracking(); >> 157 // inform Start/End of tracking for each track to the physics process >> 158 >> 159 >> 160 >> 161 public: >> 162 virtual void ResetNumberOfInteractionLengthLeft(); >> 163 // reset (determine the value of)NumberOfInteractionLengthLeft >> 164 private: >> 165 G4ParticleDefinition* theFwdParticleDef; >> 166 G4VProcess* theDirectProcess; 65 167 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 }; 168 }; >> 169 98 170 99 #endif 171 #endif 100 172