BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
SubDetectorROOTGeo Class Reference

#include <SubDetectorROOTGeo.h>

Inheritance diagram for SubDetectorROOTGeo:

Public Member Functions

 SubDetectorROOTGeo ()
 Constructor.
virtual ~SubDetectorROOTGeo ()
 Destructor.
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
void SetChildNo (int childNo)
TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
 SubDetectorROOTGeo ()
 Constructor.
virtual ~SubDetectorROOTGeo ()
 Destructor.
virtual void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
virtual int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
virtual void SetChildNo (int childNo)
virtual TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
virtual TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
virtual TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
virtual TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
virtual int GetHitsNum ()
 Get number of hits in HitsArray;.
virtual TGeoPhysicalNode * GetHit (int i)
 Get ith hit in HitsArray;.
virtual void SetDetectorOn ()
 Set all physicalNodes in m_DeteorsArray visible;.
 SubDetectorROOTGeo ()
 Constructor.
virtual ~SubDetectorROOTGeo ()
 Destructor.
virtual void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
virtual int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
virtual void SetChildNo (int childNo)
virtual TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
virtual TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
virtual TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
virtual TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
virtual int GetHitsNum ()
 Get number of hits in HitsArray;.
virtual TGeoPhysicalNode * GetHit (int i)
 Get ith hit in HitsArray;.
virtual void SetDetectorOn ()
 Set all physicalNodes in m_DeteorsArray visible;.
 SubDetectorROOTGeo ()
 Constructor.
virtual ~SubDetectorROOTGeo ()
 Destructor.
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
void SetChildNo (int childNo)
TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
 SubDetectorROOTGeo ()
 Constructor.
virtual ~SubDetectorROOTGeo ()
 Destructor.
virtual void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
virtual int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
virtual void SetChildNo (int childNo)
virtual TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
virtual TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
virtual TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
virtual TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
virtual int GetHitsNum ()
 Get number of hits in HitsArray;.
virtual TGeoPhysicalNode * GetHit (int i)
 Get ith hit in HitsArray;.
virtual void SetDetectorOn ()
 Set all physicalNodes in m_DeteorsArray visible;.
 SubDetectorROOTGeo ()
 Constructor.
virtual ~SubDetectorROOTGeo ()
 Destructor.
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
void SetChildNo (int childNo)
TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.

Protected Attributes

int m_ROOTGeoInit
int m_childNo
TGeoVolume * m_TopVolume
int m_2DGeoInit
TObjArray * m_DetectorsArray
TObjArray * m_HitsArray
TObjArray * m_2DHitsArray

Detailed Description

Class SubDetectorROOTGeo is a base class for the four subdetector ROOT geometry class.

Author
Zhengyun You \URL{youzy.nosp@m.@hep.nosp@m..pku..nosp@m.cn}

Definition at line 29 of file DetectorDescription/ROOTGeo/include/ROOTGeo/SubDetectorROOTGeo.h.

Constructor & Destructor Documentation

◆ SubDetectorROOTGeo() [1/6]

SubDetectorROOTGeo::SubDetectorROOTGeo ( )

Constructor.

Definition at line 18 of file DetectorDescription/ROOTGeo/src/SubDetectorROOTGeo.cxx.

18 : m_ROOTGeoInit( 0 ) {
19 // Default constructor.
20 // m_sxp.Initialize();
21}

Referenced by MdcROOTGeo::MdcROOTGeo().

◆ ~SubDetectorROOTGeo() [1/6]

SubDetectorROOTGeo::~SubDetectorROOTGeo ( )
virtual

Destructor.

Definition at line 23 of file DetectorDescription/ROOTGeo/src/SubDetectorROOTGeo.cxx.

23{ m_sxp.Finalize(); }

◆ SubDetectorROOTGeo() [2/6]

SubDetectorROOTGeo::SubDetectorROOTGeo ( )

Constructor.

◆ ~SubDetectorROOTGeo() [2/6]

virtual SubDetectorROOTGeo::~SubDetectorROOTGeo ( )
virtual

Destructor.

◆ SubDetectorROOTGeo() [3/6]

SubDetectorROOTGeo::SubDetectorROOTGeo ( )

Constructor.

◆ ~SubDetectorROOTGeo() [3/6]

virtual SubDetectorROOTGeo::~SubDetectorROOTGeo ( )
virtual

Destructor.

◆ SubDetectorROOTGeo() [4/6]

SubDetectorROOTGeo::SubDetectorROOTGeo ( )

Constructor.

◆ ~SubDetectorROOTGeo() [4/6]

virtual SubDetectorROOTGeo::~SubDetectorROOTGeo ( )
virtual

Destructor.

◆ SubDetectorROOTGeo() [5/6]

SubDetectorROOTGeo::SubDetectorROOTGeo ( )

Constructor.

◆ ~SubDetectorROOTGeo() [5/6]

virtual SubDetectorROOTGeo::~SubDetectorROOTGeo ( )
virtual

Destructor.

◆ SubDetectorROOTGeo() [6/6]

SubDetectorROOTGeo::SubDetectorROOTGeo ( )

Constructor.

◆ ~SubDetectorROOTGeo() [6/6]

virtual SubDetectorROOTGeo::~SubDetectorROOTGeo ( )
virtual

Destructor.

Member Function Documentation

◆ GetAssemblyVolume() [1/6]

TGeoVolumeAssembly * SubDetectorROOTGeo::GetAssemblyVolume ( const std::string & an)

Get an assembly by name;.

Definition at line 44 of file DetectorDescription/ROOTGeo/src/SubDetectorROOTGeo.cxx.

44 {
45 TGeoVolumeAssembly* av =
46 (TGeoVolumeAssembly*)TGDMLProcessor::GetInstance()->GetAssemblyVolume( an );
47 if ( !av ) std::cout << "Assembly Volume " << an << " not found " << std::endl;
48 return av;
49}

Referenced by TofROOTGeo::GetVolumeAssembly().

◆ GetAssemblyVolume() [2/6]

virtual TGeoVolumeAssembly * SubDetectorROOTGeo::GetAssemblyVolume ( const std::string & an)
virtual

Get an assembly by name;.

◆ GetAssemblyVolume() [3/6]

virtual TGeoVolumeAssembly * SubDetectorROOTGeo::GetAssemblyVolume ( const std::string & an)
virtual

Get an assembly by name;.

◆ GetAssemblyVolume() [4/6]

TGeoVolumeAssembly * SubDetectorROOTGeo::GetAssemblyVolume ( const std::string & an)

Get an assembly by name;.

◆ GetAssemblyVolume() [5/6]

virtual TGeoVolumeAssembly * SubDetectorROOTGeo::GetAssemblyVolume ( const std::string & an)
virtual

Get an assembly by name;.

◆ GetAssemblyVolume() [6/6]

TGeoVolumeAssembly * SubDetectorROOTGeo::GetAssemblyVolume ( const std::string & an)

Get an assembly by name;.

◆ GetHit() [1/3]

TGeoPhysicalNode * SubDetectorROOTGeo::GetHit ( int i)
virtual

Get ith hit in HitsArray;.

Definition at line 61 of file EventDisplay/BesVisLib/src/SubDetectorROOTGeo.cxx.

61 {
62 if ( i < m_HitsArray->GetEntries() ) return (TGeoPhysicalNode*)m_HitsArray->At( i );
63 else return 0;
64}

◆ GetHit() [2/3]

virtual TGeoPhysicalNode * SubDetectorROOTGeo::GetHit ( int i)
virtual

Get ith hit in HitsArray;.

◆ GetHit() [3/3]

virtual TGeoPhysicalNode * SubDetectorROOTGeo::GetHit ( int i)
virtual

Get ith hit in HitsArray;.

◆ GetHitsNum() [1/3]

virtual int SubDetectorROOTGeo::GetHitsNum ( )
inlinevirtual

Get number of hits in HitsArray;.

Definition at line 59 of file EventDisplay/BesVisLib/include/BesVisLib/SubDetectorROOTGeo.h.

59{ return m_HitsArray->GetEntries(); }

◆ GetHitsNum() [2/3]

virtual int SubDetectorROOTGeo::GetHitsNum ( )
inlinevirtual

Get number of hits in HitsArray;.

Definition at line 59 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/SubDetectorROOTGeo.h.

59{ return m_HitsArray->GetEntries(); }

◆ GetHitsNum() [3/3]

virtual int SubDetectorROOTGeo::GetHitsNum ( )
inlinevirtual

Get number of hits in HitsArray;.

Definition at line 59 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/SubDetectorROOTGeo.h.

59{ return m_HitsArray->GetEntries(); }

◆ GetLogicalVolume() [1/6]

◆ GetLogicalVolume() [2/6]

virtual TGeoVolume * SubDetectorROOTGeo::GetLogicalVolume ( const std::string & vn)
virtual

Get a logical volume by name;.

◆ GetLogicalVolume() [3/6]

virtual TGeoVolume * SubDetectorROOTGeo::GetLogicalVolume ( const std::string & vn)
virtual

Get a logical volume by name;.

◆ GetLogicalVolume() [4/6]

TGeoVolume * SubDetectorROOTGeo::GetLogicalVolume ( const std::string & vn)

Get a logical volume by name;.

◆ GetLogicalVolume() [5/6]

virtual TGeoVolume * SubDetectorROOTGeo::GetLogicalVolume ( const std::string & vn)
virtual

Get a logical volume by name;.

◆ GetLogicalVolume() [6/6]

TGeoVolume * SubDetectorROOTGeo::GetLogicalVolume ( const std::string & vn)

Get a logical volume by name;.

◆ GetNode() [1/6]

TGeoNode * SubDetectorROOTGeo::GetNode ( const std::string & nn)

Get a node(physical volume) by name;.

Definition at line 51 of file DetectorDescription/ROOTGeo/src/SubDetectorROOTGeo.cxx.

51 {
52 TGeoNode* node = (TGeoNode*)TGDMLProcessor::GetInstance()->GetPhysicalVolume( nn );
53 if ( !node ) std::cout << "Physical Volume " << nn << " not found " << std::endl;
54 return node;
55}

Referenced by TofROOTGeo::GetBucket(), MdcROOTGeo::GetLayer(), EmcROOTGeo::GetPart(), EmcROOTGeo::GetPhi(), MdcROOTGeo::GetSegment(), MdcROOTGeo::SetNode(), MucROOTGeo::SetNode(), and TofROOTGeo::SetNode().

◆ GetNode() [2/6]

virtual TGeoNode * SubDetectorROOTGeo::GetNode ( const std::string & nn)
virtual

Get a node(physical volume) by name;.

◆ GetNode() [3/6]

virtual TGeoNode * SubDetectorROOTGeo::GetNode ( const std::string & nn)
virtual

Get a node(physical volume) by name;.

◆ GetNode() [4/6]

TGeoNode * SubDetectorROOTGeo::GetNode ( const std::string & nn)

Get a node(physical volume) by name;.

◆ GetNode() [5/6]

virtual TGeoNode * SubDetectorROOTGeo::GetNode ( const std::string & nn)
virtual

Get a node(physical volume) by name;.

◆ GetNode() [6/6]

TGeoNode * SubDetectorROOTGeo::GetNode ( const std::string & nn)

Get a node(physical volume) by name;.

◆ GetTopVolume() [1/6]

TGeoVolume * SubDetectorROOTGeo::GetTopVolume ( )
inline

◆ GetTopVolume() [2/6]

virtual TGeoVolume * SubDetectorROOTGeo::GetTopVolume ( )
inlinevirtual

Get the top(world) volume;.

Definition at line 50 of file EventDisplay/BesVisLib/include/BesVisLib/SubDetectorROOTGeo.h.

50{ return m_TopVolume; }

◆ GetTopVolume() [3/6]

virtual TGeoVolume * SubDetectorROOTGeo::GetTopVolume ( )
inlinevirtual

Get the top(world) volume;.

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/SubDetectorROOTGeo.h.

50{ return m_TopVolume; }

◆ GetTopVolume() [4/6]

TGeoVolume * SubDetectorROOTGeo::GetTopVolume ( )
inline

Get the top(world) volume;.

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-dbg/include/ROOTGeo/SubDetectorROOTGeo.h.

50{ return m_TopVolume; }

◆ GetTopVolume() [5/6]

virtual TGeoVolume * SubDetectorROOTGeo::GetTopVolume ( )
inlinevirtual

Get the top(world) volume;.

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/SubDetectorROOTGeo.h.

50{ return m_TopVolume; }

◆ GetTopVolume() [6/6]

TGeoVolume * SubDetectorROOTGeo::GetTopVolume ( )
inline

Get the top(world) volume;.

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-opt/include/ROOTGeo/SubDetectorROOTGeo.h.

50{ return m_TopVolume; }

◆ IsInitialized() [1/6]

int SubDetectorROOTGeo::IsInitialized ( )
inline

If the ROOT geometry of this subdetctor is initialized;.

Definition at line 41 of file DetectorDescription/ROOTGeo/include/ROOTGeo/SubDetectorROOTGeo.h.

41{ return m_ROOTGeoInit; }

◆ IsInitialized() [2/6]

virtual int SubDetectorROOTGeo::IsInitialized ( )
inlinevirtual

If the ROOT geometry of this subdetctor is initialized;.

Definition at line 41 of file EventDisplay/BesVisLib/include/BesVisLib/SubDetectorROOTGeo.h.

41{ return m_ROOTGeoInit; }

◆ IsInitialized() [3/6]

virtual int SubDetectorROOTGeo::IsInitialized ( )
inlinevirtual

If the ROOT geometry of this subdetctor is initialized;.

Definition at line 41 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/SubDetectorROOTGeo.h.

41{ return m_ROOTGeoInit; }

◆ IsInitialized() [4/6]

int SubDetectorROOTGeo::IsInitialized ( )
inline

If the ROOT geometry of this subdetctor is initialized;.

Definition at line 41 of file InstallArea/x86_64-el9-gcc13-dbg/include/ROOTGeo/SubDetectorROOTGeo.h.

41{ return m_ROOTGeoInit; }

◆ IsInitialized() [5/6]

virtual int SubDetectorROOTGeo::IsInitialized ( )
inlinevirtual

If the ROOT geometry of this subdetctor is initialized;.

Definition at line 41 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/SubDetectorROOTGeo.h.

41{ return m_ROOTGeoInit; }

◆ IsInitialized() [6/6]

int SubDetectorROOTGeo::IsInitialized ( )
inline

If the ROOT geometry of this subdetctor is initialized;.

Definition at line 41 of file InstallArea/x86_64-el9-gcc13-opt/include/ROOTGeo/SubDetectorROOTGeo.h.

41{ return m_ROOTGeoInit; }

◆ ReadGdml() [1/6]

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

Initialize the instance of ROOTGeo.

Definition at line 25 of file DetectorDescription/ROOTGeo/src/SubDetectorROOTGeo.cxx.

25 {
26 m_config.SetURI( gdmlFile );
27 m_config.SetSetupName( setupName );
28 m_config.SetType( "ROOT" );
29
30 m_sxp.Configure( &m_config );
31 m_sxp.Initialize();
32 m_sxp.Run();
33
34 m_TopVolume = (TGeoVolume*)TGDMLProcessor::GetInstance()->GetWorldVolume();
35 if ( !m_TopVolume ) std::cout << "Top Volume not found " << std::endl;
36}

Referenced by EmcROOTGeo::InitFromGDML(), MdcROOTGeo::InitFromGDML(), MucROOTGeo::InitFromGDML(), TofROOTGeo::InitFromGDML(), EmcROOTGeo::InitFromGdml(), MdcROOTGeo::InitFromGdml(), MucROOTGeo::InitFromGdml(), and TofROOTGeo::InitFromGdml().

◆ ReadGdml() [2/6]

virtual void SubDetectorROOTGeo::ReadGdml ( const char * gdmlFile,
const char * setupName )
virtual

Initialize the instance of ROOTGeo.

◆ ReadGdml() [3/6]

virtual void SubDetectorROOTGeo::ReadGdml ( const char * gdmlFile,
const char * setupName )
virtual

Initialize the instance of ROOTGeo.

◆ ReadGdml() [4/6]

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

Initialize the instance of ROOTGeo.

◆ ReadGdml() [5/6]

virtual void SubDetectorROOTGeo::ReadGdml ( const char * gdmlFile,
const char * setupName )
virtual

Initialize the instance of ROOTGeo.

◆ ReadGdml() [6/6]

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

Initialize the instance of ROOTGeo.

◆ SetChildNo() [1/6]

void SubDetectorROOTGeo::SetChildNo ( int childNo)
inline

◆ SetChildNo() [2/6]

virtual void SubDetectorROOTGeo::SetChildNo ( int childNo)
inlinevirtual

Definition at line 44 of file EventDisplay/BesVisLib/include/BesVisLib/SubDetectorROOTGeo.h.

44{ m_childNo = childNo; }

◆ SetChildNo() [3/6]

virtual void SubDetectorROOTGeo::SetChildNo ( int childNo)
inlinevirtual

◆ SetChildNo() [4/6]

void SubDetectorROOTGeo::SetChildNo ( int childNo)
inline

◆ SetChildNo() [5/6]

virtual void SubDetectorROOTGeo::SetChildNo ( int childNo)
inlinevirtual

◆ SetChildNo() [6/6]

void SubDetectorROOTGeo::SetChildNo ( int childNo)
inline

◆ SetDetectorOn() [1/3]

void SubDetectorROOTGeo::SetDetectorOn ( )
virtual

Set all physicalNodes in m_DeteorsArray visible;.

Definition at line 66 of file EventDisplay/BesVisLib/src/SubDetectorROOTGeo.cxx.

66 {
67 for ( Int_t i = 0; i < m_DetectorsArray->GetEntries(); i++ )
68 {
69 TGeoPhysicalNode* pNode = (TGeoPhysicalNode*)m_DetectorsArray->At( i );
70 if ( pNode ) pNode->SetVisibility( 1 );
71 }
72}

◆ SetDetectorOn() [2/3]

virtual void SubDetectorROOTGeo::SetDetectorOn ( )
virtual

Set all physicalNodes in m_DeteorsArray visible;.

◆ SetDetectorOn() [3/3]

virtual void SubDetectorROOTGeo::SetDetectorOn ( )
virtual

Set all physicalNodes in m_DeteorsArray visible;.

Member Data Documentation

◆ m_2DGeoInit

◆ m_2DHitsArray

◆ m_childNo

◆ m_DetectorsArray

◆ m_HitsArray

◆ m_ROOTGeoInit

◆ m_TopVolume

TGeoVolume * SubDetectorROOTGeo::m_TopVolume
protected

The documentation for this class was generated from the following files: