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

#include <MucROOTGeo.h>

+ Inheritance diagram for MucROOTGeo:

Public Member Functions

 MucROOTGeo ()
 Constructor.
 
 ~MucROOTGeo ()
 Destructor.
 
void InitFromGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
void SetDefaultVis ()
 Set default visual attributes;.
 
void SetAllVisible ()
 Set all visible;.
 
void SetQuarterVisible ()
 Set quater visible;.
 
void SetPhysicalNode ()
 Set the pointers to the physical nodes;.
 
int GetPartNum ()
 Get number of part;.
 
int GetSegNum (int part)
 Get number of segment on part;.
 
int GetGapNum (int part)
 Get number of gap on part;.
 
int GetStripNum (int part, int seg, int gap)
 Get number of strip on gap;.
 
TGeoVolume * GetVolumeMuc ()
 Get Muc volume;.
 
TGeoVolume * GetVolumeAbsorber (int part, int seg, int absorber)
 Get absorber volume;

 
float GetAbsorberThickness (int part, int seg, int absorber)
 Get thickness of an absorber;.
 
TGeoVolume * GetVolumeAbsorberPanel (int part, int seg, int absorber, int panel)
 Get absorber panel volume;

 
TGeoVolume * GetVolumeGap (int part, int seg, int gap)
 Get gap volume;

 
TGeoVolume * GetVolumeAluminumBox (int part, int seg, int gap)
 Get box volume;

 
TGeoVolume * GetVolumeStripPlane (int part, int seg, int gap)
 Get strip plane volume;.
 
TGeoVolume * GetVolumeStrip (int part, int seg, int gap, int strip)
 Get strip volume;

 
TGeoVolume * GetVolumeGasChamber (int part, int seg, int gap, int panel, int gasChamber)
 Get rpc gas chamber volume;

 
TGeoVolume * GetVolumeBakelite (int part, int seg, int gap, int panel, int bakelite)
 Get rpc bakelite volume;

 
TGeoNode * GetGap (int part, int seg, int gap)
 Get absorber node;

 
TGeoNode * GetStripPlane (int part, int seg, int gap)
 Get box node;.
 
TGeoNode * GetStrip (int part, int seg, int gap, int strip)
 Get strip node;

 
TGeoPhysicalNode * GetPhysicalGap (int part, int seg, int gap)
 Get rpc gas chamber node;

 
TGeoPhysicalNode * GetPhysicalAluminumBox (int part, int seg, int gap)
 Get box physical node;.
 
TGeoPhysicalNode * GetPhysicalStrip (int part, int seg, int gap, int strip)
 Get strip physical node;.
 
 MucROOTGeo ()
 Constructor.
 
 ~MucROOTGeo ()
 Destructor.
 
void InitFromGDML (const char *gdmlFile, const char *setupName)
 Initialize ROOTGeo from GDML.
 
void InitFromROOT (TGeoVolume *vol)
 Initialize ROOTGeo from TGeoVolume logicalMuc.
 
void Init2DGeometry ()
 Initialize 2D Geometry.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
void SetVolumeDefaultVis ()
 Set default visual attributes;.
 
void SetAllVisible ()
 Set all visible;.
 
void SetQuarterVisible ()
 Set quater visible;.
 
void SetHalfVisible ()
 Set half visible;.
 
void SetNoEndVisible ()
 Set noend visible;.
 
void SetPhysicalNode ()
 Set the pointers to the physical nodes;.
 
void SetDetector ()
 Set Detecor (what is detector depends on you)
 
void SetHits ()
 Set all physicalNodes corresponding to digiCol;.
 
void SetVisMucDetector ()
 Set Muc detector visibility;.
 
void SetVisMucHits ()
 Set Muc hits visibility;.
 
int GetPartNb ()
 Get number of part;.
 
int GetSegNb (int part)
 Get number of segment on part;.
 
int GetGapNb (int part)
 Get number of gap on part;.
 
int GetStripNb (int part, int seg, int gap)
 Get number of strip on gap;.
 
int GetAbsorberNb (int part)
 Get number of absorber on part;.
 
void SetVolumeMuc (TGeoVolume *vol)
 Set Muc volume, while initializing from ROOT;.
 
TGeoVolume * GetVolumeMuc ()
 Get Muc volume;.
 
TGeoVolume * GetVolumeAbsorber (int part, int seg, int absorber)
 Get absorber volume;

 
TGeoVolume * GetVolumeAbsorberSmallBlock (int gap, int sb)
 Get absorber small block;.
 
TGeoVolume * GetVolumeAbsorberPanel (int part, int seg, int absorber, int panel)
 Get absorber panel volume;

 
TGeoVolume * GetVolumeGap (int part, int seg, int gap)
 Get gap volume;

 
TGeoVolume * GetVolumeBox (int part, int seg, int gap)
 Get box volume;

 
TGeoVolume * GetVolumeBoxSurface (int part, int seg, int gap, int up)
 Get box surface volume;

 
TGeoVolume * GetVolumeStripPlane (int part, int seg, int gap)
 Get strip plane volume;.
 
TGeoVolume * GetVolumeStrip (int part, int seg, int gap, int strip)
 Get strip volume;

 
TGeoVolume * GetVolumeGasChamber (int part, int seg, int gap, int panel, int gasChamber)
 Get rpc gas chamber volume;

 
TGeoVolume * GetVolumeGasBorder (int part, int seg, int gap, int panel, int gasChamber)
 Get rpc gas border volume;

 
TGeoVolume * GetVolumeBakelite (int part, int seg, int gap, int RpcUpDown, int panel, int bakelite)
 Get rpc bakelite volume;

 
TGeoNode * GetAbsorber (int part, int seg, int absorber)
 Get absorber node;

 
TGeoNode * GetAbsorberPanel (int part, int seg, int absorber, int panel)
 Get absorber panel node;

 
TGeoNode * GetGap (int part, int seg, int gap)
 Get gap node;

 
TGeoNode * GetStripPlane (int part, int seg, int gap)
 Get strip plane node;.
 
TGeoNode * GetStrip (int part, int seg, int gap, int strip)
 Get strip node;

 
TGeoPhysicalNode * GetPhysicalAbsorber (int part, int seg, int gap, int panel)
 Get rpc gas chamber node;

 
TGeoPhysicalNode * GetPhysicalGap (int part, int seg, int gap)
 Get gap physical node;.
 
TGeoPhysicalNode * GetPhysicalStrip (int part, int seg, int gap, int strip)
 Get strip physical node;.
 
Muc2DStripGet2DStrip (int part, int seg, int gap, int strip)
 Get Muc2DStrip;.
 
Int_t GetPart (TGeoPhysicalNode *phyNode)
 Get part no of a physcial node.
 
Bool_t IsZRVisible (int part, int seg)
 Is a segment visible in ZR view.
 
Double_t Range360 (Double_t input)
 Get input value 0~360.
 
void Draw (Option_t *option)
 Draw function.
 
void DrawHits (Option_t *option)
 Draw 2D hits.
 
 MucROOTGeo ()
 Constructor.
 
 ~MucROOTGeo ()
 Destructor.
 
void InitFromGDML (const char *gdmlFile, const char *setupName)
 Initialize ROOTGeo from GDML.
 
void InitFromROOT (TGeoVolume *vol)
 Initialize ROOTGeo from TGeoVolume logicalMuc.
 
void Init2DGeometry ()
 Initialize 2D Geometry.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
void SetVolumeDefaultVis ()
 Set default visual attributes;.
 
void SetAllVisible ()
 Set all visible;.
 
void SetQuarterVisible ()
 Set quater visible;.
 
void SetHalfVisible ()
 Set half visible;.
 
void SetNoEndVisible ()
 Set noend visible;.
 
void SetPhysicalNode ()
 Set the pointers to the physical nodes;.
 
void SetDetector ()
 Set Detecor (what is detector depends on you)
 
void SetHits ()
 Set all physicalNodes corresponding to digiCol;.
 
void SetVisMucDetector ()
 Set Muc detector visibility;.
 
void SetVisMucHits ()
 Set Muc hits visibility;.
 
int GetPartNb ()
 Get number of part;.
 
int GetSegNb (int part)
 Get number of segment on part;.
 
int GetGapNb (int part)
 Get number of gap on part;.
 
int GetStripNb (int part, int seg, int gap)
 Get number of strip on gap;.
 
int GetAbsorberNb (int part)
 Get number of absorber on part;.
 
void SetVolumeMuc (TGeoVolume *vol)
 Set Muc volume, while initializing from ROOT;.
 
TGeoVolume * GetVolumeMuc ()
 Get Muc volume;.
 
TGeoVolume * GetVolumeAbsorber (int part, int seg, int absorber)
 Get absorber volume;

 
TGeoVolume * GetVolumeAbsorberSmallBlock (int gap, int sb)
 Get absorber small block;.
 
TGeoVolume * GetVolumeAbsorberPanel (int part, int seg, int absorber, int panel)
 Get absorber panel volume;

 
TGeoVolume * GetVolumeGap (int part, int seg, int gap)
 Get gap volume;

 
TGeoVolume * GetVolumeBox (int part, int seg, int gap)
 Get box volume;

 
TGeoVolume * GetVolumeBoxSurface (int part, int seg, int gap, int up)
 Get box surface volume;

 
TGeoVolume * GetVolumeStripPlane (int part, int seg, int gap)
 Get strip plane volume;.
 
TGeoVolume * GetVolumeStrip (int part, int seg, int gap, int strip)
 Get strip volume;

 
TGeoVolume * GetVolumeGasChamber (int part, int seg, int gap, int panel, int gasChamber)
 Get rpc gas chamber volume;

 
TGeoVolume * GetVolumeGasBorder (int part, int seg, int gap, int panel, int gasChamber)
 Get rpc gas border volume;

 
TGeoVolume * GetVolumeBakelite (int part, int seg, int gap, int RpcUpDown, int panel, int bakelite)
 Get rpc bakelite volume;

 
TGeoNode * GetAbsorber (int part, int seg, int absorber)
 Get absorber node;

 
TGeoNode * GetAbsorberPanel (int part, int seg, int absorber, int panel)
 Get absorber panel node;

 
TGeoNode * GetGap (int part, int seg, int gap)
 Get gap node;

 
TGeoNode * GetStripPlane (int part, int seg, int gap)
 Get strip plane node;.
 
TGeoNode * GetStrip (int part, int seg, int gap, int strip)
 Get strip node;

 
TGeoPhysicalNode * GetPhysicalAbsorber (int part, int seg, int gap, int panel)
 Get rpc gas chamber node;

 
TGeoPhysicalNode * GetPhysicalGap (int part, int seg, int gap)
 Get gap physical node;.
 
TGeoPhysicalNode * GetPhysicalStrip (int part, int seg, int gap, int strip)
 Get strip physical node;.
 
Muc2DStripGet2DStrip (int part, int seg, int gap, int strip)
 Get Muc2DStrip;.
 
Int_t GetPart (TGeoPhysicalNode *phyNode)
 Get part no of a physcial node.
 
Bool_t IsZRVisible (int part, int seg)
 Is a segment visible in ZR view.
 
Double_t Range360 (Double_t input)
 Get input value 0~360.
 
void Draw (Option_t *option)
 Draw function.
 
void DrawHits (Option_t *option)
 Draw 2D hits.
 
 MucROOTGeo ()
 Constructor.
 
 ~MucROOTGeo ()
 Destructor.
 
void InitFromGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
void SetDefaultVis ()
 Set default visual attributes;.
 
void SetAllVisible ()
 Set all visible;.
 
void SetQuarterVisible ()
 Set quater visible;.
 
void SetPhysicalNode ()
 Set the pointers to the physical nodes;.
 
int GetPartNum ()
 Get number of part;.
 
int GetSegNum (int part)
 Get number of segment on part;.
 
int GetGapNum (int part)
 Get number of gap on part;.
 
int GetStripNum (int part, int seg, int gap)
 Get number of strip on gap;.
 
TGeoVolume * GetVolumeMuc ()
 Get Muc volume;.
 
TGeoVolume * GetVolumeAbsorber (int part, int seg, int absorber)
 Get absorber volume;

 
float GetAbsorberThickness (int part, int seg, int absorber)
 Get thickness of an absorber;.
 
TGeoVolume * GetVolumeAbsorberPanel (int part, int seg, int absorber, int panel)
 Get absorber panel volume;

 
TGeoVolume * GetVolumeGap (int part, int seg, int gap)
 Get gap volume;

 
TGeoVolume * GetVolumeAluminumBox (int part, int seg, int gap)
 Get box volume;

 
TGeoVolume * GetVolumeStripPlane (int part, int seg, int gap)
 Get strip plane volume;.
 
TGeoVolume * GetVolumeStrip (int part, int seg, int gap, int strip)
 Get strip volume;

 
TGeoVolume * GetVolumeGasChamber (int part, int seg, int gap, int panel, int gasChamber)
 Get rpc gas chamber volume;

 
TGeoVolume * GetVolumeBakelite (int part, int seg, int gap, int panel, int bakelite)
 Get rpc bakelite volume;

 
TGeoNode * GetGap (int part, int seg, int gap)
 Get absorber node;

 
TGeoNode * GetStripPlane (int part, int seg, int gap)
 Get box node;.
 
TGeoNode * GetStrip (int part, int seg, int gap, int strip)
 Get strip node;

 
TGeoPhysicalNode * GetPhysicalGap (int part, int seg, int gap)
 Get rpc gas chamber node;

 
TGeoPhysicalNode * GetPhysicalAluminumBox (int part, int seg, int gap)
 Get box physical node;.
 
TGeoPhysicalNode * GetPhysicalStrip (int part, int seg, int gap, int strip)
 Get strip physical node;.
 
- Public Member Functions inherited from SubDetectorROOTGeo
 SubDetectorROOTGeo ()
 Constructor.
 
virtual ~SubDetectorROOTGeo ()
 Destructor.
 
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
 
void SetChildNo (int childNo)
 
TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
 
TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
 
TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
 
TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
 
 SubDetectorROOTGeo ()
 Constructor.
 
virtual ~SubDetectorROOTGeo ()
 Destructor.
 
virtual void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
virtual int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
 
virtual void SetChildNo (int childNo)
 
virtual TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
 
virtual TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
 
virtual TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
 
virtual TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
 
virtual int GetHitsNum ()
 Get number of hits in HitsArray;.
 
virtual TGeoPhysicalNode * GetHit (int i)
 Get ith hit in HitsArray;.
 
virtual void SetDetectorOn ()
 Set all physicalNodes in m_DeteorsArray visible;.
 
 SubDetectorROOTGeo ()
 Constructor.
 
virtual ~SubDetectorROOTGeo ()
 Destructor.
 
virtual void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
virtual int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
 
virtual void SetChildNo (int childNo)
 
virtual TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
 
virtual TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
 
virtual TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
 
virtual TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
 
virtual int GetHitsNum ()
 Get number of hits in HitsArray;.
 
virtual TGeoPhysicalNode * GetHit (int i)
 Get ith hit in HitsArray;.
 
virtual void SetDetectorOn ()
 Set all physicalNodes in m_DeteorsArray visible;.
 
 SubDetectorROOTGeo ()
 Constructor.
 
virtual ~SubDetectorROOTGeo ()
 Destructor.
 
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
int IsInitialized ()
 If the ROOT geometry of this subdetctor is initialized;.
 
void SetChildNo (int childNo)
 
TGeoVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
 
TGeoVolume * GetTopVolume ()
 Get the top(world) volume;.
 
TGeoVolumeAssembly * GetAssemblyVolume (const std::string &an)
 Get an assembly by name;.
 
TGeoNode * GetNode (const std::string &nn)
 Get a node(physical volume) by name;.
 

Additional Inherited Members

- Protected Attributes inherited from SubDetectorROOTGeo
int m_ROOTGeoInit
 
int m_childNo
 
TGeoVolume * m_TopVolume
 
int m_2DGeoInit
 
TObjArray * m_DetectorsArray
 
TObjArray * m_HitsArray
 
TObjArray * m_2DHitsArray
 

Detailed Description

Class MucGeo contains all of the objects necessary to describe the muc geometry.

Author
Zhengyun You \URL{youzy.nosp@m.@hep.nosp@m..pku..nosp@m.cn}

Definition at line 27 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/ROOTGeo/MucROOTGeo.h.

Constructor & Destructor Documentation

◆ MucROOTGeo() [1/4]

MucROOTGeo::MucROOTGeo ( )

Constructor.

Definition at line 29 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

30{
31 // Default constructor.
32 for (int part = 0; part < m_kPart; part++) {
33 for (int seg = 0; seg < m_kSegMax; seg++) {
34 for (int gap = 0; gap < m_kGapMax; gap++) {
35 m_NodeGap[part][seg][gap] = 0;
36 m_PhysicalGap[part][seg][gap] = 0;
37 // m_NodeBox[part][seg][gap] = 0;
38 // m_PhysicalBox[part][seg][gap] = 0;
39 for (int strip = 0; strip < m_kStripMax; strip++) {
40 m_NodeStrip[part][seg][gap][strip] = 0;
41 m_PhysicalStrip[part][seg][gap][strip] = 0;
42 }
43 }
44 }
45 }
46
47 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
48 //cout << "MucGeoGeneral::InitFromXML(), GdmlManagementPath not found" << endl;
49 string GdmlFile = GdmlManagementPath + string("/dat/Muc.gdml");
50 //string GdmlFile = string("Muc.gdml");
51 cout << "GdmlFile " << GdmlFile << endl;
52 InitFromGdml( GdmlFile.c_str(), "Muc" );
53}
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.

◆ ~MucROOTGeo() [1/4]

MucROOTGeo::~MucROOTGeo ( )

Destructor.

Definition at line 55 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

56{ }

◆ MucROOTGeo() [2/4]

MucROOTGeo::MucROOTGeo ( )

Constructor.

◆ ~MucROOTGeo() [2/4]

MucROOTGeo::~MucROOTGeo ( )

Destructor.

◆ MucROOTGeo() [3/4]

MucROOTGeo::MucROOTGeo ( )

Constructor.

◆ ~MucROOTGeo() [3/4]

MucROOTGeo::~MucROOTGeo ( )

Destructor.

◆ MucROOTGeo() [4/4]

MucROOTGeo::MucROOTGeo ( )

Constructor.

◆ ~MucROOTGeo() [4/4]

MucROOTGeo::~MucROOTGeo ( )

Destructor.

Member Function Documentation

◆ Draw() [1/2]

void MucROOTGeo::Draw ( Option_t *  option)

Draw function.

Definition at line 1433 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1434{
1435 TString opt = option;
1436 opt.ToUpper();
1437
1438 if (!m_2DGeoInit) cout << "MucROOTGeo::Draw2D(), 2D Geometry not initialized!" << endl;
1439 BesView *view = (BesView*)gPad->GetView();
1440 if (!view) cout << "MucROOTGeo::Draw(), BesView not found" << endl;
1441
1442 if (view->GetVisMucGlobal()) { // MucVisGlobal
1443 // seg and gap
1444 for (Int_t part = GetPartNb()-1; part >= 0; part--) { // draw west first
1445 if ( (part == 0 && view->GetVisMucEast()) ||
1446 (part == 1 && view->GetVisMucBarrel()) ||
1447 (part == 2 && view->GetVisMucWest()) ) {
1448 for (Int_t seg = 0; seg < GetSegNb(part); seg++) {
1449 if (opt.Contains("XY")) {
1450 if (m_MucXY[part][seg]) m_MucXY[part][seg]->Draw("");
1451 for (Int_t gap = 0; gap < GetGapNb(part); gap++) {
1452 if (m_MucXYGap[part][seg][gap]) m_MucXYGap[part][seg][gap]->Draw("");
1453 }
1454 }
1455 if (opt.Contains("ZR")) {
1456 if ( m_MucZR[part][seg] ) { // && IsZRVisible(part, seg) ) {
1457 if (part == 1) m_MucZR[part][seg]->SetRotatable(true);
1458 m_MucZR[part][seg]->Draw("");
1459 }
1460 for (Int_t gap = 0; gap < GetGapNb(part); gap++) {
1461 if (m_MucZRGap[part][seg][gap]) {
1462 if (part == 1) m_MucZRGap[part][seg][gap]->SetRotatable(true);
1463 m_MucZRGap[part][seg][gap]->Draw("");
1464 }
1465 }
1466 }
1467 }
1468 }
1469 }
1470
1471 // strips, should be drawn after all segs and gaps have been drawn
1472 for (Int_t part = GetPartNb()-1; part >= 0; part--) { // draw west first
1473 for (Int_t seg = 0; seg < GetSegNb(part); seg++) {
1474 for (Int_t gap = 0; gap < GetGapNb(part); gap++) {
1475 for (Int_t strip = 0; strip < GetStripNb(part, seg, gap); strip++) {
1476 if (m_Muc2DStrip[part][seg][gap][strip]) {
1477 m_Muc2DStrip[part][seg][gap][strip]->SetFired(false);
1478 if ( (part == 0 && view->GetVisMucEast()) ||
1479 (part == 1 && view->GetVisMucBarrel()) ||
1480 (part == 2 && view->GetVisMucWest()) ) {
1481 m_Muc2DStrip[part][seg][gap][strip]->Draw("");
1482 }
1483 }
1484 }
1485 }
1486 }
1487 }
1488
1489 }
1490}
virtual void Draw(Option_t *option="")
virtual void Draw(Option_t *option="")
Definition: Muc2DStrip.cxx:204
int GetGapNb(int part)
Get number of gap on part;.
int GetSegNb(int part)
Get number of segment on part;.
int GetStripNb(int part, int seg, int gap)
Get number of strip on gap;.

Referenced by BesGeometry::Draw2DXY(), and BesGeometry::Draw2DZR().

◆ Draw() [2/2]

void MucROOTGeo::Draw ( Option_t *  option)

Draw function.

◆ DrawHits() [1/2]

void MucROOTGeo::DrawHits ( Option_t *  option)

Draw 2D hits.

Definition at line 1493 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1494{
1495 BesView *view = (BesView*)gPad->GetView();
1496 if (!view) cout << "MucROOTGeo::DrawHits(), BesView not found" << endl;
1497
1498
1499 if (view->GetVisMucHitsGlobal()) {
1500
1501 /*
1502 for (Int_t part = GetPartNb()-1; part >= 0; part--) { // draw west first
1503 for (Int_t seg = 0; seg < GetSegNb(part); seg++) {
1504 for (Int_t gap = 0; gap < GetGapNb(part); gap++) {
1505 for (Int_t strip = 0; strip < GetStripNb(part, seg, gap); strip++) {
1506 if (m_Muc2DStrip[part][seg][gap][strip]) m_Muc2DStrip[part][seg][gap][strip]->ClearInfo();
1507 }
1508 }
1509 }
1510 }*/
1511
1512 if (m_MucDigiCol) {
1513 for (int i = 0; i < m_MucDigiCol->GetEntries(); i++) {
1514 TMucDigi *aMucDigi = (TMucDigi*)m_MucDigiCol->At(i);
1515
1516 //cout << aMucDigi->getIntId() << endl;
1517 Identifier aMucID( aMucDigi->getIntId() );
1518 int part = MucID::part( aMucID );
1519 int seg = MucID::seg( aMucID );
1520 int gap = MucID::gap( aMucID );
1521 int strip = MucID::strip( aMucID );
1522
1523 Muc2DStrip *aStrip = 0;
1524 aStrip = m_Muc2DStrip[part][seg][gap][strip];
1525 if (aStrip) {
1526 if ( (part == 0 && view->GetVisMucHitsEast()) ||
1527 (part == 1 && view->GetVisMucHitsBarrel()) ||
1528 (part == 2 && view->GetVisMucHitsWest()) ) {
1529 aStrip->SetFired(true);
1530 aStrip->Draw();
1531 }
1532 }
1533 }
1534 }
1535 }
1536}
static int part(const Identifier &id)
Definition: MucID.cxx:46
static int gap(const Identifier &id)
Definition: MucID.cxx:66
static int seg(const Identifier &id)
Definition: MucID.cxx:56
static int strip(const Identifier &id)
Definition: MucID.cxx:76
UInt_t getIntId() const
Definition: TRawData.cxx:50

Referenced by BesEvent::DrawHits().

◆ DrawHits() [2/2]

void MucROOTGeo::DrawHits ( Option_t *  option)

Draw 2D hits.

◆ Get2DStrip() [1/2]

Muc2DStrip * MucROOTGeo::Get2DStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get Muc2DStrip;.

Definition at line 1358 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1359{
1360 if (m_Muc2DStrip[part][seg][gap][strip]) return m_Muc2DStrip[part][seg][gap][strip];
1361 else return 0;
1362}

Referenced by BesEvent::ConstructMucTrackFromRec().

◆ Get2DStrip() [2/2]

Muc2DStrip * MucROOTGeo::Get2DStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get Muc2DStrip;.

◆ GetAbsorber() [1/2]

TGeoNode * MucROOTGeo::GetAbsorber ( int  part,
int  seg,
int  absorber 
)

Get absorber node;

Definition at line 1275 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1276{
1277 if (m_NodeAbsorber[part][seg][absorber] != 0) {
1278 return m_NodeAbsorber[part][seg][absorber];
1279 }
1280 else {
1281 return 0;
1282 }
1283}

Referenced by Init2DGeometry().

◆ GetAbsorber() [2/2]

TGeoNode * MucROOTGeo::GetAbsorber ( int  part,
int  seg,
int  absorber 
)

Get absorber node;

◆ GetAbsorberNb() [1/2]

int MucROOTGeo::GetAbsorberNb ( int  part)

Get number of absorber on part;.

Definition at line 1147 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1148{
1149 int absorber = m_kAbsorber[part];
1150 return absorber;
1151}

Referenced by GetPart(), SetDetector(), and SetVolumeDefaultVis().

◆ GetAbsorberNb() [2/2]

int MucROOTGeo::GetAbsorberNb ( int  part)

Get number of absorber on part;.

◆ GetAbsorberPanel() [1/2]

TGeoNode * MucROOTGeo::GetAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)

Get absorber panel node;

Definition at line 1286 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1287{
1288 if (m_NodeAbsorberPanel[part][seg][absorber][panel] != 0) {
1289 return m_NodeAbsorberPanel[part][seg][absorber][panel];
1290 }
1291 else {
1292 return 0;
1293 }
1294}

◆ GetAbsorberPanel() [2/2]

TGeoNode * MucROOTGeo::GetAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)

Get absorber panel node;

◆ GetAbsorberThickness() [1/2]

float MucROOTGeo::GetAbsorberThickness ( int  part,
int  seg,
int  absorber 
)

Get thickness of an absorber;.

Definition at line 362 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

363{
364 float thickness = 0.0;
365 TGeoVolume *vol = GetVolumeAbsorber(part, seg, absorber);
366 if (vol) {
367 thickness = 2.0*((TGeoBBox*)vol->GetShape())->GetDZ();
368 }
369
370 return thickness;
371}
TGeoVolume * GetVolumeAbsorber(int part, int seg, int absorber)
Get absorber volume;

Referenced by MucGeoGeneral::InitFromXML().

◆ GetAbsorberThickness() [2/2]

float MucROOTGeo::GetAbsorberThickness ( int  part,
int  seg,
int  absorber 
)

Get thickness of an absorber;.

◆ GetGap() [1/4]

TGeoNode * MucROOTGeo::GetGap ( int  part,
int  seg,
int  gap 
)

Get absorber node;

Get absorber panel node;
Get gap node;

Definition at line 446 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

447{
448 if (m_NodeGap[part][seg][gap] != 0) {
449 return m_NodeGap[part][seg][gap];
450 }
451 else {
452 std::cout << "Node: " << "Part" << part << "Seg" << seg << "Gap" << gap << " not found" << std::endl;
453 return 0;
454 }
455}

Referenced by Init2DGeometry(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetNoEndVisible(), SetPhysicalNode(), SetQuarterVisible(), and SetVolumeDefaultVis().

◆ GetGap() [2/4]

TGeoNode * MucROOTGeo::GetGap ( int  part,
int  seg,
int  gap 
)

Get gap node;

◆ GetGap() [3/4]

TGeoNode * MucROOTGeo::GetGap ( int  part,
int  seg,
int  gap 
)

Get gap node;

◆ GetGap() [4/4]

TGeoNode * MucROOTGeo::GetGap ( int  part,
int  seg,
int  gap 
)

Get absorber node;

Get absorber panel node;
Get gap node;

◆ GetGapNb() [1/2]

int MucROOTGeo::GetGapNb ( int  part)

Get number of gap on part;.

Definition at line 1133 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1134{
1135 int gap = m_kGap[part];
1136 return gap;
1137}

Referenced by Draw(), GetPart(), Init2DGeometry(), SetDetector(), and SetVolumeDefaultVis().

◆ GetGapNb() [2/2]

int MucROOTGeo::GetGapNb ( int  part)

Get number of gap on part;.

◆ GetGapNum() [1/2]

int MucROOTGeo::GetGapNum ( int  part)

Get number of gap on part;.

Definition at line 339 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

340{
341 int gap = m_kGap[part];
342 return gap;
343}

Referenced by MucGeoGeneral::InitFromXML().

◆ GetGapNum() [2/2]

int MucROOTGeo::GetGapNum ( int  part)

Get number of gap on part;.

◆ GetPart() [1/2]

int MucROOTGeo::GetPart ( TGeoPhysicalNode *  phyNode)

Get part no of a physcial node.

Definition at line 1365 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1366{
1367 for (int part = 0; part < GetPartNb(); part++) {
1368 for (int seg = 0; seg < GetSegNb(part); seg++) {
1369 for (int gap = 0; gap < GetGapNb(part); gap++) {
1370 if (phyNode == GetPhysicalGap(part, seg, gap)) {
1371 return part;
1372 }
1373 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
1374 if (phyNode == GetPhysicalStrip(part, seg, gap, strip)) {
1375 return part;
1376 }
1377 }
1378 }
1379 for (int absorber = 0; absorber < GetAbsorberNb(part); absorber++) {
1380 for (int panel = 0; panel < m_kPanelMax; panel++) {
1381 if (phyNode == GetPhysicalAbsorber(part, seg, absorber, panel)) {
1382 return part;
1383 }
1384 }
1385 }
1386 }
1387 }
1388
1389 return -1;
1390}
int GetAbsorberNb(int part)
Get number of absorber on part;.
TGeoPhysicalNode * GetPhysicalStrip(int part, int seg, int gap, int strip)
Get strip physical node;.
TGeoPhysicalNode * GetPhysicalGap(int part, int seg, int gap)
Get rpc gas chamber node;
TGeoPhysicalNode * GetPhysicalAbsorber(int part, int seg, int gap, int panel)
Get rpc gas chamber node;

Referenced by SetVisMucDetector(), and SetVisMucHits().

◆ GetPart() [2/2]

Int_t MucROOTGeo::GetPart ( TGeoPhysicalNode *  phyNode)

Get part no of a physcial node.

◆ GetPartNb() [1/2]

int MucROOTGeo::GetPartNb ( )

Get number of part;.

Definition at line 1119 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1120{
1121 int part = m_kPart;
1122 return part;
1123}

Referenced by Draw(), GetPart(), Init2DGeometry(), SetDetector(), and SetVolumeDefaultVis().

◆ GetPartNb() [2/2]

int MucROOTGeo::GetPartNb ( )

Get number of part;.

◆ GetPartNum() [1/2]

int MucROOTGeo::GetPartNum ( )

Get number of part;.

Definition at line 325 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

326{
327 int part = m_kPart;
328 return part;
329}

Referenced by MucGeoGeneral::InitFromXML().

◆ GetPartNum() [2/2]

int MucROOTGeo::GetPartNum ( )

Get number of part;.

◆ GetPhysicalAbsorber() [1/2]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalAbsorber ( int  part,
int  seg,
int  gap,
int  panel 
)

Get rpc gas chamber node;

Get rpc bakelite node;
Get absorber physical node;

Definition at line 1330 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1331{
1332 return m_PhysicalAbsorber[part][seg][absorber][panel];
1333}

Referenced by GetPart(), and SetDetector().

◆ GetPhysicalAbsorber() [2/2]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalAbsorber ( int  part,
int  seg,
int  gap,
int  panel 
)

Get rpc gas chamber node;

Get rpc bakelite node;
Get absorber physical node;

◆ GetPhysicalAluminumBox() [1/2]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalAluminumBox ( int  part,
int  seg,
int  gap 
)

Get box physical node;.

◆ GetPhysicalAluminumBox() [2/2]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalAluminumBox ( int  part,
int  seg,
int  gap 
)

Get box physical node;.

◆ GetPhysicalGap() [1/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalGap ( int  part,
int  seg,
int  gap 
)

Get rpc gas chamber node;

Get rpc bakelite node;
Get gap physical node;

Definition at line 495 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

496{
497 if (m_PhysicalGap[part][seg][gap] != 0) {
498 return m_PhysicalGap[part][seg][gap];
499 }
500 else {
501 std::cout << "PhysicalNode: " << "Part" << part << "Seg" << seg << "Gap" << gap << " not found" << std::endl;
502 return 0;
503 }
504}

Referenced by GetPart(), BesGeometry::GetPhysicalMucGap(), Init2DGeometry(), MucGeoGeneral::InitFromXML(), and SetDetector().

◆ GetPhysicalGap() [2/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalGap ( int  part,
int  seg,
int  gap 
)

Get gap physical node;.

◆ GetPhysicalGap() [3/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalGap ( int  part,
int  seg,
int  gap 
)

Get gap physical node;.

◆ GetPhysicalGap() [4/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalGap ( int  part,
int  seg,
int  gap 
)

Get rpc gas chamber node;

Get rpc bakelite node;
Get gap physical node;

◆ GetPhysicalStrip() [1/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip physical node;.

Definition at line 519 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

520{
521 if (m_PhysicalStrip[part][seg][gap][strip] != 0) {
522 return m_PhysicalStrip[part][seg][gap][strip];
523 }
524 else {
525 std::cout << "PhysicalNode: " << "Part" << part << "Seg" << seg << "Gap" << gap << "Strip" << strip << " not found" << std::endl;
526 return 0;
527 }
528}

Referenced by GetPart(), BesGeometry::GetPhysicalMucStrip(), Init2DGeometry(), MucGeoGeneral::InitFromXML(), SetHits(), and BesVisDisplay::SetMucFiredCell().

◆ GetPhysicalStrip() [2/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip physical node;.

◆ GetPhysicalStrip() [3/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip physical node;.

◆ GetPhysicalStrip() [4/4]

TGeoPhysicalNode * MucROOTGeo::GetPhysicalStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip physical node;.

◆ GetSegNb() [1/2]

int MucROOTGeo::GetSegNb ( int  part)

Get number of segment on part;.

Definition at line 1126 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1127{
1128 int seg = m_kSeg[part];
1129 return seg;
1130}

Referenced by Draw(), GetPart(), Init2DGeometry(), SetDetector(), and SetVolumeDefaultVis().

◆ GetSegNb() [2/2]

int MucROOTGeo::GetSegNb ( int  part)

Get number of segment on part;.

◆ GetSegNum() [1/2]

int MucROOTGeo::GetSegNum ( int  part)

Get number of segment on part;.

Definition at line 332 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

333{
334 int seg = m_kSeg[part];
335 return seg;
336}

Referenced by MucGeoGeneral::InitFromXML().

◆ GetSegNum() [2/2]

int MucROOTGeo::GetSegNum ( int  part)

Get number of segment on part;.

◆ GetStrip() [1/4]

TGeoNode * MucROOTGeo::GetStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip node;

Definition at line 483 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

484{
485 if (m_NodeStrip[part][seg][gap][strip] != 0) {
486 return m_NodeStrip[part][seg][gap][strip];
487 }
488 else {
489 std::cout << "Node: " << "Part" << part << "Seg" << "0" << "Gap" << gap << "Strip" << strip << " not found" << std::endl;
490 return 0;
491 }
492}

Referenced by SetAllVisible(), SetDefaultVis(), SetPhysicalNode(), and SetVolumeDefaultVis().

◆ GetStrip() [2/4]

TGeoNode * MucROOTGeo::GetStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip node;

◆ GetStrip() [3/4]

TGeoNode * MucROOTGeo::GetStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip node;

◆ GetStrip() [4/4]

TGeoNode * MucROOTGeo::GetStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip node;

◆ GetStripNb() [1/2]

int MucROOTGeo::GetStripNb ( int  part,
int  seg,
int  gap 
)

Get number of strip on gap;.

Definition at line 1140 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1141{
1142 int strip = m_StripNum[part][seg][gap];
1143 return strip;
1144}

Referenced by Draw(), Init2DGeometry(), and SetVolumeDefaultVis().

◆ GetStripNb() [2/2]

int MucROOTGeo::GetStripNb ( int  part,
int  seg,
int  gap 
)

Get number of strip on gap;.

◆ GetStripNum() [1/2]

int MucROOTGeo::GetStripNum ( int  part,
int  seg,
int  gap 
)

Get number of strip on gap;.

Definition at line 346 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

347{
348 int strip = m_StripNum[part][seg][gap];
349 return strip;
350}

Referenced by MucGeoGeneral::InitFromXML().

◆ GetStripNum() [2/2]

int MucROOTGeo::GetStripNum ( int  part,
int  seg,
int  gap 
)

Get number of strip on gap;.

◆ GetStripPlane() [1/4]

TGeoNode * MucROOTGeo::GetStripPlane ( int  part,
int  seg,
int  gap 
)

Get box node;.

Get strip plane node;

Definition at line 471 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

472{
473 if (m_NodeStripPlane[part][seg][gap] != 0) {
474 return m_NodeStripPlane[part][seg][gap];
475 }
476 else {
477 std::cout << "Node: " << "Part" << part << "Seg" << seg << "Gap" << gap << "StripPlane" << " not found" << std::endl;
478 return 0;
479 }
480}

Referenced by SetPhysicalNode().

◆ GetStripPlane() [2/4]

TGeoNode * MucROOTGeo::GetStripPlane ( int  part,
int  seg,
int  gap 
)

Get strip plane node;.

◆ GetStripPlane() [3/4]

TGeoNode * MucROOTGeo::GetStripPlane ( int  part,
int  seg,
int  gap 
)

Get strip plane node;.

◆ GetStripPlane() [4/4]

TGeoNode * MucROOTGeo::GetStripPlane ( int  part,
int  seg,
int  gap 
)

Get box node;.

Get strip plane node;

◆ GetVolumeAbsorber() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorber ( int  part,
int  seg,
int  absorber 
)

Get absorber volume;

Definition at line 353 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

354{
355 std::stringstream osname;
356 osname << "l" << "Muc" << "P" << part << "S" << seg << "Ab" << absorber;
357
358 return GetLogicalVolume( osname.str() );
359}
TGeoVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.

Referenced by GetAbsorberThickness(), BesGeometry::GetVolumeMucAbsorber(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetNoEndVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().

◆ GetVolumeAbsorber() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorber ( int  part,
int  seg,
int  absorber 
)

Get absorber volume;

◆ GetVolumeAbsorber() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorber ( int  part,
int  seg,
int  absorber 
)

Get absorber volume;

◆ GetVolumeAbsorber() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorber ( int  part,
int  seg,
int  absorber 
)

Get absorber volume;

◆ GetVolumeAbsorberPanel() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)

Get absorber panel volume;

Definition at line 374 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

375{
376 std::stringstream osname;
377 osname << "l" << "Muc" << "P" << part << "S" << seg << "Ab" << absorber << "Pn" << panel;
378
379 return GetLogicalVolume( osname.str() );
380}

Referenced by BesGeometry::GetVolumeMucAbsorberPanel(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), and SetQuarterVisible().

◆ GetVolumeAbsorberPanel() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)

Get absorber panel volume;

◆ GetVolumeAbsorberPanel() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)

Get absorber panel volume;

◆ GetVolumeAbsorberPanel() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeAbsorberPanel ( int  part,
int  seg,
int  absorber,
int  panel 
)

Get absorber panel volume;

◆ GetVolumeAbsorberSmallBlock() [1/2]

TGeoVolume * MucROOTGeo::GetVolumeAbsorberSmallBlock ( int  gap,
int  sb 
)

Get absorber small block;.

Definition at line 1163 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1164{
1165 std::stringstream osname;
1166 osname << "VolumeSmallBlock" << "Gap" << gap << "SB" << sb;
1167
1168 return GetLogicalVolume( osname.str() );
1169}

Referenced by SetVolumeDefaultVis().

◆ GetVolumeAbsorberSmallBlock() [2/2]

TGeoVolume * MucROOTGeo::GetVolumeAbsorberSmallBlock ( int  gap,
int  sb 
)

Get absorber small block;.

◆ GetVolumeAluminumBox() [1/2]

TGeoVolume * MucROOTGeo::GetVolumeAluminumBox ( int  part,
int  seg,
int  gap 
)

Get box volume;

Definition at line 392 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

393{
394 std::stringstream osname;
395 osname <<"l" << "Muc" << "P" << part << "S" << seg << "G" << gap <<"Al";
396
397 return GetLogicalVolume( osname.str() );
398}

◆ GetVolumeAluminumBox() [2/2]

TGeoVolume * MucROOTGeo::GetVolumeAluminumBox ( int  part,
int  seg,
int  gap 
)

Get box volume;

◆ GetVolumeBakelite() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeBakelite ( int  part,
int  seg,
int  gap,
int  panel,
int  bakelite 
)

Get rpc bakelite volume;

Definition at line 437 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

438{
439 std::stringstream osname;
440 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "R" << panel << "B" << bakelite;
441
442 return GetLogicalVolume( osname.str() );
443}

Referenced by BesGeometry::GetVolumeMucBakelite(), SetAllVisible(), SetDefaultVis(), SetQuarterVisible(), and SetVolumeDefaultVis().

◆ GetVolumeBakelite() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeBakelite ( int  part,
int  seg,
int  gap,
int  panel,
int  bakelite 
)

Get rpc bakelite volume;

◆ GetVolumeBakelite() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeBakelite ( int  part,
int  seg,
int  gap,
int  RpcUpDown,
int  panel,
int  bakelite 
)

Get rpc bakelite volume;

Definition at line 1264 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1265{
1266 std::stringstream osname;
1267 int segment = 0;
1268 if (part ==1 && seg ==2) segment = 2;
1269 osname << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "R" << RpcUpDown << "Pn" << panel<< "B" << bakelite;
1270
1271 return GetLogicalVolume( osname.str() );
1272}

◆ GetVolumeBakelite() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeBakelite ( int  part,
int  seg,
int  gap,
int  RpcUpDown,
int  panel,
int  bakelite 
)

Get rpc bakelite volume;

◆ GetVolumeBox() [1/2]

TGeoVolume * MucROOTGeo::GetVolumeBox ( int  part,
int  seg,
int  gap 
)

Get box volume;

Definition at line 1192 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1193{
1194 std::stringstream osname;
1195 osname << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap << "Al";
1196
1197 return GetLogicalVolume( osname.str() );
1198}

Referenced by SetVolumeDefaultVis().

◆ GetVolumeBox() [2/2]

TGeoVolume * MucROOTGeo::GetVolumeBox ( int  part,
int  seg,
int  gap 
)

Get box volume;

◆ GetVolumeBoxSurface() [1/2]

TGeoVolume * MucROOTGeo::GetVolumeBoxSurface ( int  part,
int  seg,
int  gap,
int  up 
)

Get box surface volume;

Definition at line 1201 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1202{
1203 std::stringstream osname;
1204 int segment = 0;
1205 if (part ==1 && seg ==2) segment = 2;
1206 osname << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "AlSf" <<up;
1207
1208 return GetLogicalVolume( osname.str() );
1209}

Referenced by SetVolumeDefaultVis().

◆ GetVolumeBoxSurface() [2/2]

TGeoVolume * MucROOTGeo::GetVolumeBoxSurface ( int  part,
int  seg,
int  gap,
int  up 
)

Get box surface volume;

◆ GetVolumeGap() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeGap ( int  part,
int  seg,
int  gap 
)

Get gap volume;

Definition at line 383 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

384{
385 std::stringstream osname;
386 osname << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap;
387
388 return GetLogicalVolume( osname.str() );
389}

Referenced by BesGeometry::GetVolumeMucGap(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetNoEndVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().

◆ GetVolumeGap() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeGap ( int  part,
int  seg,
int  gap 
)

Get gap volume;

◆ GetVolumeGap() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeGap ( int  part,
int  seg,
int  gap 
)

Get gap volume;

◆ GetVolumeGap() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeGap ( int  part,
int  seg,
int  gap 
)

Get gap volume;

◆ GetVolumeGasBorder() [1/2]

TGeoVolume * MucROOTGeo::GetVolumeGasBorder ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)

Get rpc gas border volume;

Definition at line 1253 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1254{
1255 std::stringstream osname;
1256 int segment = 0;
1257 if (part ==1 && seg ==2) segment = 2;
1258 osname << "l" << "Muc" << "P" << part%2 << "S" << segment << "G" << gap << "R" << rpcUpDown << "Pn" << panel << "GB";
1259
1260 return GetLogicalVolume( osname.str() );
1261}

Referenced by SetVolumeDefaultVis().

◆ GetVolumeGasBorder() [2/2]

TGeoVolume * MucROOTGeo::GetVolumeGasBorder ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)

Get rpc gas border volume;

◆ GetVolumeGasChamber() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeGasChamber ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)

Get rpc gas chamber volume;

Definition at line 428 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

429{
430 std::stringstream osname;
431 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "R" << gasChamber << "Pn" << panel << "C";
432
433 return GetLogicalVolume( osname.str() );
434}

Referenced by BesGeometry::GetVolumeMucGasChamber(), SetAllVisible(), SetDefaultVis(), SetQuarterVisible(), and SetVolumeDefaultVis().

◆ GetVolumeGasChamber() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeGasChamber ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)

Get rpc gas chamber volume;

◆ GetVolumeGasChamber() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeGasChamber ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)

Get rpc gas chamber volume;

◆ GetVolumeGasChamber() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeGasChamber ( int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber 
)

Get rpc gas chamber volume;

◆ GetVolumeMuc() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeMuc ( )
inline

◆ GetVolumeMuc() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeMuc ( )
inline

Get Muc volume;.

Definition at line 101 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MucROOTGeo.h.

101{ return m_Muc; }

◆ GetVolumeMuc() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeMuc ( )
inline

Get Muc volume;.

Definition at line 101 of file InstallArea/include/BesVisLib/BesVisLib/MucROOTGeo.h.

101{ return m_Muc; }

◆ GetVolumeMuc() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeMuc ( )
inline

Get Muc volume;.

Definition at line 68 of file InstallArea/include/ROOTGeo/ROOTGeo/MucROOTGeo.h.

68{ return m_Muc; }

◆ GetVolumeStrip() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip volume;

Definition at line 411 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

412{
413 std::stringstream osname;
414 if(strip < 10) {
415 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "s" << "00" << strip;
416 }
417 else if(strip<100){
418 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "s" << "0" << strip;
419 }
420 else {
421 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "s" << strip;
422 }
423
424 return GetLogicalVolume( osname.str() );
425}

Referenced by SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().

◆ GetVolumeStrip() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip volume;

◆ GetVolumeStrip() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip volume;

◆ GetVolumeStrip() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeStrip ( int  part,
int  seg,
int  gap,
int  strip 
)

Get strip volume;

◆ GetVolumeStripPlane() [1/4]

TGeoVolume * MucROOTGeo::GetVolumeStripPlane ( int  part,
int  seg,
int  gap 
)

Get strip plane volume;.

Definition at line 401 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

402{
403 int segment = 0; if(part==1&&seg==2) segment = 2;
404 std::stringstream osname;
405 osname << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "SP";
406
407 return GetLogicalVolume( osname.str() );
408}

Referenced by BesGeometry::GetVolumeMucStrip(), BesGeometry::GetVolumeMucStripPlane(), SetDefaultVis(), SetNode(), and SetVolumeDefaultVis().

◆ GetVolumeStripPlane() [2/4]

TGeoVolume * MucROOTGeo::GetVolumeStripPlane ( int  part,
int  seg,
int  gap 
)

Get strip plane volume;.

◆ GetVolumeStripPlane() [3/4]

TGeoVolume * MucROOTGeo::GetVolumeStripPlane ( int  part,
int  seg,
int  gap 
)

Get strip plane volume;.

◆ GetVolumeStripPlane() [4/4]

TGeoVolume * MucROOTGeo::GetVolumeStripPlane ( int  part,
int  seg,
int  gap 
)

Get strip plane volume;.

◆ Init2DGeometry() [1/2]

void MucROOTGeo::Init2DGeometry ( )

Initialize 2D Geometry.

Definition at line 100 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

101{
102 if (m_ROOTGeoInit != 1 && m_ROOTGeoInit != 2) {
103 cout << "MucROOTGeo::Init2DGeometry, ROOT Geometry not Initialized yet!" << endl;
104 return;
105 }
106 m_2DGeoInit = 1;
107
108 Int_t mucColor = 1002;
109 Int_t mucLineColor = 15; //15;
110 Int_t mucXYStyle = 1001;//3001;
111 Int_t mucZRStyle = 1001;//3007;
112
113 Int_t mucGapColor = 10; // 1002
114 Int_t mucGapStyle = 1001; //1001;
115 Int_t mucGapXYECStyle = 4000; //1001;
116 Int_t mucGapLineColor = 15;
117
118 Double_t x = 0.0, y = 0.0, z = 0.0;
119 Double_t r = 0.0, phi = 0.0;
120 Double_t local[3] = {0.0, 0.0, 0.0};
121 Double_t master[3] = {0.0, 0.0, 0.0};
122 //Int_t nPoints = 4;
123 Double_t P[300] = {0.0};
124 //Double_t center[3] = {0.0, 0.0, 0.0};
125 TString name;
126
127 Int_t part = 0, seg = 0, gap = 0, strip = 0;
128
129 //----------XY-----------
130 // Muc
131 TGeoCompositeShape *mucShape = (TGeoCompositeShape*)GetVolumeMuc()->GetShape();
132 if (mucShape) ;
133
134 TGeoBoolNode *mucBoolNode = mucShape->GetBoolNode();
135 TGeoBBox *mucOuterShape = (TGeoBBox*)mucBoolNode->GetLeftShape();
136 TGeoTube *mucInnerShape = (TGeoTube*)mucBoolNode->GetRightShape();
137 if (mucOuterShape) ;
138 //if (mucInnerShape) cout << "mucInnerShape name : " << mucInnerShape->GetName() << endl;
139 //else cout << "MucROOTGeo:Init2DGeoometry, mucInnerShape not found" << endl;
140
141 Double_t mucOuterR = mucOuterShape->GetDX();
142 Double_t mucInnerR = mucInnerShape->GetRmax() + 40.0; // 40.0 is the height of first gap
143
144 // Barrel
145 // barrel segment XY view
146
147 part = 1;
148 Int_t xySegPointSeq[4] = {0,1,1,0}; // point 0,1,2,3 -> 0,1,1,0
149 for (seg = 0; seg < GetSegNb(part); seg++) {
150 name = TString("MucBarrelSeg");
151 name += seg;
152 for (Int_t iPoint = 0; iPoint < 4; iPoint++) {
153 if (iPoint < 2) r = mucInnerR/TMath::Cos(TMath::Pi()/8.0);
154 else r = mucOuterR/TMath::Cos(TMath::Pi()/8.0);
155 phi = TMath::Pi()/8.0 * (2*seg-1 + 2*xySegPointSeq[iPoint]);
156 x = r * TMath::Cos(phi);
157 y = r * TMath::Sin(phi);
158 z = 0.0;
159 P[3*iPoint] = x;
160 P[3*iPoint+1] = y;
161 P[3*iPoint+2] = z;
162 }
163 m_MucXY[part][seg] = new BesPolygon2D(name, name, 4, &P[0]);
164 m_MucXY[part][seg]->SetFillColor(mucColor);
165 m_MucXY[part][seg]->SetFillStyle(mucXYStyle);
166 m_MucXY[part][seg]->SetLineColor(mucLineColor);
167 }
168
169 // barrel segment ZR view
170
171 part = 1;
172 for (seg = 0; seg < GetSegNb(part); seg++) {
173 for (Int_t iPoint = 0; iPoint < 4; iPoint++) {
174 if (iPoint == 0 || iPoint == 3 ) r = mucInnerR;
175 else r = mucOuterR;
176 phi = TMath::Pi()/4.0 * seg;
177
178 x = r * TMath::Cos(phi);
179 y = r * TMath::Sin(phi);
180
181 TGeoVolume *volAbsorber = 0;
182 volAbsorber= GetAbsorber(part, seg, 0)->GetVolume();
183 TGeoBBox *absorberShape = (TGeoBBox*)volAbsorber->GetShape();
184 if (seg == 2)cout<<"in MucROOTGeo::Init2DGeometry() x,y,z = "<<absorberShape->GetDX()<<" "<<absorberShape->GetDY()<<" "<<absorberShape->GetDZ()<<endl;
185 Double_t dy = absorberShape->GetDY();
186 z = dy;
187 if (iPoint < 2) z = -dy;
188
189 P[3*iPoint] = x;
190 P[3*iPoint+1] = y;
191 P[3*iPoint+2] = z;
192 }
193
194 if (seg == 2 || seg == 6) {
195 if (seg == 2) name = TString("MucBarrelUpSeg");
196 if (seg == 6) name = TString("MucBarrelDownSeg");
197
198 m_MucZR[part][seg] = new BesPolygon2D(name, name, 4, &P[0]);
199 m_MucZR[part][seg]->SetFillColor(mucColor);
200 m_MucZR[part][seg]->SetFillStyle(mucZRStyle);
201 m_MucZR[part][seg]->SetLineColor(mucLineColor);
202 }
203 }
204
205 // barrel gap
206
207 part = 1;
208 for (seg = 0; seg < GetSegNb(part); seg++) {
209 for (gap = 0; gap < GetGapNb(part); gap++) {
210
211 TGeoPhysicalNode *phyNode = 0;
212 phyNode = GetPhysicalGap(part, seg, gap);
213
214 TGeoBBox *gapShape = (TGeoBBox*)phyNode->GetShape();
215 Double_t dx = gapShape->GetDX();
216 Double_t dy = gapShape->GetDY();
217 Double_t dz = gapShape->GetDZ();
218
219 // barrel gap XY view
220 for (Int_t i = 0; i < 4; i++) {
221 local[1] = 0.0; // y
222 switch (i) {
223 case 0:
224 local[0] = -dx;
225 local[2] = -dz;
226 break;
227 case 1:
228 local[0] = dx;
229 local[2] = -dz;
230 break;
231 case 2:
232 local[0] = dx;
233 local[2] = dz;
234 break;
235 case 3:
236 local[0] = -dx;
237 local[2] = dz;
238 break;
239 }
240 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top
241 for (Int_t j = 0; j < 3; j++) P[3*i+j] = master[j];
242 }
243
244 name = TString("MucBarrelSeg");
245 name += seg;
246 name += TString("Gap");
247 name += gap;
248
249 m_MucXYGap[part][seg][gap] = new BesPolygon2D(name, name, 4, &P[0]);
250 m_MucXYGap[part][seg][gap]->SetFillColor(mucGapColor);
251 m_MucXYGap[part][seg][gap]->SetFillStyle(mucGapStyle);
252 m_MucXYGap[part][seg][gap]->SetLineColor(mucGapLineColor);
253
254 // barrel gap ZR view
255 for (Int_t i = 0; i < 4; i++) {
256 local[0] = 0.0; // x
257 switch (i) {
258 case 0:
259 local[1] = -dy;
260 local[2] = -dz;
261 break;
262 case 1:
263 local[1] = -dy;
264 local[2] = dz;
265 break;
266 case 2:
267 local[1] = dy;
268 local[2] = dz;
269 break;
270 case 3:
271 local[1] = dy;
272 local[2] = -dz;
273 break;
274 }
275 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top
276 for (Int_t j = 0; j < 3; j++) P[3*i+j] = master[j];
277 }
278
279 if (seg == 2 || seg == 6) {
280 if (seg == 2) {
281 name = TString("MucBarrelUpSegGap");
282 name += gap;
283 }
284 else if (seg == 6) {
285 name = TString("MucBarrelDownSegGap");
286 name += gap;
287 }
288
289 m_MucZRGap[part][seg][gap] = new BesPolygon2D(name, name, 4, &P[0]);
290 m_MucZRGap[part][seg][gap]->SetFillColor(mucGapColor);
291 m_MucZRGap[part][seg][gap]->SetFillStyle(mucGapStyle);
292 m_MucZRGap[part][seg][gap]->SetLineColor(mucGapLineColor);
293 }
294 }
295 }
296 // End cap
297 for (part = 0; part < GetPartNb(); part++) {
298 if (part == 1) continue;
299 for (seg = 0; seg < GetSegNb(part); seg++) {
300 Double_t segP[100];
301 Int_t iSegPoint = 0;
302
303 for (gap = 0; gap < GetGapNb(part); gap++) {
304 TGeoPhysicalNode *phyNode = 0;
305 phyNode = GetPhysicalGap(part, seg, gap);
306
307 Int_t ixyPoint = 0, izrPoint = 0;
308 Int_t nPanel = 3; //4
309 //TGeoCompositeShape *addPanelShape[nPanel];
310 //TGeoTrap *panelShape[nPanel];
311 TGeoCompositeShape *addPanelShape[4];
312 TGeoTrap *panelShape[4];
313
314
315 for (Int_t panel = nPanel-1; panel >= 0; panel--) {
316 if (panel == nPanel-1) addPanelShape[panel] = (TGeoCompositeShape*)GetGap(part, seg, gap)->GetVolume()->GetShape();
317 else addPanelShape[panel] = (TGeoCompositeShape*)addPanelShape[panel+1]->GetBoolNode()->GetLeftShape();
318
319 panelShape[panel] = (TGeoTrap*)addPanelShape[panel]->GetBoolNode()->GetRightShape();
320
321 Double_t *localArb8Point, masterArb8Point[3*8];
322 localArb8Point = panelShape[panel]->GetVertices();
323 for (Int_t i = 0; i < 8; i++) {
324 local[0] = localArb8Point[2*i];
325 local[1] = localArb8Point[2*i+1];
326 if (i < 4) local[2] = panelShape[panel]->GetDz() * (-1.0);
327 else local[2] = panelShape[panel]->GetDz();
328
329 addPanelShape[panel]->GetBoolNode()->GetRightMatrix()->LocalToMaster(local, &master[0]); // transform to gap coordinate
330
331 for (Int_t j = 0; j < 3; j++) local[j] = master[j];
332 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top
333 for (Int_t j = 0; j < 3; j++) {
334 masterArb8Point[3*i+j] = master[j];
335 }
336 }
337
338 // xy, add point on panel 3 and panel 0 //panel 3 -> panel 2(new geom)
339 if (panel == 2) {
340 Int_t xyPanelPointSeq[4] = {0, 3, 7, 4};
341 for (Int_t i = 0; i < 4; i++) {
342 for (Int_t j = 0; j < 3; j++) {
343 P[3*ixyPoint+j] = masterArb8Point[3*xyPanelPointSeq[i]+j];
344 }
345 ixyPoint++;
346 }
347 }
348 if (panel == 0) {
349 Int_t xyPanelPointSeq[4] = {7, 4, 0, 3};
350 for (Int_t i = 0; i < 4; i++) {
351 for (Int_t j = 0; j < 3; j++) {
352 P[3*ixyPoint+j] = masterArb8Point[3*xyPanelPointSeq[i]+j];
353 }
354 ixyPoint++;
355 }
356 }
357
358 // zr, add point on panel 3 and panel 0, use P from P[100] //panel 3 -> panel 2(new geom)
359 if (panel == 2) {
360 Int_t zrPanelPointSeq[4] = {4, 7, 6, 5};
361 for (Int_t i = 0; i < 4; i++) {
362 for (Int_t j = 0; j < 3; j++) {
363 P[100+3*izrPoint+j] = masterArb8Point[3*zrPanelPointSeq[i]+j];
364 }
365 izrPoint++;
366 }
367 }
368 if (panel == 0) {
369 Int_t zrPanelPointSeq[4] = {6, 5, 4, 7};
370 for (Int_t i = 0; i < 4; i++) {
371 for (Int_t j = 0; j < 3; j++) {
372 P[100+3*izrPoint+j] = masterArb8Point[3*zrPanelPointSeq[i]+j];
373 }
374 izrPoint++;
375 }
376 }
377 }
378
379 if (part == 0) name = TString("MucEastEc");
380 else if (part == 2) name = TString("MucWestEc");
381 name += TString("Seg");
382 name += seg;
383 name += TString("Gap");
384 name += gap;
385
386 //cout << name << endl;
387 m_MucXYGap[part][seg][gap] = new BesPolygon2D(name, name, ixyPoint, &P[0]); // ixyPoint = 8
388 m_MucXYGap[part][seg][gap]->SetFillColor(mucGapColor);
389 m_MucXYGap[part][seg][gap]->SetFillStyle(mucGapXYECStyle);
390 m_MucXYGap[part][seg][gap]->SetLineColor(mucGapLineColor);
391
392 m_MucZRGap[part][seg][gap] = new BesPolygon2D(name, name, izrPoint, &P[100]); // izrPoint = 8
393 m_MucZRGap[part][seg][gap]->SetFillColor(mucGapColor);
394 m_MucZRGap[part][seg][gap]->SetFillStyle(mucGapStyle);
395 m_MucZRGap[part][seg][gap]->SetLineColor(mucGapLineColor);
396
397 // end cap segment ZR view
398
399 if (gap == 0) {
400 Double_t zrFirstAbsorberHeight = ((TGeoBBox*)GetAbsorber(part, seg, 0)->GetVolume()->GetShape())->GetDZ()*2.0;
401 for (Int_t i = 0; i < 4; i++) {
402 for (Int_t j = 0; j < 3; j++) {
403 if ( (part == 0 && (seg == 0 || seg == 2)) || (part == 2 && (seg == 1 || seg == 3)) ) {
404 Int_t zrSegPointSeq[4] = {6, 7, 0, 1};
405 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j];
406 }
407 else {
408 Int_t zrSegPointSeq[4] = {5, 4, 3, 2};
409 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j];
410 }
411
412 if (j == 2) {
413 if (part == 0) segP[3*iSegPoint+j] -= zrFirstAbsorberHeight;
414 else if (part == 2) segP[3*iSegPoint+j] += zrFirstAbsorberHeight;
415 }
416 }
417 iSegPoint++;
418 }
419 }
420 else if (gap == 7) {
421 Double_t zrLastAbsorberHeight = ((TGeoBBox*)GetAbsorber(part, seg, 8)->GetVolume()->GetShape())->GetDZ()*2.0;
422 for (Int_t i = 0; i < 4; i++) {
423 for (Int_t j = 0; j < 3; j++) {
424 if ( (part == 0 && (seg == 0 || seg == 2)) || (part == 2 && (seg == 1 || seg == 3)) ){
425 Int_t zrSegPointSeq[4] = {2, 3, 4, 5};
426 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j];
427 }
428 else {
429 Int_t zrSegPointSeq[4] = {1, 0, 7, 6};
430 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j];
431 }
432
433 if (j == 2) {
434 if (part == 0) segP[3*iSegPoint+j] += zrLastAbsorberHeight;
435 else if (part == 2) segP[3*iSegPoint+j] -= zrLastAbsorberHeight;
436 }
437 }
438 iSegPoint++;
439 }
440 }
441
442 }
443 if (part == 0) name = TString("MucEastEc");
444 else if (part == 2) name = TString("MucWestEc");
445 name += TString("Seg");
446 name += seg;
447 m_MucZR[part][seg] = new BesPolygon2D(name, name, iSegPoint, &segP[0]); // izrPoint = 8
448 m_MucZR[part][seg]->SetFillColor(mucColor);
449 m_MucZR[part][seg]->SetFillStyle(mucZRStyle);
450 m_MucZR[part][seg]->SetLineColor(mucLineColor);
451 }
452 }
453
454 for (part = 0; part < GetPartNb(); part++) {
455 for (seg = 0; seg < GetSegNb(part); seg++) {
456 for (gap = 0; gap < GetGapNb(part); gap++) {
457 for (strip = 0; strip < GetStripNb(part, seg, gap); strip++) {
458 TGeoPhysicalNode *phyNode = 0;
459 phyNode = GetPhysicalStrip(part, seg, gap, strip);
460 TGeoBBox *stripShape = (TGeoBBox*)phyNode->GetShape();
461 Double_t dx = stripShape->GetDX();
462 Double_t dy = stripShape->GetDY();
463 Double_t dz = stripShape->GetDZ();
464 dz *= m_kStripZMuliple;
465
466 for (Int_t i = 0; i < 8; i++) {
467 switch (i) {
468 case 0:
469 local[0] = -dx;
470 local[1] = -dy;
471 local[2] = -dz;
472 break;
473 case 1:
474 local[0] = dx;
475 local[1] = -dy;
476 local[2] = -dz;
477 break;
478 case 2:
479 local[0] = dx;
480 local[1] = dy;
481 local[2] = -dz;
482 break;
483 case 3:
484 local[0] = -dx;
485 local[1] = dy;
486 local[2] = -dz;
487 break;
488 case 4:
489 local[0] = -dx;
490 local[1] = -dy;
491 local[2] = dz;
492 break;
493 case 5:
494 local[0] = dx;
495 local[1] = -dy;
496 local[2] = dz;
497 break;
498 case 6:
499 local[0] = dx;
500 local[1] = dy;
501 local[2] = dz;
502 break;
503 case 7:
504 local[0] = -dx;
505 local[1] = dy;
506 local[2] = dz;
507 break;
508 }
509
510 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top
511 for (Int_t j = 0; j < 3; j++) P[3*i+j] = master[j];
512 }
513
514 name = TString("Muc Part");
515 name += part;
516 name += TString(" Seg");
517 name += seg;
518 name += TString(" Gap");
519 name += gap;
520 name += TString(" Strip");
521 name += strip;
522
523 m_Muc2DStrip[part][seg][gap][strip] = new Muc2DStrip(name, name, 8, &P[0], part, seg, gap, strip);
524 }
525 }
526 }
527 }
528}
double P(RecMdcKalTrack *trk)
Double_t x[10]
TGeoNode * GetAbsorber(int part, int seg, int absorber)
Get absorber node;
TGeoNode * GetGap(int part, int seg, int gap)
Get absorber node;

Referenced by BesGeometry::InitGeometry().

◆ Init2DGeometry() [2/2]

void MucROOTGeo::Init2DGeometry ( )

Initialize 2D Geometry.

◆ InitFromGdml() [1/2]

void MucROOTGeo::InitFromGdml ( const char *  gdmlFile,
const char *  setupName 
)

Initialize the instance of ROOTGeo.

Definition at line 59 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

60{
61 ReadGdml(gdmlFile, setupName);
62 SetNode();
63 //SetDefaultVis();
64
65 m_ROOTGeoInit = 1;
66}
void SetNode()
Set the pointers to theirs nodes;.
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.

Referenced by MucROOTGeo().

◆ InitFromGDML() [1/2]

void MucROOTGeo::InitFromGDML ( const char *  gdmlFile,
const char *  setupName 
)

Initialize ROOTGeo from GDML.

Definition at line 82 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

83{
84 m_ROOTGeoInit = 2;
85
86 ReadGdml(gdmlFile, setupName);
87 SetNode();
88}

Referenced by BesGeometry::InitFromGDML().

◆ InitFromGDML() [2/2]

void MucROOTGeo::InitFromGDML ( const char *  gdmlFile,
const char *  setupName 
)

Initialize ROOTGeo from GDML.

◆ InitFromGdml() [2/2]

void MucROOTGeo::InitFromGdml ( const char *  gdmlFile,
const char *  setupName 
)

Initialize the instance of ROOTGeo.

◆ InitFromROOT() [1/2]

void MucROOTGeo::InitFromROOT ( TGeoVolume *  vol)

Initialize ROOTGeo from TGeoVolume logicalMuc.

Definition at line 91 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

92{
93 m_ROOTGeoInit = 1;
94
95 SetVolumeMuc(vol);
96 SetNode();
97}
void SetVolumeMuc(TGeoVolume *vol)
Set Muc volume, while initializing from ROOT;.

Referenced by BesGeometry::InitFromROOT().

◆ InitFromROOT() [2/2]

void MucROOTGeo::InitFromROOT ( TGeoVolume *  vol)

Initialize ROOTGeo from TGeoVolume logicalMuc.

◆ IsZRVisible() [1/2]

Bool_t MucROOTGeo::IsZRVisible ( int  part,
int  seg 
)

Is a segment visible in ZR view.

Definition at line 1393 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1394{
1395 if (part != 1) return true;
1396
1397 BesView *view = (BesView*)gPad->GetView();
1398 Double_t viewPhi = view->GetLongitude();
1399 viewPhi = Range360(viewPhi);
1400
1401 Int_t viewSeg = Int_t(viewPhi/45.0+0.5);
1402 Int_t upSeg = viewSeg+2;
1403 Int_t downSeg = viewSeg-2;
1404 if (upSeg < 0) upSeg += 8;
1405 else if (upSeg >= 8) upSeg -= 8;
1406 if (downSeg < 0) downSeg += 8;
1407 else if (downSeg >= 8) downSeg -= 8;
1408
1409 if (seg == upSeg || seg == downSeg) return true;
1410 else return false;
1411}
Double_t Range360(Double_t input)
Get input value 0~360.

◆ IsZRVisible() [2/2]

Bool_t MucROOTGeo::IsZRVisible ( int  part,
int  seg 
)

Is a segment visible in ZR view.

◆ Range360() [1/2]

Double_t MucROOTGeo::Range360 ( Double_t  input)

Get input value 0~360.

Definition at line 1414 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1415{
1416 if (input >= 360.0) {
1417 do {
1418 input -= 360.0;
1419 }
1420 while (input >= 360.0);
1421 }
1422 else if (input < 0.0) {
1423 do {
1424 input += 360.0;
1425 }
1426 while (input < 0.0);
1427 }
1428
1429 return input;
1430}

Referenced by IsZRVisible().

◆ Range360() [2/2]

Double_t MucROOTGeo::Range360 ( Double_t  input)

Get input value 0~360.

◆ SetAllVisible() [1/4]

void MucROOTGeo::SetAllVisible ( )

Set all visible;.

Definition at line 187 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

188{
189 for (int part = 0; part < m_kPart; part++) {
190 for (int seg = 0; seg < m_kSeg[part]; seg++) {
191 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) {
192 if(part == 1) {
193 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1);
194 }
195 else {
196 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0);
197 for (int panel = 0; panel < m_kPanel[part]; panel++) {
198 GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(1);
199 }
200 }
201 }
202
203 for (int gap = 0; gap < m_kGap[part]; gap++) {
204 GetVolumeGap(part, seg, gap)->SetVisibility(0);
205 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
206 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0);
207 }
208
209 for (int panel = 0; panel < m_kPanel[part]; panel++) {
210 for(int bakelite = 0; bakelite < m_kBakelite; bakelite++) {
211 GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(1);
212 }
213 for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) {
214 GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(1);
215 }
216 }
217 }
218 }
219 }
220
221 for (int part = 0; part < m_kPart; part++) {
222 for (int seg = 0; seg < m_kSeg[part]; seg++) {
223 for (int gap = 0; gap < m_kGap[part]; gap++) {
224 GetGap(part, seg, gap)->SetVisibility(1);
225 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
226 GetStrip(part, seg, gap, strip)->SetVisibility(0);
227 }
228 }
229 }
230 }
231}
TGeoVolume * GetVolumeGasChamber(int part, int seg, int gap, int panel, int gasChamber)
Get rpc gas chamber volume;
TGeoVolume * GetVolumeBakelite(int part, int seg, int gap, int panel, int bakelite)
Get rpc bakelite volume;
TGeoVolume * GetVolumeAbsorberPanel(int part, int seg, int absorber, int panel)
Get absorber panel volume;
TGeoVolume * GetVolumeGap(int part, int seg, int gap)
Get gap volume;
TGeoVolume * GetVolumeStrip(int part, int seg, int gap, int strip)
Get strip volume;
TGeoNode * GetStrip(int part, int seg, int gap, int strip)
Get strip node;

Referenced by BesGeometry::SetDefaultVis().

◆ SetAllVisible() [2/4]

void MucROOTGeo::SetAllVisible ( )

Set all visible;.

◆ SetAllVisible() [3/4]

void MucROOTGeo::SetAllVisible ( )

Set all visible;.

◆ SetAllVisible() [4/4]

void MucROOTGeo::SetAllVisible ( )

Set all visible;.

◆ SetDefaultVis() [1/2]

void MucROOTGeo::SetDefaultVis ( )

Set default visual attributes;.

Definition at line 121 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

122{
123 //std::cout << "begin of set defaultvis" << std::endl;
124 int mucColor = 2;
125 int absorberColor = 2;
126 int gapColor = 8;
127 int gasChamberColor = 8;
128 int bakeliteColor = 8;
129 int stripColor = 6;
130
131 m_Muc->SetLineColor(mucColor);
132 m_Muc->SetVisibility(0);
133
134 for (int part = 0; part < m_kPart; part++) {
135 for (int seg = 0; seg < m_kSeg[part]; seg++) {
136 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) {
137 GetVolumeAbsorber(part, seg, absorber)->SetLineColor(absorberColor);
138 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0);
139 if (part != 1) {
140 for (int panel = 0; panel < m_kPanel[part]; panel++) {
141 GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetLineColor(absorberColor);
142 GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(0);
143 }
144 }
145 }
146
147 for (int gap = 0; gap < m_kGap[part]; gap++) {
148 GetVolumeGap(part, seg, gap)->SetLineColor(gapColor);
149 GetVolumeGap(part, seg, gap)->SetVisibility(0);
150 GetVolumeStripPlane(part, seg, gap)->SetLineColor(gapColor);
151 GetVolumeStripPlane(part, seg, gap)->SetVisibility(0);
152
153 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
154 GetVolumeStrip(part, seg, gap, strip)->SetLineColor(stripColor);
155 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(1);
156 }
157
158 for (int panel = 0; panel < m_kPanel[part]; panel++) {
159 for(int bakelite = 0; bakelite < m_kBakelite; bakelite++) {
160 GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetLineColor(bakeliteColor);
161 GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(0);
162 }
163 for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) {
164 GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetLineColor(gasChamberColor);
165 GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(0);
166 }
167 }
168 }
169 }
170 }
171
172 for (int part = 0; part < m_kPart; part++) {
173 for (int seg = 0; seg < m_kSeg[part]; seg++) {
174 for (int gap = 0; gap < m_kGap[part]; gap++) {
175 GetGap(part, seg, gap)->SetVisibility(0);
176 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
177 GetStrip(part, seg, gap, strip)->SetVisibility(0);
178 }
179 }
180 }
181 }
182
183 //std::cout << "end of set defaultvis" << std::endl;
184}
TGeoVolume * GetVolumeStripPlane(int part, int seg, int gap)
Get strip plane volume;.

◆ SetDefaultVis() [2/2]

void MucROOTGeo::SetDefaultVis ( )

Set default visual attributes;.

◆ SetDetector() [1/2]

void MucROOTGeo::SetDetector ( )

Set Detecor (what is detector depends on you)

Definition at line 981 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

982{
983 BesView *view = 0;
984 if (gPad) view = (BesView*)gPad->GetView();
985
986 m_DetectorsArray->Clear();
987 for (int part = 0; part < GetPartNb(); part++) {
988 for (int seg = 0; seg < GetSegNb(part); seg++) {
989 for (int gap = 0; gap < GetGapNb(part); gap++) {
990 TGeoPhysicalNode *phyNode = 0;
991 phyNode = GetPhysicalGap(part, seg, gap);
992 if (phyNode) {
993 phyNode->SetVisibility(0); // set all invisible before set any visible
994 if ( (part == 1 && seg <= 8) ||
995 (part == 0 && seg <= 3) ||
996 (part == 2 && seg <= 3) ) {
997 m_DetectorsArray->Add( phyNode );
998 }
999 else if (view && view->GetVisFull3DMuc()) {
1000 m_DetectorsArray->Add( phyNode );
1001 }
1002 }
1003 }
1004 for (int absorber = 0; absorber < GetAbsorberNb(part); absorber++) {
1005 for (int panel = 0; panel < m_kPanelMax; panel++) {
1006 TGeoPhysicalNode *phyNode = 0;
1007 phyNode = GetPhysicalAbsorber(part, seg, absorber, panel);
1008 if (phyNode) {
1009 phyNode->SetVisibility(0);
1010 if ( (part == 1 && seg <= 8) ||
1011 (part == 0 && seg <= 3) ||
1012 (part == 2 && seg <= 3) ) {
1013 m_DetectorsArray->Add( phyNode );
1014 }
1015 else if (view && view->GetVisFull3DMuc()) {
1016 m_DetectorsArray->Add( phyNode );
1017 }
1018 }
1019 }
1020 }
1021 }
1022 }
1023
1024}

Referenced by BesClient::HandleViewOptionMenu().

◆ SetDetector() [2/2]

void MucROOTGeo::SetDetector ( )

Set Detecor (what is detector depends on you)

◆ SetHalfVisible() [1/2]

void MucROOTGeo::SetHalfVisible ( )

Set half visible;.

Definition at line 852 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

853{
854 for (int part = 0; part < m_kPart; part++) {
855 for (int seg = 0; seg < m_kSeg[part]; seg++) {
856 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) {
857 if (part == 1) {
858 if (seg < 3 || seg > 5) GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1);
859 }
860 else {
861 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0);
862 for (int panel = 0; panel < m_kPanel[part]; panel++) {
863 if (seg == 0 || seg == 3) GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(1);
864 }
865 }
866 }
867
868 for (int gap = 0; gap < m_kGap[part]; gap++) {
869 if (part == 1 && (seg < 3 || seg > 5)) {
870 GetVolumeGap(part, seg, gap)->SetVisibility(1);
871 GetGap(part, seg, gap)->SetVisibility(1);
872 }
873 else {
874 GetVolumeGap(part, seg, gap)->SetVisibility(0);
875 GetGap(part, seg, gap)->SetVisibility(0);
876 }
877 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
878 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0);
879 }
880
881// for (int panel = 0; panel < m_kPanel[part]; panel++) {
882// for (int bakelite = 0; bakelite < m_kBakelite; bakelite++) {
883// if (part != 1 && (seg == 0 || seg == 3)) GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(1);
884// }
885// for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) {
886// if (part != 1 && (seg == 0 || seg == 3)) GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(1);
887// }
888// }
889 }
890 }
891 }
892}

◆ SetHalfVisible() [2/2]

void MucROOTGeo::SetHalfVisible ( )

Set half visible;.

◆ SetHits() [1/2]

void MucROOTGeo::SetHits ( )

Set all physicalNodes corresponding to digiCol;.

Definition at line 1027 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1028{
1029 // set previous event hits to default vis
1030 for (int i = 0; i < m_HitsArray->GetEntries(); i++) {
1031 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i);
1032 phyNode->SetLineColor(m_stripColor);
1033 phyNode->SetVisibility(0);
1034 }
1035 m_HitsArray->Clear("C");
1036
1037 // set previous event 2D hits info to default
1038 for (int i = 0; i < m_2DHitsArray->GetEntries(); i++) {
1039 Muc2DStrip *aStrip = (Muc2DStrip*)m_2DHitsArray->At(i);
1040 aStrip->ClearInfo();
1041 aStrip->AddInfo(aStrip->GetTitle());
1042 aStrip->CloseInfo();
1043 }
1044 m_2DHitsArray->Clear("C");
1045
1046 if (gEvent) m_MucDigiCol = gEvent->GetMucDigiCol();
1047
1048 for (int i = 0; i < m_MucDigiCol->GetEntries(); i++) {
1049 Identifier aMucID( ((TMucDigi*)m_MucDigiCol->At(i))->getIntId() );
1050 int part = MucID::part( aMucID );
1051 int seg = MucID::seg( aMucID );
1052 int gap = MucID::gap( aMucID );
1053 int strip = MucID::strip( aMucID );
1054
1055 TGeoPhysicalNode *phyNode = 0;
1056 phyNode = GetPhysicalStrip( part, seg, gap, strip );
1057 if (phyNode) m_HitsArray->Add( phyNode );
1058
1059 Muc2DStrip *aStrip = 0;
1060 aStrip = m_Muc2DStrip[part][seg][gap][strip];
1061 if (aStrip) {
1062 aStrip->ClearInfo();
1063 aStrip->AddInfo(aStrip->GetTitle());
1064
1065 char data[100];
1066 sprintf(data, "Fired");
1067 aStrip->AddInfo( TString(data) );
1068
1069 aStrip->CloseInfo();
1070
1071 m_2DHitsArray->Add(aStrip);
1072 }
1073 }
1074}
TTree * data
virtual void ClearInfo()
Definition: Muc2DStrip.cxx:119
virtual void CloseInfo()
Definition: Muc2DStrip.cxx:125

Referenced by BesEvent::SetHits().

◆ SetHits() [2/2]

void MucROOTGeo::SetHits ( )

Set all physicalNodes corresponding to digiCol;.

◆ SetNode() [1/4]

void MucROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

Definition at line 69 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

70{
71 m_Muc = GetTopVolume();
72 if(!m_Muc) {
73 m_Muc = GetLogicalVolume("logicalMuc");
74 }
75 if(!m_Muc) std::cout << "m_Muc = 0" << std::endl;
76
77 int gapCount = 0;
78 for (int part = 0; part < m_kPart; part++) {
79 for (int seg = 0; seg < m_kSeg[part]; seg++) {
80 for (int gap = 0; gap < m_kGap[part]; gap++) {
81 m_StripNum[part][seg][gap] = GetVolumeStripPlane(part, seg, gap)->GetNdaughters();
82 //std::cout << part << " " << seg << " " << gap << " " << m_StripNum[part][seg][gap] <<" "<<GetVolumeStripPlane(part, seg, gap)->GetName()<< std::endl;
83
84 std::stringstream osnameGap;
85 osnameGap << "pv_" << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap << "_" << gapCount;
86 m_NodeGap[part][seg][gap] = GetNode( osnameGap.str() );
87 gapCount++;
88
89 //cout<<"in MucROOTGeo "<<m_NodeGap[part][seg][gap]->GetName()<<" "<<m_NodeGap[part][seg][gap]->GetDaughter(0)->GetName()<<endl;
90
91 std::stringstream osnameBox;
92 osnameBox << "pv_" << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap << "Al" << "_" << "0";
93 // m_NodeAluminumBox[part][seg][gap] = GetNode( osnameBox.str() );
94 TGeoNode *temp = GetNode( osnameBox.str() );
95
96 int segment = 0; if(part==1&&seg==2) segment = 2;
97 std::stringstream osnameStripPlane;
98 osnameStripPlane << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "SP" << "_" << "0";
99 m_NodeStripPlane[part][seg][gap] = GetNode( osnameStripPlane.str() );
100
101 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
102 std::stringstream osnameStrip;
103 if(strip < 10) {
104 osnameStrip << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "s" << "00" << strip << "_" << strip;
105 }
106 else if(strip < 100) {
107 osnameStrip << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "s" << "0" << strip << "_" << strip;
108 }
109 else {
110 osnameStrip << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "s" << strip << "_" << strip;
111 }
112
113 m_NodeStrip[part][seg][gap][strip] = GetNode( osnameStrip.str() );
114 }
115 }
116 }
117 }
118}
TGeoNode * GetNode(const std::string &nn)
Get a node(physical volume) by name;.

Referenced by InitFromGdml(), InitFromGDML(), and InitFromROOT().

◆ SetNode() [2/4]

void MucROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

◆ SetNode() [3/4]

void MucROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

◆ SetNode() [4/4]

void MucROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

◆ SetNoEndVisible() [1/2]

void MucROOTGeo::SetNoEndVisible ( )

Set noend visible;.

Definition at line 895 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

896{
897 int part = 1;
898 for (int seg = 0; seg < m_kSeg[part]; seg++) {
899 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) {
900 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1);
901 }
902
903 for (int gap = 0; gap < m_kGap[part]; gap++) {
904 GetVolumeGap(part, seg, gap)->SetVisibility(1);
905 GetGap(part, seg, gap)->SetVisibility(1);
906 }
907 }
908}

◆ SetNoEndVisible() [2/2]

void MucROOTGeo::SetNoEndVisible ( )

Set noend visible;.

◆ SetPhysicalNode() [1/4]

void MucROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

Definition at line 278 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

279{
280 int stripColor = 2;
281
282 if (gGeoManager == 0) std::cout << "Create gGeoManager first" << std::endl;
283 TGeoNode *bes = gGeoManager->GetTopNode();
284 TGeoNode *muc = bes->GetDaughter(m_childNo);
285
286 for (int part = 0; part < m_kPart; part++) {
287 for (int seg = 0; seg < m_kSeg[part]; seg++) {
288 for (int gap = 0; gap < m_kGap[part]; gap++) {
289 TGeoNode *nodeGap = GetGap(part, seg, gap);
290 m_PhysicalGap[part][seg][gap] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() +
291 TString("/") + muc->GetName() +
292 TString("/") + nodeGap->GetName() +
293 TString("/") + nodeGap->GetDaughter(0)->GetName());
294 m_PhysicalGap[part][seg][gap]->SetVisibility(0);
295 m_PhysicalGap[part][seg][gap]->SetIsVolAtt(kFALSE);
296
297 TGeoNode *nodeStripPlane = GetStripPlane(part, seg, gap);
298 //std::cout << nodeGap->GetName() << " " << nodeStripPlane->GetName() << endl;
299
300 //TGeoNode *nodeBox = GetAluminumBox(part, seg, gap);
301// m_PhysicalAluminumBox[part][seg][gap] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() +
302// TString("/") + muc->GetName() +
303// TString("/") + nodeGap->GetName() +
304// TString("/") + nodeGap->GetDaughter(0)->GetName() );
305
306
307 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
308 TGeoNode *nodeStrip = GetStrip(part, seg, gap, strip);
309 m_PhysicalStrip[part][seg][gap][strip] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() +
310 TString("/") + muc->GetName() +
311 TString("/") + nodeGap->GetName() +
312 TString("/") + nodeGap->GetDaughter(0)->GetName() +
313 TString("/") + nodeStripPlane->GetName() +
314 TString("/") + nodeStrip->GetName() );
315 m_PhysicalStrip[part][seg][gap][strip]->SetVisibility(0);
316 m_PhysicalStrip[part][seg][gap][strip]->SetIsVolAtt(kFALSE);
317 m_PhysicalStrip[part][seg][gap][strip]->SetLineColor(stripColor);
318 }
319 }
320 }
321 }
322}
TGeoNode * GetStripPlane(int part, int seg, int gap)
Get box node;.

Referenced by MucGeoGeneral::InitFromXML(), and BesGeometry::InitGeometry().

◆ SetPhysicalNode() [2/4]

void MucROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

◆ SetPhysicalNode() [3/4]

void MucROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

◆ SetPhysicalNode() [4/4]

void MucROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

◆ SetQuarterVisible() [1/4]

void MucROOTGeo::SetQuarterVisible ( )

Set quater visible;.

Definition at line 234 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MucROOTGeo.cxx.

235{
236 for (int part = 0; part < m_kPart; part++) {
237 for (int seg = 0; seg < m_kSeg[part]; seg++) {
238 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) {
239 if(part == 1) {
240 if(seg > 2) GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1);
241 }
242 else {
243 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0);
244 for (int panel = 0; panel < m_kPanel[part]; panel++) {
245 if(seg > 0 && seg < 3) GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(1);
246 }
247 }
248 }
249
250 for (int gap = 0; gap < m_kGap[part]; gap++) {
251 if (part == 1 && seg > 2) {
252 GetVolumeGap(part, seg, gap)->SetVisibility(1);
253 GetGap(part, seg, gap)->SetVisibility(1);
254 }
255 else {
256 GetVolumeGap(part, seg, gap)->SetVisibility(0);
257 GetGap(part, seg, gap)->SetVisibility(0);
258 }
259 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) {
260 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0);
261 }
262
263 for (int panel = 0; panel < m_kPanel[part]; panel++) {
264 for (int bakelite = 0; bakelite < m_kBakelite; bakelite++) {
265 if ((part != 1 && seg > 0 && seg < 3) || (part == 1 && seg > 2)) GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(1);
266 }
267 for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) {
268 if ((part != 1 && seg > 0 && seg < 3) || (part == 1 && seg > 2)) GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(1);
269 }
270 }
271 }
272 }
273 }
274
275}

◆ SetQuarterVisible() [2/4]

void MucROOTGeo::SetQuarterVisible ( )

Set quater visible;.

◆ SetQuarterVisible() [3/4]

void MucROOTGeo::SetQuarterVisible ( )

Set quater visible;.

◆ SetQuarterVisible() [4/4]

void MucROOTGeo::SetQuarterVisible ( )

Set quater visible;.

◆ SetVisMucDetector() [1/2]

void MucROOTGeo::SetVisMucDetector ( )

Set Muc detector visibility;.

Definition at line 1077 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1078{
1079 BesView *view = 0;
1080 if (gPad) view = (BesView*)gPad->GetView();
1081
1082 for (int i = 0; i < m_DetectorsArray->GetEntries(); i++) {
1083 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_DetectorsArray->At(i);
1084 phyNode->SetVisibility(0);
1085
1086 if (view && view->GetVisMucGlobal()) {
1087 int part = GetPart(phyNode);
1088 if (part == 0 && view->GetVisMucEast() ||
1089 part == 1 && view->GetVisMucBarrel() ||
1090 part == 2 && view->GetVisMucWest() )
1091 phyNode->SetVisibility(1);
1092 }
1093 }
1094}
Int_t GetPart(TGeoPhysicalNode *phyNode)
Get part no of a physcial node.

Referenced by BesGeometry::Draw3D(), and BesClient::HandleViewOptionMenu().

◆ SetVisMucDetector() [2/2]

void MucROOTGeo::SetVisMucDetector ( )

Set Muc detector visibility;.

◆ SetVisMucHits() [1/2]

void MucROOTGeo::SetVisMucHits ( )

Set Muc hits visibility;.

Definition at line 1097 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

1098{
1099 BesView *view = 0;
1100 if (gPad) view = (BesView*)gPad->GetView();
1101
1102 for (int i = 0; i < m_HitsArray->GetEntries(); i++) {
1103 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i);
1104 if (view && view->GetVisMucHitsGlobal()) {
1105 int part = GetPart(phyNode);
1106 if (part == 0 && view->GetVisMucHitsEast() ||
1107 part == 1 && view->GetVisMucHitsBarrel() ||
1108 part == 2 && view->GetVisMucHitsWest() ) {
1109 phyNode->SetVisibility(1);
1110 //phyNode->SetLineColor(kRed);
1111 continue;
1112 }
1113 }
1114 phyNode->SetVisibility(0);
1115 }
1116}

Referenced by BesGeometry::Draw3D().

◆ SetVisMucHits() [2/2]

void MucROOTGeo::SetVisMucHits ( )

Set Muc hits visibility;.

◆ SetVolumeDefaultVis() [1/2]

void MucROOTGeo::SetVolumeDefaultVis ( )

Set default visual attributes;.

Definition at line 629 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MucROOTGeo.cxx.

630{
631 m_Muc->SetLineColor(m_MucColor);
632 m_Muc->SetVisibility(0);
633
634 for (int part = 0; part < GetPartNb(); part++) {
635 for (int seg = 0; seg < GetSegNb(part); seg++) {
636 for (int absorber = 0; absorber < GetAbsorberNb(part); absorber++) {
637 GetVolumeAbsorber(part, seg, absorber)->SetLineColor(m_absorberColor);
638 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0);
639// if (part != 1) {
640// for (int panel = 0; panel < m_kPanel[part]; panel++) {
641// GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetLineColor(m_absorberColor);
642// GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(0);
643// }
644// }
645 }
646
647 for (int gap = 0; gap < GetGapNb(part); gap++) {
648 GetVolumeGap(part, seg, gap)->SetLineColor(m_gapColor);
649 GetVolumeGap(part, seg, gap)->SetVisibility(0);
650
651 GetVolumeBox(part, seg, gap)->SetLineColor(m_gapColor);
652 GetVolumeBox(part, seg, gap)->SetVisibility(0);
653
654 if (part == 1){
655 for (int sb = 0; sb < m_kSmallBlockMax; sb++){
656 GetVolumeAbsorberSmallBlock( gap, sb)->SetLineColor(m_absorberColor);
657 GetVolumeAbsorberSmallBlock( gap, sb)->SetVisibility(0);
658 }
659 }
660
661 GetVolumeStripPlane(part, seg, gap)->SetLineColor(m_gapColor);
662 GetVolumeStripPlane(part, seg, gap)->SetVisibility(0);
663
664 for (int strip = 0; strip < GetStripNb(part, seg, gap); strip++) {
665 GetVolumeStrip(part, seg, gap, strip)->SetLineColor(m_stripColor);
666 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0);
667 }
668
669 for (int up = 0; up < 2; up ++){
670 GetVolumeBoxSurface(part, seg, gap, up)->SetLineColor(m_bakeliteColor); //need change
671 GetVolumeBoxSurface(part, seg, gap, up)->SetVisibility(0);
672 int seg_shift = 0;
673 if (part == 1 && seg == 2)seg_shift = 1;
674 for (int panel = 0; panel < m_kPanel[part] + seg_shift; panel++) {
675 GetVolumeGasChamber(part, seg, gap, up, panel)->SetLineColor(m_gasChamberColor);
676 GetVolumeGasChamber(part, seg, gap, up, panel)->SetVisibility(0);
677
678 GetVolumeGasBorder(part, seg, gap, up, panel)->SetLineColor(m_bakeliteColor);
679 GetVolumeGasBorder(part, seg, gap, up, panel)->SetVisibility(0);
680
681 }
682 for (int panel = 0; panel < m_kBakelitePanel[part][up] + seg_shift; panel++) {
683 for (int bakelite = 0; bakelite < m_kBakelite; bakelite++) {
684 GetVolumeBakelite(part, seg, gap, up, panel, bakelite)->SetLineColor(m_bakeliteColor);
685 GetVolumeBakelite(part, seg, gap, up, panel, bakelite)->SetVisibility(0);
686 }
687 }
688 }
689
690// for (int panel = 0; panel < m_kPanel[part]; panel++) { //comment out 2007.1.2
691// for(int bakelite = 0; bakelite < m_kBakelite; bakelite++) {
692// GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetLineColor(m_bakeliteColor);
693// GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(0);
694// }
695// for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) {
696// GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetLineColor(m_gasChamberColor);
697// GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(0);
698// }
699// }
700 }
701 }
702 }
703
704 for (int part = 0; part < GetPartNb(); part++) {
705 for (int seg = 0; seg < GetSegNb(part); seg++) {
706 for (int gap = 0; gap < GetGapNb(part); gap++) {
707 GetGap(part, seg, gap)->SetVisibility(0);
708 for (int strip = 0; strip < GetStripNb(part, seg, gap); strip++) {
709 GetStrip(part, seg, gap, strip)->SetVisibility(0);
710 }
711 }
712 }
713 }
714
715}
TGeoVolume * GetVolumeBox(int part, int seg, int gap)
Get box volume;
TGeoVolume * GetVolumeGasBorder(int part, int seg, int gap, int panel, int gasChamber)
Get rpc gas border volume;
TGeoVolume * GetVolumeBoxSurface(int part, int seg, int gap, int up)
Get box surface volume;
TGeoVolume * GetVolumeAbsorberSmallBlock(int gap, int sb)
Get absorber small block;.

◆ SetVolumeDefaultVis() [2/2]

void MucROOTGeo::SetVolumeDefaultVis ( )

Set default visual attributes;.

◆ SetVolumeMuc() [1/2]

void MucROOTGeo::SetVolumeMuc ( TGeoVolume *  vol)
inline

Set Muc volume, while initializing from ROOT;.

Definition at line 98 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MucROOTGeo.h.

98{ m_Muc = vol; }

Referenced by InitFromROOT().

◆ SetVolumeMuc() [2/2]

void MucROOTGeo::SetVolumeMuc ( TGeoVolume *  vol)
inline

Set Muc volume, while initializing from ROOT;.

Definition at line 98 of file InstallArea/include/BesVisLib/BesVisLib/MucROOTGeo.h.

98{ m_Muc = vol; }

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