[819] | 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 | // |
---|
[1055] | 26 | // $Id: G4eBremsstrahlung.cc,v 1.56 2009/02/20 12:06:37 vnivanch Exp $ |
---|
[1196] | 27 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
[819] | 28 | // |
---|
| 29 | // ------------------------------------------------------------------- |
---|
| 30 | // |
---|
| 31 | // GEANT4 Class file |
---|
| 32 | // |
---|
| 33 | // |
---|
| 34 | // File name: G4eBremsstrahlung |
---|
| 35 | // |
---|
| 36 | // Author: Michel Maire |
---|
| 37 | // |
---|
| 38 | // Creation date: 26.06.1996 |
---|
| 39 | // |
---|
| 40 | // Modifications: |
---|
| 41 | // |
---|
| 42 | // 26-09-96 extension of the total crosssection above 100 GeV, M.Maire |
---|
| 43 | // 1-10-96 new type G4OrderedTable; ComputePartialSumSigma(), M.Maire |
---|
| 44 | // 16-10-96 DoIt() call to the non static GetEnergyCuts(), L.Urban |
---|
| 45 | // 13-12-96 Sign corrected in grejmax and greject |
---|
| 46 | // error definition of screenvar, L.Urban |
---|
| 47 | // 20-03-97 new energy loss+ionisation+brems scheme, L.Urban |
---|
| 48 | // 07-04-98 remove 'tracking cut' of the diffracted particle, MMa |
---|
| 49 | // 13-08-98 new methods SetBining() PrintInfo() |
---|
| 50 | // 03-03-99 Bug fixed in LPM effect, L.Urban |
---|
| 51 | // 10-02-00 modifications , new e.m. structure, L.Urban |
---|
| 52 | // 07-08-00 new cross section/en.loss parametrisation, LPM flag , L.Urban |
---|
| 53 | // 21-09-00 corrections in the LPM implementation, L.Urban |
---|
| 54 | // 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation |
---|
| 55 | // 09-08-01 new methods Store/Retrieve PhysicsTable (mma) |
---|
| 56 | // 17-09-01 migration of Materials to pure STL (mma) |
---|
| 57 | // 21-09-01 completion of RetrievePhysicsTable() (mma) |
---|
| 58 | // 29-10-01 all static functions no more inlined (mma) |
---|
| 59 | // 08-11-01 particleMass becomes a local variable |
---|
| 60 | // 30-04-02 V.Ivanchenko update to new design |
---|
| 61 | // 23-12-02 Change interface in order to move to cut per region (VI) |
---|
| 62 | // 26-12-02 Secondary production moved to derived classes (VI) |
---|
| 63 | // 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko) |
---|
| 64 | // 08-08-03 STD substitute standard (V.Ivanchenko) |
---|
| 65 | // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko) |
---|
| 66 | // 04-11-04 add gamma threshold (V.Ivanchenko) |
---|
| 67 | // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) |
---|
| 68 | // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) |
---|
| 69 | // 22-05-06 Use gammaThreshold from manager (V.Ivantchenko) |
---|
| 70 | // 15-01-07 use SetEmModel() from G4VEnergyLossProcess (mma) |
---|
[961] | 71 | // use RelEmModel above 1GeV (AS & VI) |
---|
| 72 | // 13-11-08 reenable LPM switch (A.Schaelicke) |
---|
[819] | 73 | // ------------------------------------------------------------------- |
---|
| 74 | // |
---|
| 75 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 76 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 77 | |
---|
| 78 | #include "G4eBremsstrahlung.hh" |
---|
| 79 | #include "G4Gamma.hh" |
---|
| 80 | #include "G4eBremsstrahlungModel.hh" |
---|
[961] | 81 | #include "G4eBremsstrahlungRelModel.hh" |
---|
[819] | 82 | #include "G4UnitsTable.hh" |
---|
| 83 | #include "G4LossTableManager.hh" |
---|
| 84 | |
---|
| 85 | #include "G4ProductionCutsTable.hh" |
---|
| 86 | #include "G4MaterialCutsCouple.hh" |
---|
| 87 | |
---|
| 88 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 89 | |
---|
| 90 | using namespace std; |
---|
| 91 | |
---|
| 92 | G4eBremsstrahlung::G4eBremsstrahlung(const G4String& name): |
---|
| 93 | G4VEnergyLossProcess(name), |
---|
| 94 | isInitialised(false) |
---|
[961] | 95 | { |
---|
| 96 | SetProcessSubType(fBremsstrahlung); |
---|
| 97 | } |
---|
[819] | 98 | |
---|
| 99 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 100 | |
---|
| 101 | G4eBremsstrahlung::~G4eBremsstrahlung() |
---|
| 102 | {} |
---|
| 103 | |
---|
| 104 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 105 | |
---|
[1055] | 106 | G4bool G4eBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) |
---|
| 107 | { |
---|
| 108 | return (&p == G4Electron::Electron() || &p == G4Positron::Positron()); |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 112 | |
---|
[819] | 113 | void G4eBremsstrahlung::InitialiseEnergyLossProcess( |
---|
| 114 | const G4ParticleDefinition* p, |
---|
| 115 | const G4ParticleDefinition*) |
---|
| 116 | { |
---|
| 117 | if(!isInitialised) { |
---|
| 118 | particle = p; |
---|
| 119 | SetSecondaryParticle(G4Gamma::Gamma()); |
---|
| 120 | SetIonisation(false); |
---|
[961] | 121 | |
---|
| 122 | if (!EmModel(1)) SetEmModel(new G4eBremsstrahlungModel(), 1); |
---|
| 123 | if (!EmModel(2)) SetEmModel(new G4eBremsstrahlungRelModel(), 2); |
---|
| 124 | |
---|
| 125 | EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); |
---|
| 126 | EmModel(1)->SetHighEnergyLimit(EmModel(2)->LowEnergyLimit()); |
---|
| 127 | EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); |
---|
[819] | 128 | |
---|
[961] | 129 | G4VEmFluctuationModel* fm = 0; |
---|
| 130 | AddEmModel(1, EmModel(1), fm); |
---|
| 131 | AddEmModel(2, EmModel(2), fm); |
---|
[819] | 132 | isInitialised = true; |
---|
| 133 | } |
---|
| 134 | G4LossTableManager* man = G4LossTableManager::Instance(); |
---|
[961] | 135 | G4double eth = man->BremsstrahlungTh(); |
---|
| 136 | EmModel(1)->SetSecondaryThreshold(eth); |
---|
| 137 | EmModel(2)->SetSecondaryThreshold(eth); |
---|
| 138 | |
---|
| 139 | // Only high energy model LMP flag is ON/OFF |
---|
| 140 | EmModel(1)->SetLPMFlag(false); |
---|
| 141 | EmModel(2)->SetLPMFlag(man->LPMFlag()); |
---|
[819] | 142 | } |
---|
| 143 | |
---|
| 144 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 145 | |
---|
| 146 | void G4eBremsstrahlung::PrintInfo() |
---|
| 147 | { |
---|
[961] | 148 | if(EmModel(1)) { |
---|
| 149 | G4LossTableManager* man = G4LossTableManager::Instance(); |
---|
| 150 | G4double eth = man->BremsstrahlungTh(); |
---|
| 151 | G4cout << " LPM flag: " << man->LPMFlag() << " for E > " |
---|
| 152 | << EmModel(1)->HighEnergyLimit()/GeV << " GeV"; |
---|
| 153 | if(eth < DBL_MAX) G4cout << ", HighEnergyThreshold(GeV)= " << eth/GeV; |
---|
| 154 | G4cout << G4endl; |
---|
[819] | 155 | } |
---|
| 156 | } |
---|
| 157 | |
---|
| 158 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|