BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/ROOTGeo/include/ROOTGeo/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 <TGeoVolume.h>
15
16#include "Saxana/ProcessingConfigurator.h"
17#include "Saxana/SAXProcessor.h"
18
19#include "Processor/TGDMLProcessor.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.
35 virtual ~SubDetectorROOTGeo();
36
37 /// Initialize the instance of ROOTGeo.
38 void ReadGdml( const char* gdmlFile, const char* setupName );
39
40 /// If the ROOT geometry of this subdetctor is initialized;
41 int IsInitialized() { return m_ROOTGeoInit; }
42
43 // Set child no of this subdetector in bes;
44 void SetChildNo( int childNo ) { m_childNo = childNo; }
45
46 /// Get a logical volume by name;
47 TGeoVolume* GetLogicalVolume( const std::string& vn );
48
49 /// Get the top(world) volume;
50 TGeoVolume* GetTopVolume() { return m_TopVolume; }
51
52 /// Get an assembly by name;
53 TGeoVolumeAssembly* GetAssemblyVolume( const std::string& an );
54
55 /// Get a node(physical volume) by name;
56 TGeoNode* GetNode( const std::string& nn );
57
58private:
59 SAXProcessor m_sxp;
60 ProcessingConfigurator m_config;
61
62protected:
63 // Have we initialize the geometry.
65 int m_childNo; // child no of this subdetector in bes.
66
67 TGeoVolume* m_TopVolume;
68};
69
70#endif /* SUBDETECTOR_ROOT_GEO_H */
TGeoNode * GetNode(const std::string &nn)
Get a node(physical volume) by name;.
TGeoVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
int IsInitialized()
If the ROOT geometry of this subdetctor is initialized;.
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.
TGeoVolumeAssembly * GetAssemblyVolume(const std::string &an)
Get an assembly by name;.