Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GeomTestOverlapList.cc
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//
27// $Id$
28//
29// --------------------------------------------------------------------
30// GEANT 4 class source file
31//
32// G4GeomTestOverlapList
33//
34// Author: D.C.Williams, UCSC ([email protected])
35// --------------------------------------------------------------------
36
38
39#include "G4VPhysicalVolume.hh"
40#include "G4LogicalVolume.hh"
41
42//
43// Constructor
44//
46 const G4VPhysicalVolume *theMother,
47 G4int theDaughter1,
48 G4int theDaughter2 )
49 : G4GeomTestErrorList(theMother),
50 daughter1(theDaughter1),
51 daughter2(theDaughter2)
52{}
53
54
55//
56// Default constructor
57//
60 daughter1(0),
61 daughter2(0)
62{}
63
64
65//
66// Destructor
67//
69{}
70
71
72//
73// Comparison operators
74//
77{
78 return daughter1==other.daughter1 && daughter2==other.daughter2;
79}
80
83{
84 if (daughter1 > other.daughter1) return false;
85 if (daughter1 < other.daughter1) return true;
86
87 return (daughter2 < other.daughter2);
88}
89
90
91
92//
93// Accessors
94//
96{
97 return GetMother()->GetLogicalVolume()->GetDaughter(daughter1);
98}
99
101{
102 return GetMother()->GetLogicalVolume()->GetDaughter(daughter2);
103}
104
106{
107 return daughter1;
108}
109
111{
112 return daughter2;
113}
114
115
116//
117// GetDaught1Points
118//
119// Return start and end points in the coordinate system of
120// the first daughter
121//
123 G4ThreeVector &s1,
124 G4ThreeVector &s2 ) const
125{
126 GetOneDaughtPoints( GetDaughter1(), i, s1, s2 );
127}
128
129
130//
131// GetDaught2Points
132//
133// Return start and end points in the coordinate system of
134// the second daughter
135//
137 G4ThreeVector &s1,
138 G4ThreeVector &s2 ) const
139{
140 GetOneDaughtPoints( GetDaughter2(), i, s1, s2 );
141}
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
const G4VPhysicalVolume * GetMother() const
void GetOneDaughtPoints(const G4VPhysicalVolume *daught, G4int i, G4ThreeVector &s1, G4ThreeVector &s2) const
G4bool operator<(const G4GeomTestOverlapList &other) const
void GetDaught2Points(G4int, G4ThreeVector &, G4ThreeVector &) const
void GetDaught1Points(G4int, G4ThreeVector &, G4ThreeVector &) const
const G4VPhysicalVolume * GetDaughter1() const
const G4VPhysicalVolume * GetDaughter2() const
G4bool operator==(const G4GeomTestOverlapList &other) const
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4LogicalVolume * GetLogicalVolume() const