source: trunk/source/processes/electromagnetic/adjoint/src/G4AdjointhMultipleScattering.cc@ 1340

Last change on this file since 1340 was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 5.6 KB
Line 
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// $Id: G4AdjointhMultipleScattering.cc,v 1.3 2010/04/12 18:57:15 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28//
29
30//
31// GEANT4 Class file
32//
33// File name: G4AdjointhMultipleScattering
34//
35// Author: Desorgher Laurent
36//
37// Creation date: 03.06.2009 cloned from G4hMultipleScattering by U.Laszlo with slight modification for adjoint_ion.
38//
39// -----------------------------------------------------------------------------
40//
41//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43
44#include "G4AdjointhMultipleScattering.hh"
45#include "G4UrbanMscModel90.hh"
46#include "G4MscStepLimitType.hh"
47
48//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49
50using namespace std;
51
52G4AdjointhMultipleScattering::G4AdjointhMultipleScattering(const G4String& processName)
53 : G4VMultipleScattering(processName)
54{
55 isInitialized = false;
56 isIon = false;
57 SetStepLimitType(fMinimal);
58}
59
60//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61
62G4AdjointhMultipleScattering::~G4AdjointhMultipleScattering()
63{}
64
65//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66
67G4bool G4AdjointhMultipleScattering::IsApplicable (const G4ParticleDefinition& p)
68{
69 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived());
70}
71
72//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73
74void G4AdjointhMultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)
75{
76 // Modification of parameters between runs
77 if(isInitialized) {
78 if (p->GetParticleType() != "adjoint_nucleus" && p->GetPDGMass() < GeV) {
79 mscUrban->SetStepLimitType(StepLimitType());
80 mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
81 mscUrban->SetSkin(Skin());
82 mscUrban->SetRangeFactor(RangeFactor());
83 mscUrban->SetGeomFactor(GeomFactor());
84 }
85 return;
86 }
87
88 // defaults for ions, which cannot be overwritten
89 if (p->GetParticleType() == "adjoint_nucleus" || p->GetPDGMass() > GeV) {
90 SetStepLimitType(fMinimal);
91 SetLateralDisplasmentFlag(false);
92 SetBuildLambdaTable(false);
93 if(p->GetParticleType() == "adjoint_nucleus") isIon = true;
94 }
95
96 // initialisation of parameters
97 G4String part_name = p->GetParticleName();
98 mscUrban = new G4UrbanMscModel90();
99
100 mscUrban->SetStepLimitType(StepLimitType());
101 mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
102 mscUrban->SetSkin(Skin());
103 mscUrban->SetRangeFactor(RangeFactor());
104 mscUrban->SetGeomFactor(GeomFactor());
105
106 AddEmModel(1,mscUrban);
107 isInitialized = true;
108}
109
110//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111
112void G4AdjointhMultipleScattering::PrintInfo()
113{
114 G4cout << " RangeFactor= " << RangeFactor()
115 << ", step limit type: " << StepLimitType()
116 << ", lateralDisplacement: " << LateralDisplasmentFlag()
117 << ", skin= " << Skin()
118 // << ", geomFactor= " << GeomFactor()
119 << G4endl;
120}
121
122//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123
124/*G4double G4AdjointhMultipleScattering::AlongStepGetPhysicalInteractionLength(
125 const G4Track& track,
126 double,
127 G4double currentMinimalStep,
128 G4double& currentSafety,
129 G4GPILSelection* selection)
130{
131 // get Step limit proposed by the process
132 valueGPILSelectionMSC = NotCandidateForSelection;
133
134 G4double escaled = track.GetKineticEnergy();
135 if(isIon) escaled *= track.GetDynamicParticle()->GetMass()/proton_mass_c2;
136
137 G4double steplength = GetMscContinuousStepLimit(track,
138 escaled,
139 currentMinimalStep,
140 currentSafety);
141 // G4cout << "StepLimit= " << steplength << G4endl;
142 // set return value for G4GPILSelection
143 *selection = valueGPILSelectionMSC;
144 return steplength;
145}
146*/
147//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148
Note: See TracBrowser for help on using the repository browser.