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

#include <MdcROOTGeo.h>

+ Inheritance diagram for MdcROOTGeo:

Public Member Functions

 MdcROOTGeo ()
 Constructor.
 
 ~MdcROOTGeo ()
 Destructor.
 
void InitFromGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
int CorrectReplica (int layer, int replica)
 Correct some axial layer id to copyNo;.
 
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 GetSegmentNb ()
 Get number of segments;.
 
int GetLayerNb ()
 Get number of layers;.
 
int GetReplicaNb (int layer)
 Get number of replicas on each layer;.
 
TGeoVolume * GetVolumeMdc ()
 Get Mdc volume;.
 
TGeoVolume * GetVolumeSegment (int segment)
 Get segment volume;.
 
TGeoVolume * GetVolumeLayer (int layer)
 Get layer volume;

 
TGeoVolume * GetVolumeReplica (int layer)
 Get replica volume;.
 
TGeoNode * GetSegment (int segment, int no)
 Get segment node;.
 
TGeoNode * GetLayer (int layer)
 Get layer node;

 
TGeoNode * GetReplica (int layer, int replica)
 Get replica node;.
 
TGeoPhysicalNode * GetPhysicalReplica (int layer, int replica)
 Get replica physical node;.
 
 MdcROOTGeo ()
 Constructor.
 
 ~MdcROOTGeo ()
 Destructor.
 
void InitFromGDML (const char *gdmlFile, const char *setupName)
 Initialize ROOTGeo from GDML.
 
void InitFromROOT (TGeoVolume *vol)
 Initialize ROOTGeo from TGeoVolume logicalMdc.
 
void Init2DGeometry ()
 Initialize 2D Geometry.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
int CorrectReplica (int layer, int replica)
 Correct some axial layer id to copyNo;.
 
void SetVolumeDefaultVis ()
 Set default visual attributes;.
 
void SetAllVisible ()
 Set all visible;.
 
void SetQuarterVisible ()
 Set quater visible;.
 
void SetHalfVisible ()
 Set half visible;.
 
void SetPhysicalNode ()
 Set the pointers to the physical nodes;.
 
void SetDetector ()
 Set default physical node attributes;.
 
void SetHits ()
 Set all physicalNodes corresponding to digiCol;.
 
void SetTFire (Bool_t input)
 
void SetQFire (Bool_t input)
 
void SetQNotOverflow (Bool_t input)
 
void SetColorfulWire (Bool_t input)
 
void SetMdcTimeSubEvTime (Bool_t input)
 
void SetVisMdcDetector ()
 Set Mdc default detector visibility;.
 
void SetVisMdcHits ()
 Set Mdc hits visibility;.
 
int GetSegmentNb ()
 Get number of segments;.
 
int GetLayerNb ()
 Get number of layers;.
 
int GetReplicaNb (int layer)
 Get number of replicas on each layer;.
 
void SetVolumeMdc (TGeoVolume *vol)
 Set Mdc volume, while initializing from ROOT;.
 
TGeoVolume * GetVolumeMdc ()
 Get Mdc volume;.
 
TGeoVolume * GetVolumeSegment (int segment)
 Get segment volume;.
 
TGeoVolume * GetVolumeLayer (int layer)
 Get layer volume;

 
TGeoVolume * GetVolumeReplica (int layer)
 Get replica volume;.
 
TGeoNode * GetSegment (int segment, int no)
 Get segment node;.
 
TGeoNode * GetLayer (int layer)
 Get layer node;

 
TGeoNode * GetReplica (int layer, int replica)
 Get replica node;.
 
TGeoPhysicalNode * GetPhysicalSegment (int segment)
 Get segment physical node;.
 
TGeoPhysicalNode * GetPhysicalReplica (int layer, int replica)
 Get replica physical node;.
 
Mdc2DWireGet2DWire (Int_t layer, Int_t replica)
 Get Mdc2DWire;.
 
Int_t GetSimuLayer (Int_t trueLayer)
 Trans trueLayer to simuLayer (0~42)->(0~49)
 
Bool_t IsHit (Int_t layer, Int_t wire)
 Judge whether the digiCol contains (layer, wire)
 
void Draw (Option_t *option)
 Draw function.
 
void DrawHits (Option_t *option)
 Draw 2D hits.
 
 MdcROOTGeo ()
 Constructor.
 
 ~MdcROOTGeo ()
 Destructor.
 
void InitFromGDML (const char *gdmlFile, const char *setupName)
 Initialize ROOTGeo from GDML.
 
void InitFromROOT (TGeoVolume *vol)
 Initialize ROOTGeo from TGeoVolume logicalMdc.
 
void Init2DGeometry ()
 Initialize 2D Geometry.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
int CorrectReplica (int layer, int replica)
 Correct some axial layer id to copyNo;.
 
void SetVolumeDefaultVis ()
 Set default visual attributes;.
 
void SetAllVisible ()
 Set all visible;.
 
void SetQuarterVisible ()
 Set quater visible;.
 
void SetHalfVisible ()
 Set half visible;.
 
void SetPhysicalNode ()
 Set the pointers to the physical nodes;.
 
void SetDetector ()
 Set default physical node attributes;.
 
void SetHits ()
 Set all physicalNodes corresponding to digiCol;.
 
void SetTFire (Bool_t input)
 
void SetQFire (Bool_t input)
 
void SetQNotOverflow (Bool_t input)
 
void SetColorfulWire (Bool_t input)
 
void SetMdcTimeSubEvTime (Bool_t input)
 
void SetVisMdcDetector ()
 Set Mdc default detector visibility;.
 
void SetVisMdcHits ()
 Set Mdc hits visibility;.
 
int GetSegmentNb ()
 Get number of segments;.
 
int GetLayerNb ()
 Get number of layers;.
 
int GetReplicaNb (int layer)
 Get number of replicas on each layer;.
 
void SetVolumeMdc (TGeoVolume *vol)
 Set Mdc volume, while initializing from ROOT;.
 
TGeoVolume * GetVolumeMdc ()
 Get Mdc volume;.
 
TGeoVolume * GetVolumeSegment (int segment)
 Get segment volume;.
 
TGeoVolume * GetVolumeLayer (int layer)
 Get layer volume;

 
TGeoVolume * GetVolumeReplica (int layer)
 Get replica volume;.
 
TGeoNode * GetSegment (int segment, int no)
 Get segment node;.
 
TGeoNode * GetLayer (int layer)
 Get layer node;

 
TGeoNode * GetReplica (int layer, int replica)
 Get replica node;.
 
TGeoPhysicalNode * GetPhysicalSegment (int segment)
 Get segment physical node;.
 
TGeoPhysicalNode * GetPhysicalReplica (int layer, int replica)
 Get replica physical node;.
 
Mdc2DWireGet2DWire (Int_t layer, Int_t replica)
 Get Mdc2DWire;.
 
Int_t GetSimuLayer (Int_t trueLayer)
 Trans trueLayer to simuLayer (0~42)->(0~49)
 
Bool_t IsHit (Int_t layer, Int_t wire)
 Judge whether the digiCol contains (layer, wire)
 
void Draw (Option_t *option)
 Draw function.
 
void DrawHits (Option_t *option)
 Draw 2D hits.
 
 MdcROOTGeo ()
 Constructor.
 
 ~MdcROOTGeo ()
 Destructor.
 
void InitFromGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of ROOTGeo.
 
void SetNode ()
 Set the pointers to theirs nodes;.
 
int CorrectReplica (int layer, int replica)
 Correct some axial layer id to copyNo;.
 
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 GetSegmentNb ()
 Get number of segments;.
 
int GetLayerNb ()
 Get number of layers;.
 
int GetReplicaNb (int layer)
 Get number of replicas on each layer;.
 
TGeoVolume * GetVolumeMdc ()
 Get Mdc volume;.
 
TGeoVolume * GetVolumeSegment (int segment)
 Get segment volume;.
 
TGeoVolume * GetVolumeLayer (int layer)
 Get layer volume;

 
TGeoVolume * GetVolumeReplica (int layer)
 Get replica volume;.
 
TGeoNode * GetSegment (int segment, int no)
 Get segment node;.
 
TGeoNode * GetLayer (int layer)
 Get layer node;

 
TGeoNode * GetReplica (int layer, int replica)
 Get replica node;.
 
TGeoPhysicalNode * GetPhysicalReplica (int layer, int replica)
 Get replica 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 MdcGeo contains all of the objects necessary to describe the mdc geometry.

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

Definition at line 29 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/ROOTGeo/MdcROOTGeo.h.

Constructor & Destructor Documentation

◆ MdcROOTGeo() [1/4]

MdcROOTGeo::MdcROOTGeo ( )

Constructor.

Definition at line 36 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

37{
38 // Default constructor.
39 for (int layer = 0; layer < m_kLayer; layer++) {
40 for (int replica = 0; replica < m_kReplicaMax; replica++) {
41 m_NodeReplica[layer][replica] = 0;
42 m_PhysicalReplica[layer][replica] = 0;
43 }
44 }
45
46 for (int i = 0; i < m_kCorrectLayer; i++) {
47 m_CorrectMap[m_kiCorrectLayer[i]] = m_kiCorrectReplica[i];
48 }
49}

◆ ~MdcROOTGeo() [1/4]

MdcROOTGeo::~MdcROOTGeo ( )

Destructor.

Definition at line 51 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

52{ }

◆ MdcROOTGeo() [2/4]

MdcROOTGeo::MdcROOTGeo ( )

Constructor.

◆ ~MdcROOTGeo() [2/4]

MdcROOTGeo::~MdcROOTGeo ( )

Destructor.

◆ MdcROOTGeo() [3/4]

MdcROOTGeo::MdcROOTGeo ( )

Constructor.

◆ ~MdcROOTGeo() [3/4]

MdcROOTGeo::~MdcROOTGeo ( )

Destructor.

◆ MdcROOTGeo() [4/4]

MdcROOTGeo::MdcROOTGeo ( )

Constructor.

◆ ~MdcROOTGeo() [4/4]

MdcROOTGeo::~MdcROOTGeo ( )

Destructor.

Member Function Documentation

◆ CorrectReplica() [1/4]

int MdcROOTGeo::CorrectReplica ( int  layer,
int  replica 
)

Correct some axial layer id to copyNo;.

Definition at line 103 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

104{
105 int rep = replica;
106 for (intMap::iterator iter = m_CorrectMap.begin(); iter != m_CorrectMap.end(); iter++) {
107 if (layer == (*iter).first ||
108 (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut &&
109 layer - m_kAxialLayerOut == (*iter).first)) {
110 rep -= (*iter).second;
111 if (rep < 0) rep += m_kReplica[layer];
112 }
113 }
114
115 //std::cout << "layer" << layer << " " << replica << "->" << rep << std::endl;
116 return rep;
117}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

Referenced by SetNode().

◆ CorrectReplica() [2/4]

int MdcROOTGeo::CorrectReplica ( int  layer,
int  replica 
)

Correct some axial layer id to copyNo;.

◆ CorrectReplica() [3/4]

int MdcROOTGeo::CorrectReplica ( int  layer,
int  replica 
)

Correct some axial layer id to copyNo;.

◆ CorrectReplica() [4/4]

int MdcROOTGeo::CorrectReplica ( int  layer,
int  replica 
)

Correct some axial layer id to copyNo;.

◆ Draw() [1/2]

void MdcROOTGeo::Draw ( Option_t *  option)

Draw function.

Definition at line 968 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

969{
970 TString opt = option;
971 opt.ToUpper();
972
973 if (!m_2DGeoInit) cout << "MdcROOTGeo::Draw2D(), 2D Geometry not initialized!" << endl;
974 BesView *view = (BesView*)gPad->GetView();
975 if (!view) cout << "MdcROOTGeo::Draw(), BesView not found" << endl;
976
977 if (view->GetVisMdcGlobal()) { // MdcVisGlobal
978 if (opt.Contains("XY")) {
979 m_MdcXY->Draw("");
980 for (Int_t i = 0; i < 4; i++) {
981 //m_MdcXYSuper[i]->Draw("");
982 }
983 }
984
985 if (opt.Contains("ZR")) {
986 for (Int_t i = 0; i < 2; i++) {
987 m_MdcZR[i]->SetRotatable(true);
988 m_MdcZR[i]->Draw("");
989 }
990 }
991
992 TString wireOpt;
993 if (view->GetVisMdcTubes()) wireOpt += "TUBE";
994 if (view->GetVisMdcWires()) wireOpt += ",WIRE";
995
996 Int_t replicaDraw = 0; // change draw sequence in a circle, (-1: 0->Max; 1: Max->0)
997 for (Int_t layer = 0; layer < m_kTrueLayer; layer++) {
998 Int_t simuLayer = GetSimuLayer(layer);
999 for (int replica = 0; replica < m_kReplica[simuLayer]; replica++) {
1000 if (m_kStereoDir[layer] == -1) replicaDraw = replica;
1001 else if (m_kStereoDir[layer] == 1) replicaDraw = m_kReplica[simuLayer]-1 - replica;
1002 else replicaDraw = replica;
1003
1004 if (m_Mdc2DWire[layer][replicaDraw]) {
1005 //cout << layer << " " << replicaDraw << endl;
1006 //m_Mdc2DWire[layer][replicaDraw]->SetHighlighted(false);
1007 m_Mdc2DWire[layer][replicaDraw]->SetFired(false);
1008 m_Mdc2DWire[layer][replicaDraw]->Draw(wireOpt);
1009 }
1010 }
1011 }
1012 }
1013}
virtual void Draw(Option_t *option="")
virtual void Draw(Option_t *option="")
virtual void Draw(Option_t *option="")
Definition: Mdc2DWire.cxx:272
Int_t GetSimuLayer(Int_t trueLayer)
Trans trueLayer to simuLayer (0~42)->(0~49)

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

◆ Draw() [2/2]

void MdcROOTGeo::Draw ( Option_t *  option)

Draw function.

◆ DrawHits() [1/2]

void MdcROOTGeo::DrawHits ( Option_t *  option)

Draw 2D hits.

Definition at line 1016 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

1017{
1018 // cout << "Draw Hits" << endl;
1019 BesView *view = (BesView*)gPad->GetView();
1020 if (!view) cout << "MdcROOTGeo::DrawHits(), BesView not found" << endl;
1021
1022 //cout << "VisMdcHitsGlobal " << view->GetVisMdcHitsGlobal() << endl;
1023 //cout << "VisMdcHits " << view->GetVisMdcHits() << endl;
1024
1025
1026 if (view->GetVisMdcHitsGlobal()) {
1027 TString wireOpt("");
1028 if (view->GetVisMdcTubes()) wireOpt += ",TUBE";
1029 if (view->GetVisMdcHits()) wireOpt += ",WIRE";
1030
1031 if (m_MdcDigiCol) {
1032 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) {
1033 TMdcDigi *aMdcDigi = (TMdcDigi*)m_MdcDigiCol->At(i);
1034
1035 Identifier aMdcID( aMdcDigi->getIntId() );
1036 int layer = MdcID::layer( aMdcID );
1037 int wire = MdcID::wire( aMdcID );
1038 unsigned int overflow = aMdcDigi->getOverflow();
1039
1040 Mdc2DWire *aWire = 0;
1041 aWire = m_Mdc2DWire[layer][wire];
1042 if (aWire){
1043 if ((k_TFire) && (aMdcDigi->getTimeChannel() == 0x7FFFFFFF)){
1044 continue;
1045 }
1046 if ((k_QFire) && (aMdcDigi->getChargeChannel() == 0x7FFFFFFF)){
1047 continue;
1048 }
1049 //if ((!k_TOverflow) && ((overflow&1)>0) ){
1050 // continue;
1051 //}
1052 if ((k_QNotOverflow) && ((overflow&2)>0) ){
1053 continue;
1054 }
1055 aWire->SetFired(true);
1056 aWire->SetColorfulWire(k_ColorfulWire,k_MdcTimeSubEvTime);
1057 aWire->Draw(wireOpt);
1058 }
1059 }
1060 }
1061 }
1062}
void SetColorfulWire(Bool_t colorfulWire, Bool_t subEvTime)
Definition: Mdc2DWire.cxx:513
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
Definition: MdcID.cxx:49
static int wire(const Identifier &id)
Definition: MdcID.cxx:54
UInt_t getOverflow() const
Definition: TMdcDigi.cxx:42
UInt_t getIntId() const
Definition: TRawData.cxx:50
UInt_t getChargeChannel() const
Definition: TRawData.cxx:60
UInt_t getTimeChannel() const
Definition: TRawData.cxx:55

Referenced by BesEvent::DrawHits().

◆ DrawHits() [2/2]

void MdcROOTGeo::DrawHits ( Option_t *  option)

Draw 2D hits.

◆ Get2DWire() [1/2]

Mdc2DWire * MdcROOTGeo::Get2DWire ( Int_t  layer,
Int_t  replica 
)

Get Mdc2DWire;.

Definition at line 938 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

939{
940 if (m_Mdc2DWire[layer][wire]) return m_Mdc2DWire[layer][wire];
941 else return 0;
942}

Referenced by BesEvent::ConstructMdcTrackFromRec().

◆ Get2DWire() [2/2]

Mdc2DWire * MdcROOTGeo::Get2DWire ( Int_t  layer,
Int_t  replica 
)

Get Mdc2DWire;.

◆ GetLayer() [1/4]

TGeoNode * MdcROOTGeo::GetLayer ( int  layer)

Get layer node;

Definition at line 334 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

335{
336 std::stringstream osname;
337 if (layer >= 0 && layer < m_kStereoLayerIn) {
338 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "_" << layer;
339 }
340 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
341 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_" << layer;
342 }
343 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
344 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
345 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "_" << layer;
346 }
347 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut &&
348 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) {
349 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0" << "_"
350 << 2*layer - m_kStereoLayerIn - m_kAxialLayerIn - m_kStereoLayerOut;
351 }
352 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut &&
353 layer < m_kLayer) {
354 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1" << "_"
355 << 2*(layer - m_kAxialLayerOut) - m_kStereoLayerIn - m_kAxialLayerIn - m_kStereoLayerOut + 1;
356 }
357
358 //std::cout << osname.str() << std::endl;
359 return GetNode( osname.str() );
360}
TGeoNode * GetNode(const std::string &nn)
Get a node(physical volume) by name;.

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

◆ GetLayer() [2/4]

TGeoNode * MdcROOTGeo::GetLayer ( int  layer)

Get layer node;

◆ GetLayer() [3/4]

TGeoNode * MdcROOTGeo::GetLayer ( int  layer)

Get layer node;

◆ GetLayer() [4/4]

TGeoNode * MdcROOTGeo::GetLayer ( int  layer)

Get layer node;

◆ GetLayerNb() [1/4]

int MdcROOTGeo::GetLayerNb ( )

Get number of layers;.

◆ GetLayerNb() [2/4]

int MdcROOTGeo::GetLayerNb ( )
inline

Get number of layers;.

Definition at line 96 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MdcROOTGeo.h.

96{ return m_kLayer; }

◆ GetLayerNb() [3/4]

int MdcROOTGeo::GetLayerNb ( )
inline

Get number of layers;.

Definition at line 96 of file InstallArea/include/BesVisLib/BesVisLib/MdcROOTGeo.h.

96{ return m_kLayer; }

◆ GetLayerNb() [4/4]

int MdcROOTGeo::GetLayerNb ( )

Get number of layers;.

◆ GetPhysicalReplica() [1/4]

TGeoPhysicalNode * MdcROOTGeo::GetPhysicalReplica ( int  layer,
int  replica 
)

Get replica physical node;.

Definition at line 376 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

377{
378 if (m_PhysicalReplica[layer][replica] != 0) {
379 return m_PhysicalReplica[layer][replica];
380 }
381 else {
382 std::cout << "PhysicalNode: " << "Layer" << layer << "Replica" << replica << " not found" << std::endl;
383 return 0;
384 }
385}

Referenced by BesGeometry::GetPhysicalMdcReplica(), Init2DGeometry(), SetHits(), and BesVisDisplay::SetMdcFiredCell().

◆ GetPhysicalReplica() [2/4]

TGeoPhysicalNode * MdcROOTGeo::GetPhysicalReplica ( int  layer,
int  replica 
)

Get replica physical node;.

◆ GetPhysicalReplica() [3/4]

TGeoPhysicalNode * MdcROOTGeo::GetPhysicalReplica ( int  layer,
int  replica 
)

Get replica physical node;.

◆ GetPhysicalReplica() [4/4]

TGeoPhysicalNode * MdcROOTGeo::GetPhysicalReplica ( int  layer,
int  replica 
)

Get replica physical node;.

◆ GetPhysicalSegment() [1/2]

TGeoPhysicalNode * MdcROOTGeo::GetPhysicalSegment ( int  segment)

Get segment physical node;.

Definition at line 914 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

915{
916 if (m_PhysicalSegment[segment] != 0) {
917 return m_PhysicalSegment[segment];
918 }
919 else {
920 //std::cout << "PhysicalNode: " << "Segment" << segment << " not found" << std::endl;
921 return 0;
922 }
923}

◆ GetPhysicalSegment() [2/2]

TGeoPhysicalNode * MdcROOTGeo::GetPhysicalSegment ( int  segment)

Get segment physical node;.

◆ GetReplica() [1/4]

TGeoNode * MdcROOTGeo::GetReplica ( int  layer,
int  replica 
)

Get replica node;.

Definition at line 363 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

364{
365 if (m_NodeReplica[layer][replica] != 0) {
366 //std::cout << " replica " << layer << " " << replica << " found " << std::endl;
367 return m_NodeReplica[layer][replica];
368 }
369 else {
370 std::cout << "Node: " << "Layer" << layer << "Replica" << replica << " not found" << std::endl;
371 return 0;
372 }
373}

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

◆ GetReplica() [2/4]

TGeoNode * MdcROOTGeo::GetReplica ( int  layer,
int  replica 
)

Get replica node;.

◆ GetReplica() [3/4]

TGeoNode * MdcROOTGeo::GetReplica ( int  layer,
int  replica 
)

Get replica node;.

◆ GetReplica() [4/4]

TGeoNode * MdcROOTGeo::GetReplica ( int  layer,
int  replica 
)

Get replica node;.

◆ GetReplicaNb() [1/4]

int MdcROOTGeo::GetReplicaNb ( int  layer)
inline

Get number of replicas on each layer;.

Definition at line 67 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/ROOTGeo/MdcROOTGeo.h.

67{ return m_kReplica[layer]; }

◆ GetReplicaNb() [2/4]

int MdcROOTGeo::GetReplicaNb ( int  layer)
inline

Get number of replicas on each layer;.

Definition at line 99 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MdcROOTGeo.h.

99{ return m_kReplica[layer]; }

◆ GetReplicaNb() [3/4]

int MdcROOTGeo::GetReplicaNb ( int  layer)
inline

Get number of replicas on each layer;.

Definition at line 99 of file InstallArea/include/BesVisLib/BesVisLib/MdcROOTGeo.h.

99{ return m_kReplica[layer]; }

◆ GetReplicaNb() [4/4]

int MdcROOTGeo::GetReplicaNb ( int  layer)
inline

Get number of replicas on each layer;.

Definition at line 67 of file InstallArea/include/ROOTGeo/ROOTGeo/MdcROOTGeo.h.

67{ return m_kReplica[layer]; }

◆ GetSegment() [1/4]

TGeoNode * MdcROOTGeo::GetSegment ( int  segment,
int  no 
)

Get segment node;.

Definition at line 320 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

321{
322 std::stringstream osname;
323 if (segment == 1 || segment == 2) {
324 osname << "pv_" << "logical" << "Mdc" << "Segment" << segment << "_" << m_kLayer + segment - 1;
325 }
326 else {
327 osname << "pv_" << "logical" << "Mdc" << "Segment" << segment << "_" << m_kLayer + 2 + (segment - 3)*2 + no;
328 }
329
330 return GetNode( osname.str() );
331}

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

◆ GetSegment() [2/4]

TGeoNode * MdcROOTGeo::GetSegment ( int  segment,
int  no 
)

Get segment node;.

◆ GetSegment() [3/4]

TGeoNode * MdcROOTGeo::GetSegment ( int  segment,
int  no 
)

Get segment node;.

◆ GetSegment() [4/4]

TGeoNode * MdcROOTGeo::GetSegment ( int  segment,
int  no 
)

Get segment node;.

◆ GetSegmentNb() [1/4]

int MdcROOTGeo::GetSegmentNb ( )

Get number of segments;.

◆ GetSegmentNb() [2/4]

int MdcROOTGeo::GetSegmentNb ( )
inline

Get number of segments;.

Definition at line 93 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MdcROOTGeo.h.

93{ return m_kSegment; }

◆ GetSegmentNb() [3/4]

int MdcROOTGeo::GetSegmentNb ( )
inline

Get number of segments;.

Definition at line 93 of file InstallArea/include/BesVisLib/BesVisLib/MdcROOTGeo.h.

93{ return m_kSegment; }

◆ GetSegmentNb() [4/4]

int MdcROOTGeo::GetSegmentNb ( )

Get number of segments;.

◆ GetSimuLayer() [1/2]

Int_t MdcROOTGeo::GetSimuLayer ( Int_t  trueLayer)

Trans trueLayer to simuLayer (0~42)->(0~49)

Definition at line 945 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

946{
947 if (trueLayer < 36 || trueLayer >= m_kTrueLayer) return trueLayer;
948 if (trueLayer >= 36) return (36 + 2*(trueLayer-36));
949 return trueLayer;
950}

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

◆ GetSimuLayer() [2/2]

Int_t MdcROOTGeo::GetSimuLayer ( Int_t  trueLayer)

Trans trueLayer to simuLayer (0~42)->(0~49)

◆ GetVolumeLayer() [1/4]

TGeoVolume * MdcROOTGeo::GetVolumeLayer ( int  layer)

Get layer volume;

Definition at line 268 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

269{
270 std::stringstream osname;
271 if (layer >= 0 && layer < m_kStereoLayerIn) {
272 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer;
273 }
274 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
275 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer;
276 }
277 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
278 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
279 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer;
280 }
281 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut &&
282 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) {
283 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0";
284 }
285 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut &&
286 layer < m_kLayer) {
287 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1";
288 }
289
290 return GetLogicalVolume( osname.str() );
291}
TGeoVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.

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

◆ GetVolumeLayer() [2/4]

TGeoVolume * MdcROOTGeo::GetVolumeLayer ( int  layer)

Get layer volume;

◆ GetVolumeLayer() [3/4]

TGeoVolume * MdcROOTGeo::GetVolumeLayer ( int  layer)

Get layer volume;

◆ GetVolumeLayer() [4/4]

TGeoVolume * MdcROOTGeo::GetVolumeLayer ( int  layer)

Get layer volume;

◆ GetVolumeMdc() [1/4]

TGeoVolume * MdcROOTGeo::GetVolumeMdc ( )
inline

◆ GetVolumeMdc() [2/4]

TGeoVolume * MdcROOTGeo::GetVolumeMdc ( )
inline

Get Mdc volume;.

Definition at line 105 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MdcROOTGeo.h.

105{ return m_Mdc; }

◆ GetVolumeMdc() [3/4]

TGeoVolume * MdcROOTGeo::GetVolumeMdc ( )
inline

Get Mdc volume;.

Definition at line 105 of file InstallArea/include/BesVisLib/BesVisLib/MdcROOTGeo.h.

105{ return m_Mdc; }

◆ GetVolumeMdc() [4/4]

TGeoVolume * MdcROOTGeo::GetVolumeMdc ( )
inline

Get Mdc volume;.

Definition at line 70 of file InstallArea/include/ROOTGeo/ROOTGeo/MdcROOTGeo.h.

70{ return m_Mdc; }

◆ GetVolumeReplica() [1/4]

TGeoVolume * MdcROOTGeo::GetVolumeReplica ( int  layer)

Get replica volume;.

Definition at line 294 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

295{
296 std::stringstream osname;
297 if (layer >= 0 && layer < m_kStereoLayerIn) {
298 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs";
299 }
300 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
301 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer << "Replica";
302 }
303 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
304 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
305 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs";
306 }
307 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut &&
308 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) {
309 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0" << "Replica";
310 }
311 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut &&
312 layer < m_kLayer) {
313 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1" << "Replica";
314 }
315
316 return GetLogicalVolume( osname.str() );
317}

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

◆ GetVolumeReplica() [2/4]

TGeoVolume * MdcROOTGeo::GetVolumeReplica ( int  layer)

Get replica volume;.

◆ GetVolumeReplica() [3/4]

TGeoVolume * MdcROOTGeo::GetVolumeReplica ( int  layer)

Get replica volume;.

◆ GetVolumeReplica() [4/4]

TGeoVolume * MdcROOTGeo::GetVolumeReplica ( int  layer)

Get replica volume;.

◆ GetVolumeSegment() [1/4]

TGeoVolume * MdcROOTGeo::GetVolumeSegment ( int  segment)

Get segment volume;.

Definition at line 260 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

261{
262 std::stringstream osname;
263 osname << "logical" << "Mdc" << "Segment" << segment;
264 return GetLogicalVolume( osname.str() );
265}

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

◆ GetVolumeSegment() [2/4]

TGeoVolume * MdcROOTGeo::GetVolumeSegment ( int  segment)

Get segment volume;.

◆ GetVolumeSegment() [3/4]

TGeoVolume * MdcROOTGeo::GetVolumeSegment ( int  segment)

Get segment volume;.

◆ GetVolumeSegment() [4/4]

TGeoVolume * MdcROOTGeo::GetVolumeSegment ( int  segment)

Get segment volume;.

◆ Init2DGeometry() [1/2]

void MdcROOTGeo::Init2DGeometry ( )

Initialize 2D Geometry.

Definition at line 107 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

108{
109 if (m_ROOTGeoInit != 1 && m_ROOTGeoInit != 2) {
110 cout << "MdcROOTGeo::Init2DGeometry, ROOT Geometry not Initialized yet!" << endl;
111 return;
112 }
113 m_2DGeoInit = 1;
114
115 Int_t mdcColor = 11; //1002; // 41, 29
116 Int_t mdcLineColor = 15;
117 Int_t mdcXYStyle = 1001;//3001;
118 Int_t mdcZRStyle = 1001;//3007;
119
120 Int_t mdcStereoSuperColor = 38;
121 Int_t mdcAxialSuperColor = 4;
122
123 Double_t local[3] = {0.0, 0.0, 0.0};
124 Double_t master[3] = {0.0, 0.0, 0.0};
125 //Int_t nPoints = 4;
126 Double_t P[300] = {0.0};
127 Double_t center[3] = {0.0, 0.0, 0.0};
128 TString name;
129
130 //----------XY-----------
131 // Mdc
132 TGeoTube *mdcShape = (TGeoTube*)GetVolumeMdc()->GetShape();
133 m_MdcXY = new BesCircle2D("Mdc", "Mdc", mdcShape->GetRmin(), mdcShape->GetRmax(), &center[0]);
134 m_MdcXY->SetNSegment(360);
135 m_MdcXY->SetFillColor(mdcColor);
136 m_MdcXY->SetFillStyle(mdcXYStyle);
137 m_MdcXY->SetLineColor(mdcLineColor);
138
139 // Mdc Supers
140 Int_t layerIn[4] = {0,
141 m_kStereoLayerIn,
142 m_kStereoLayerIn+m_kAxialLayerIn,
143 m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut
144 };
145 Int_t layerOut[4] = {m_kStereoLayerIn-1,
146 m_kStereoLayerIn+m_kAxialLayerIn-1,
147 m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut-1,
148 m_kLayer-1
149 };
150 for (Int_t i = 0; i < 4; i++) {
151 TGeoTube *mdcSuperShapeIn = (TGeoTube*)(GetLayer(layerIn[i])->GetVolume())->GetShape();
152 TGeoTube *mdcSuperShapeOut = (TGeoTube*)(GetLayer(layerOut[i])->GetVolume())->GetShape();
153 name = TString("MdcSuper" + i);
154 m_MdcXYSuper[i] = new BesCircle2D(name, name, mdcSuperShapeIn->GetRmin(), mdcSuperShapeOut->GetRmax(), &center[0]);
155 if (i%2 == 0) m_MdcXYSuper[i]->SetFillColor(mdcStereoSuperColor);
156 else m_MdcXYSuper[i]->SetFillColor(mdcAxialSuperColor);
157 }
158
159 // Mdc Wires
160 for (Int_t layer = 0; layer < m_kTrueLayer; layer++) {
161 Int_t simuLayer = GetSimuLayer(layer);
162 for (int replica = 0; replica < m_kReplica[simuLayer]; replica++) {
163 //cout << "layer " << layer << " replica " << replica << endl;
164 TGeoPhysicalNode *wirePhyNode = GetPhysicalReplica(simuLayer, replica);
165 name = TString("Mdc Layer ");
166 name += layer;
167 name += " Wire ";
168 name += replica;
169
170 if (m_kStereoDir[layer] != 0) { // stereo Layer
171 TGeoArb8 *wireShape = (TGeoArb8*)wirePhyNode->GetShape();
172 Double_t *localArb8Point, masterArb8Point[24];
173 localArb8Point = wireShape->GetVertices();
174 for (Int_t i = 0; i < 8; i++) {
175 local[0] = localArb8Point[2*i];
176 local[1] = localArb8Point[2*i+1];
177 if (i < 4) local[2] = wireShape->GetDz() * (-1.0);
178 else local[2] = wireShape->GetDz();
179
180 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel())
181 ->LocalToMaster(local, &master[0]); // transform to top
182 for (Int_t j = 0; j < 3; j++) {
183 masterArb8Point[3*i+j] = master[j];
184 }
185 }
186
187 m_Mdc2DWire[layer][replica] = new Mdc2DWire(name, name, 8, &masterArb8Point[0]);
188
189 }
190 else { // axial Layer
191
192 TGeoTubeSeg *wireShape = (TGeoTubeSeg*)wirePhyNode->GetShape();
193
194 Double_t centerR = 0.5*(wireShape->GetRmin() + wireShape->GetRmax());
195 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut)
196 centerR = wireShape->GetRmax();
197 Double_t centerPhi =
198 0.5*(wireShape->GetPhi1() + wireShape->GetPhi2()) * TMath::DegToRad();
199 local[0] = centerR * cos(centerPhi);
200 local[1] = centerR * sin(centerPhi);
201 local[2] = 0.0;
202 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel())
203 ->LocalToMaster(local, &master[0]); // transform to top
204
205 Double_t rmin = wireShape->GetRmin();
206 Double_t rmax = wireShape->GetRmax();
207 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut)
208 rmax = rmin + 2*(rmax-rmin);
209 m_Mdc2DWire[layer][replica] =
210 new Mdc2DWire( name, name, rmin, rmax, wireShape->GetDz(),centerPhi, &master[0] );
211 }
212 }
213 }
214
215 //----------ZR-----------
216 // Mdc
217 Int_t iPoint = 0;
218 TGeoTube *aMdcLayer = 0;
219
220 for (Int_t layer = 0; layer < m_kLayer; layer++) {
221 aMdcLayer = (TGeoTube*)GetLayer(layer)->GetVolume()->GetShape();
222 P[3*iPoint] = 0.0;
223 P[3*iPoint+1] = aMdcLayer->GetRmin();
224 P[3*iPoint+2] = aMdcLayer->GetDz();
225 iPoint++;
226 }
227
228 P[3*iPoint] = 0.0;
229 P[3*iPoint+1] = aMdcLayer->GetRmax();
230 P[3*iPoint+2] = aMdcLayer->GetDz();
231 iPoint++;
232 P[3*iPoint] = 0.0;
233 P[3*iPoint+1] = aMdcLayer->GetRmax();
234 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0);
235 iPoint++;
236
237 for (Int_t layer = m_kLayer-1; layer >= 0; layer--) {
238 aMdcLayer = (TGeoTube*)GetLayer(layer)->GetVolume()->GetShape();
239 P[3*iPoint] = 0.0;
240 P[3*iPoint+1] = aMdcLayer->GetRmin();
241 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0);
242 iPoint++;
243 }
244
245
246 m_MdcZR[0] = new BesPolygon2D("MdcZRUp", "MdcZRUp", iPoint, &P[0]);
247
248 for (Int_t i = 0; i < iPoint; i++)
249 P[3*i+1] *= -1.0;
250
251 m_MdcZR[1] = new BesPolygon2D("MdcZRDown", "MdcZRDown", iPoint, &P[0]);
252
253 for (Int_t i = 0; i < 2; i++) {
254 m_MdcZR[i]->SetFillColor(mdcColor);
255 m_MdcZR[i]->SetFillStyle(mdcZRStyle);
256 m_MdcZR[i]->SetLineColor(mdcLineColor);
257 }
258}
double P(RecMdcKalTrack *trk)
double sin(const BesAngle a)
double cos(const BesAngle a)
TGeoPhysicalNode * GetPhysicalReplica(int layer, int replica)
Get replica physical node;.

Referenced by BesGeometry::InitGeometry().

◆ Init2DGeometry() [2/2]

void MdcROOTGeo::Init2DGeometry ( )

Initialize 2D Geometry.

◆ InitFromGdml() [1/2]

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

Initialize the instance of ROOTGeo.

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

56{
57 ReadGdml(gdmlFile, setupName);
58 SetNode();
60
61 m_ROOTGeoInit = 1;
62}
void SetNode()
Set the pointers to theirs nodes;.
void SetDefaultVis()
Set default visual attributes;.
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.

◆ InitFromGDML() [1/2]

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

Initialize ROOTGeo from GDML.

Definition at line 90 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

91{
92 m_ROOTGeoInit = 2;
93 ReadGdml(gdmlFile, setupName);
94 SetNode();
95}

Referenced by BesGeometry::InitFromGDML().

◆ InitFromGDML() [2/2]

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

Initialize ROOTGeo from GDML.

◆ InitFromGdml() [2/2]

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

Initialize the instance of ROOTGeo.

◆ InitFromROOT() [1/2]

void MdcROOTGeo::InitFromROOT ( TGeoVolume *  vol)

Initialize ROOTGeo from TGeoVolume logicalMdc.

Definition at line 98 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

99{
100 m_ROOTGeoInit = 1;
101
102 SetVolumeMdc(vol);
103 SetNode();
104}
void SetVolumeMdc(TGeoVolume *vol)
Set Mdc volume, while initializing from ROOT;.

Referenced by BesGeometry::InitFromROOT().

◆ InitFromROOT() [2/2]

void MdcROOTGeo::InitFromROOT ( TGeoVolume *  vol)

Initialize ROOTGeo from TGeoVolume logicalMdc.

◆ IsHit() [1/2]

Bool_t MdcROOTGeo::IsHit ( Int_t  layer,
Int_t  wire 
)

Judge whether the digiCol contains (layer, wire)

Definition at line 953 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

954{
955 if (m_MdcDigiCol) {
956 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) {
957 Identifier mdcID( ((TMdcDigi*)m_MdcDigiCol->At(i))->getIntId() );
958 if (layer == MdcID::layer( mdcID ) && wire == MdcID::wire( mdcID )) {
959 return kTRUE;
960 }
961 }
962 }
963
964 return kFALSE;
965}

◆ IsHit() [2/2]

Bool_t MdcROOTGeo::IsHit ( Int_t  layer,
Int_t  wire 
)

Judge whether the digiCol contains (layer, wire)

◆ SetAllVisible() [1/4]

void MdcROOTGeo::SetAllVisible ( )

Set all visible;.

Definition at line 170 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

171{
172 for (int segment = 1; segment <= m_kSegment; segment++) {
173 GetVolumeSegment(segment)->SetVisibility(0);
174 }
175
176 for (int layer = 0; layer < m_kLayer; layer++) {
177 GetVolumeLayer(layer)->SetVisibility(1);
178 GetVolumeReplica(layer)->SetVisibility(0);
179 }
180
181 for (int segment = 1; segment <= m_kSegment; segment++) {
182 for (int no = 0; no < 2; no++) {
183 GetSegment(segment, no)->SetVisibility(1);
184 }
185 }
186
187 for (int layer = 0; layer < m_kLayer; layer++) {
188 GetLayer(layer)->SetVisibility(1);
189 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
190 GetReplica(layer, replica)->SetVisibility(0);
191 }
192 }
193}
TGeoNode * GetSegment(int segment, int no)
Get segment node;.
TGeoVolume * GetVolumeLayer(int layer)
Get layer volume;
TGeoNode * GetReplica(int layer, int replica)
Get replica node;.
TGeoVolume * GetVolumeReplica(int layer)
Get replica volume;.
TGeoVolume * GetVolumeSegment(int segment)
Get segment volume;.

Referenced by BesGeometry::SetDefaultVis().

◆ SetAllVisible() [2/4]

void MdcROOTGeo::SetAllVisible ( )

Set all visible;.

◆ SetAllVisible() [3/4]

void MdcROOTGeo::SetAllVisible ( )

Set all visible;.

◆ SetAllVisible() [4/4]

void MdcROOTGeo::SetAllVisible ( )

Set all visible;.

◆ SetColorfulWire() [1/2]

void MdcROOTGeo::SetColorfulWire ( Bool_t  input)

Definition at line 757 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

757 {
758 k_ColorfulWire = input;
759}

◆ SetColorfulWire() [2/2]

void MdcROOTGeo::SetColorfulWire ( Bool_t  input)

◆ SetDefaultVis() [1/2]

void MdcROOTGeo::SetDefaultVis ( )

Set default visual attributes;.

Definition at line 120 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

121{
122 //std::cout << "begin of set defaultvis" << std::endl;
123 int mdcColor = 3;
124 int segmentColor = 0;
125 int hypeColor = 3;
126 int tubeColor = 4;
127 int twistedTubsColor = 3;
128 int replicaColor = 4;
129
130 m_Mdc->SetLineColor(mdcColor);
131 m_Mdc->SetVisibility(0);
132
133 for (int segment = 1; segment <= m_kSegment; segment++) {
134 GetVolumeSegment(segment)->SetLineColor(segmentColor);
135 GetVolumeSegment(segment)->SetVisibility(0);
136 }
137
138 for (int layer =0; layer < m_kLayer; layer++) {
139 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
140 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
141 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) {
142 GetVolumeLayer(layer)->SetLineColor(hypeColor);
143 GetVolumeReplica(layer)->SetLineColor(twistedTubsColor);
144 }
145 else {
146 GetVolumeLayer(layer)->SetLineColor(tubeColor);
147 GetVolumeReplica(layer)->SetLineColor(replicaColor);
148 }
149 GetVolumeLayer(layer)->SetVisibility(0);
150 GetVolumeReplica(layer)->SetVisibility(1);
151 }
152
153 for (int segment = 1; segment <= m_kSegment; segment++) {
154 for (int no = 0; no < 2; no++) {
155 GetSegment(segment, no)->SetVisibility(0);
156 }
157 }
158
159 for (int layer = 0; layer < m_kLayer; layer++) {
160 GetLayer(layer)->SetVisibility(0);
161 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
162 GetReplica(layer, replica)->SetVisibility(0);
163 }
164 }
165
166 //std::cout << "end of set defaultvis" << std::endl;
167}

Referenced by InitFromGdml().

◆ SetDefaultVis() [2/2]

void MdcROOTGeo::SetDefaultVis ( )

Set default visual attributes;.

◆ SetDetector() [1/2]

void MdcROOTGeo::SetDetector ( )

Set default physical node attributes;.

Draw Detecor (what is detector depends on you)

Definition at line 568 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

569{
570 BesView *view = 0;
571 if (gPad) view = (BesView*)gPad->GetView();
572 //if (view) cout << "viewVisFull3DMdc " << view->GetVisFull3DMdc() << endl;
573
574 m_DetectorsArray->Clear();
575 for (int segment = 0; segment < 2*m_kSegment-2; segment++) {
576 TGeoPhysicalNode *phyNode = 0;
577 phyNode = m_PhysicalSegment[segment];
578 //cout << m_PhysicalSegment[segment]->GetName() << endl;
579 if (phyNode) {
580 phyNode->SetVisibility(0); // set all invisible before set any visible
581 if ( (segment >= 2 && segment <= 3) || segment > 59) {
582 m_DetectorsArray->Add( phyNode );
583 }
584 else if (view && view->GetVisFull3DMdc()) {
585 m_DetectorsArray->Add( phyNode );
586 }
587 }
588 }
589 /*
590 for (int part = 0; part < m_kPart; part++) {
591 int nPhi = (part == 1 ? m_kPhiBr : m_kPhiEc);
592 for (int phi = 0; phi < nPhi; phi++) {
593 int nTheta = (part == 1 ? m_kThetaBr : m_kThetaEc);
594 for (int theta = 0; theta < nTheta; theta++) {
595 // This is you detector, set it on
596 if ( (part == 1 && theta != 0 && theta != 43 && ((phi != 0 && phi != 60) || theta%2 == 0)) ||
597 (part != 1 && theta != 0) ) {
598 m_PhysicalCrystal[part][phi][theta]->SetVisibility(0);
599 }
600
601 // This is you hit
602 // when you are to set fired hits to another color, say red,
603 // SetIsVolAtt(kFALSE) and to then SetLineColor(kRed);
604 if (phi == 12 && theta == 5) {
605 m_PhysicalCrystal[part][phi][theta]->SetVisibility(1);
606 m_PhysicalCrystal[part][phi][theta]->SetLineColor(2);
607 }
608 }
609 }
610 }
611 std::cout << "end of set detector on" << std::endl;
612 */
613}

Referenced by BesClient::HandleViewOptionMenu().

◆ SetDetector() [2/2]

void MdcROOTGeo::SetDetector ( )

Set default physical node attributes;.

Draw Detecor (what is detector depends on you)

◆ SetHalfVisible() [1/2]

void MdcROOTGeo::SetHalfVisible ( )

Set half visible;.

Definition at line 474 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

475{
476 for (int segment = 1; segment <= m_kSegment; segment++) {
477 GetVolumeSegment(segment)->SetVisibility(0);
478 }
479
480 for (int layer = 0; layer < m_kLayer; layer++) {
481 GetVolumeLayer(layer)->SetVisibility(0);
482 GetVolumeReplica(layer)->SetVisibility(1);
483 }
484
485 for (int segment = 1; segment <= m_kSegment; segment++) {
486 for (int no = 0; no < 2; no++) {
487 GetSegment(segment, no)->SetVisibility(0);
488 }
489 }
490
491 for (int layer = 0; layer < m_kLayer; layer++) {
492 GetLayer(layer)->SetVisibility(0);
493 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
494 if (replica < m_kReplica[layer]/4 ||
495 replica > m_kReplica[layer]*3/4 ) GetReplica(layer, replica)->SetVisibility(1);
496 else GetReplica(layer, replica)->SetVisibility(0);
497 }
498 }
499}

◆ SetHalfVisible() [2/2]

void MdcROOTGeo::SetHalfVisible ( )

Set half visible;.

◆ SetHits() [1/2]

void MdcROOTGeo::SetHits ( )

Set all physicalNodes corresponding to digiCol;.

Definition at line 616 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

617{
618 // set previous event hits to default vis
619 cout << "m_HitsArray size(): " << m_HitsArray->GetEntries() << endl;
620 cout << "m_2DHitsArray size(): " << m_2DHitsArray->GetEntries() << endl;
621 for (int i = 0; i < m_HitsArray->GetEntries(); i++) {
622 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i);
623 phyNode->SetVisibility(0);
624 }
625 m_HitsArray->Clear("C");
626
627 // set previous event 2D hits info to default
628 for (int i = 0; i < m_2DHitsArray->GetEntries(); i++) {
629 Mdc2DWire *aWire = (Mdc2DWire*)m_2DHitsArray->At(i);
630 aWire->ClearInfo();
631 aWire->AddInfo(aWire->GetTitle());
632 aWire->CloseInfo();
633 }
634 m_2DHitsArray->Clear("C");
635
636 // set new hits
637 if (gEvent) m_MdcDigiCol = gEvent->GetMdcDigiCol();
638
639 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) {
640 TMdcDigi *aMdcDigi = (TMdcDigi*)m_MdcDigiCol->At(i);
641 Identifier aMdcID( aMdcDigi->getIntId() );
642 int layer = MdcID::layer( aMdcID );
643 int wire = MdcID::wire( aMdcID );
644
645 Double_t time = RawDataUtil::MdcTime(aMdcDigi->getTimeChannel());
646 Int_t charge = RawDataUtil::MdcCharge(aMdcDigi->getChargeChannel());
647
648 TGeoPhysicalNode *phyNode = 0;
649 if (layer < 36) { // number of layers in the three inner
650 phyNode = GetPhysicalReplica(layer, wire);
651 if (phyNode) m_HitsArray->Add( phyNode );
652 }
653 else {
654 phyNode = GetPhysicalReplica( GetSimuLayer(layer), wire );
655 if (phyNode) m_HitsArray->Add( phyNode );
656 phyNode = GetPhysicalReplica( GetSimuLayer(layer)+1, wire);
657 if (phyNode) m_HitsArray->Add( phyNode );
658 }
659
660 Mdc2DWire *aWire = 0;
661 aWire = m_Mdc2DWire[layer][wire];
662 if (aWire) {
663 aWire->ClearInfo();
664 aWire->AddInfo(aWire->GetTitle());
665 double evTime = gEvent->GetHeader().GetEvTime();
666
667 char data[100];
668 if(time>1000000) {
669 sprintf(data, "NO time");
670 }else{
671 sprintf(data, "time=%-.1f ns", time);
672 if(fabs(evTime)>0.0001){
673 sprintf(data, "%s, Tdrift(Raw)=%-.1f ns", data, time - evTime +230);
674 }
675 }
676 if(charge>1000000) {
677 sprintf(data, "%s, NO charge", data);
678 }else{
679 sprintf(data, "%s, charge=%d", data,charge);
680 }
681 aWire->AddInfo( TString(data) );
682 sprintf(data, "Fired");
683 aWire->AddInfo( TString(data) );
684
685 aWire->SetTime(time);//yzhang
686 aWire->SetCharge(charge);//yzhang
687 unsigned int overflow = aMdcDigi->getOverflow();
688 aWire->SetQOverflow(overflow&2);//yzhang
689 aWire->SetEvTime(evTime);
690
691 aWire->CloseInfo();
692
693 m_2DHitsArray->Add(aWire);
694 }
695
696 }
697}
TTree * data
Double_t time
virtual void ClearInfo()
Definition: Mdc2DWire.cxx:184
void SetQOverflow(Bool_t qOvfl)
Definition: Mdc2DWire.cxx:499
virtual void CloseInfo()
Definition: Mdc2DWire.cxx:190
void SetTime(Double_t time)
Definition: Mdc2DWire.cxx:485
void SetEvTime(Double_t time)
Definition: Mdc2DWire.cxx:506
void SetCharge(Double_t charge)
Definition: Mdc2DWire.cxx:492
static double MdcCharge(int chargeChannel)

Referenced by BesEvent::SetHits().

◆ SetHits() [2/2]

void MdcROOTGeo::SetHits ( )

Set all physicalNodes corresponding to digiCol;.

◆ SetMdcTimeSubEvTime() [1/2]

void MdcROOTGeo::SetMdcTimeSubEvTime ( Bool_t  input)

Definition at line 762 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

762 {
763 k_MdcTimeSubEvTime = input;
764}

◆ SetMdcTimeSubEvTime() [2/2]

void MdcROOTGeo::SetMdcTimeSubEvTime ( Bool_t  input)

◆ SetNode() [1/4]

void MdcROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

Definition at line 65 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

66{
67 m_Mdc = GetTopVolume();
68 if(!m_Mdc) std::cout << "m_Mdc = 0" << std::endl;
69
70 for (int layer = 0; layer < m_kLayer; layer++) {
71 //std::cout << "Layer " << layer << std::endl;
72 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
73 std::stringstream osname;
74 int rep = replica;
75 if (layer >= 0 && layer < m_kStereoLayerIn) {
76 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs" << "_" << rep;
77 }
78 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
79 rep = CorrectReplica(layer, rep);
80 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "Replica" << "_" << rep;
81 }
82 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
83 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
84 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs" << "_" << rep;
85 }
86 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut &&
87 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) {
88 rep = CorrectReplica(layer, rep);
89 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0" << "Replica" << "_" << rep;
90 }
91 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut &&
92 layer < m_kLayer) {
93 rep = CorrectReplica(layer, rep);
94 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1" << "Replica" << "_" << rep;
95 }
96
97 m_NodeReplica[layer][replica] = GetNode( osname.str() );
98 }
99 }
100}
int CorrectReplica(int layer, int replica)
Correct some axial layer id to copyNo;.

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

◆ SetNode() [2/4]

void MdcROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

◆ SetNode() [3/4]

void MdcROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

◆ SetNode() [4/4]

void MdcROOTGeo::SetNode ( )

Set the pointers to theirs nodes;.

◆ SetPhysicalNode() [1/4]

void MdcROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

Definition at line 223 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

224{
225 int twistedTubsColor = 3;
226 int replicaColor = 4;
227
228 if (gGeoManager == 0) std::cout << "Create gGeoManager first" << std::endl;
229 TGeoNode *bes = gGeoManager->GetTopNode();
230 //std::cout << "m_childNo " << m_childNo << std::endl;
231 TGeoNode *mdc = bes->GetDaughter(m_childNo);
232
233 //if(!m_Mdc) std::cout << "m_Mdc = 0" << std::endl;
234
235 for (int layer = 0; layer < m_kLayer; layer++) {
236 TGeoNode *nodeLayer = GetLayer(layer);
237 //std::cout << "Layer " << layer << std::endl;
238 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
239 TGeoNode *nodeReplica = GetReplica(layer, replica);
240 m_PhysicalReplica[layer][replica] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() +
241 TString("/") + mdc->GetName() +
242 TString("/") + nodeLayer->GetName() +
243 TString("/") + nodeReplica->GetName());
244 m_PhysicalReplica[layer][replica]->SetVisibility(0);
245 m_PhysicalReplica[layer][replica]->SetIsVolAtt(kFALSE);
246 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
247 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
248 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) {
249 m_PhysicalReplica[layer][replica]->SetLineColor(twistedTubsColor);
250 }
251 else {
252 m_PhysicalReplica[layer][replica]->SetLineColor(replicaColor);
253 }
254 //if (m_PhysicalReplica[layer][replica]->IsVolAttributes()) std::cout << "yes " << std::endl;
255 }
256 }
257}
std::string mdc
Definition: CalibModel.cxx:45

Referenced by BesGeometry::InitGeometry().

◆ SetPhysicalNode() [2/4]

void MdcROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

◆ SetPhysicalNode() [3/4]

void MdcROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

◆ SetPhysicalNode() [4/4]

void MdcROOTGeo::SetPhysicalNode ( )

Set the pointers to the physical nodes;.

◆ SetQFire() [1/2]

void MdcROOTGeo::SetQFire ( Bool_t  input)

Definition at line 751 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

751 {
752 k_QFire = input;
753 //cout << "Mdc ROOT Geometry ADC Match: " << k_QMatch << endl;
754}

◆ SetQFire() [2/2]

void MdcROOTGeo::SetQFire ( Bool_t  input)

◆ SetQNotOverflow() [1/2]

void MdcROOTGeo::SetQNotOverflow ( Bool_t  input)

Definition at line 745 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

745 {
746 k_QNotOverflow = input;
747 //cout << "Mdc ROOT Geometry TDC Match: " << k_TMatch << endl;
748}

◆ SetQNotOverflow() [2/2]

void MdcROOTGeo::SetQNotOverflow ( Bool_t  input)

◆ SetQuarterVisible() [1/4]

void MdcROOTGeo::SetQuarterVisible ( )

Set quater visible;.

Definition at line 196 of file DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/src/MdcROOTGeo.cxx.

197{
198 for (int segment = 1; segment <= m_kSegment; segment++) {
199 GetVolumeSegment(segment)->SetVisibility(0);
200 }
201
202 for (int layer = 0; layer < m_kLayer; layer++) {
203 GetVolumeLayer(layer)->SetVisibility(0);
204 GetVolumeReplica(layer)->SetVisibility(1);
205 }
206
207 for (int segment = 1; segment <= m_kSegment; segment++) {
208 for (int no = 0; no < 2; no++) {
209 GetSegment(segment, no)->SetVisibility(0);
210 }
211 }
212
213 for (int layer = 0; layer < m_kLayer; layer++) {
214 GetLayer(layer)->SetVisibility(0);
215 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
216 if (replica < m_kReplica[layer]/4) GetReplica(layer, replica)->SetVisibility(0);
217 else GetReplica(layer, replica)->SetVisibility(1);
218 }
219 }
220}

◆ SetQuarterVisible() [2/4]

void MdcROOTGeo::SetQuarterVisible ( )

Set quater visible;.

◆ SetQuarterVisible() [3/4]

void MdcROOTGeo::SetQuarterVisible ( )

Set quater visible;.

◆ SetQuarterVisible() [4/4]

void MdcROOTGeo::SetQuarterVisible ( )

Set quater visible;.

◆ SetTFire() [1/2]

void MdcROOTGeo::SetTFire ( Bool_t  input)

Definition at line 733 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

733 {
734 k_TFire= input;
735 //cout << "Mdc ROOT Geometry TDC Match: " << k_TMatch << endl;
736}

◆ SetTFire() [2/2]

void MdcROOTGeo::SetTFire ( Bool_t  input)

◆ SetVisMdcDetector() [1/2]

void MdcROOTGeo::SetVisMdcDetector ( )

Set Mdc default detector visibility;.

Definition at line 700 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

701{
702 BesView *view = 0;
703 if (gPad) view = (BesView*)gPad->GetView();
704
705 for (int i = 0; i < m_DetectorsArray->GetEntries(); i++) {
706 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_DetectorsArray->At(i);
707 if (view && view->GetVisMdcGlobal()) {
708 phyNode->SetVisibility(1);
709 continue;
710 }
711 phyNode->SetVisibility(0);
712 }
713}

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

◆ SetVisMdcDetector() [2/2]

void MdcROOTGeo::SetVisMdcDetector ( )

Set Mdc default detector visibility;.

◆ SetVisMdcHits() [1/2]

void MdcROOTGeo::SetVisMdcHits ( )

Set Mdc hits visibility;.

Definition at line 716 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

717{
718 BesView *view = 0;
719 if (gPad) view = (BesView*)gPad->GetView();
720
721 for (int i = 0; i < m_HitsArray->GetEntries(); i++) {
722 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i);
723 if (view && view->GetVisMdcHitsGlobal()) {
724 phyNode->SetVisibility(1);
725 }
726 else {
727 phyNode->SetVisibility(0);
728 }
729 }
730}

Referenced by BesGeometry::Draw3D().

◆ SetVisMdcHits() [2/2]

void MdcROOTGeo::SetVisMdcHits ( )

Set Mdc hits visibility;.

◆ SetVolumeDefaultVis() [1/2]

void MdcROOTGeo::SetVolumeDefaultVis ( )

Set default visual attributes;.

Definition at line 358 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/src/MdcROOTGeo.cxx.

359{
360 //std::cout << "begin of set defaultvis" << std::endl;
361 m_Mdc->SetLineColor(m_MdcColor);
362 m_Mdc->SetVisibility(0);
363
364 for (int segment = 1; segment <= m_kSegment; segment++) {
365 GetVolumeSegment(segment)->SetLineColor(m_segmentColor);
366 //if (segment > 3) GetVolumeSegment(segment)->SetVisibility(0);
367 GetVolumeSegment(segment)->SetVisibility(1);
368 }
369
370 for (int layer =0; layer < m_kLayer; layer++) {
371 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
372 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
373 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) {
374 GetVolumeLayer(layer)->SetLineColor(m_hypeColor);
375 GetVolumeReplica(layer)->SetLineColor(m_twistedTubsColor);
376 }
377 else {
378 GetVolumeLayer(layer)->SetLineColor(m_tubeColor);
379 GetVolumeReplica(layer)->SetLineColor(m_replicaColor);
380 }
381 GetVolumeLayer(layer)->SetVisibility(0);
382 GetVolumeReplica(layer)->SetVisibility(1);
383 }
384
385 for (int segment = 1; segment <= m_kSegment; segment++) {
386 for (int no = 0; no < 2; no++) {
387 GetSegment(segment, no)->SetVisibility(0);
388 }
389 }
390
391 for (int layer = 0; layer < m_kLayer; layer++) {
392 GetLayer(layer)->SetVisibility(0);
393 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
394 GetReplica(layer, replica)->SetVisibility(0);
395 }
396 }
397
398 //std::cout << "end of set defaultvis" << std::endl;
399}

◆ SetVolumeDefaultVis() [2/2]

void MdcROOTGeo::SetVolumeDefaultVis ( )

Set default visual attributes;.

◆ SetVolumeMdc() [1/2]

void MdcROOTGeo::SetVolumeMdc ( TGeoVolume *  vol)
inline

Set Mdc volume, while initializing from ROOT;.

Definition at line 102 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MdcROOTGeo.h.

102{ m_Mdc = vol; }

Referenced by InitFromROOT().

◆ SetVolumeMdc() [2/2]

void MdcROOTGeo::SetVolumeMdc ( TGeoVolume *  vol)
inline

Set Mdc volume, while initializing from ROOT;.

Definition at line 102 of file InstallArea/include/BesVisLib/BesVisLib/MdcROOTGeo.h.

102{ m_Mdc = vol; }

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