48 fpRegisteredSBPoints()
51 std::set<SBPoint*>::iterator itPt;
52 for(itPt = pSBPoints.begin(); itPt != pSBPoints.end(); ++itPt)
67 std::set<SBPoint*>::iterator itPt;
68 for(itPt = fpRegisteredSBPoints.begin();
69 itPt != fpRegisteredSBPoints.end();
72 (*itPt)->CleanCluster();
74 fpRegisteredSBPoints.clear();
82 fpRegisteredSBPoints.insert(pSBPoint);
96 std::set<SBPoint* >::iterator itSDSPt;
97 for(itSDSPt = fpRegisteredSBPoints.begin();
98 itSDSPt != fpRegisteredSBPoints.end();
101 x+= (*itSDSPt)->GetPosition().x();
102 y+= (*itSDSPt)->GetPosition().y();
103 z+= (*itSDSPt)->GetPosition().z();
107 x/fpRegisteredSBPoints.size(),
108 y/fpRegisteredSBPoints.size(),
109 z/fpRegisteredSBPoints.size());
117 std::set<SBPoint* >::iterator itSDSPt;
118 for(itSDSPt = fpRegisteredSBPoints.begin();
119 itSDSPt != fpRegisteredSBPoints.end();
122 res += (*itSDSPt)->GetEdep();
129 void ClusterSBPoints::UpdateDoubleStrand()
132 bool firstStrandTouch =
false;
133 bool secondStrandTouch =
false;
135 std::set<SBPoint* >::iterator itSDSPt;
136 for(itSDSPt = fpRegisteredSBPoints.begin();
137 itSDSPt != fpRegisteredSBPoints.end();
141 if( ((*itSDSPt)->GetTouchedStrand() == 0 ) && !firstStrandTouch )
143 firstStrandTouch =
true;
144 if(secondStrandTouch)
151 if( ((*itSDSPt)->GetTouchedStrand() == 1 ) && !secondStrandTouch )
153 secondStrandTouch =
true;
180 if(((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2))<=
181 (pMinDist/
nm*pMinDist/
nm))
195 assert((
unsigned int)pMinPts > this->
GetSize());
196 std::vector<SBPoint*>::iterator itPt = pPtsToCheck->begin();
197 while(itPt != pPtsToCheck->end() )
203 if( (!(*itPt)->HasCluster())
204 && (fpRegisteredSBPoints.find(*itPt) == fpRegisteredSBPoints.end())
209 if(this->
GetSize() >= (
unsigned int)pMinPts)
214 itPt = pPtsToCheck->begin();
227 std::set<SBPoint*>::iterator itClusPt;
228 for(itClusPt = fpRegisteredSBPoints.begin();
229 itClusPt != fpRegisteredSBPoints.end();
233 if((*pPtToCheck != *(*itClusPt)))
260 if(((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2))<=
261 (pMinDist/
nm*pMinDist/
nm))
278 std::set<SBPoint*>::iterator itPt;
279 for(itPt = points.begin(); itPt != points.end(); ++itPt)
bool HasIn(const SBPoint *, G4double)
void AddSBPoint(SBPoint *pSBPoint)
Definition of the ClusterSBPoints class.
std::set< SBPoint * > GetRegistredSBPoints() const
CLHEP::Hep3Vector G4ThreeVector
define a cluster of SB Points
ClusterSBPoints(std::set< SBPoint * > pPoints)
unsigned int GetSize() const
void SetCluster(ClusterSBPoints *pCluster)
void FindAllPointsPossible(std::vector< SBPoint * > *ptToCheck, G4int minPts, G4double minDist)
void MergeWith(ClusterSBPoints *)
bool HasInBarycenter(const SBPoint *, G4double)
static constexpr double nm
G4ThreeVector GetBarycenter() const
G4ThreeVector GetPosition() const
defines a point of energy deposition which defines a damage to the DNA.
bool AreOnTheSameCluster(const SBPoint *pPt1, const SBPoint *pPt2, G4double pMinDist)