BOSS 8.0.0
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 <iostream>
11#include <string>
12
13#include "G4Geo/SubDetectorG4Geo.h"
14
16 // Default constructor.
17 // m_sxp.Initialize();
18}
19
21
22void SubDetectorG4Geo::ReadGdml( const char* gdmlFile, const char* setupName ) {
23 m_config.SetURI( gdmlFile );
24 m_config.SetSetupName( setupName );
25 m_config.SetType( "G4" );
26
27 m_sxp.Configure( &m_config );
28 m_sxp.Initialize();
29 m_sxp.Run();
30}
31
32G4LogicalVolume* SubDetectorG4Geo::GetLogicalVolume( const std::string& vn ) {
33 G4LogicalVolume* lv = (G4LogicalVolume*)GDMLProcessor::GetInstance()->GetLogicalVolume( vn );
34 // if (!lv) std::cout << "Logical Volume " << vn << " not found " << std::endl;
35 return lv;
36}
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;.