BOSS
7.1.2
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
8
using namespace
std
;
9
10
#include <string>
11
#include <iostream>
12
13
#include "
G4Geo/SubDetectorG4Geo.h
"
14
15
SubDetectorG4Geo::SubDetectorG4Geo
()
16
: m_G4GeoInit(0)
17
{
18
// Default constructor.
19
//m_sxp.Initialize();
20
}
21
22
SubDetectorG4Geo::~SubDetectorG4Geo
()
23
{
24
m_sxp.Finalize();
25
}
26
27
void
28
SubDetectorG4Geo::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
39
G4LogicalVolume*
40
SubDetectorG4Geo::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.h
SubDetectorG4Geo::SubDetectorG4Geo
SubDetectorG4Geo()
Constructor.
Definition
SubDetectorG4Geo.cxx:15
SubDetectorG4Geo::~SubDetectorG4Geo
virtual ~SubDetectorG4Geo()
Destructor.
Definition
SubDetectorG4Geo.cxx:22
SubDetectorG4Geo::ReadGdml
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition
SubDetectorG4Geo.cxx:28
SubDetectorG4Geo::GetLogicalVolume
G4LogicalVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
Definition
SubDetectorG4Geo.cxx:40
std
Definition
RootEventData/RootEventData_rootcint.cxx:38
7.1.2
DetectorDescription
G4Geo
G4Geo-00-00-13
src
SubDetectorG4Geo.cxx
Generated by
1.12.0