BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisLib/include/BesVisLib/SubDetectorROOTGeo.h
Go to the documentation of this file.
1//$id$
2/*
3 * 2004/12/9 Zhengyun You Peking University
4 * ROOT Geometry for Bes sub-detector in event display and reconstruction.
5 *
6 */
7
8#ifndef SUBDETECTOR_ROOT_GEO_H
9#define SUBDETECTOR_ROOT_GEO_H
10
11#include <string>
12
13#include <TGeoNode.h>
14#include <TGeoPhysicalNode.h>
15#include <TGeoVolume.h>
16
17#include "Processor/TGDMLProcessor.h"
18#include "Saxana/ProcessingConfigurator.h"
19#include "Saxana/SAXProcessor.h"
20
21/**
22 * Class SubDetectorROOTGeo is a base class for the four subdetector
23 * ROOT geometry class.
24 *
25 * @author Zhengyun You \URL{mailto:youzy@hep.pku.cn}
26 *
27 */
28
30public:
31 /// Constructor.
33
34 /// Destructor.
36
37 /// Initialize the instance of ROOTGeo.
38 virtual void ReadGdml( const char* gdmlFile, const char* setupName );
39
40 /// If the ROOT geometry of this subdetctor is initialized;
41 virtual int IsInitialized() { return m_ROOTGeoInit; }
42
43 // Set child no of this subdetector in bes;
44 virtual void SetChildNo( int childNo ) { m_childNo = childNo; }
45
46 /// Get a logical volume by name;
47 virtual TGeoVolume* GetLogicalVolume( const std::string& vn );
48
49 /// Get the top(world) volume;
50 virtual TGeoVolume* GetTopVolume() { return m_TopVolume; }
51
52 /// Get an assembly by name;
53 virtual TGeoVolumeAssembly* GetAssemblyVolume( const std::string& an );
54
55 /// Get a node(physical volume) by name;
56 virtual TGeoNode* GetNode( const std::string& nn );
57
58 /// Get number of hits in HitsArray;
59 virtual int GetHitsNum() { return m_HitsArray->GetEntries(); }
60
61 /// Get ith hit in HitsArray;
62 virtual TGeoPhysicalNode* GetHit( int i );
63
64 /// Set all physicalNodes in m_DeteorsArray visible;
65 virtual void SetDetectorOn();
66
67private:
68 SAXProcessor m_sxp;
69 ProcessingConfigurator m_config;
70
71protected:
72 // Have we initialize the geometry.
73 int m_ROOTGeoInit;
74 int m_childNo; // child no of this subdetector in bes.
76
77 TGeoVolume* m_TopVolume;
78
79 TObjArray* m_DetectorsArray;
80 TObjArray* m_HitsArray;
81 TObjArray* m_2DHitsArray;
82};
83
84#endif /* SUBDETECTOR_ROOT_GEO_H */
virtual int GetHitsNum()
Get number of hits in HitsArray;.
virtual TGeoPhysicalNode * GetHit(int i)
Get ith hit in HitsArray;.
virtual ~SubDetectorROOTGeo()
Destructor.
virtual void SetDetectorOn()
Set all physicalNodes in m_DeteorsArray visible;.
virtual TGeoVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
virtual void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.
virtual TGeoNode * GetNode(const std::string &nn)
Get a node(physical volume) by name;.
virtual TGeoVolume * GetTopVolume()
Get the top(world) volume;.
virtual TGeoVolumeAssembly * GetAssemblyVolume(const std::string &an)
Get an assembly by name;.
SubDetectorROOTGeo()
Constructor.
virtual int IsInitialized()
If the ROOT geometry of this subdetctor is initialized;.