Import Geant4 8.1.0 source tree
This commit is contained in:
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeSearchScene.cc,v 1.9 2005/11/22 16:34:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4PhysicalVolumeSearchScene.cc,v 1.12 2006/06/29 21:32:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 10th August 1998.
|
||||
@@ -35,13 +38,12 @@
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
|
||||
G4PhysicalVolumeSearchScene::G4PhysicalVolumeSearchScene
|
||||
(const G4String& requiredPhysicalVolumeName, G4int requiredCopyNo):
|
||||
(G4PhysicalVolumeModel* pPVModel,
|
||||
const G4String& requiredPhysicalVolumeName,
|
||||
G4int requiredCopyNo):
|
||||
fpPVModel (pPVModel),
|
||||
fRequiredPhysicalVolumeName (requiredPhysicalVolumeName),
|
||||
fRequiredCopyNo (requiredCopyNo),
|
||||
fCurrentDepth (0),
|
||||
fpCurrentPV (0),
|
||||
fpCurrentLV (0),
|
||||
fpCurrentMaterial (0),
|
||||
fpCurrentObjectTransformation (0),
|
||||
fFoundDepth (0),
|
||||
fpFoundPV (0),
|
||||
@@ -51,31 +53,28 @@ G4PhysicalVolumeSearchScene::G4PhysicalVolumeSearchScene
|
||||
|
||||
G4PhysicalVolumeSearchScene::~G4PhysicalVolumeSearchScene () {}
|
||||
|
||||
void G4PhysicalVolumeSearchScene::EstablishSpecials
|
||||
(G4PhysicalVolumeModel& pvModel) {
|
||||
pvModel.DefinePointersToWorkingSpace (&fCurrentDepth,
|
||||
&fpCurrentPV,
|
||||
&fpCurrentLV,
|
||||
&fpCurrentMaterial);
|
||||
}
|
||||
|
||||
void G4PhysicalVolumeSearchScene::FindVolume (const G4VSolid&) {
|
||||
|
||||
G4int currentDepth = fpPVModel->GetCurrentDepth();
|
||||
G4VPhysicalVolume* pCurrentPV = fpPVModel->GetCurrentPV();
|
||||
G4LogicalVolume* pCurrentLV = fpPVModel->GetCurrentLV();
|
||||
//G4Material* pCurrentMaterial = fpPVModel->GetCurrentMaterial();
|
||||
|
||||
/**************************************************
|
||||
G4cout << "Required volume: \"" << fRequiredPhysicalVolumeName
|
||||
<< "\", copy no. " << fRequiredCopyNo << G4endl;
|
||||
G4cout << "PhysicalVolume: \"" << fpCurrentPV -> GetName ()
|
||||
<< "\", copy no. " << fpCurrentPV -> GetCopyNo () << G4endl;
|
||||
G4cout << "PhysicalVolume: \"" << pCurrentPV -> GetName ()
|
||||
<< "\", copy no. " << pCurrentPV -> GetCopyNo () << G4endl;
|
||||
*******************************************/
|
||||
|
||||
if (fRequiredPhysicalVolumeName == fpCurrentPV -> GetName () &&
|
||||
if (fRequiredPhysicalVolumeName == pCurrentPV -> GetName () &&
|
||||
(fRequiredCopyNo < 0 || // I.e., ignore negative request.
|
||||
fRequiredCopyNo == fpCurrentPV -> GetCopyNo ())) {
|
||||
fRequiredCopyNo == pCurrentPV -> GetCopyNo ())) {
|
||||
// Current policy - take first one found!!
|
||||
if (!fpFoundPV) { // i.e., if not already found.
|
||||
fFoundDepth = fCurrentDepth;
|
||||
fpFoundPV = fpCurrentPV;
|
||||
fpFoundLV = fpCurrentLV;
|
||||
fFoundDepth = currentDepth;
|
||||
fpFoundPV = pCurrentPV;
|
||||
fpFoundLV = pCurrentLV;
|
||||
fFoundObjectTransformation = *fpCurrentObjectTransformation;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user