Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4VPhysicalVolume.cc
Go to the documentation of this file.
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$
28//
29//
30// class G4VPhysicalVolume Implementation
31//
32// --------------------------------------------------------------------
33
34#include "G4VPhysicalVolume.hh"
35
37#include "G4LogicalVolume.hh"
38
39// Constructor: init parameters and register in Store
40//
42 const G4ThreeVector &tlate,
43 const G4String& pName,
44 G4LogicalVolume* pLogical,
46 : frot(pRot), ftrans(tlate), flogical(pLogical),
47 fname(pName), flmother(0)
48{
50}
51
52// Fake default constructor - sets only member data and allocates memory
53// for usage restricted to object persistency.
54//
56 : frot(0), flogical(0), fname(""), flmother(0)
57{
58 // Register to store
59 //
61}
62
63// Destructor - remove from Store
64//
66{
68}
69
71{
72 return 1;
73}
74
76{
77 static G4RotationMatrix aRotM;
78 static G4RotationMatrix IdentityRM; // Never changed (from "1")
79 G4RotationMatrix* retval;
80
81 // Insure against frot being a null pointer
82 if(frot)
83 {
84 aRotM= frot->inverse();
85 retval= &aRotM;
86 }
87 else
88 {
89 retval= &IdentityRM;
90 }
91 return retval;
92}
93
94// Only implemented for placed and parameterised volumes.
95// Not required for replicas.
96//
98{
99 return false;
100}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
HepRotation inverse() const
static void Register(G4VPhysicalVolume *pSolid)
static void DeRegister(G4VPhysicalVolume *pSolid)
G4RotationMatrix * GetObjectRotation() const
G4VPhysicalVolume(G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother)
virtual G4int GetMultiplicity() const
G4RotationMatrix * frot
virtual ~G4VPhysicalVolume()
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true)