BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcG4Geo.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 <iomanip>
12#include <iostream>
13#include <sstream>
14#include <string>
15#include <vector>
16
17#include "G4Geo/MdcG4Geo.h"
18#include "Identifier/MdcID.h"
19
21 string GdmlManagementPath = getenv( "GDMLMANAGEMENTDATAROOT" );
22 if ( GdmlManagementPath == "" ) cout << "MdcG4Geo::GdmlManagementPath not set" << endl;
23 string GdmlFile = GdmlManagementPath + string( "/dat/Mdc.gdml" );
24 cout << "Construct Mdc from GdmlFile " << GdmlFile << endl;
25 InitFromGdml( GdmlFile.c_str(), "Mdc" );
26}
27
29
30void MdcG4Geo::InitFromGdml( const char* gdmlFile, const char* setupName ) {
31 ReadGdml( gdmlFile, setupName );
32 m_TopVolume = GetLogicalVolume( "logicalMdc" );
33 if ( !m_TopVolume ) cout << "MdcG4Geo::InitFromGdml, m_TopVolume not found" << endl;
34 else cout << "Mdc TopVolume name " << m_TopVolume->GetName() << endl;
36
37 m_G4GeoInit = 1;
38}
39
MdcG4Geo()
Constructor.
Definition MdcG4Geo.cxx:20
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition MdcG4Geo.cxx:30
void SetDefaultVis()
Set default visual attributes;.
Definition MdcG4Geo.cxx:40
~MdcG4Geo()
Destructor.
Definition MdcG4Geo.cxx:28
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;.