Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
geometry
navigation
src
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 (davidw@scipp.ucsc.edu)
35
// --------------------------------------------------------------------
36
37
#include "
G4GeomTestOverlapList.hh
"
38
39
#include "
G4VPhysicalVolume.hh
"
40
#include "
G4LogicalVolume.hh
"
41
42
//
43
// Constructor
44
//
45
G4GeomTestOverlapList::G4GeomTestOverlapList
(
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
//
58
G4GeomTestOverlapList::G4GeomTestOverlapList
()
59
:
G4GeomTestErrorList
(0),
60
daughter1(0),
61
daughter2(0)
62
{}
63
64
65
//
66
// Destructor
67
//
68
G4GeomTestOverlapList::~G4GeomTestOverlapList
()
69
{}
70
71
72
//
73
// Comparison operators
74
//
75
G4bool
76
G4GeomTestOverlapList::operator==
(
const
G4GeomTestOverlapList
&other )
const
77
{
78
return
daughter1==other.daughter1 && daughter2==other.daughter2;
79
}
80
81
G4bool
82
G4GeomTestOverlapList::operator<
(
const
G4GeomTestOverlapList
&other )
const
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
//
95
const
G4VPhysicalVolume
*
G4GeomTestOverlapList::GetDaughter1
()
const
96
{
97
return
GetMother
()->
GetLogicalVolume
()->
GetDaughter
(daughter1);
98
}
99
100
const
G4VPhysicalVolume
*
G4GeomTestOverlapList::GetDaughter2
()
const
101
{
102
return
GetMother
()->
GetLogicalVolume
()->
GetDaughter
(daughter2);
103
}
104
105
G4int
G4GeomTestOverlapList::GetDaughter1Index
()
const
106
{
107
return
daughter1;
108
}
109
110
G4int
G4GeomTestOverlapList::GetDaughter2Index
()
const
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
//
122
void
G4GeomTestOverlapList::GetDaught1Points
(
G4int
i,
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
//
136
void
G4GeomTestOverlapList::GetDaught2Points
(
G4int
i,
137
G4ThreeVector
&s1,
138
G4ThreeVector
&s2 )
const
139
{
140
GetOneDaughtPoints
(
GetDaughter2
(), i, s1, s2 );
141
}
Generated on Sat May 25 2013 14:33:11 for Geant4 by
1.8.4