Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClusteringAlgo Class Reference

#include <ClusteringAlgo.hh>

Public Member Functions

 ClusteringAlgo (G4double pEps, G4int pMinPts, G4double pSPointsProb, G4double pEMinDamage, G4double pEMaxDamage)
 
 ~ClusteringAlgo ()
 
G4double GetEps ()
 
void SetEps (G4double val)
 
G4int GetMinPts ()
 
void SetMinPts (G4int val)
 
G4double GetSPointsProb ()
 
void SetSPointsProb (G4double val)
 
G4double GetEMinDamage ()
 
void SetEMinDamage (G4double val)
 
G4double GetEMaxDamage ()
 
void SetEMaxDamage (G4double val)
 
void RegisterDamage (G4ThreeVector, G4double)
 
std::map< G4int, G4intRunClustering ()
 
void Purge ()
 
G4int GetSSB () const
 
G4int GetComplexSSB () const
 
G4int GetDSB () const
 
std::map< G4int, G4intGetClusterSizeDistribution ()
 

Detailed Description

Definition at line 49 of file ClusteringAlgo.hh.

Constructor & Destructor Documentation

ClusteringAlgo::ClusteringAlgo ( G4double  pEps,
G4int  pMinPts,
G4double  pSPointsProb,
G4double  pEMinDamage,
G4double  pEMaxDamage 
)

Definition at line 51 of file ClusteringAlgo.cc.

53 :fEps(pEps),fMinPts(pMinPts),
54  fSPointsProb(pSPointsProb),fEMinDamage(pEMinDamage),fEMaxDamage(pEMaxDamage)
55 {
56  fNextSBPointID = 0;
57  fpClustAlgoMessenger = new ClusteringAlgoMessenger(this);
58 }
ClusteringAlgo::~ClusteringAlgo ( )

Definition at line 62 of file ClusteringAlgo.cc.

63 {
64  delete fpClustAlgoMessenger;
65  Purge();
66 }

Here is the call graph for this function:

Member Function Documentation

map< G4int, G4int > ClusteringAlgo::GetClusterSizeDistribution ( )

Definition at line 333 of file ClusteringAlgo.cc.

334 {
335  std::map<G4int,G4int> sizeDistribution;
336  sizeDistribution[1]=GetSSB();
337  std::vector<ClusterSBPoints*>::const_iterator itCluster;
338  for(itCluster = fpClusters.begin();
339  itCluster != fpClusters.end();
340  itCluster++)
341  {
342  sizeDistribution[(*itCluster)->GetSize()]++;
343  }
344  return sizeDistribution;
345 }
G4int GetSSB() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4int ClusteringAlgo::GetComplexSSB ( ) const

Definition at line 297 of file ClusteringAlgo.cc.

298 {
299  G4int nbSSB = 0;
300  std::vector<ClusterSBPoints*>::const_iterator itCluster;
301  for(itCluster = fpClusters.begin();
302  itCluster != fpClusters.end();
303  ++itCluster)
304  {
305  if((*itCluster)->IsSSB())
306  {
307  nbSSB ++;
308  }
309  }
310  return nbSSB;
311 }
int G4int
Definition: G4Types.hh:78
G4int ClusteringAlgo::GetDSB ( ) const

Definition at line 315 of file ClusteringAlgo.cc.

316 {
317  G4int nbDSB = 0;
318  std::vector<ClusterSBPoints*>::const_iterator itCluster;
319  for(itCluster = fpClusters.begin();
320  itCluster != fpClusters.end();
321  ++itCluster)
322  {
323  if((*itCluster)->IsDSB())
324  {
325  nbDSB ++;
326  }
327  }
328  return nbDSB;
329 }
int G4int
Definition: G4Types.hh:78
G4double ClusteringAlgo::GetEMaxDamage ( )
inline

Definition at line 90 of file ClusteringAlgo.hh.

91  {
92  return fEMaxDamage;
93  };
G4double ClusteringAlgo::GetEMinDamage ( )
inline

Definition at line 82 of file ClusteringAlgo.hh.

83  {
84  return fEMinDamage;
85  };
G4double ClusteringAlgo::GetEps ( )
inline

Definition at line 58 of file ClusteringAlgo.hh.

59  {
60  return fEps;
61  };
G4int ClusteringAlgo::GetMinPts ( )
inline

Definition at line 66 of file ClusteringAlgo.hh.

67  {
68  return fMinPts;
69  };
G4double ClusteringAlgo::GetSPointsProb ( )
inline

Definition at line 74 of file ClusteringAlgo.hh.

75  {
76  return fSPointsProb;
77  };
G4int ClusteringAlgo::GetSSB ( ) const

Definition at line 279 of file ClusteringAlgo.cc.

280 {
281  G4int nbSSB = 0;
282  std::vector<SBPoint*>::const_iterator itSDSPt;
283  for(itSDSPt = fpSetOfPoints.begin();
284  itSDSPt != fpSetOfPoints.end();
285  ++itSDSPt)
286  {
287  if(!(*itSDSPt)->HasCluster())
288  {
289  nbSSB++;
290  }
291  }
292  return nbSSB;
293 }
int G4int
Definition: G4Types.hh:78

Here is the caller graph for this function:

void ClusteringAlgo::Purge ( )

Definition at line 349 of file ClusteringAlgo.cc.

350 {
351  fNextSBPointID = 0;
352  std::vector<ClusterSBPoints*>::iterator itCluster;
353  for(itCluster = fpClusters.begin();
354  itCluster != fpClusters.end();
355  ++itCluster)
356  {
357  delete *itCluster;
358  *itCluster = NULL;
359  }
360  fpClusters.clear();
361  std::vector<SBPoint*>::iterator itPt;
362  for(itPt = fpSetOfPoints.begin();
363  itPt != fpSetOfPoints.end();
364  ++itPt)
365  {
366  delete *itPt;
367  *itPt = NULL;
368  }
369  fpSetOfPoints.clear();
370 }

Here is the caller graph for this function:

void ClusteringAlgo::RegisterDamage ( G4ThreeVector  pPos,
G4double  pEdep 
)

Definition at line 105 of file ClusteringAlgo.cc.

106 {
107  if(IsEdepSufficient(pEdep))
108  {
109  if(IsInSensitiveArea())
110  {
111  fpSetOfPoints.push_back( new SBPoint(fNextSBPointID++, pPos, pEdep));
112  }
113  }
114 }
defines a point of energy deposition which defines a damage to the DNA.
Definition: SBPoint.hh:47
map< G4int, G4int > ClusteringAlgo::RunClustering ( )

Definition at line 118 of file ClusteringAlgo.cc.

119 {
120 
121  // quick sort style
122  // create cluster
123  std::vector<SBPoint*>::iterator itVisitorPt, itObservedPt;
124  for(itVisitorPt = fpSetOfPoints.begin();
125  itVisitorPt != fpSetOfPoints.end();
126  ++itVisitorPt )
127  {
128  itObservedPt = itVisitorPt;
129  itObservedPt ++;
130  while(itObservedPt != fpSetOfPoints.end() )
131  {
132  // if at least one of the two points has not a cluster
133  if(!((*itObservedPt)->HasCluster() && (*itVisitorPt)->HasCluster()))
134  {
135  if(AreOnTheSameCluster( (*itObservedPt)->GetPosition(),
136  (*itVisitorPt)->GetPosition(),fEps))
137  {
138  // if none has a cluster. Create a new one
139  if(!(*itObservedPt)->HasCluster() && !(*itVisitorPt)->HasCluster())
140  {
141  // create the new cluster
142  set<SBPoint*> clusterPoints;
143  clusterPoints.insert((*itObservedPt));
144  clusterPoints.insert((*itVisitorPt));
145  ClusterSBPoints* lCluster = new ClusterSBPoints(clusterPoints);
146  assert(lCluster);
147  fpClusters.push_back(lCluster);
148  assert(lCluster);
149  // inform SB point that they are part of a cluster now
150  assert(lCluster);
151  (*itObservedPt)->SetCluster(lCluster);
152  assert(lCluster);
153  (*itVisitorPt)->SetCluster(lCluster);
154  }else
155  {
156  // add the point to the existing cluster
157  if((*itObservedPt)->HasCluster())
158  {
159  (*itObservedPt)->GetCluster()->AddSBPoint((*itVisitorPt));
160  (*itVisitorPt)->SetCluster((*itObservedPt)->GetCluster());
161  }
162 
163  if((*itVisitorPt)->HasCluster())
164  {
165  (*itVisitorPt)->GetCluster()->AddSBPoint((*itObservedPt));
166  (*itObservedPt)->SetCluster((*itVisitorPt)->GetCluster());
167  }
168  }
169  }
170  }
171  ++itObservedPt;
172  }
173  }
174 
175  // associate isolated points and merge clusters
176  IncludeUnassociatedPoints();
177  MergeClusters();
178 
179  // return cluster size distribution
181 }
define a cluster of SB Points
std::map< G4int, G4int > GetClusterSizeDistribution()
bool AreOnTheSameCluster(const SBPoint *pPt1, const SBPoint *pPt2, G4double pMinDist)

Here is the call graph for this function:

void ClusteringAlgo::SetEMaxDamage ( G4double  val)
inline

Definition at line 94 of file ClusteringAlgo.hh.

95  {
96  fEMaxDamage=val;
97  };

Here is the caller graph for this function:

void ClusteringAlgo::SetEMinDamage ( G4double  val)
inline

Definition at line 86 of file ClusteringAlgo.hh.

87  {
88  fEMinDamage=val;
89  };

Here is the caller graph for this function:

void ClusteringAlgo::SetEps ( G4double  val)
inline

Definition at line 62 of file ClusteringAlgo.hh.

63  {
64  fEps=val;
65  };

Here is the caller graph for this function:

void ClusteringAlgo::SetMinPts ( G4int  val)
inline

Definition at line 70 of file ClusteringAlgo.hh.

71  {
72  fMinPts=val;
73  };

Here is the caller graph for this function:

void ClusteringAlgo::SetSPointsProb ( G4double  val)
inline

Definition at line 78 of file ClusteringAlgo.hh.

79  {
80  fSPointsProb=val;
81  };

Here is the caller graph for this function:


The documentation for this class was generated from the following files: