Loading...
Searching...
No Matches
IonLet.hh
Go to the documentation of this file.
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/// \file radiobiology/include/IonLet.hh
27/// \brief Definition of the RadioBio::IonLet class
28
29#ifndef RadiobiologyIonLet_HH
30#define RadiobiologyIonLet_HH
31
32#include "globals.hh"
33
34#include <valarray>
35
36namespace RadioBio
37{
38
39/// class to save and hold data for LET of different ions
40class IonLet
41{
42 public:
43 // Constructor wants ion data, trackID and total voxel number
44 // trackID used only to see if particle is primary
45 IonLet(G4int trackID, G4int PDG, G4String fullname, G4String name, G4int Z, G4int A,
46 G4int voxNumber);
47 ~IonLet() = default;
48
49 // Alias for matrix type
50 using array_type = std::valarray<G4double>;
51
52 G4bool IsPrimary() const { return fIsPrimary; }
53 G4int GetPDGencoding() const { return fPDGencoding; }
54 G4String GetFullName() const { return fFullName; }
55 G4String GetName() const { return fName; }
56 G4int GetZ() const { return fZ; }
57 G4int GetA() const { return fA; }
58
59 // Track and Dose LET numerator and denominator
60 array_type GetLETDN() const { return fLETDN; }
61 array_type GetLETDD() const { return fLETDD; }
62 array_type GetLETTN() const { return fLETTN; }
63 array_type GetLETTD() const { return fLETTD; }
64
65 // Final Dose and Track LET for the ion
66 array_type GetLETD() const { return fLETD; }
67 array_type GetLETT() const { return fLETT; }
68
69 void SetLETDN(array_type LETDN) { fLETDN = LETDN; }
70 void SetLETDD(array_type LETDD) { fLETDD = LETDD; }
71 void SetLETTN(array_type LETTN) { fLETTN = LETTN; }
72 void SetLETTD(array_type LETTD) { fLETTD = LETTD; }
73
74 // To update data inside this IonLet
75 void Update(G4int voxel, G4double DE, G4double DEELETrons, G4double Lsn, G4double DX);
76
77 // To merge data from another IonLet object inside this one
78 void Merge(const IonLet* lhs);
79
80 // To calculate LET given the numerator and denominator
81 void Calculate();
82
83 // To sort by the mass number, else sort by the atomic one.
84 G4bool operator<(const IonLet& a) const
85 {
86 return (this->fZ == a.fZ) ? this->fA < a.fA : this->fZ < a.fZ;
87 }
88
89 private:
90 G4bool fIsPrimary = true; // True if particle is primary
91 G4int fPDGencoding = -1; // Particle data group id for the particle
92 G4String fFullName ; // AZ[excitation energy]: like He3[1277.4], ...
93 G4String fName ; // simple name no excitation energy: He3, He4, ...
94 G4int fZ = -1; // atomic number
95 G4int fA = -1; // mass number
96
97 // Track averaged LET and Dose averaged LET
98 // Numerator, denominator, actual value.
105};
106
107} // namespace RadioBio
108
109#endif // IonLet_HH
std::vector< ExP01TrackerHit * > a
class to save and hold data for LET of different ions
G4int GetZ() const
Definition IonLet.hh:56
array_type fLETDN
Definition IonLet.hh:99
void Calculate()
Definition IonLet.cc:81
void SetLETTD(array_type LETTD)
Definition IonLet.hh:72
G4String GetName() const
Definition IonLet.hh:55
void SetLETDN(array_type LETDN)
Definition IonLet.hh:69
array_type fLETDD
Definition IonLet.hh:100
G4int GetPDGencoding() const
Definition IonLet.hh:53
void Merge(const IonLet *lhs)
Definition IonLet.cc:66
array_type GetLETDN() const
Definition IonLet.hh:60
array_type fLETTN
Definition IonLet.hh:101
array_type fLETTD
Definition IonLet.hh:102
G4String fFullName
Definition IonLet.hh:92
G4String GetFullName() const
Definition IonLet.hh:54
array_type GetLETTD() const
Definition IonLet.hh:63
void Update(G4int voxel, G4double DE, G4double DEELETrons, G4double Lsn, G4double DX)
Definition IonLet.cc:52
array_type GetLETTN() const
Definition IonLet.hh:62
G4int GetA() const
Definition IonLet.hh:57
array_type GetLETDD() const
Definition IonLet.hh:61
void SetLETTN(array_type LETTN)
Definition IonLet.hh:71
G4bool operator<(const IonLet &a) const
Definition IonLet.hh:84
array_type fLETD
Definition IonLet.hh:103
array_type GetLETD() const
Definition IonLet.hh:66
array_type fLETT
Definition IonLet.hh:104
std::valarray< G4double > array_type
Definition IonLet.hh:50
array_type GetLETT() const
Definition IonLet.hh:67
G4bool IsPrimary() const
Definition IonLet.hh:52
void SetLETDD(array_type LETDD)
Definition IonLet.hh:70
G4String fName
Definition IonLet.hh:93
~IonLet()=default
IonLet(G4int trackID, G4int PDG, G4String fullname, G4String name, G4int Z, G4int A, G4int voxNumber)
Definition IonLet.cc:37
G4int fPDGencoding
Definition IonLet.hh:91
G4bool fIsPrimary
Definition IonLet.hh:90

Applications | User Support | Publications | Collaboration