ATLAS Offline Software
Typedefs | Functions
SingleLogicalVolumeFactory.cxx File Reference
#include "SingleLogicalVolumeFactory.h"
#include "Geo2G4SolidFactory.h"
#include "GeoMaterial2G4/Geo2G4MaterialFactory.h"
#include "GeoModelKernel/GeoLogVol.h"
#include "SimHelpers/ServiceAccessor.h"
#include "AthenaBaseComps/AthMsgStreamMacros.h"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
Include dependency graph for SingleLogicalVolumeFactory.cxx:

Go to the source code of this file.

Typedefs

typedef std::map< std::string, G4LogicalVolume *, std::less< std::string > > vMap
 

Functions

G4LogicalVolume *SingleLogicalVolumeFactory::Build ATLAS_NOT_THREAD_SAFE (const GeoLogVol *theLog)
 

Typedef Documentation

◆ vMap

typedef std::map<std::string, G4LogicalVolume*, std::less<std::string> > vMap

Definition at line 18 of file SingleLogicalVolumeFactory.cxx.

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

G4LogicalVolume* SingleLogicalVolumeFactory::Build ATLAS_NOT_THREAD_SAFE ( const GeoLogVol *  theLog)

Definition at line 20 of file SingleLogicalVolumeFactory.cxx.

21 {
22  static Geo2G4SolidFactory theSolidFactory;
23  static Geo2G4MaterialFactory theMaterialFactory;
24  static vMap volumeList;
25  //
26  // Get Material from GeoModel
27  //
28  const std::string& n= theLog->getName();
29  if (volumeList.find(n) == volumeList.end()) {
30  G4LogicalVolume *theG4Log=0;
31  G4Material* theG4Mat=theMaterialFactory.Build(theLog->getMaterial());
32 
33  G4VSolid * theG4Solid = theSolidFactory.Build(theLog->getShape());
34 
35  ATH_MSG_DEBUG("Building logical volume (single) "<<theLog->getName()<< " " << theG4Mat);
36  theG4Log = new G4LogicalVolume(theG4Solid,
37  theG4Mat,
38  theLog->getName(),
39  0,0,0);
40  volumeList[n] = theG4Log;
41  return theG4Log;
42  }
43  return volumeList[n];
44 }
vMap
std::map< std::string, G4LogicalVolume *, std::less< std::string > > vMap
Definition: SingleLogicalVolumeFactory.cxx:18
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
volumeList
std::map< std::string, AGDDVolume * > volumeList
Definition: AGDDSection.h:9
Geo2G4SolidFactory
Definition: Geo2G4SolidFactory.h:23
Geo2G4MaterialFactory
Definition: Geo2G4MaterialFactory.h:15
Geo2G4MaterialFactory::Build
G4Material * Build(const GeoMaterial *)
Definition: Geo2G4MaterialFactory.cxx:29