BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
TofG4Geo.cxx
Go to the documentation of this file.
1//$id$
2
3/*
4 * 2005/10/30 Zhengyun You Peking University
5 * Tof 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/TofG4Geo.h"
19#include "ReadBoostRoot.hh"
20
21
23{
24 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
25 if (GdmlManagementPath == "") cout << "TofG4Geo::GdmlManagementPath not set" << endl;
26
27
28
29 string GdmlFile = GdmlManagementPath + string("/dat/Tof.gdml");
30 cout << "Construct old Tof from GdmlFile " << GdmlFile << endl;
31
32
33
34 InitFromGdml( GdmlFile.c_str(), "Tof" );
35}
36
38{ }
39
40void
41TofG4Geo::InitFromGdml( const char *gdmlFile, const char *setupName )
42{
43 ReadGdml(gdmlFile, setupName);
44 m_TopVolume = GetLogicalVolume("logicalTof");
45 if (!m_TopVolume) cout << "TofG4Geo::InitFromGdml, m_TopVolume not found" << endl;
46 else cout << "Tof TopVolume name " << m_TopVolume->GetName() << endl;
48
49 m_G4GeoInit = 1;
50}
51
52void
54{
55}
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;.
~TofG4Geo()
Destructor.
Definition: TofG4Geo.cxx:37
TofG4Geo()
Constructor.
Definition: TofG4Geo.cxx:22
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition: TofG4Geo.cxx:41
void SetDefaultVis()
Set default visual attributes;.
Definition: TofG4Geo.cxx:53