BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/ROOTGeo/ROOTGeo-00-00-16/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 <TGeoVolume.h>
14#include <TGeoNode.h>
15
16#include "Saxana/SAXProcessor.h"
17#include "Saxana/ProcessingConfigurator.h"
18#include "Processor/TGDMLProcessor.h"
19
20/**
21 * Class SubDetectorROOTGeo is a base class for the four subdetector
22 * ROOT geometry class.
23 *
24 * @author Zhengyun You \URL{mailto:[email protected]}
25 *
26 */
27
29{
30 public:
31
32 /// Constructor.
34
35 /// Destructor.
36 virtual ~SubDetectorROOTGeo();
37
38 /// Initialize the instance of ROOTGeo.
39 void ReadGdml( const char *gdmlFile, const char *setupName );
40
41 /// If the ROOT geometry of this subdetctor is initialized;
42 int IsInitialized() { return m_ROOTGeoInit; }
43
44 // Set child no of this subdetector in bes;
45 void SetChildNo(int childNo) { m_childNo = childNo; }
46
47 /// Get a logical volume by name;
48 TGeoVolume *GetLogicalVolume( const std::string& vn );
49
50 /// Get the top(world) volume;
51 TGeoVolume *GetTopVolume() { return m_TopVolume; }
52
53 /// Get an assembly by name;
54 TGeoVolumeAssembly *GetAssemblyVolume( const std::string& an );
55
56 /// Get a node(physical volume) by name;
57 TGeoNode* GetNode( const std::string& nn );
58
59 private:
60
61 SAXProcessor m_sxp;
62 ProcessingConfigurator m_config;
63
64 protected:
65 // Have we initialize the geometry.
67 int m_childNo; // child no of this subdetector in bes.
68
69 TGeoVolume *m_TopVolume;
70};
71
72#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;.