SubDetectorG4Geo Class Reference

#include <SubDetectorG4Geo.h>

Inheritance diagram for SubDetectorG4Geo:

BesG4Geo EmcG4Geo MdcG4Geo MRPCG4Geo MucG4Geo TofG4Geo List of all members.

Public Member Functions

 SubDetectorG4Geo ()
 Constructor.
virtual ~SubDetectorG4Geo ()
 Destructor.
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of G4Geo.
int IsInitialized ()
 If the G4 geometry of this subdetctor is initialized;.
G4LogicalVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
G4LogicalVolume * GetTopVolume ()
 Get the top(world) volume;.

Protected Attributes

int m_G4GeoInit
G4LogicalVolume * m_TopVolume

Private Attributes

SAXProcessor m_sxp
ProcessingConfigurator m_config

Detailed Description

Class SubDetectorG4Geo is a base class for the four subdetector G4 geometry class.

Author:
Zhengyun You {mailto:youzy@hep.pku.cn}

Definition at line 30 of file SubDetectorG4Geo.h.


Constructor & Destructor Documentation

SubDetectorG4Geo::SubDetectorG4Geo (  ) 

Constructor.

Definition at line 15 of file SubDetectorG4Geo.cxx.

00016   : m_G4GeoInit(0)
00017 { 
00018   // Default constructor.
00019   //m_sxp.Initialize();
00020 }

SubDetectorG4Geo::~SubDetectorG4Geo (  )  [virtual]

Destructor.

Definition at line 22 of file SubDetectorG4Geo.cxx.

References m_sxp.

00023 { 
00024   m_sxp.Finalize();
00025 }


Member Function Documentation

G4LogicalVolume * SubDetectorG4Geo::GetLogicalVolume ( const std::string vn  ) 

Get a logical volume by name;.

Definition at line 40 of file SubDetectorG4Geo.cxx.

Referenced by TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), and BesG4Geo::InitFromGdml().

00041 {
00042   G4LogicalVolume *lv = (G4LogicalVolume*)GDMLProcessor::GetInstance()->GetLogicalVolume(vn);
00043   //if (!lv) std::cout << "Logical Volume " << vn << " not found " << std::endl;
00044   return lv;
00045 }

G4LogicalVolume* SubDetectorG4Geo::GetTopVolume (  )  [inline]

Get the top(world) volume;.

Definition at line 50 of file SubDetectorG4Geo.h.

References m_TopVolume.

Referenced by BesTofConstruction::Construct(), BesMucConstruction::Construct(), BesMdcConstruction::Construct(), BesEmcConstruction::Construct(), ExtBesTofConstruction::Construct(), ExtBesMucConstruction::Construct(), ExtBesMdcConstruction::Construct(), ExtBesEmcConstruction::Construct(), ExtBesTofConstruction::ConstructETF(), TRungeFitter::setBesFromGdml(), and KalFitAlg::setBesFromGdml().

00050 { return m_TopVolume; }

int SubDetectorG4Geo::IsInitialized (  )  [inline]

If the G4 geometry of this subdetctor is initialized;.

Definition at line 44 of file SubDetectorG4Geo.h.

References m_G4GeoInit.

00044 { return m_G4GeoInit; }

void SubDetectorG4Geo::ReadGdml ( const char *  gdmlFile,
const char *  setupName 
)

Initialize the instance of G4Geo.

Definition at line 28 of file SubDetectorG4Geo.cxx.

References m_config, and m_sxp.

Referenced by TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), and BesG4Geo::InitFromGdml().

00029 {
00030   m_config.SetURI( gdmlFile );
00031   m_config.SetSetupName( setupName );
00032   m_config.SetType ( "G4" );
00033   
00034   m_sxp.Configure( &m_config );
00035   m_sxp.Initialize();
00036   m_sxp.Run();
00037 }


Member Data Documentation

ProcessingConfigurator SubDetectorG4Geo::m_config [private]

Definition at line 55 of file SubDetectorG4Geo.h.

Referenced by ReadGdml().

int SubDetectorG4Geo::m_G4GeoInit [protected]

Definition at line 59 of file SubDetectorG4Geo.h.

Referenced by TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), BesG4Geo::InitFromGdml(), and IsInitialized().

SAXProcessor SubDetectorG4Geo::m_sxp [private]

Definition at line 54 of file SubDetectorG4Geo.h.

Referenced by ReadGdml(), and ~SubDetectorG4Geo().

G4LogicalVolume* SubDetectorG4Geo::m_TopVolume [protected]

Definition at line 61 of file SubDetectorG4Geo.h.

Referenced by GetTopVolume(), TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), and BesG4Geo::InitFromGdml().


Generated on Tue Nov 29 23:35:55 2016 for BOSS_7.0.2 by  doxygen 1.4.7