2 // ********************************************************************
 
    3 // * License and Disclaimer                                           *
 
    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.                             *
 
   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.         *
 
   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 // ********************************************************************
 
   27 // $Id: G4VPhysicalVolume.icc 74466 2013-10-07 15:36:32Z gcosmo $
 
   30 // class G4VPhysicalVolume Inline Implementation
 
   32 // --------------------------------------------------------------------
 
   34 // These macros change the references to fields that are now encapsulated
 
   35 // in the class G4PVData.
 
   37 #define G4MT_rot ((subInstanceManager.offset[instanceID]).frot)
 
   38 #define G4MT_trans ((subInstanceManager.offset[instanceID]).ftrans)
 
   40 #define G4MT_pvdata (subInstanceManager.offset[instanceID])
 
   43 G4bool G4VPhysicalVolume::operator == (const G4VPhysicalVolume& right) const
 
   45   return (this==&right) ? true : false;
 
   49 G4int G4VPhysicalVolume::GetInstanceID() const
 
   56 const G4ThreeVector& G4VPhysicalVolume::GetTranslation() const
 
   62 void G4VPhysicalVolume::SetTranslation(const G4ThreeVector &vec)
 
   68 const G4RotationMatrix* G4VPhysicalVolume::GetRotation() const
 
   74 G4RotationMatrix* G4VPhysicalVolume::GetRotation()
 
   80 void G4VPhysicalVolume::SetRotation(G4RotationMatrix *pRot)
 
   86 G4LogicalVolume* G4VPhysicalVolume::GetLogicalVolume() const
 
   92 void G4VPhysicalVolume::SetLogicalVolume(G4LogicalVolume *pLogical)
 
   98 G4LogicalVolume* G4VPhysicalVolume::GetMotherLogical() const
 
  104 void G4VPhysicalVolume::SetMotherLogical(G4LogicalVolume *pMother)
 
  110 const G4String& G4VPhysicalVolume::GetName() const
 
  116 void G4VPhysicalVolume::SetName(const G4String& pName)
 
  122 EVolume G4VPhysicalVolume::VolumeType() const
 
  127   G4double width,offset;
 
  129   if ( IsReplicated() )
 
  131     GetReplicationData(axis,nReplicas,width,offset,consuming);
 
  132     type = (consuming) ? kReplica : kParameterised;
 
  142 G4RotationMatrix G4VPhysicalVolume::GetObjectRotationValue() const
 
  144   G4RotationMatrix  aRotM;   // Initialised to identity
 
  146   // Insure against G4MT_rot being a null pointer
 
  149      aRotM= G4MT_rot->inverse();
 
  155 G4ThreeVector  G4VPhysicalVolume::GetObjectTranslation() const
 
  161 const G4RotationMatrix* G4VPhysicalVolume::GetFrameRotation() const
 
  167 G4ThreeVector  G4VPhysicalVolume::GetFrameTranslation() const