G4AssemblyTriplet.icc

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 // Class G4AssemblyTriplet - inline implementation
00031 //
00032 // ----------------------------------------------------------------------
00033 
00034 inline
00035 G4AssemblyTriplet::G4AssemblyTriplet()
00036   : fVolume( 0 ), fRotation( 0 ), fAssembly(0), fIsReflection(false)
00037 {
00038   G4ThreeVector v(0.,0.,0.);
00039   fTranslation = v;
00040 }
00041 
00042 inline
00043 G4AssemblyTriplet::G4AssemblyTriplet( G4LogicalVolume* pVolume,
00044                                       G4ThreeVector& translation,
00045                                       G4RotationMatrix* pRotation,
00046                                       G4bool isReflection )
00047   : fVolume( pVolume ), fTranslation( translation ), fRotation( pRotation ),
00048     fAssembly( 0 ), fIsReflection(isReflection)
00049 {
00050 }
00051 
00052 inline
00053 G4AssemblyTriplet::G4AssemblyTriplet( G4AssemblyVolume* pAssembly,
00054                                       G4ThreeVector& translation,
00055                                       G4RotationMatrix* pRotation,
00056                                       G4bool isReflection )
00057   : fVolume( 0 ), fTranslation( translation ), fRotation( pRotation ),
00058     fAssembly( pAssembly ), fIsReflection(isReflection) 
00059 {
00060 }
00061 
00062 inline
00063 G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& scopy )
00064 {
00065   fVolume       = scopy.GetVolume();
00066   fRotation     = scopy.GetRotation();
00067   fTranslation  = scopy.GetTranslation();
00068   fAssembly     = scopy.GetAssembly();
00069   fIsReflection = scopy.IsReflection();
00070 }
00071 
00072 inline
00073 G4AssemblyTriplet::~G4AssemblyTriplet()
00074 {
00075 }
00076 
00077 inline
00078 G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
00079 {
00080   return fVolume;
00081 }
00082 
00083 inline
00084 void G4AssemblyTriplet::SetVolume( G4LogicalVolume* pVolume )
00085 {
00086   if ( fAssembly ) 
00087   {
00088     G4Exception("G4AssemblyTriplet::SetVolume()",
00089                 "GeomVol1001", JustWarning,
00090                 "There is an assembly already set, it will be ignored.");
00091   }
00092   fVolume = pVolume;
00093   fAssembly = 0;
00094 }
00095 
00096 inline
00097 G4AssemblyVolume* G4AssemblyTriplet::GetAssembly() const
00098 {
00099   return fAssembly;
00100 }
00101 
00102 inline
00103 void G4AssemblyTriplet::SetAssembly( G4AssemblyVolume* pAssembly )
00104 {
00105   if ( fVolume ) 
00106   {
00107     G4Exception("G4AssemblyTriplet::SetAssembly()",
00108                 "GeomVol1001", JustWarning,
00109                 "There is a volume already set, it will be ignored.");
00110   }
00111   fAssembly = pAssembly;
00112   fVolume = 0;
00113 }
00114 
00115 inline
00116 G4ThreeVector G4AssemblyTriplet::GetTranslation() const
00117 {
00118   return fTranslation;
00119 }
00120 
00121 inline
00122 void G4AssemblyTriplet::SetTranslation( G4ThreeVector& translation )
00123 {
00124   fTranslation = translation;
00125 }
00126 
00127 inline
00128 G4RotationMatrix* G4AssemblyTriplet::GetRotation() const
00129 {
00130   return fRotation;
00131 }
00132 
00133 inline
00134 void G4AssemblyTriplet::SetRotation( G4RotationMatrix* pRotation )
00135 {
00136   fRotation = pRotation;
00137 }
00138 
00139 inline
00140 G4bool G4AssemblyTriplet::IsReflection() const
00141 {
00142   return fIsReflection;
00143 }  
00144 
00145 inline
00146 G4AssemblyTriplet&
00147 G4AssemblyTriplet::operator=( const G4AssemblyTriplet& scopy )
00148 {
00149   if( this != &scopy )
00150   {
00151     fVolume       = scopy.GetVolume();
00152     fRotation     = scopy.GetRotation();
00153     fTranslation  = scopy.GetTranslation();
00154     fAssembly     = scopy.GetAssembly();
00155     fIsReflection = scopy.IsReflection();
00156   }
00157   
00158   return *this;
00159 }

Generated on Mon May 27 17:47:41 2013 for Geant4 by  doxygen 1.4.7