Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // class G4VPhysicalVolume inline implementati << 26 // >> 27 // $Id: G4VPhysicalVolume.icc,v 1.10 2006/06/29 18:32:37 gunter Exp $ >> 28 // GEANT4 tag $Name: geant4-09-02-patch-03 $ >> 29 // >> 30 // >> 31 // class G4VPhysicalVolume Inline Implementation 27 // 32 // 28 // ------------------------------------------- 33 // -------------------------------------------------------------------- 29 34 30 inline 35 inline 31 G4bool G4VPhysicalVolume::operator == (const G << 36 G4bool G4VPhysicalVolume::operator == (const G4VPhysicalVolume& p) const >> 37 { >> 38 return (this==&p) ? true : false; >> 39 } >> 40 >> 41 inline >> 42 const G4ThreeVector& G4VPhysicalVolume::GetTranslation() const >> 43 { >> 44 return ftrans; >> 45 } >> 46 >> 47 inline >> 48 void G4VPhysicalVolume::SetTranslation(const G4ThreeVector &v) >> 49 { >> 50 ftrans=v; >> 51 } >> 52 >> 53 inline >> 54 const G4RotationMatrix* G4VPhysicalVolume::GetRotation() const >> 55 { >> 56 return frot; >> 57 } >> 58 >> 59 inline >> 60 G4RotationMatrix* G4VPhysicalVolume::GetRotation() 32 { 61 { 33 return this==&right; << 62 return frot; 34 } 63 } 35 64 36 inline 65 inline 37 G4int G4VPhysicalVolume::GetInstanceID() const << 66 void G4VPhysicalVolume::SetRotation(G4RotationMatrix *pRot) 38 { 67 { 39 return instanceID; << 68 frot=pRot; 40 } 69 } 41 70 42 inline 71 inline 43 G4LogicalVolume* G4VPhysicalVolume::GetLogical 72 G4LogicalVolume* G4VPhysicalVolume::GetLogicalVolume() const 44 { 73 { 45 return flogical; 74 return flogical; 46 } 75 } 47 76 48 inline 77 inline 49 void G4VPhysicalVolume::SetLogicalVolume(G4Log << 78 void G4VPhysicalVolume::SetLogicalVolume(G4LogicalVolume *pLogical) 50 { 79 { 51 flogical = pLogical; << 80 flogical=pLogical; 52 } 81 } 53 82 54 inline 83 inline 55 G4LogicalVolume* G4VPhysicalVolume::GetMotherL 84 G4LogicalVolume* G4VPhysicalVolume::GetMotherLogical() const 56 { 85 { 57 return flmother; 86 return flmother; 58 } 87 } 59 88 60 inline 89 inline 61 void G4VPhysicalVolume::SetMotherLogical(G4Log << 90 void G4VPhysicalVolume::SetMotherLogical(G4LogicalVolume *pMother) 62 { 91 { 63 flmother = pMother; << 92 flmother=pMother; 64 } 93 } 65 94 66 inline 95 inline 67 const G4String& G4VPhysicalVolume::GetName() c 96 const G4String& G4VPhysicalVolume::GetName() const 68 { 97 { 69 return fname; 98 return fname; 70 } 99 } 71 100 72 inline 101 inline 73 EVolume G4VPhysicalVolume::DeduceVolumeType() << 102 void G4VPhysicalVolume::SetName(const G4String& pName) 74 { 103 { 75 EVolume type; << 104 fname=pName; 76 EAxis axis; << 105 } 77 G4int nReplicas; << 106 78 G4double width,offset; << 107 inline 79 G4bool consuming; << 108 G4RotationMatrix G4VPhysicalVolume::GetObjectRotationValue() const 80 if ( IsReplicated() ) << 109 { 81 { << 110 G4RotationMatrix aRotM; // Initialised to identity 82 GetReplicationData(axis,nReplicas,width,of << 111 83 type = (consuming) ? kReplica : kParameter << 112 // Insure against frot being a null pointer 84 } << 113 if(frot) 85 else << 86 { 114 { 87 type = kNormal; << 115 aRotM= frot->inverse(); 88 } 116 } 89 return type; << 117 return aRotM; >> 118 } >> 119 >> 120 inline >> 121 G4ThreeVector G4VPhysicalVolume::GetObjectTranslation() const >> 122 { >> 123 return ftrans; >> 124 } >> 125 >> 126 inline >> 127 const G4RotationMatrix* G4VPhysicalVolume::GetFrameRotation() const >> 128 { >> 129 return frot; >> 130 } >> 131 >> 132 inline >> 133 G4ThreeVector G4VPhysicalVolume::GetFrameTranslation() const >> 134 { >> 135 return -ftrans; 90 } 136 } 91 137