Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClusteringAlgo.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 // This example is provided by the Geant4-DNA collaboration
27 // Any report or published results obtained using the Geant4-DNA software
28 // shall cite the following Geant4-DNA collaboration publication:
29 // Med. Phys. 37 (2010) 4692-4708
30 // The Geant4-DNA web site is available at http://geant4-dna.org
31 //
32 // Authors: Henri Payno and Yann Perrot
33 //
34 // $Id$
35 //
38 
39 #ifndef ClusteringAlgo_H
40 #define ClusteringAlgo_H 1
41 
42 #include "ClusterSBPoints.hh"
43 #include "SBPoint.hh"
44 
45 #include <map>
46 
48 
50 {
51 public:
52 
53  ClusteringAlgo(G4double pEps, G4int pMinPts, G4double pSPointsProb,
54  G4double pEMinDamage, G4double pEMaxDamage);
56 
57  // Get Set methods
59  {
60  return fEps;
61  };
62  void SetEps(G4double val)
63  {
64  fEps=val;
65  };
67  {
68  return fMinPts;
69  };
70  void SetMinPts(G4int val)
71  {
72  fMinPts=val;
73  };
75  {
76  return fSPointsProb;
77  };
79  {
80  fSPointsProb=val;
81  };
83  {
84  return fEMinDamage;
85  };
87  {
88  fEMinDamage=val;
89  };
91  {
92  return fEMaxDamage;
93  };
95  {
96  fEMaxDamage=val;
97  };
98 
99  // Register a damage (position, edep)
101 
102  // Clustering Algorithm
103  std::map<G4int,G4int> RunClustering();
104 
105  // Clean all data structures
106  void Purge();
107 
108  // Return the number of simple break
109  G4int GetSSB() const;
110  // Return the number of complex simple break
111  G4int GetComplexSSB() const;
112  // Return the number of double strand break
113  G4int GetDSB() const;
114  // Return a map representing cluster size distribution
115  // first G4int : cluster size (1 = SSB)
116  // second G4int : counts
117  std::map<G4int,G4int> GetClusterSizeDistribution();
118 
119 private:
120 
121  // Functions to check if SB candidate
122  G4bool IsInSensitiveArea();
123  G4bool IsEdepSufficient(G4double);
124  // Check if a SB point can be merged to a cluster, and do it
125  bool FindCluster(SBPoint* pPt);
126  // Check if two points can be merged
127  bool AreOnTheSameCluster(G4ThreeVector, G4ThreeVector,G4double);
128  // Merge clusters
129  void MergeClusters();
130  // Add SSB to clusters
131  void IncludeUnassociatedPoints();
132 
133  // Parameters to run clustering algorithm
134  G4double fEps; // distance to merge SBPoints
135  G4int fMinPts; // number of SBPoints to create a cluster
136  G4double fSPointsProb; // probability for a point to be in the sensitive area
137  G4double fEMinDamage; // min energy to create a damage
138  G4double fEMaxDamage; // energy to have a probability to create a damage = 1
139 
140  // Data structure containing all SB points
141  std::vector<SBPoint*> fpSetOfPoints;
142  // Datya structure containing all clusters
143  std::vector<ClusterSBPoints*> fpClusters;
144  // ID of the next SB point
145  unsigned int fNextSBPointID;
146 
147  ClusteringAlgoMessenger* fpClustAlgoMessenger;
148 
149 };
150 
151 #endif
152 
void SetEMinDamage(G4double val)
Definition of the ClusterSBPoints class.
G4int GetComplexSSB() const
void SetEps(G4double val)
Definition of the SBPoint class.
G4int GetSSB() const
std::map< G4int, G4int > RunClustering()
int G4int
Definition: G4Types.hh:78
G4double GetSPointsProb()
bool G4bool
Definition: G4Types.hh:79
ClusteringAlgo(G4double pEps, G4int pMinPts, G4double pSPointsProb, G4double pEMinDamage, G4double pEMaxDamage)
G4double GetEps()
std::map< G4int, G4int > GetClusterSizeDistribution()
void SetEMaxDamage(G4double val)
void RegisterDamage(G4ThreeVector, G4double)
void SetSPointsProb(G4double val)
G4double GetEMinDamage()
G4int GetDSB() const
G4double GetEMaxDamage()
void SetMinPts(G4int val)
double G4double
Definition: G4Types.hh:76
defines a point of energy deposition which defines a damage to the DNA.
Definition: SBPoint.hh:47