CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MRPCG4Geo_dbs.cxx
Go to the documentation of this file.
1//$id$
2
3/*
4 * 2011/08/15 Matthias Ullrich Giessen University
5 * MRPC 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/TofID.h"
18#include "G4Geo/MRPCG4Geo_dbs.h"
19
20
21
23{
24 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
25 if (GdmlManagementPath == "") cout << "MRPCG4Geo_dbs::GdmlManagementPath not set" << endl;
26
27
28 string GdmlFile = GdmlManagementPath + string("/dat/Tof_mrpc_dbs.gdml");
29 cout << "Construct new Tof (including MRPC (double sided readout) as EC Tof) from GdmlFile " << GdmlFile << endl;
30
31
32 InitFromGdml( GdmlFile.c_str(), "Tof" );
33}
34
37
38void
39MRPCG4Geo_dbs::InitFromGdml( const char *gdmlFile, const char *setupName )
40{
41 ReadGdml(gdmlFile, setupName);
42 m_TopVolume = GetLogicalVolume("logicalTof");
43 if (!m_TopVolume) cout << "MRPCG4Geo::InitFromGdml, m_TopVolume not found" << endl;
44 else cout << "MRPC TopVolume name " << m_TopVolume->GetName() << endl;
46
47 m_G4GeoInit = 1;
48}
49
50void
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
void SetDefaultVis()
Set default visual attributes;.
MRPCG4Geo_dbs()
Constructor.
~MRPCG4Geo_dbs()
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;.
G4LogicalVolume * m_TopVolume