| 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 | // Calculation of the total, elastic and inelastic cross-sections
|
|---|
| 27 | // based on Barashenkov parametrisations of pion data
|
|---|
| 28 | //
|
|---|
| 29 | // 16.08.06 V.Ivanchenko - first implementation
|
|---|
| 30 | // 22.01.07 V.Ivanchenko - add cross section interfaces with Z and A
|
|---|
| 31 | // 05.03.07 V.Ivanchenko - add IfZAApplicable
|
|---|
| 32 | //
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 | #ifndef G4UPiNuclearCrossSection_h
|
|---|
| 36 | #define G4UPiNuclearCrossSection_h
|
|---|
| 37 |
|
|---|
| 38 | #include "G4VCrossSectionDataSet.hh"
|
|---|
| 39 | #include "G4DynamicParticle.hh"
|
|---|
| 40 | #include "G4DataVector.hh"
|
|---|
| 41 | #include "globals.hh"
|
|---|
| 42 | #include <vector>
|
|---|
| 43 |
|
|---|
| 44 | class G4PhysicsTable;
|
|---|
| 45 |
|
|---|
| 46 | class G4UPiNuclearCrossSection : public G4VCrossSectionDataSet
|
|---|
| 47 | {
|
|---|
| 48 | public:
|
|---|
| 49 |
|
|---|
| 50 | G4UPiNuclearCrossSection();
|
|---|
| 51 |
|
|---|
| 52 | virtual ~G4UPiNuclearCrossSection();
|
|---|
| 53 |
|
|---|
| 54 | virtual
|
|---|
| 55 | G4bool IsApplicable(const G4DynamicParticle* aParticle,
|
|---|
| 56 | const G4Element* anElement);
|
|---|
| 57 |
|
|---|
| 58 | virtual
|
|---|
| 59 | G4bool IsZAApplicable(const G4DynamicParticle* aParticle,
|
|---|
| 60 | G4double Z, G4double A);
|
|---|
| 61 |
|
|---|
| 62 | virtual
|
|---|
| 63 | G4double GetCrossSection(const G4DynamicParticle* aParticle,
|
|---|
| 64 | const G4Element* anElement, G4double T=0.);
|
|---|
| 65 |
|
|---|
| 66 | virtual
|
|---|
| 67 | G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
|
|---|
| 68 | G4double Z, G4double A, G4double T=0.);
|
|---|
| 69 |
|
|---|
| 70 | G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
|
|---|
| 71 | const G4Element* anElement);
|
|---|
| 72 |
|
|---|
| 73 | G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
|
|---|
| 74 | G4double Z, G4double A);
|
|---|
| 75 |
|
|---|
| 76 | G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
|
|---|
| 77 | const G4Element* anElement);
|
|---|
| 78 |
|
|---|
| 79 | G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
|
|---|
| 80 | G4double Z, G4double A);
|
|---|
| 81 |
|
|---|
| 82 | void BuildPhysicsTable(const G4ParticleDefinition&);
|
|---|
| 83 |
|
|---|
| 84 | void DumpPhysicsTable(const G4ParticleDefinition&);
|
|---|
| 85 |
|
|---|
| 86 | private:
|
|---|
| 87 |
|
|---|
| 88 | void Initialise();
|
|---|
| 89 |
|
|---|
| 90 | void AddDataSet(const G4String& p, const G4double* tot,
|
|---|
| 91 | const G4double* in, const G4double* e, G4int n);
|
|---|
| 92 |
|
|---|
| 93 | G4double Interpolate(G4double Z, G4double A, G4double ekin,
|
|---|
| 94 | G4PhysicsTable*);
|
|---|
| 95 |
|
|---|
| 96 | G4int NZ;
|
|---|
| 97 | std::vector<G4int> theZ;
|
|---|
| 98 | G4DataVector theA;
|
|---|
| 99 | G4PhysicsTable* piPlusElastic;
|
|---|
| 100 | G4PhysicsTable* piPlusInelastic;
|
|---|
| 101 | G4PhysicsTable* piMinusElastic;
|
|---|
| 102 | G4PhysicsTable* piMinusInelastic;
|
|---|
| 103 |
|
|---|
| 104 | G4double aPower;
|
|---|
| 105 | G4double elow;
|
|---|
| 106 | G4double elowest;
|
|---|
| 107 | G4double APower[92];
|
|---|
| 108 |
|
|---|
| 109 | const G4ParticleDefinition* piPlus;
|
|---|
| 110 | const G4ParticleDefinition* piMinus;
|
|---|
| 111 | };
|
|---|
| 112 |
|
|---|
| 113 | inline G4bool G4UPiNuclearCrossSection::IsApplicable(
|
|---|
| 114 | const G4DynamicParticle* part,
|
|---|
| 115 | const G4Element* elm)
|
|---|
| 116 | {
|
|---|
| 117 | return IsZAApplicable(part, elm->GetZ(), elm->GetN());
|
|---|
| 118 | }
|
|---|
| 119 |
|
|---|
| 120 | inline G4bool G4UPiNuclearCrossSection::IsZAApplicable(
|
|---|
| 121 | const G4DynamicParticle* part,
|
|---|
| 122 | G4double Z, G4double)
|
|---|
| 123 | {
|
|---|
| 124 | return ((part->GetDefinition() == piMinus ||
|
|---|
| 125 | part->GetDefinition() == piPlus) &&
|
|---|
| 126 | Z > 1.5);
|
|---|
| 127 | }
|
|---|
| 128 |
|
|---|
| 129 | inline G4double G4UPiNuclearCrossSection::GetCrossSection(
|
|---|
| 130 | const G4DynamicParticle* dp,
|
|---|
| 131 | const G4Element* elm, G4double)
|
|---|
| 132 | {
|
|---|
| 133 | return GetInelasticCrossSection(dp, elm->GetZ(), elm->GetN());
|
|---|
| 134 | }
|
|---|
| 135 |
|
|---|
| 136 | inline G4double G4UPiNuclearCrossSection::GetIsoZACrossSection(
|
|---|
| 137 | const G4DynamicParticle* dp,
|
|---|
| 138 | G4double Z, G4double A, G4double)
|
|---|
| 139 | {
|
|---|
| 140 | return GetInelasticCrossSection(dp, Z, A);
|
|---|
| 141 | }
|
|---|
| 142 |
|
|---|
| 143 | inline G4double G4UPiNuclearCrossSection::GetInelasticCrossSection(
|
|---|
| 144 | const G4DynamicParticle* dp,
|
|---|
| 145 | const G4Element* elm)
|
|---|
| 146 | {
|
|---|
| 147 | return GetInelasticCrossSection(dp, elm->GetZ(), elm->GetN());
|
|---|
| 148 | }
|
|---|
| 149 |
|
|---|
| 150 | inline G4double G4UPiNuclearCrossSection::GetElasticCrossSection(
|
|---|
| 151 | const G4DynamicParticle* dp,
|
|---|
| 152 | const G4Element* elm)
|
|---|
| 153 | {
|
|---|
| 154 | return GetElasticCrossSection(dp, elm->GetZ(), elm->GetN());
|
|---|
| 155 | }
|
|---|
| 156 |
|
|---|
| 157 | #endif
|
|---|