Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:21:59

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 Damage.hh
0029 /// \brief Definition of the Damage class
0030 
0031 #ifndef DAMAGE_HH
0032 #define DAMAGE_HH
0033 
0034 struct Position
0035 {
0036   Position(double v1,double v2,double v3): x(v1), y(v2), z(v3) {}
0037   double x=0;
0038   double y=0;
0039   double z=0;
0040   void setX(double v) {x=v;}
0041   void setY(double v) {y=v;}
0042   void setZ(double v) {z=v;}
0043 };
0044 
0045 /// \brief defines a DNA damage
0046 class Damage
0047 {
0048 public:
0049 
0050 /** DNA Damage type
0051 *   Defines the molecule type of damaged DNA following SDD formalism 
0052 */
0053   enum DamageType{
0054     fOther = -1,
0055     fBackbone = 0,
0056     fBase = 1
0057   };
0058 
0059 /** DNA Damage cause
0060 *   Defines the cause of DNA damage following SDD formalism 
0061 */
0062   enum DamageCause{
0063     fUnknown = -1,
0064     fDirect = 0,
0065     fIndirect = 1
0066   };
0067 
0068 /** Damaged DNA
0069 *   Defines the damaged DNA structure following SDD formalism 
0070 */
0071   enum DamageChromatin{
0072     fUnspecified = 0,
0073     fHeterochromatin = 1,
0074     fEuchromatin = 2,
0075     fFreeDNA = 3,
0076     fOtherDNA = 4
0077   };
0078   
0079   /// \brief constructor
0080   Damage(DamageType,unsigned int,unsigned int,unsigned int,unsigned long int,Position,DamageCause,DamageChromatin);
0081   /// \brief destructor
0082   ~Damage() = default;
0083 
0084   // Getters and setters
0085 
0086   void SetDamageType(DamageType pVal){fType=pVal;};
0087   DamageType GetDamageType(){return fType;};
0088 
0089   void SetChromo(unsigned int pVal){fChromo=pVal;};
0090   unsigned int GetChromo() const{return fChromo;};
0091 
0092   void SetEvt(unsigned int pVal){fEvt=pVal;};
0093   unsigned int GetEvt() const{return fEvt;};
0094 
0095   void SetStrand(unsigned int pVal){fStrand=pVal;};
0096   unsigned int GetStrand() const{return fStrand;};
0097 
0098   void SetCopyNb(unsigned long int pVal){fCopyNb=pVal;};
0099   unsigned long int GetCopyNb() const{return fCopyNb;};
0100 
0101   void SetCause(DamageCause pVal){fCause=pVal;};
0102   DamageCause GetCause() const{return fCause;};
0103 
0104   void SetDamageChromatin(DamageChromatin pVal){fChromatin=pVal;};
0105   DamageChromatin GetDamageChromatin(){return fChromatin;};
0106 
0107   bool operator != (const Damage& ) const;
0108   bool operator == (const Damage& ) const;
0109 
0110 private:
0111   
0112   DamageType        fType;    // SB or BD?
0113   unsigned int      fChromo;  // chromosome ID
0114   unsigned int      fEvt;     // event number
0115   unsigned int      fStrand;  // Strand
0116   unsigned long int fCopyNb;  // Copy number
0117   Position             fPosition;// Position
0118   DamageCause       fCause;  // Direct or indirect damage?
0119   DamageChromatin   fChromatin;   // hetero or euchromatin?
0120 };
0121 
0122 #endif // DAMAGE_HH