G4eSingleCoulombScatteringModel.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //      G4eSingleCoulombScatteringModel.cc
00027 // -------------------------------------------------------------------
00028 //
00029 // GEANT4 Class header file
00030 //
00031 // File name:    G4eSingleCoulombScatteringModel
00032 //
00033 // Author:      Cristina Consolandi
00034 //
00035 // Creation date: 20.10.2012  
00036 //                           
00037 //      Class Description:
00038 //      Single Scattering model for electron-nuclei interaction.
00039 //      Suitable for high energy electrons and low scattering angles.
00040 //
00041 //
00042 //       Reference:
00043 //      M.J. Boschini et al.
00044 //      "Non Ionizing Energy Loss induced by Electrons in the Space Environment"
00045 //      Proc. of the 13th International Conference on Particle Physics and Advanced Technology 
00046 //      (13th ICPPAT, Como 3-7/10/2011), World Scientific (Singapore).
00047 //      Available at: http://arxiv.org/abs/1111.4042v4
00048 //
00049 //
00050 // -------------------------------------------------------------------
00051 //
00052 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00053 
00054 
00055 #include "G4eSingleCoulombScatteringModel.hh"
00056 #include "G4SystemOfUnits.hh"
00057 #include "Randomize.hh"
00058 #include "G4ParticleChangeForGamma.hh"
00059 #include "G4Proton.hh"
00060 #include "G4ProductionCutsTable.hh"
00061 #include "G4NucleiProperties.hh"
00062 
00063 #include "G4UnitsTable.hh"
00064 
00065 
00066 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00067 
00068 using namespace std;
00069 
00070 G4eSingleCoulombScatteringModel::G4eSingleCoulombScatteringModel(const G4String& nam)
00071   : G4VEmModel(nam),
00072 
00073     cosThetaMin(1.0),
00074     isInitialised(false)
00075 {
00076         fNistManager = G4NistManager::Instance();
00077         theParticleTable = G4ParticleTable::GetParticleTable();
00078         fParticleChange = 0;
00079 
00080         pCuts=0;
00081         currentMaterial = 0;
00082         currentElement  = 0;
00083         currentCouple = 0;
00084 
00085         lowEnergyLimit  = 0*eV;
00086         recoilThreshold = 0.*eV;
00087         particle = 0;
00088         mass=0;
00089         currentMaterialIndex = -1;
00090 
00091         Mottcross = new G4ScreeningMottCrossSection(); 
00092 
00093 }
00094 
00095 
00096 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00097 
00098 G4eSingleCoulombScatteringModel::~G4eSingleCoulombScatteringModel()
00099 { delete  Mottcross;}
00100 
00101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00102 
00103 void G4eSingleCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
00104                                            const G4DataVector&  )
00105 {
00106         SetupParticle(p);
00107         currentCouple = 0;
00108         currentMaterialIndex = -1;
00109         cosThetaMin = cos(PolarAngleLimit());
00110         Mottcross->Initialise(p,cosThetaMin);
00111  
00112         pCuts = G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3);
00113 
00114 
00115         if(!isInitialised) {
00116           isInitialised = true;
00117           fParticleChange = GetParticleChangeForGamma();
00118         }
00119 }
00120 
00121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00122 
00123 G4double G4eSingleCoulombScatteringModel::ComputeCrossSectionPerAtom(
00124                                 const G4ParticleDefinition* p,
00125                                 G4double kinEnergy, 
00126                                 G4double Z, 
00127                                 G4double , 
00128                                 G4double, 
00129                                 G4double )
00130 {
00131 
00132         SetupParticle(p);
00133  
00134         G4double cross =0.0;
00135         if(kinEnergy < lowEnergyLimit) return cross;
00136 
00137         DefineMaterial(CurrentCouple());
00138 
00139         //Total Cross section
00140         Mottcross->SetupKinematic(kinEnergy, Z);
00141         cross = Mottcross->NuclearCrossSection();
00142 
00143         //cout<< "....cross "<<G4BestUnit(cross,"Surface") << " cm2 "<< cross/cm2 <<endl;
00144   return cross;
00145 }
00146 
00147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00148 
00149 void G4eSingleCoulombScatteringModel::SampleSecondaries(
00150                                std::vector<G4DynamicParticle*>* fvect,
00151                                const G4MaterialCutsCouple* couple,
00152                                const G4DynamicParticle* dp,
00153                                G4double cutEnergy, 
00154                                G4double)
00155 {
00156         G4double kinEnergy = dp->GetKineticEnergy();
00157         //cout<<"--- kinEnergy "<<kinEnergy<<endl;
00158 
00159 
00160         if(kinEnergy < lowEnergyLimit) return;
00161         
00162         DefineMaterial(couple);
00163         SetupParticle(dp->GetDefinition());
00164 
00165         // Choose nucleus
00166         currentElement = SelectRandomAtom(couple,particle,
00167                                     kinEnergy,cutEnergy,kinEnergy);//last two :cutEnergy= min e kinEnergy=max
00168 
00169         G4double Z  = currentElement->GetZ();
00170         G4int iz    = G4int(Z);
00171         G4int ia = SelectIsotopeNumber(currentElement);
00172 
00173         //cout<<"Element "<<currentElement->GetName()<<endl;;   
00174 
00175         G4double cross= Mottcross->GetTotalCross();
00176 
00177 
00178         if(cross == 0.0)return;
00179                 
00180         G4ThreeVector dir = dp->GetMomentumDirection(); //old direction
00181         G4ThreeVector newDirection=Mottcross->GetNewDirection();//new direction
00182         newDirection.rotateUz(dir);   
00183   
00184         fParticleChange->ProposeMomentumDirection(newDirection);   
00185   
00186         //Recoil energy
00187         G4double trec= Mottcross->GetTrec();
00188         //Energy after scattering       
00189         G4double finalT = kinEnergy - trec;
00190 
00191 
00192         if(finalT <= lowEnergyLimit) { 
00193                 trec = kinEnergy;  
00194                 finalT = 0.0;
00195                 } 
00196     
00197         fParticleChange->SetProposedKineticEnergy(finalT);
00198 
00199         G4double tcut = recoilThreshold;
00200         if(pCuts) { tcut= std::min(tcut,(*pCuts)[currentMaterialIndex]); 
00201                 }
00202  
00203 
00204         if(trec > tcut) {
00205 
00206                 //cout<<"Trec "<<trec/eV<<endl;
00207                 G4ParticleDefinition* ion = theParticleTable->GetIon(iz, ia, 0.0);
00208 
00209                 //incident before scattering
00210                 G4double ptot=sqrt(Mottcross->GetMom2Lab());
00211                 //incident after scattering
00212                 G4double plab = sqrt(finalT*(finalT + 2.0*mass));
00213                 G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
00214                 //secondary particle
00215                 G4DynamicParticle* newdp  = new G4DynamicParticle(ion, p2, trec);
00216                         fvect->push_back(newdp);
00217                         }
00218 
00219         else if(trec > 0.0) {
00220                 fParticleChange->ProposeNonIonizingEnergyDeposit(trec);
00221                 if(trec< tcut) fParticleChange->ProposeLocalEnergyDeposit(trec);
00222                 }
00223 
00224 
00225 }
00226 
00227 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00228                 

Generated on Mon May 27 17:48:12 2013 for Geant4 by  doxygen 1.4.7