source: trunk/source/geometry/navigation/include/G4GeomTestErrorList.hh @ 1202

Last change on this file since 1202 was 921, checked in by garnier, 15 years ago

en test de gl2ps. Problemes de libraries

File size: 4.1 KB
Line 
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: G4GeomTestErrorList.hh,v 1.3 2006/06/29 18:35:38 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-cand-01 $
29//
30// --------------------------------------------------------------------
31// GEANT 4 class header file
32//
33// G4GeomTestErrorList
34//
35// Class description:
36//
37// A list of line segments that are found inside two
38// separate daughter volumes, indicating a geometry error.
39//
40// This class relies on the compiler generated copy constructor
41// and assignment operator.
42
43// Author: D.C.Williams, UCSC (davidw@scipp.ucsc.edu)
44// --------------------------------------------------------------------
45#ifndef G4GeomTestErrorList_hh
46#define G4GeomTestErrorList_hh
47
48#include <vector>
49
50#include "G4Types.hh"
51#include "G4ThreeVector.hh"
52#include "G4RotationMatrix.hh"
53
54class G4VPhysicalVolume;
55
56class G4GeomTestErrorList
57{
58  public:  // with description
59 
60    G4GeomTestErrorList( const G4VPhysicalVolume *theMother );
61    virtual ~G4GeomTestErrorList();
62      // Constructor and virtual destructor
63
64    void AddError( const G4ThreeVector &s1, const G4ThreeVector &s2  );
65      // Declare a new instance of an error, by specifying
66      // two points in the coordinate system of the mother
67
68    const G4VPhysicalVolume *GetMother() const;
69      // Return pointers to mother volume
70
71    G4int NumError() const;
72      // Return number of errors
73
74    void GetMotherPoints( G4int i, G4ThreeVector &s1, G4ThreeVector &s2 ) const;
75    void GetGlobalPoints( G4int i, G4ThreeVector &s1, G4ThreeVector &s2 ) const;
76      // Return start and end points in various
77      // coordinate systems
78
79    void GetOneDaughtPoints( const G4VPhysicalVolume *daught,
80                          G4int i, G4ThreeVector &s1, G4ThreeVector &s2 ) const;
81      // Return start and end points in the coordinate system of a
82      // daughter volume
83
84  private:
85 
86    void FindGlobalCoordinateSystem();
87      // Calculate the global coordinate system
88
89    class Segment
90    {
91      public:
92        Segment( const G4ThreeVector &as1, const G4ThreeVector &as2 )
93          : s1(as1), s2(as2) {;}
94   
95        const G4ThreeVector &GetS1() const { return s1; }
96        const G4ThreeVector &GetS2() const { return s2; }
97   
98      private:
99        G4ThreeVector s1, s2;
100    };
101    std::vector<Segment> segments;
102      // List of error segments
103
104    const G4VPhysicalVolume *mother;
105      // Mother volume
106
107    G4ThreeVector globalTranslation;
108    G4RotationMatrix globalRotation;
109      // Global coordinate system with respect to mother
110};
111
112#endif
Note: See TracBrowser for help on using the repository browser.