BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
MRPCG4Geo.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.h"
19
20
21
23{
24 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
25 if (GdmlManagementPath == "") cout << "MRPCG4Geo::GdmlManagementPath not set" << endl;
26
27
28 string GdmlFile = GdmlManagementPath + string("/dat/Tof_mrpc.gdml");
29 cout << "Construct new Tof (including MRPC (double sided readout) as End Cap Tof) from GdmlFile " << GdmlFile << endl;
30
31
32 InitFromGdml( GdmlFile.c_str(), "Tof" );
33}
34
37
38void
39MRPCG4Geo::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.
Definition MRPCG4Geo.cxx:39
MRPCG4Geo()
Constructor.
Definition MRPCG4Geo.cxx:22
void SetDefaultVis()
Set default visual attributes;.
Definition MRPCG4Geo.cxx:51
~MRPCG4Geo()
Destructor.
Definition MRPCG4Geo.cxx:35
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