Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-28 09:20:43

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 //
0028 /// \file TLKModel.hh
0029 /// \brief Definition of the TLKModel class
0030 
0031 #ifndef TLKMODEL_HH
0032 #define TLKMODEL_HH
0033 
0034 //#include <boost/numeric/odeint.hpp>
0035 #include <vector>
0036 #include <string>
0037 class Damage;
0038 class TLKModel
0039 {
0040 public:
0041     
0042   /// \brief constructor
0043     TLKModel(double pLambda1 =-1,double pLambda2=-1, double pBeta1=-1, double pBeta2=-1,double pEta=-1);
0044   /// \brief destructor
0045     ~TLKModel() = default;
0046 
0047     double GetLambda1(){return fLambda1;};
0048     void SetLambda1(double pVal){fLambda1 = pVal;};
0049     double GetLambda2(){return fLambda2;};
0050     void SetLambda2(double pVal){fLambda2 = pVal;};
0051     double GetBeta1(){return fBeta1;};
0052     void SetBeta1(double pVal){fBeta1 = pVal;};
0053     double GetBeta2(){return fBeta2;};
0054     void SetBeta2(double pVal){fBeta2 = pVal;};
0055     double GetEta(){return fEta;};
0056     void SetEta(double pVal){fEta = pVal;};
0057 
0058     double GetSingleDSBYield(){return fSingleDSBYield;};
0059     void SetSingleDSBYield(double pVal){fSingleDSBYield = pVal;};
0060 
0061     double GetComplexDSBYield(){return fComplexDSBYield;};
0062     void SetComplexDSBYield(double pVal){fComplexDSBYield = pVal;};
0063 
0064     unsigned int GetBpForDSB(){return fBpForDSB;};
0065     void SetBpForDSB(unsigned int pVal){fBpForDSB = pVal;};
0066 
0067     double GetStartTime(){return fStartTime;};
0068     void SetStartTime(double pVal){fStartTime = pVal;};
0069     double GetStopTime(){return fStopTime;};
0070     void SetStopTime(double pVal){fStopTime = pVal;};
0071     double GetStepTime(){return fStepTime;};
0072     void SetStepTime(double pVal){fStepTime = pVal;};
0073 
0074     // Compute damage inputs required by TLK model
0075     void ComputeAndSetDamageInput(std::vector<Damage>);
0076 
0077     // Compute SF for a given absorbed dose expressed in Gy
0078     double ComputeSF(double pDose);
0079 
0080     // Compute a SF Curve
0081     void CalculateRepair(double pDoseMax, double pDeltaDose);
0082 
0083     // Write output, dose expressed in Gy
0084     void WriteOutput(std::string pFileName);
0085     
0086     void SetDose(double d) {fDose = d;}
0087 private:
0088     std::vector<double> TLK_odes_system(double t,std::vector<double> y);
0089     // TLK parameters
0090     // simple DSB repair probability (h-1)  
0091     double fLambda1{0};
0092     // complex DSB repair probability (h-1) 
0093     double fLambda2{0};
0094     // simple DSB misrepair probability (h-1)
0095     double fBeta1{0};
0096     // complex DSB misrepair probability (h-1)
0097     double fBeta2{0};
0098     // binary misrepair probability (h-1)
0099     double fEta{0};
0100 
0101     // DSB Yields in Gy-1
0102     double fSingleDSBYield{0};
0103     double fComplexDSBYield{0};
0104 
0105     // num of bp to consider a DSB for the MakeCluster function
0106     // default value is 10
0107     unsigned int fBpForDSB{10};
0108 
0109     // Time for integration
0110     double fStartTime{0};
0111     double fStopTime{0};
0112     double fStepTime{0};
0113 
0114     // SF curve
0115     std::vector<std::pair<double,double>> fSFCurve;
0116     // store dose deposited in nucleus cell
0117     double fDose{0};
0118 };
0119 
0120 #endif