G4GeomTestVolPoint.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // --------------------------------------------------------------------
00030 // GEANT 4 class source file
00031 //
00032 // G4GeomTestVolPoint
00033 //
00034 // Author: D.C.Williams, UCSC (davidw@scipp.ucsc.edu)
00035 // --------------------------------------------------------------------
00036 
00037 #include "G4GeomTestVolPoint.hh"
00038 
00039 //
00040 // Constructor (specific)
00041 //
00042 G4GeomTestVolPoint::G4GeomTestVolPoint( const G4ThreeVector &thePoint,
00043                                               G4double theS,
00044                                               G4bool isEntering,
00045                                               G4int theDaughterIndex )
00046   : G4GeomTestPoint( thePoint, theS, isEntering ),
00047     daughterIndex(theDaughterIndex)
00048 {;}
00049 
00050 
00051 //
00052 // Constructor (from base)
00053 //
00054 G4GeomTestVolPoint::G4GeomTestVolPoint( const G4GeomTestPoint &base,
00055                                               G4int theDaughterIndex )
00056   : G4GeomTestPoint( base ), daughterIndex(theDaughterIndex)
00057 {;}
00058 
00059 
00060 //
00061 // Constructor (from base, with coordinate transformation)
00062 //
00063 G4GeomTestVolPoint::G4GeomTestVolPoint( const G4GeomTestPoint &base,
00064                                               G4int theDaughterIndex,
00065                                         const G4ThreeVector &translation,
00066                                         const G4RotationMatrix *rotation )
00067   : G4GeomTestPoint( base ), daughterIndex(theDaughterIndex)
00068 {
00069   //
00070   // Rotate point
00071   //
00072   if (rotation)
00073     p = rotation->inverse()*p - translation;
00074   else
00075     p = p - translation;
00076 }
00077 
00078 
00079 //
00080 // Constructor (copy)
00081 //
00082 G4GeomTestVolPoint::G4GeomTestVolPoint( const G4GeomTestVolPoint &other )
00083   : G4GeomTestPoint( other ), daughterIndex(other.daughterIndex)
00084 {;}
00085 
00086 
00087 //
00088 // Constructor (default)
00089 //
00090 G4GeomTestVolPoint::G4GeomTestVolPoint()
00091   : daughterIndex(-1)
00092 {;}
00093 
00094 
00095 //
00096 // Destructor
00097 //
00098 G4GeomTestVolPoint::~G4GeomTestVolPoint() {;}
00099 
00100 
00101 //
00102 // Assignment operator
00103 //
00104 G4GeomTestVolPoint&
00105 G4GeomTestVolPoint::operator=(const G4GeomTestVolPoint& other)
00106 {
00107    // Check assignment to self
00108    //
00109    if (this == &other)  { return *this; }
00110 
00111    // Copy base class data
00112    //
00113    G4GeomTestPoint::operator=(other);
00114 
00115    // Copy data
00116    //
00117    daughterIndex = other.daughterIndex;
00118 
00119    return *this;
00120 }
00121 
00122 
00123 //
00124 // Volume accessor
00125 //
00126 G4int G4GeomTestVolPoint::GetDaughterIndex() const
00127 {
00128   return daughterIndex;
00129 }

Generated on Mon May 27 17:48:22 2013 for Geant4 by  doxygen 1.4.7