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: G4GeomTestOvershootList.cc,v 1.3 2006/06/29 18:36:41 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-04-ref-00 $ |
---|
29 | // |
---|
30 | // -------------------------------------------------------------------- |
---|
31 | // GEANT 4 class source file |
---|
32 | // |
---|
33 | // G4GeomTestOvershootList |
---|
34 | // |
---|
35 | // Author: D.C.Williams, UCSC (davidw@scipp.ucsc.edu) |
---|
36 | // -------------------------------------------------------------------- |
---|
37 | |
---|
38 | #include "G4GeomTestOvershootList.hh" |
---|
39 | |
---|
40 | #include "G4VPhysicalVolume.hh" |
---|
41 | #include "G4LogicalVolume.hh" |
---|
42 | |
---|
43 | // |
---|
44 | // Constructor |
---|
45 | // |
---|
46 | G4GeomTestOvershootList::G4GeomTestOvershootList( |
---|
47 | const G4VPhysicalVolume *theMother, |
---|
48 | G4int theDaughterIndex ) |
---|
49 | : G4GeomTestErrorList(theMother), |
---|
50 | daughter(theDaughterIndex) |
---|
51 | {} |
---|
52 | |
---|
53 | |
---|
54 | // |
---|
55 | // Default constructor |
---|
56 | // |
---|
57 | G4GeomTestOvershootList::G4GeomTestOvershootList() |
---|
58 | : G4GeomTestErrorList(0), |
---|
59 | daughter(0) |
---|
60 | {} |
---|
61 | |
---|
62 | |
---|
63 | // |
---|
64 | // Destructor |
---|
65 | // |
---|
66 | G4GeomTestOvershootList::~G4GeomTestOvershootList() |
---|
67 | {} |
---|
68 | |
---|
69 | |
---|
70 | // |
---|
71 | // Comparison operators |
---|
72 | // |
---|
73 | G4bool |
---|
74 | G4GeomTestOvershootList::operator==( const G4GeomTestOvershootList &other ) const |
---|
75 | { |
---|
76 | return daughter==other.daughter; |
---|
77 | } |
---|
78 | |
---|
79 | G4bool |
---|
80 | G4GeomTestOvershootList::operator< ( const G4GeomTestOvershootList &other ) const |
---|
81 | { |
---|
82 | return (daughter < other.daughter); |
---|
83 | } |
---|
84 | |
---|
85 | |
---|
86 | |
---|
87 | // |
---|
88 | // Accessors |
---|
89 | // |
---|
90 | const G4VPhysicalVolume *G4GeomTestOvershootList::GetDaughter() const |
---|
91 | { |
---|
92 | return GetMother()->GetLogicalVolume()->GetDaughter(daughter); |
---|
93 | } |
---|
94 | |
---|
95 | G4int G4GeomTestOvershootList::GetDaughterIndex() const |
---|
96 | { |
---|
97 | return daughter; |
---|
98 | } |
---|
99 | |
---|
100 | |
---|
101 | // |
---|
102 | // GetDaughtPoints |
---|
103 | // |
---|
104 | // Return start and end points in the coordinate system of |
---|
105 | // the daughter |
---|
106 | // |
---|
107 | void G4GeomTestOvershootList::GetDaughtPoints( G4int i, |
---|
108 | G4ThreeVector &s1, |
---|
109 | G4ThreeVector &s2 ) const |
---|
110 | { |
---|
111 | GetOneDaughtPoints( GetDaughter(), i, s1, s2 ); |
---|
112 | } |
---|