BOSS 8.0.0
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 <iomanip>
12#include <iostream>
13#include <sstream>
14#include <string>
15#include <vector>
16
17#include "G4Geo/MRPCG4Geo.h"
18#include "Identifier/TofID.h"
19
21 string GdmlManagementPath = getenv( "GDMLMANAGEMENTDATAROOT" );
22 if ( GdmlManagementPath == "" ) cout << "MRPCG4Geo::GdmlManagementPath not set" << endl;
23
24 string GdmlFile = GdmlManagementPath + string( "/dat/Tof_mrpc.gdml" );
25 cout << "Construct new Tof (including MRPC (double sided readout) as End Cap Tof) from "
26 "GdmlFile "
27 << GdmlFile << endl;
28
29 InitFromGdml( GdmlFile.c_str(), "Tof" );
30}
31
33
34void MRPCG4Geo::InitFromGdml( const char* gdmlFile, const char* setupName ) {
35 ReadGdml( gdmlFile, setupName );
36 m_TopVolume = GetLogicalVolume( "logicalTof" );
37 if ( !m_TopVolume ) cout << "MRPCG4Geo::InitFromGdml, m_TopVolume not found" << endl;
38 else cout << "MRPC TopVolume name " << m_TopVolume->GetName() << endl;
40
41 m_G4GeoInit = 1;
42}
43
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition MRPCG4Geo.cxx:34
MRPCG4Geo()
Constructor.
Definition MRPCG4Geo.cxx:20
void SetDefaultVis()
Set default visual attributes;.
Definition MRPCG4Geo.cxx:44
~MRPCG4Geo()
Destructor.
Definition MRPCG4Geo.cxx:32
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;.