CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemG4Geo.cxx
Go to the documentation of this file.
1//$id$
2/*
3 * 2005/10/30 Zhengyun You Peking University
4 * 2007/05/23 Yuan Ye IHEP
5 * Mdc 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#include "Identifier/CgemID.h"
18#include "G4Geo/CgemG4Geo.h"
19
21{
22 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
23 if (GdmlManagementPath == "") cout << "CgemG4Geo::GdmlManagementPath not set" << endl;
24 string GdmlFile = GdmlManagementPath + string("/dat/Cgem.gdml");
25 cout << "Construct Cgem from GdmlFile " << GdmlFile << endl;
26 InitFromGdml( GdmlFile.c_str(), "Cgem" );
27}
28
31
32void
33CgemG4Geo::InitFromGdml( const char *gdmlFile, const char *setupName )
34{
35 ReadGdml(gdmlFile, setupName);
36 m_TopVolume = GetLogicalVolume("Cgem_logic");
37 if (!m_TopVolume) cout << "CgemG4Geo::InitFromGdml, m_TopVolume not found" << endl;
38 else cout << "Cgem TopVolume name " << m_TopVolume->GetName() << endl;
40
41 m_G4GeoInit = 1;
42}
43
44void
void SetDefaultVis()
Set default visual attributes;.
Definition CgemG4Geo.cxx:45
CgemG4Geo()
Constructor.
Definition CgemG4Geo.cxx:20
~CgemG4Geo()
Destructor.
Definition CgemG4Geo.cxx:29
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition CgemG4Geo.cxx:33
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