BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
BesG4Geo.cxx
Go to the documentation of this file.
1//$id$
2
3/*
4 * 2007/05/28 Deng Ziyan
5 * Bes Geometry General for Simulation
6 * inherit from class SubDetectorG4Geo
7 */
8
9using namespace std;
10
11#include <string>
12#include <iostream>
13#include <sstream>
14#include <vector>
15#include <iomanip>
16
17
18#include "ReadBoostRoot.hh"
19#include "G4Geo/BesG4Geo.h"
20
22{
23 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
24 if (GdmlManagementPath == "") cout << "BesG4Geo::GdmlManagementPath not set" << endl;
25 string GdmlFile = GdmlManagementPath + string("/dat/Bes.gdml");
26 cout << "Construct Bes from GdmlFile " << GdmlFile << endl;
27 InitFromGdml( GdmlFile.c_str(), "Default" );
28}
29
31{ }
32
33void
34BesG4Geo::InitFromGdml( const char *gdmlFile, const char *setupName )
35{
36 ReadGdml(gdmlFile, setupName);
37 m_TopVolume = GetLogicalVolume("logicalWorld");
38 if (!m_TopVolume) cout << "BesG4Geo::InitFromGdml, m_TopVolume not found" << endl;
39 else cout << "Bes TopVolume name " << m_TopVolume->GetName() << endl;
41
42 m_G4GeoInit = 1;
43}
44
45void
47{
48}
~BesG4Geo()
Destructor.
Definition: BesG4Geo.cxx:30
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition: BesG4Geo.cxx:34
BesG4Geo()
Constructor.
Definition: BesG4Geo.cxx:21
void SetDefaultVis()
Set default visual attributes;.
Definition: BesG4Geo.cxx:46
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;.
G4LogicalVolume * m_TopVolume