BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
BesGeometry Class Reference

#include <BesGeometry.h>

+ Inheritance diagram for BesGeometry:

Public Member Functions

 BesGeometry ()
 
virtual ~BesGeometry ()
 
virtual void InitFromGDML (const TString fPath)
 
virtual void InitFromROOT (TGeoVolume *volBes)
 
virtual void InitGeometry ()
 
const char * GetFilename (const char *RunPeriod)
 
virtual void SetDefaultVis ()
 
virtual void Draw (Option_t *option="3D")
 
virtual void Draw3D ()
 
virtual void Draw2DXY ()
 
virtual void Draw2DZR ()
 
Float_t GetBesR ()
 
Float_t GetBesZ ()
 
TGeoVolume * GetVolBes ()
 
TGeoVolume * GetVolumeBeamPipe ()
 
MdcROOTGeoGetMdcROOTGeo ()
 
TofROOTGeoGetTofROOTGeo ()
 
EmcROOTGeoGetEmcROOTGeo ()
 
MucROOTGeoGetMucROOTGeo ()
 
TGeoVolume * GetVolumeMdc ()
 
TGeoVolume * GetVolumeMdcSegment (int segment)
 
TGeoVolume * GetVolumeMdcLayer (int layer)
 
TGeoVolume * GetVolumeMdcReplica (int layer)
 
TGeoPhysicalNode * GetPhysicalMdcReplica (int layer, int replica)
 
TGeoVolume * GetVolumeTof ()
 
TGeoPhysicalNode * GetPhysicalTofScin (int part, int layer, int scin)
 
TGeoVolume * GetVolumeEmc ()
 
TGeoVolume * GetVolumeEmcPart (int part)
 
TGeoVolume * GetVolumeEmcPhi (int part, int phi)
 
TGeoVolume * GetVolumeEmcTheta (int part, int phi, int theta)
 
TGeoVolume * GetVolumeEmcCrystal (int part, int phi, int theta)
 
TGeoPhysicalNode * GetPhysicalEmcCrystal (int part, int phi, int theta)
 
TGeoVolume * GetVolumeMuc ()
 
TGeoVolume * GetVolumeMucAbsorber (int part, int seg, int absorber)
 
TGeoVolume * GetVolumeMucAbsorberPanel (int part, int seg, int absorber, int panel)
 
TGeoVolume * GetVolumeMucGap (int part, int seg, int gap)
 
TGeoVolume * GetVolumeMucStripPlane (int part, int seg, int gap)
 
TGeoVolume * GetVolumeMucStrip (int part, int seg, int gap, int strip)
 
TGeoVolume * GetVolumeMucGasChamber (int part, int seg, int gap, int panel, int gasChamber)
 
TGeoVolume * GetVolumeMucBakelite (int part, int seg, int gap, int RpcUpDown, int panel, int bakelite)
 
TGeoPhysicalNode * GetPhysicalMucGap (int part, int seg, int gap)
 
TGeoPhysicalNode * GetPhysicalMucStrip (int part, int seg, int gap, int strip)
 
 BesGeometry ()
 
virtual ~BesGeometry ()
 
virtual void InitFromGDML (const TString fPath)
 
virtual void InitFromROOT (TGeoVolume *volBes)
 
virtual void InitGeometry ()
 
const char * GetFilename (const char *RunPeriod)
 
virtual void SetDefaultVis ()
 
virtual void Draw (Option_t *option="3D")
 
virtual void Draw3D ()
 
virtual void Draw2DXY ()
 
virtual void Draw2DZR ()
 
Float_t GetBesR ()
 
Float_t GetBesZ ()
 
TGeoVolume * GetVolBes ()
 
TGeoVolume * GetVolumeBeamPipe ()
 
MdcROOTGeoGetMdcROOTGeo ()
 
TofROOTGeoGetTofROOTGeo ()
 
EmcROOTGeoGetEmcROOTGeo ()
 
MucROOTGeoGetMucROOTGeo ()
 
TGeoVolume * GetVolumeMdc ()
 
TGeoVolume * GetVolumeMdcSegment (int segment)
 
TGeoVolume * GetVolumeMdcLayer (int layer)
 
TGeoVolume * GetVolumeMdcReplica (int layer)
 
TGeoPhysicalNode * GetPhysicalMdcReplica (int layer, int replica)
 
TGeoVolume * GetVolumeTof ()
 
TGeoPhysicalNode * GetPhysicalTofScin (int part, int layer, int scin)
 
TGeoVolume * GetVolumeEmc ()
 
TGeoVolume * GetVolumeEmcPart (int part)
 
TGeoVolume * GetVolumeEmcPhi (int part, int phi)
 
TGeoVolume * GetVolumeEmcTheta (int part, int phi, int theta)
 
TGeoVolume * GetVolumeEmcCrystal (int part, int phi, int theta)
 
TGeoPhysicalNode * GetPhysicalEmcCrystal (int part, int phi, int theta)
 
TGeoVolume * GetVolumeMuc ()
 
TGeoVolume * GetVolumeMucAbsorber (int part, int seg, int absorber)
 
TGeoVolume * GetVolumeMucAbsorberPanel (int part, int seg, int absorber, int panel)
 
TGeoVolume * GetVolumeMucGap (int part, int seg, int gap)
 
TGeoVolume * GetVolumeMucStripPlane (int part, int seg, int gap)
 
TGeoVolume * GetVolumeMucStrip (int part, int seg, int gap, int strip)
 
TGeoVolume * GetVolumeMucGasChamber (int part, int seg, int gap, int panel, int gasChamber)
 
TGeoVolume * GetVolumeMucBakelite (int part, int seg, int gap, int RpcUpDown, int panel, int bakelite)
 
TGeoPhysicalNode * GetPhysicalMucGap (int part, int seg, int gap)
 
TGeoPhysicalNode * GetPhysicalMucStrip (int part, int seg, int gap, int strip)
 

Detailed Description

Constructor & Destructor Documentation

◆ BesGeometry() [1/2]

BesGeometry::BesGeometry ( )

◆ ~BesGeometry() [1/2]

BesGeometry::~BesGeometry ( )
virtual

Definition at line 52 of file BesGeometry.cxx.

53{
54 delete m_Bes;
55 delete m_BeamPipe;
56
57 delete m_MdcROOTGeo;
58 delete m_TofROOTGeo;
59 delete m_EmcROOTGeo;
60 delete m_MucROOTGeo;
61}

◆ BesGeometry() [2/2]

BesGeometry::BesGeometry ( )

◆ ~BesGeometry() [2/2]

virtual BesGeometry::~BesGeometry ( )
virtual

Member Function Documentation

◆ Draw() [1/2]

void BesGeometry::Draw ( Option_t *  option = "3D")
virtual

Definition at line 279 of file BesGeometry.cxx.

280{
281 //
282 // BesGeometry draw function
283 TString opt = option;
284 opt.ToUpper();
285
286 if ( opt.Contains("3D") ) {
287 Draw3D();
288 }
289 else if ( opt.Contains("XY") ) {
290 Draw2DXY();
291 }
292 else if ( opt.Contains("ZR") ) {
293 Draw2DZR();
294 }
295}
virtual void Draw2DXY()
virtual void Draw2DZR()
virtual void Draw3D()

Referenced by BesVisDisplay::DrawView(), and BesView::SetViewType().

◆ Draw() [2/2]

virtual void BesGeometry::Draw ( Option_t *  option = "3D")
virtual

◆ Draw2DXY() [1/2]

void BesGeometry::Draw2DXY ( )
virtual

Definition at line 340 of file BesGeometry.cxx.

341{
342 BesView *view = (BesView*)gPad->GetView();
343
344 if (view && view->GetVisBeamPipe()) m_BeamPipeXY->Draw();
345
346 if (m_MdcROOTGeo) m_MdcROOTGeo->Draw("XY");
347 if (m_TofROOTGeo) m_TofROOTGeo->Draw("XY");
348 if (m_EmcROOTGeo) m_EmcROOTGeo->Draw("XY");
349 if (m_MucROOTGeo) m_MucROOTGeo->Draw("XY");
350
351 if (view && view->GetVisZRPlaneOnXY()) m_ZRPlaneOnXY->Draw();
352 if (view && view->GetVisAxis()) view->ShowAxis();
353}
virtual void Draw(Option_t *option="")
virtual void Draw(Option_t *option="")

Referenced by Draw().

◆ Draw2DXY() [2/2]

virtual void BesGeometry::Draw2DXY ( )
virtual

◆ Draw2DZR() [1/2]

void BesGeometry::Draw2DZR ( )
virtual

Definition at line 355 of file BesGeometry.cxx.

356{
357 BesView *view = (BesView*)gPad->GetView();
358
359 if (view && view->GetVisBeamPipe()) m_BeamPipeZR->Draw();
360
361 if (m_MdcROOTGeo) m_MdcROOTGeo->Draw("ZR");
362 if (m_TofROOTGeo) m_TofROOTGeo->Draw("ZR");
363 if (m_EmcROOTGeo) m_EmcROOTGeo->Draw("ZR");
364 if (m_MucROOTGeo) m_MucROOTGeo->Draw("ZR");
365
366 if (view && view->GetVisAxis()) view->ShowAxis();
367}

Referenced by Draw().

◆ Draw2DZR() [2/2]

virtual void BesGeometry::Draw2DZR ( )
virtual

◆ Draw3D() [1/2]

void BesGeometry::Draw3D ( )
virtual

Definition at line 297 of file BesGeometry.cxx.

298{
299 BesView *view = (BesView*)gPad->GetView();
300
301 if (view && view->GetViewType() == k3DView) {
302
303 if (m_MdcROOTGeo) {
304 m_MdcROOTGeo->SetVisMdcDetector();
305 m_MdcROOTGeo->SetVisMdcHits();
306 }
307
308 if (m_TofROOTGeo) {
309 m_TofROOTGeo->SetVisTofDetector();
310 m_TofROOTGeo->SetVisTofHits();
311 }
312
313 if (m_EmcROOTGeo) {
314 m_EmcROOTGeo->SetVisEmcDetector();
315 m_EmcROOTGeo->SetVisEmcHits();
316 }
317
318 if (m_MucROOTGeo) {
319 m_MucROOTGeo->SetVisMucDetector();
320 m_MucROOTGeo->SetVisMucHits();
321 }
322 }
323
324 //if (gGeoManager) {
325 // cout << "gGeoManager exit" << endl;
326 //}
327 //else {
328 // cout << "gGeoManager do not exit" << endl;
329 //}
330
331 //if (m_Bes){
332 // cout << "m_Bes address:" << m_Bes << endl;
333 //}
334
335
336 //if (m_Bes) m_Bes->Draw();
337 //if (view && view->GetVisAxis()) view->ShowAxis();
338}
void SetVisEmcDetector()
Set Emc detector visibility;.
void SetVisMdcDetector()
Set Mdc default detector visibility;.
void SetVisMucDetector()
Set Muc detector visibility;.
void SetVisTofDetector()
Set Tof detector visibility;.

Referenced by Draw().

◆ Draw3D() [2/2]

virtual void BesGeometry::Draw3D ( )
virtual

◆ GetBesR() [1/2]

Float_t BesGeometry::GetBesR ( )
inline

Definition at line 35 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

35{ return m_BesR; }

Referenced by ClassImp().

◆ GetBesR() [2/2]

Float_t BesGeometry::GetBesR ( )
inline

Definition at line 35 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

35{ return m_BesR; }

◆ GetBesZ() [1/2]

Float_t BesGeometry::GetBesZ ( )
inline

Definition at line 36 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

36{ return m_BesZ; }

Referenced by ClassImp().

◆ GetBesZ() [2/2]

Float_t BesGeometry::GetBesZ ( )
inline

Definition at line 36 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

36{ return m_BesZ; }

◆ GetEmcROOTGeo() [1/2]

◆ GetEmcROOTGeo() [2/2]

EmcROOTGeo * BesGeometry::GetEmcROOTGeo ( )
inline

Definition at line 43 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

43{ return m_EmcROOTGeo; }

◆ GetFilename() [1/2]

const char * BesGeometry::GetFilename ( const char *  RunPeriod)

Definition at line 259 of file BesGeometry.cxx.

260{
261 return RunPeriod;
262}

◆ GetFilename() [2/2]

const char * BesGeometry::GetFilename ( const char *  RunPeriod)

◆ GetMdcROOTGeo() [1/2]

◆ GetMdcROOTGeo() [2/2]

MdcROOTGeo * BesGeometry::GetMdcROOTGeo ( )
inline

Definition at line 41 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

41{ return m_MdcROOTGeo; }

◆ GetMucROOTGeo() [1/2]

◆ GetMucROOTGeo() [2/2]

MucROOTGeo * BesGeometry::GetMucROOTGeo ( )
inline

Definition at line 44 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

44{ return m_MucROOTGeo; }

◆ GetPhysicalEmcCrystal() [1/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalEmcCrystal ( int  part,
int  phi,
int  theta 
)
inline

Definition at line 63 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

63{ return m_EmcROOTGeo->GetPhysicalCrystal(part, phi, theta); }
TGeoPhysicalNode * GetPhysicalCrystal(int part, int phi, int theta)
Get crystal physical node;.

◆ GetPhysicalEmcCrystal() [2/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalEmcCrystal ( int  part,
int  phi,
int  theta 
)
inline

Definition at line 63 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

63{ return m_EmcROOTGeo->GetPhysicalCrystal(part, phi, theta); }

◆ GetPhysicalMdcReplica() [1/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalMdcReplica ( int  layer,
int  replica 
)
inline

Definition at line 50 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

50{ return m_MdcROOTGeo->GetPhysicalReplica(layer, replica); }
TGeoPhysicalNode * GetPhysicalReplica(int layer, int replica)
Get replica physical node;.

◆ GetPhysicalMdcReplica() [2/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalMdcReplica ( int  layer,
int  replica 
)
inline

Definition at line 50 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

50{ return m_MdcROOTGeo->GetPhysicalReplica(layer, replica); }

◆ GetPhysicalMucGap() [1/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalMucGap ( int  part,
int  seg,
int  gap 
)
inline

Definition at line 73 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

73{ return m_MucROOTGeo->GetPhysicalGap(part, seg, gap); }
TGeoPhysicalNode * GetPhysicalGap(int part, int seg, int gap)
Get rpc gas chamber node;

◆ GetPhysicalMucGap() [2/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalMucGap ( int  part,
int  seg,
int  gap 
)
inline

Definition at line 73 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

73{ return m_MucROOTGeo->GetPhysicalGap(part, seg, gap); }

◆ GetPhysicalMucStrip() [1/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalMucStrip ( int  part,
int  seg,
int  gap,
int  strip 
)
inline

Definition at line 74 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

74{ return m_MucROOTGeo->GetPhysicalStrip(part, seg, gap, strip); }
TGeoPhysicalNode * GetPhysicalStrip(int part, int seg, int gap, int strip)
Get strip physical node;.

◆ GetPhysicalMucStrip() [2/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalMucStrip ( int  part,
int  seg,
int  gap,
int  strip 
)
inline

Definition at line 74 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

74{ return m_MucROOTGeo->GetPhysicalStrip(part, seg, gap, strip); }

◆ GetPhysicalTofScin() [1/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalTofScin ( int  part,
int  layer,
int  scin 
)
inline

Definition at line 56 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

56{ return m_TofROOTGeo->GetPhysicalScin(part, layer, scin); }
TGeoPhysicalNode * GetPhysicalScin(int part, int scin)
Get scintillator physical node;.

◆ GetPhysicalTofScin() [2/2]

TGeoPhysicalNode * BesGeometry::GetPhysicalTofScin ( int  part,
int  layer,
int  scin 
)
inline

Definition at line 56 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

56{ return m_TofROOTGeo->GetPhysicalScin(part, layer, scin); }

◆ GetTofROOTGeo() [1/2]

◆ GetTofROOTGeo() [2/2]

TofROOTGeo * BesGeometry::GetTofROOTGeo ( )
inline

Definition at line 42 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

42{ return m_TofROOTGeo; }

◆ GetVolBes() [1/2]

TGeoVolume * BesGeometry::GetVolBes ( )
inline

Definition at line 38 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

38{ return m_Bes; }

Referenced by BesClient::SaveGeoAs().

◆ GetVolBes() [2/2]

TGeoVolume * BesGeometry::GetVolBes ( )
inline

Definition at line 38 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

38{ return m_Bes; }

◆ GetVolumeBeamPipe() [1/2]

TGeoVolume * BesGeometry::GetVolumeBeamPipe ( )
inline

Definition at line 39 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

39{ return m_BeamPipe; }

◆ GetVolumeBeamPipe() [2/2]

TGeoVolume * BesGeometry::GetVolumeBeamPipe ( )
inline

Definition at line 39 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

39{ return m_BeamPipe; }

◆ GetVolumeEmc() [1/2]

TGeoVolume * BesGeometry::GetVolumeEmc ( )
inline

Definition at line 58 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

58{ return m_EmcROOTGeo->GetVolumeEmc(); }

◆ GetVolumeEmc() [2/2]

TGeoVolume * BesGeometry::GetVolumeEmc ( )
inline

Definition at line 58 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

58{ return m_EmcROOTGeo->GetVolumeEmc(); }

◆ GetVolumeEmcCrystal() [1/2]

TGeoVolume * BesGeometry::GetVolumeEmcCrystal ( int  part,
int  phi,
int  theta 
)
inline

Definition at line 62 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

62{ return m_EmcROOTGeo->GetVolumeCrystal(part, phi, theta); }
TGeoVolume * GetVolumeCrystal(int part, int phi, int theta)
Get crystal volume;.

◆ GetVolumeEmcCrystal() [2/2]

TGeoVolume * BesGeometry::GetVolumeEmcCrystal ( int  part,
int  phi,
int  theta 
)
inline

Definition at line 62 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

62{ return m_EmcROOTGeo->GetVolumeCrystal(part, phi, theta); }

◆ GetVolumeEmcPart() [1/2]

TGeoVolume * BesGeometry::GetVolumeEmcPart ( int  part)
inline

Definition at line 59 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

59{ return m_EmcROOTGeo->GetVolumePart(part); }
TGeoVolume * GetVolumePart(int part)
Get part volume;.

◆ GetVolumeEmcPart() [2/2]

TGeoVolume * BesGeometry::GetVolumeEmcPart ( int  part)
inline

Definition at line 59 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

59{ return m_EmcROOTGeo->GetVolumePart(part); }

◆ GetVolumeEmcPhi() [1/2]

TGeoVolume * BesGeometry::GetVolumeEmcPhi ( int  part,
int  phi 
)
inline

Definition at line 60 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

60{ return m_EmcROOTGeo->GetVolumePhi(part, phi); }
TGeoVolume * GetVolumePhi(int part, int phi)
Get phi volume;

◆ GetVolumeEmcPhi() [2/2]

TGeoVolume * BesGeometry::GetVolumeEmcPhi ( int  part,
int  phi 
)
inline

Definition at line 60 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

60{ return m_EmcROOTGeo->GetVolumePhi(part, phi); }

◆ GetVolumeEmcTheta() [1/2]

TGeoVolume * BesGeometry::GetVolumeEmcTheta ( int  part,
int  phi,
int  theta 
)
inline

Definition at line 61 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

61{ return m_EmcROOTGeo->GetVolumeTheta(part, phi, theta); }
TGeoVolume * GetVolumeTheta(int part, int phi, int theta)
Get theta volume;.

◆ GetVolumeEmcTheta() [2/2]

TGeoVolume * BesGeometry::GetVolumeEmcTheta ( int  part,
int  phi,
int  theta 
)
inline

Definition at line 61 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

61{ return m_EmcROOTGeo->GetVolumeTheta(part, phi, theta); }

◆ GetVolumeMdc() [1/2]

TGeoVolume * BesGeometry::GetVolumeMdc ( )
inline

Definition at line 46 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

46{ return m_MdcROOTGeo->GetVolumeMdc(); }

◆ GetVolumeMdc() [2/2]

TGeoVolume * BesGeometry::GetVolumeMdc ( )
inline

Definition at line 46 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

46{ return m_MdcROOTGeo->GetVolumeMdc(); }

◆ GetVolumeMdcLayer() [1/2]

TGeoVolume * BesGeometry::GetVolumeMdcLayer ( int  layer)
inline

Definition at line 48 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

48{ return m_MdcROOTGeo->GetVolumeLayer(layer); }
TGeoVolume * GetVolumeLayer(int layer)
Get layer volume;

◆ GetVolumeMdcLayer() [2/2]

TGeoVolume * BesGeometry::GetVolumeMdcLayer ( int  layer)
inline

Definition at line 48 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

48{ return m_MdcROOTGeo->GetVolumeLayer(layer); }

◆ GetVolumeMdcReplica() [1/2]

TGeoVolume * BesGeometry::GetVolumeMdcReplica ( int  layer)
inline

Definition at line 49 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

49{ return m_MdcROOTGeo->GetVolumeReplica(layer); }
TGeoVolume * GetVolumeReplica(int layer)
Get replica volume;.

◆ GetVolumeMdcReplica() [2/2]

TGeoVolume * BesGeometry::GetVolumeMdcReplica ( int  layer)
inline

Definition at line 49 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

49{ return m_MdcROOTGeo->GetVolumeReplica(layer); }

◆ GetVolumeMdcSegment() [1/2]

TGeoVolume * BesGeometry::GetVolumeMdcSegment ( int  segment)
inline

Definition at line 47 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

47{ return m_MdcROOTGeo->GetVolumeSegment(segment); }
TGeoVolume * GetVolumeSegment(int segment)
Get segment volume;.

◆ GetVolumeMdcSegment() [2/2]

TGeoVolume * BesGeometry::GetVolumeMdcSegment ( int  segment)
inline

Definition at line 47 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

47{ return m_MdcROOTGeo->GetVolumeSegment(segment); }

◆ GetVolumeMuc() [1/2]

TGeoVolume * BesGeometry::GetVolumeMuc ( )
inline

Definition at line 65 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

65{ return m_MucROOTGeo->GetVolumeMuc(); }

◆ GetVolumeMuc() [2/2]

TGeoVolume * BesGeometry::GetVolumeMuc ( )
inline

Definition at line 65 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

65{ return m_MucROOTGeo->GetVolumeMuc(); }

◆ GetVolumeMucAbsorber() [1/2]

TGeoVolume * BesGeometry::GetVolumeMucAbsorber ( int  part,
int  seg,
int  absorber 
)
inline

Definition at line 66 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

66{ return m_MucROOTGeo->GetVolumeAbsorber(part, seg, absorber); }
TGeoVolume * GetVolumeAbsorber(int part, int seg, int absorber)
Get absorber volume;

◆ GetVolumeMucAbsorber() [2/2]

TGeoVolume * BesGeometry::GetVolumeMucAbsorber ( int  part,
int  seg,
int  absorber 
)
inline

Definition at line 66 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

66{ return m_MucROOTGeo->GetVolumeAbsorber(part, seg, absorber); }

◆ GetVolumeMucAbsorberPanel() [1/2]

TGeoVolume * BesGeometry::GetVolumeMucAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)
inline

Definition at line 67 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

67{ return m_MucROOTGeo->GetVolumeAbsorberPanel(part, seg, absorber, panel); }
TGeoVolume * GetVolumeAbsorberPanel(int part, int seg, int absorber, int panel)
Get absorber panel volume;

◆ GetVolumeMucAbsorberPanel() [2/2]

TGeoVolume * BesGeometry::GetVolumeMucAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)
inline

Definition at line 67 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

67{ return m_MucROOTGeo->GetVolumeAbsorberPanel(part, seg, absorber, panel); }

◆ GetVolumeMucBakelite() [1/2]

TGeoVolume * BesGeometry::GetVolumeMucBakelite ( int  part,
int  seg,
int  gap,
int  RpcUpDown,
int  panel,
int  bakelite 
)
inline

Definition at line 72 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

72{ return m_MucROOTGeo->GetVolumeBakelite(part, seg, gap, RpcUpDown, panel, bakelite); }
TGeoVolume * GetVolumeBakelite(int part, int seg, int gap, int panel, int bakelite)
Get rpc bakelite volume;

◆ GetVolumeMucBakelite() [2/2]

TGeoVolume * BesGeometry::GetVolumeMucBakelite ( int  part,
int  seg,
int  gap,
int  RpcUpDown,
int  panel,
int  bakelite 
)
inline

Definition at line 72 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

72{ return m_MucROOTGeo->GetVolumeBakelite(part, seg, gap, RpcUpDown, panel, bakelite); }

◆ GetVolumeMucGap() [1/2]

TGeoVolume * BesGeometry::GetVolumeMucGap ( int  part,
int  seg,
int  gap 
)
inline

Definition at line 68 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

68{ return m_MucROOTGeo->GetVolumeGap(part, seg, gap); }
TGeoVolume * GetVolumeGap(int part, int seg, int gap)
Get gap volume;

◆ GetVolumeMucGap() [2/2]

TGeoVolume * BesGeometry::GetVolumeMucGap ( int  part,
int  seg,
int  gap 
)
inline

Definition at line 68 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

68{ return m_MucROOTGeo->GetVolumeGap(part, seg, gap); }

◆ GetVolumeMucGasChamber() [1/2]

TGeoVolume * BesGeometry::GetVolumeMucGasChamber ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)
inline

Definition at line 71 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

71{ return m_MucROOTGeo->GetVolumeGasChamber(part, seg, gap, panel, gasChamber); }
TGeoVolume * GetVolumeGasChamber(int part, int seg, int gap, int panel, int gasChamber)
Get rpc gas chamber volume;

◆ GetVolumeMucGasChamber() [2/2]

TGeoVolume * BesGeometry::GetVolumeMucGasChamber ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)
inline

Definition at line 71 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

71{ return m_MucROOTGeo->GetVolumeGasChamber(part, seg, gap, panel, gasChamber); }

◆ GetVolumeMucStrip() [1/2]

TGeoVolume * BesGeometry::GetVolumeMucStrip ( int  part,
int  seg,
int  gap,
int  strip 
)
inline

Definition at line 70 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

70{ return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }
TGeoVolume * GetVolumeStripPlane(int part, int seg, int gap)
Get strip plane volume;.

◆ GetVolumeMucStrip() [2/2]

TGeoVolume * BesGeometry::GetVolumeMucStrip ( int  part,
int  seg,
int  gap,
int  strip 
)
inline

Definition at line 70 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

70{ return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }

◆ GetVolumeMucStripPlane() [1/2]

TGeoVolume * BesGeometry::GetVolumeMucStripPlane ( int  part,
int  seg,
int  gap 
)
inline

Definition at line 69 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

69{ return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }

◆ GetVolumeMucStripPlane() [2/2]

TGeoVolume * BesGeometry::GetVolumeMucStripPlane ( int  part,
int  seg,
int  gap 
)
inline

Definition at line 69 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

69{ return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }

◆ GetVolumeTof() [1/2]

TGeoVolume * BesGeometry::GetVolumeTof ( )
inline

Definition at line 52 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesGeometry.h.

52{ return m_TofROOTGeo->GetVolumeTof(); }

◆ GetVolumeTof() [2/2]

TGeoVolume * BesGeometry::GetVolumeTof ( )
inline

Definition at line 52 of file InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h.

52{ return m_TofROOTGeo->GetVolumeTof(); }

◆ InitFromGDML() [1/2]

void BesGeometry::InitFromGDML ( const TString  fPath)
virtual

Definition at line 63 of file BesGeometry.cxx.

64{
65 gGeoManager->SetVisOption(0); // to show all visible volumes.
66 gGeoManager->SetVisLevel(5);
67
68 TGeoIdentity *identity = new TGeoIdentity();
69
70 TGeoMaterial *mat = new TGeoMaterial("VOID",0,0,0);
71 mat->SetTransparency(20);
72 TGeoMedium *med = new TGeoMedium("MED",1,mat);
73 m_Bes = gGeoManager->MakeBox("volBes", med, m_BesR, m_BesR, 0.5*m_BesZ);
74
75 TGeoVolume *topVolume = new TGeoVolume(); // temp top volume for load geometry more than once
76 gGeoManager->SetTopVolume(topVolume);
77 gGeoManager->SetTopVolume(m_Bes);
78
79 Int_t iChildNo = 0;
80 m_MdcROOTGeo = new MdcROOTGeo();
81 m_MdcROOTGeo->InitFromGDML( (fPath + TString("Mdc.gdml")).Data(), "Mdc" );
82 cout<<"in BesGeometry construct mdc1"<<endl;
83 m_Mdc = m_MdcROOTGeo->GetVolumeMdc();
84 if (m_Mdc) cout << "Construct Mdc" << endl;
85 else cout << "Volume Mdc not found " << endl;
86 m_Bes->AddNode(m_Mdc, iChildNo, identity);
87 m_MdcROOTGeo->SetChildNo(iChildNo);//Connect bes with mdc, form physcialnode path. m_Bes->GetNdaughters()-1
88
89 iChildNo++;
90 m_TofROOTGeo = new TofROOTGeo();
91 m_TofROOTGeo->InitFromGDML( (fPath + TString("Tof.gdml")).Data(), "Tof" );
92 cout<<"construct tof"<<endl;
93 m_Tof = m_TofROOTGeo->GetVolumeTof();
94 if (m_Tof) cout << "Construct Tof" << endl;
95 else cout << "Volume Tof not found " << endl;
96 m_Bes->AddNode(m_Tof, iChildNo, identity);
97 m_TofROOTGeo->SetChildNo(iChildNo);
98
99 iChildNo++;
100 m_EmcROOTGeo = new EmcROOTGeo();
101 m_EmcROOTGeo->InitFromGDML( (fPath + TString("Emc.gdml")).Data(), "Emc" );
102 m_Emc = m_EmcROOTGeo->GetVolumeEmc();
103 if (m_Emc) cout << "Construct Emc" << endl;
104 else cout << "Volume Emc not found " << endl;
105 m_Bes->AddNode(m_Emc, iChildNo, identity);
106 m_EmcROOTGeo->SetChildNo(iChildNo);
107
108 iChildNo++;
109 m_MucROOTGeo = new MucROOTGeo();
110 m_MucROOTGeo->InitFromGDML( (fPath + TString("Muc.gdml")).Data(), "Muc" );
111 m_Muc = m_MucROOTGeo->GetVolumeMuc();
112 if (m_Muc) cout << "Construct Muc" << endl;
113 else cout << "Volume Muc not found " << endl;
114 m_Bes->AddNode(m_Muc, iChildNo, identity);
115 m_MucROOTGeo->SetChildNo(iChildNo);
116
117 iChildNo++;
118 Int_t beamPipeColor = 3;
119 m_BeamPipe = gGeoManager->MakeTube("volBeamPipe", med, m_BeamPipeRMin, m_BeamPipeRMax, m_BeamPipeZ);
120 m_BeamPipe->SetLineColor(beamPipeColor);
121 m_Bes->AddNode(m_BeamPipe, iChildNo, identity);
122
123 Int_t nDaughters = m_Bes->GetNodes()->GetEntries();
124 cout << "volBes contains " << nDaughters << " nodes : " << endl;
125 for (Int_t i = 0; i < nDaughters; i++) {
126 cout << i << " : " << m_Bes->GetNode(i)->GetName() << endl;
127 }
128
129 InitGeometry();
130}
virtual void InitGeometry()
void InitFromGDML(const char *gdmlFile, const char *setupName)
Initialize ROOTGeo from GDML.
void InitFromGDML(const char *gdmlFile, const char *setupName)
Initialize ROOTGeo from GDML.
void InitFromGDML(const char *gdmlFile, const char *setupName)
Initialize ROOTGeo from GDML.
void InitFromGDML(const char *gdmlFile, const char *setupName)
Initialize ROOTGeo from GDML.

Referenced by BesVisDisplay::InitGeometryFromGDML().

◆ InitFromGDML() [2/2]

virtual void BesGeometry::InitFromGDML ( const TString  fPath)
virtual

◆ InitFromROOT() [1/2]

void BesGeometry::InitFromROOT ( TGeoVolume *  volBes)
virtual

Definition at line 132 of file BesGeometry.cxx.

133{
134 gGeoManager->SetVisOption(0); // to show all visible volumes.
135 gGeoManager->SetVisLevel(5);
136
137 m_Bes = volBes;
138 m_BesR = ((TGeoBBox*)m_Bes->GetShape())->GetDX();
139 m_BesZ = ((TGeoBBox*)m_Bes->GetShape())->GetDZ()*2.0;
140
141 TGeoVolume *topVolume = new TGeoVolume();
142 gGeoManager->SetTopVolume(topVolume);
143 gGeoManager->SetTopVolume(m_Bes);
144
145 Int_t nDaughters = m_Bes->GetNodes()->GetEntries();
146
147 //cout << "volBes contains " << nDaughters << " nodes : " << endl;
148 //for (Int_t i = 0; i < nDaughters; i++) {
149 // cout << i << " : " << m_Bes->GetNode(i)->GetName() << endl;
150 //}
151
152 Int_t iChildNo = 0;
153 m_MdcROOTGeo = new MdcROOTGeo();
154 TGeoNode *nodeMdc = m_Bes->GetNode(iChildNo);
155 if (nodeMdc) m_Mdc = nodeMdc->GetVolume();
156 //else cout << "Node logicalMdc not found" << endl;
157 //if (m_Mdc) cout << "Set Mdc" << endl;
158 //else cout << "Volume Mdc not found " << endl;
159 m_MdcROOTGeo->InitFromROOT( m_Mdc );
160 m_MdcROOTGeo->SetChildNo(iChildNo);//Connect bes with mdc, form physcialnode path. m_Bes->GetNdaughters()-1
161
162 iChildNo++;
163 m_TofROOTGeo = new TofROOTGeo();
164 TGeoNode *nodeTof = m_Bes->GetNode(iChildNo);
165 if (nodeTof) m_Tof = nodeTof->GetVolume();
166 //else cout << "Node logicalTof not found" << endl;
167 //if (m_Tof) cout << "Set Tof" << endl;
168 //else cout << "Volume Tof not found " << endl;
169 m_TofROOTGeo->InitFromROOT( m_Tof );
170 m_TofROOTGeo->SetChildNo(iChildNo);
171
172 iChildNo++;
173 m_EmcROOTGeo = new EmcROOTGeo();
174 TGeoNode *nodeEmc = m_Bes->GetNode(iChildNo);
175 if (nodeEmc) m_Emc = nodeEmc->GetVolume();
176 //else cout << "Node logicalEmc not found" << endl;
177 //if (m_Emc) cout << "Set Emc" << endl;
178 //else cout << "Volume Emc not found " << endl;
179 m_EmcROOTGeo->InitFromROOT( m_Emc );
180 m_EmcROOTGeo->SetChildNo(iChildNo);
181
182 iChildNo++;
183 m_MucROOTGeo = new MucROOTGeo();
184 TGeoNode *nodeMuc = m_Bes->GetNode(iChildNo);
185 if (nodeMuc) m_Muc = nodeMuc->GetVolume();
186 //else cout << "Node logicalMuc not found" << endl;
187 //if (m_Muc) cout << "Set Muc" << endl;
188 //else cout << "Volume Muc not found " << endl;
189 m_MucROOTGeo->InitFromROOT( m_Muc );
190 m_MucROOTGeo->SetChildNo(iChildNo);
191
192 iChildNo++;
193 TGeoNode *nodeBeamPipe = m_Bes->GetNode(iChildNo);
194 if (nodeBeamPipe) {
195 m_BeamPipe = nodeBeamPipe->GetVolume();
196 m_BeamPipe->SetLineColor(4);
197 }
198 //else cout << "Node volBeamPipe not found " << endl;
199 //cout << "Set beanmpi complete" << endl;
200 InitGeometry();
201 //cout << "init root ok" << endl;
202}
void InitFromROOT(TGeoVolume *vol)
Initialize ROOTGeo from TGeoVolume logicalEmc.
void InitFromROOT(TGeoVolume *vol)
Initialize ROOTGeo from TGeoVolume logicalMdc.
void InitFromROOT(TGeoVolume *vol)
Initialize ROOTGeo from TGeoVolume logicalMuc.
void InitFromROOT(TGeoVolume *vol)
Initialize ROOTGeo from TGeoVolume logicalTof.

Referenced by BesVisDisplay::InitGeometryFromROOT().

◆ InitFromROOT() [2/2]

virtual void BesGeometry::InitFromROOT ( TGeoVolume *  volBes)
virtual

◆ InitGeometry() [1/2]

void BesGeometry::InitGeometry ( )
virtual

Definition at line 204 of file BesGeometry.cxx.

205{
206 gGeoManager->SetDrawExtraPaths(); // draw physical node or not;
207 gGeoManager->CloseGeometry();
208 gGeoManager->SetNsegments(20); // devide a circle to 20 slides
209
210 // PhysicalNode necessary for fast setting node visible or not in an event
211 // Should be set after gGeoManager closed
212 m_MdcROOTGeo->SetPhysicalNode(); //here liang
213 m_TofROOTGeo->SetPhysicalNode(); //here liang
214 m_EmcROOTGeo->SetPhysicalNode(); //here liang
215 m_MucROOTGeo->SetPhysicalNode();
216
217 // 2D Geometry initialization should be after SetPhysicalNode();
218 m_MdcROOTGeo->Init2DGeometry(); //here liang
219 m_TofROOTGeo->Init2DGeometry(); //here liang
220 m_EmcROOTGeo->Init2DGeometry(); //here liang
221 m_MucROOTGeo->Init2DGeometry();
222
223 Double_t P[3*4] = {0.0};
224
225 // BeamPipe
226 Double_t beamPipeCenter[3] = {0.0, 0.0, 0.0};
227 m_BeamPipeXY =
228 new BesCircle2D("BeamPipe", "BeamPipe", m_BeamPipeRMin, m_BeamPipeRMax, &beamPipeCenter[0]);
229
230 for (Int_t i = 0; i < 4; i++) {
231 P[3*i] = 0.0;
232 if (i == 0 || i == 3) P[3*i+1] = -1.0*m_BeamPipeRMax;
233 else P[3*i+1] = m_BeamPipeRMax;
234 if (i == 0 || i == 1) P[3*i+2] = -1.0*m_BeamPipeZ;
235 else P[3*i+2] = m_BeamPipeZ;
236 }
237 m_BeamPipeZR = new BesPolygon2D("BeamPipe", "BeamPipe", 4, &P[0]);
238
239 // Auxiliary line
240 if (!m_Bes) cout << "BesGeometry:InitGeometry, top volume m_Bes not found" << endl;
241 TGeoBBox *besShape = (TGeoBBox*)m_Bes->GetShape();
242 m_BesR = besShape->GetDX();
243 m_BesZ = besShape->GetDZ()*2.0;
244 for (Int_t i = 0; i < 4; i++) {
245 P[3*i] = 0.0;
246 if (i == 0 || i == 3) P[3*i+1] = -1.0*m_BesR;
247 else P[3*i+1] = m_BesR;
248 if (i == 0 || i == 1) P[3*i+2] = -1.0*m_BesZ;
249 else P[3*i+2] = m_BesZ;
250 }
251
252 m_ZRPlaneOnXY = new BesPolygon2D("ZRPlaneOnXY", "ZRPlaneOnXY", 4, &P[0]);
253 m_ZRPlaneOnXY->SetRotatable(true);
254 m_ZRPlaneOnXY->SetLineWidth(1);
255 m_ZRPlaneOnXY->SetLineStyle(3);
256 m_ZRPlaneOnXY->SetFillStyle(4000);
257}
double P(RecMdcKalTrack *trk)
void SetPhysicalNode()
Set the pointers to the physical nodes;.
void SetPhysicalNode()
Set the pointers to the physical nodes;.
void SetPhysicalNode()
Set the pointers to the physical nodes;.
void SetPhysicalNode()
Set the pointers to the physical nodes;.

Referenced by InitFromGDML(), and InitFromROOT().

◆ InitGeometry() [2/2]

virtual void BesGeometry::InitGeometry ( )
virtual

◆ SetDefaultVis() [1/2]

void BesGeometry::SetDefaultVis ( )
virtual

Definition at line 264 of file BesGeometry.cxx.

265{
266 m_Bes->SetLineColor(2);
267 m_Bes->SetVisibility(0);
268
269 m_BeamPipe->SetLineColor(4);
270 m_BeamPipe->SetVisibility(0);
271
272 m_MdcROOTGeo->SetAllVisible();
273 m_TofROOTGeo->SetAllVisible();
274 m_EmcROOTGeo->SetAllVisible();
275 m_MucROOTGeo->SetAllVisible();
276
277}

Referenced by BesVisDisplay::InitGeometryFromGDML().

◆ SetDefaultVis() [2/2]

virtual void BesGeometry::SetDefaultVis ( )
virtual

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