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 ClassifiedDamage.hh
0029 /// \brief Definition of the ClassifiedDamage class
0030 
0031 #ifndef CLASSIFIEDDAMAGE_HH
0032 #define CLASSIFIEDDAMAGE_HH
0033 
0034 #include "Damage.hh"
0035 
0036 #include <vector>
0037 
0038 /// \brief defines a classified DNA damage
0039 class ClassifiedDamage
0040 {
0041 public:
0042 
0043 // DNA Classified Damage type
0044 //   Defines the type of damage ollowing SDD formalism 
0045   enum ClassifiedDamageType{
0046     fNA = -1,
0047     fSSB = 0,
0048     fDSB = 1
0049   };
0050 
0051   /// \brief constructor
0052   ClassifiedDamage();
0053   /// \brief destructor
0054   ~ClassifiedDamage() = default;
0055 
0056   // Compute the type of classified damage i.e. SSB or DSB
0057   void ComputeType();
0058   ClassifiedDamageType GetClassifiedDamageType() const {return fType;};
0059 
0060   const int GetNumDamage() const {return fDamage.size();};
0061   // Add a damage to the lst of damage
0062   void AddDamage(Damage);
0063 
0064   // Compute the position in terms of bp of the classified damage
0065   void ComputeBp();
0066   unsigned long int GetBpBegin() const{return fBp_begin;};
0067   unsigned long int GetBpEnd() const{return fBp_end;};
0068   unsigned long int GetBpBarycenter() const{return fBp_barycenter;};
0069 
0070   // TODO
0071   // Compute the coordinates of the classified damage
0072   void ComputePosition();
0073   /*
0074   Point GetPosBegin(){return fPos_begin;};
0075   Point GetPosEnd(){return fPos_end;};
0076   Point GetPosBarycenter(){return fPos_barycenter;};
0077   */
0078 
0079   // Compute the complexity of the classified damage
0080   void ComputeComplexity();
0081   int GetComplexity() const{return fComplexity;};
0082 
0083   // Reset the classified damage
0084   void Reset();
0085 
0086   // Tell if base damages have to be taken into account
0087   void SetIncludeBase(bool pVal) {fIncludeBase =  pVal;};
0088   bool GetIncludeBase() const {return fIncludeBase;};
0089 
0090   // Le Tuan Anh:
0091   bool GetIsThereDirectComponentContribution() const 
0092   {return fIsThereDirectContribution;} // Return true if there is at least 1 direct SB in this cluster
0093   bool GetIsThereIndirectComponentContribution() const 
0094   {return fIsThereIndirectContribution;} // Return true if there is at least 1 indirect SB in this cluster
0095 
0096 private:
0097 
0098   // CLASSIFIED DAMAGE MEMBERS
0099 
0100   std::vector<Damage>   fDamage;              // List of damage
0101   ClassifiedDamageType  fType;                // SSB or DSB or other?
0102   unsigned long int     fBp_begin{0};            // Position
0103   unsigned long int     fBp_end{0};
0104   unsigned long int     fBp_barycenter{0};
0105   int                   fComplexity{0};          // Complexity
0106   bool                  fIncludeBase{false};        // Base inclusion in the complexity
0107   bool fIsThereDirectContribution = false; // check if Direct damage appears in cluster a not?
0108   bool fIsThereIndirectContribution = false; // check if Indirect damage appears in cluster a not?
0109 
0110   };
0111 
0112 #endif // CLASSIFIEDDAMAGE_HH