|
|
|||
File indexing completed on 2025-12-15 09:32:53
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 /// \file radiobiology/src/IonLet.cc 0028 /// \brief Implementation of the RadioBio::IonLet class 0029 0030 #include "IonLet.hh" 0031 0032 namespace RadioBio 0033 { 0034 0035 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0036 0037 IonLet::IonLet(G4int trackID, G4int PDG, G4String fullname, G4String name, G4int Z, G4int A, 0038 G4int voxNumber) 0039 : fIsPrimary(trackID == 1), fPDGencoding(PDG), fFullName(fullname), fName(name), fZ(Z), fA(A) 0040 { 0041 fLETDN = array_type(0.0, voxNumber); 0042 fLETDD = array_type(0.0, voxNumber); 0043 fLETTN = array_type(0.0, voxNumber); 0044 fLETTD = array_type(0.0, voxNumber); 0045 0046 fLETD = array_type(0.0, voxNumber); 0047 fLETT = array_type(0.0, voxNumber); 0048 } 0049 0050 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0051 0052 void IonLet::Update(G4int voxel, G4double DE, G4double DEELETrons, G4double Lsn, G4double DX) 0053 { 0054 // ions dose LET Numerator, including secondary electrons energy deposit 0055 fLETDN[voxel] += (DE + DEELETrons) * Lsn; 0056 // ions dose LET Denominator, including secondary electrons energy deposit 0057 fLETDD[voxel] += DE + DEELETrons; 0058 // ions track LET Numerator 0059 fLETTN[voxel] += DX * Lsn; 0060 // ions track LET Denominator 0061 fLETTD[voxel] += DX; 0062 } 0063 0064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0065 0066 void IonLet::Merge(const IonLet* rhs) 0067 { 0068 // If programmed correctly, this exception should never appear 0069 if (rhs->GetPDGencoding() != fPDGencoding || rhs->IsPrimary() != fIsPrimary) 0070 G4Exception("IonLet::merge", "mergingdifferentions", FatalException, 0071 "Cannotmerge ions, probably merging of data from different ions"); 0072 0073 fLETDN += rhs->GetLETDN(); 0074 fLETDD += rhs->GetLETDD(); 0075 fLETTN += rhs->GetLETTN(); 0076 fLETTD += rhs->GetLETTD(); 0077 } 0078 0079 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0080 0081 void IonLet::Calculate() 0082 { 0083 for (unsigned int v = 0; v < fLETD.size(); v++) { 0084 if (fLETDD[v] > 0.) fLETD[v] = fLETDN[v] / fLETDD[v]; 0085 if (fLETTD[v] > 0.) fLETT[v] = fLETTN[v] / fLETTD[v]; 0086 } 0087 } 0088 0089 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0090 0091 } // namespace RadioBio
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|