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5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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 
 36 namespace RadioBio
 37 {
 38 
 39 /// class to save and hold data for LET of different ions
 40 class 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.
 99     array_type fLETDN = {};
100     array_type fLETDD = {};
101     array_type fLETTN = {};
102     array_type fLETTD = {};
103     array_type fLETD = {};
104     array_type fLETT = {};
105 };
106 
107 }  // namespace RadioBio
108 
109 #endif  // IonLet_HH
110