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 // $Id$ >> 27 // 26 // ------------------------------------------- 28 // ------------------------------------------------------------------- 27 // 29 // 28 // Geant4 Class header file << 30 // GEANT4 Class header file >> 31 // 29 // 32 // 30 // File name: G4PolarizedComptonModel 33 // File name: G4PolarizedComptonModel 31 // 34 // 32 // Author: Andreas Schaelicke 35 // Author: Andreas Schaelicke 33 // 36 // >> 37 // Creation date: 01.05.2005 >> 38 // >> 39 // Modifications: >> 40 // 18-07-06 use newly calculated cross sections (P. Starovoitov) >> 41 // 21-08-05 update interface (A. Schaelicke) >> 42 // >> 43 // 34 // Class Description: 44 // Class Description: 35 // Implementation of polarized gamma Compton << 45 // >> 46 // Implementation of polarized gamma Compton scattering on free electron >> 47 // >> 48 >> 49 // ------------------------------------------------------------------- >> 50 // 36 51 37 #ifndef G4PolarizedComptonModel_h 52 #ifndef G4PolarizedComptonModel_h 38 #define G4PolarizedComptonModel_h 1 53 #define G4PolarizedComptonModel_h 1 39 54 40 #include "globals.hh" << 41 #include "G4KleinNishinaCompton.hh" 55 #include "G4KleinNishinaCompton.hh" 42 #include "G4StokesVector.hh" 56 #include "G4StokesVector.hh" 43 #include "G4ThreeVector.hh" << 44 57 45 class G4DynamicParticle; << 46 class G4MaterialCutsCouple; << 47 class G4ParticleDefinition; << 48 class G4ParticleChangeForGamma; 58 class G4ParticleChangeForGamma; 49 class G4VPolarizedXS; << 59 class G4PolarizedComptonCrossSection; 50 60 51 class G4PolarizedComptonModel : public G4Klein 61 class G4PolarizedComptonModel : public G4KleinNishinaCompton 52 { 62 { 53 public: << 63 >> 64 public: >> 65 54 explicit G4PolarizedComptonModel(const G4Par 66 explicit G4PolarizedComptonModel(const G4ParticleDefinition* p = nullptr, 55 const G4Str << 67 const G4String& nam = "Polarized-Compton"); 56 68 57 virtual ~G4PolarizedComptonModel() override; << 69 virtual G4double ComputeCrossSectionPerAtom( 58 << 70 const G4ParticleDefinition*, 59 virtual G4double ComputeCrossSectionPerAtom( << 71 G4double kinEnergy, 60 << 72 G4double Z, 61 << 73 G4double A, 62 << 74 G4double cut, >> 75 G4double emax) override; 63 G4double ComputeAsymmetryPerAtom(G4double ga 76 G4double ComputeAsymmetryPerAtom(G4double gammaEnergy, G4double Z); >> 77 virtual ~G4PolarizedComptonModel(); 64 78 65 virtual void SampleSecondaries(std::vector<G 79 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 66 const G4Mater << 80 const G4MaterialCutsCouple*, 67 const G4Dynam << 81 const G4DynamicParticle*, 68 G4double maxE << 82 G4double tmin, 69 << 83 G4double maxEnergy) override; 70 // polarized routines << 84 71 inline void SetTargetPolarization(const G4Th << 85 // polarized routines 72 inline void SetBeamPolarization(const G4Thre << 86 inline void SetTargetPolarization(const G4ThreeVector & pTarget); 73 inline const G4ThreeVector& GetTargetPolariz << 87 inline void SetBeamPolarization(const G4ThreeVector & pBeam); 74 inline const G4ThreeVector& GetBeamPolarizat << 88 inline const G4ThreeVector & GetTargetPolarization() const; 75 inline const G4ThreeVector& GetFinalGammaPol << 89 inline const G4ThreeVector & GetBeamPolarization() const; 76 inline const G4ThreeVector& GetFinalElectron << 90 inline const G4ThreeVector & GetFinalGammaPolarization() const; >> 91 inline const G4ThreeVector & GetFinalElectronPolarization() const; >> 92 private: >> 93 >> 94 void PrintWarning(const G4DynamicParticle*, G4int, G4double grej, >> 95 G4double onecos, G4double phi, const G4String) const; 77 96 78 // hide assignment operator 97 // hide assignment operator 79 G4PolarizedComptonModel& operator=(const G4P << 98 G4PolarizedComptonModel & operator=(const G4PolarizedComptonModel &right) = delete; 80 delete; << 99 G4PolarizedComptonModel(const G4PolarizedComptonModel&) = delete; 81 G4PolarizedComptonModel(const G4PolarizedCom << 100 82 << 101 G4PolarizedComptonCrossSection * crossSectionCalculator; 83 private: << 102 // incomming 84 void PrintWarning(const G4DynamicParticle*, << 103 G4StokesVector theBeamPolarization; // photon 85 G4double onecos, G4double << 104 G4StokesVector theTargetPolarization; // electron 86 << 87 static constexpr G4int fLoopLim = 10000; << 88 << 89 G4VPolarizedXS* fCrossSectionCalculator; << 90 // incoming << 91 G4StokesVector fBeamPolarization; // phot << 92 G4StokesVector fTargetPolarization; // elec << 93 // outgoing 105 // outgoing 94 G4StokesVector fFinalGammaPolarization; << 106 G4StokesVector finalGammaPolarization; 95 G4StokesVector finalElectronPolarization; 107 G4StokesVector finalElectronPolarization; 96 108 97 G4int fVerboseLevel; << 109 G4int verboseLevel; 98 }; 110 }; 99 111 100 //....oooOO0OOooo........oooOO0OOooo........oo 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 101 113 102 inline void G4PolarizedComptonModel::SetTarget << 114 inline void G4PolarizedComptonModel::SetTargetPolarization(const G4ThreeVector & pTarget) 103 const G4ThreeVector& pTarget) << 104 { 115 { 105 fTargetPolarization = G4StokesVector(pTarget << 116 theTargetPolarization = pTarget; 106 } 117 } 107 inline void G4PolarizedComptonModel::SetBeamPo << 118 inline void G4PolarizedComptonModel::SetBeamPolarization(const G4ThreeVector & pBeam) 108 const G4ThreeVector& pBeam) << 109 { 119 { 110 fBeamPolarization = G4StokesVector(pBeam); << 120 theBeamPolarization = pBeam; 111 } 121 } 112 inline const G4ThreeVector& G4PolarizedCompton << 122 inline const G4ThreeVector & G4PolarizedComptonModel::GetTargetPolarization() const 113 const << 114 { 123 { 115 return fTargetPolarization; << 124 return theTargetPolarization; 116 } 125 } 117 inline const G4ThreeVector& G4PolarizedCompton << 126 inline const G4ThreeVector & G4PolarizedComptonModel::GetBeamPolarization() const 118 { 127 { 119 return fBeamPolarization; << 128 return theBeamPolarization; 120 } 129 } 121 inline const G4ThreeVector& G4PolarizedCompton << 130 inline const G4ThreeVector & G4PolarizedComptonModel::GetFinalGammaPolarization() const 122 const << 123 { 131 { 124 return fFinalGammaPolarization; << 132 return finalGammaPolarization; 125 } 133 } 126 inline const G4ThreeVector& << 134 inline const G4ThreeVector & G4PolarizedComptonModel::GetFinalElectronPolarization() const 127 G4PolarizedComptonModel::GetFinalElectronPolar << 128 { 135 { 129 return finalElectronPolarization; 136 return finalElectronPolarization; 130 } 137 } 131 138 132 #endif 139 #endif 133 140