CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
SubDetectorG4Geo.cxx
Go to the documentation of this file.
1//$id$
2/*
3 * 2005/10/30 Zhengyun You Peking University
4 * G4 Geometry for Bes sub-detector
5 *
6 */
7
8using namespace std;
9
10#include <string>
11#include <iostream>
12
14
16 : m_G4GeoInit(0)
17{
18 // Default constructor.
19 //m_sxp.Initialize();
20}
21
23{
24 m_sxp.Finalize();
25}
26
27void
28SubDetectorG4Geo::ReadGdml( const char *gdmlFile, const char *setupName )
29{
30 m_config.SetURI( gdmlFile );
31 m_config.SetSetupName( setupName );
32 m_config.SetType ( "G4" );
33
34 m_sxp.Configure( &m_config );
35 m_sxp.Initialize();
36 m_sxp.Run();
37}
38
39G4LogicalVolume*
40SubDetectorG4Geo::GetLogicalVolume( const std::string& vn )
41{
42 G4LogicalVolume *lv = (G4LogicalVolume*)GDMLProcessor::GetInstance()->GetLogicalVolume(vn);
43 //if (!lv) std::cout << "Logical Volume " << vn << " not found " << std::endl;
44 return lv;
45}
46
47
SubDetectorG4Geo()
Constructor.
virtual ~SubDetectorG4Geo()
Destructor.
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
G4LogicalVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.