BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisLib/BesVisLib-00-06-02/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 <TGeoVolume.h>
14#include <TGeoNode.h>
15#include <TGeoPhysicalNode.h>
16
17#include "Saxana/SAXProcessor.h"
18#include "Saxana/ProcessingConfigurator.h"
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:[email protected]}
26 *
27 */
28
30{
31 public:
32
33 /// Constructor.
35
36 /// Destructor.
38
39 /// Initialize the instance of ROOTGeo.
40 virtual void ReadGdml( const char *gdmlFile, const char *setupName );
41
42 /// If the ROOT geometry of this subdetctor is initialized;
43 virtual int IsInitialized() { return m_ROOTGeoInit; }
44
45 // Set child no of this subdetector in bes;
46 virtual void SetChildNo(int childNo) { m_childNo = childNo; }
47
48 /// Get a logical volume by name;
49 virtual TGeoVolume *GetLogicalVolume( const std::string& vn );
50
51 /// Get the top(world) volume;
52 virtual TGeoVolume *GetTopVolume() { return m_TopVolume; }
53
54 /// Get an assembly by name;
55 virtual TGeoVolumeAssembly *GetAssemblyVolume( const std::string& an );
56
57 /// Get a node(physical volume) by name;
58 virtual TGeoNode* GetNode( const std::string& nn );
59
60 /// Get number of hits in HitsArray;
61 virtual int GetHitsNum() { return m_HitsArray->GetEntries(); }
62
63 /// Get ith hit in HitsArray;
64 virtual TGeoPhysicalNode* GetHit(int i);
65
66 /// Set all physicalNodes in m_DeteorsArray visible;
67 virtual void SetDetectorOn();
68
69
70 private:
71
72 SAXProcessor m_sxp;
73 ProcessingConfigurator m_config;
74
75 protected:
76 // Have we initialize the geometry.
77 int m_ROOTGeoInit;
78 int m_childNo; // child no of this subdetector in bes.
80
81 TGeoVolume *m_TopVolume;
82
83 TObjArray *m_DetectorsArray;
84 TObjArray *m_HitsArray;
85 TObjArray *m_2DHitsArray;
86};
87
88#endif /* SUBDETECTOR_ROOT_GEO_H */
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;.