BOSS 7.0.4
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 (Bool_t cgem_flag=0)
 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 SetPhysicalDefaultVis ()
 Set default physical node attributes;.
 
void SetDetector ()
 Draw Detecor (what is detector depends on you)
 
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 (Bool_t cgem_flag=0)
 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 SetPhysicalDefaultVis ()
 Set default physical node attributes;.
 
void SetDetector ()
 Draw Detecor (what is detector depends on you)
 
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 ( Bool_t  cgem_flag = 0)

Constructor.

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

53{
54 m_MdcColor = 3;
55 m_segmentColor = 0;
56 m_hypeColor = 3;
57 m_tubeColor = 4;
58 //m_twistedTubsColor = kBlue;
59 m_twistedTubsColor = 9; //Long Peixun's update: Blue -> Green, as same as XY View
60 //m_replicaColor = kCyan;
61 m_replicaColor = 8; //Long Peixun's update: Grey -> Blue, as same as XY View
62
63 //Long Peixun's update: According to CGEM flag, set start wire layer
64 if (cgem_flag) m_StartLayer = 8;
65 else m_StartLayer = 0;
66
67 k_TFire = kTRUE;
68 k_QFire = kTRUE;
69 k_QNotOverflow = kFALSE;
70
71 // Default constructor.
72 for (int layer = 0; layer < m_kLayer; layer++) {
73 m_NodeLayer[layer] = 0;
74 for (int replica = 0; replica < m_kReplicaMax; replica++) {
75 m_NodeReplica[layer][replica] = 0;
76 m_PhysicalReplica[layer][replica] = 0;
77 }
78 }
79
80 for (int i = 0; i < m_kCorrectLayer; i++) {
81 m_CorrectMap[m_kiCorrectLayer[i]] = m_kiCorrectReplica[i];
82 }
83
84 for (int layer = 0; layer < m_kTrueLayer; layer++) {
85 for (int replica = 0; replica < m_kReplicaMax; replica++) {
86 m_Mdc2DWire[layer][replica] = 0;
87 }
88 }
89}

◆ ~MdcROOTGeo() [2/4]

MdcROOTGeo::~MdcROOTGeo ( )

Destructor.

◆ MdcROOTGeo() [3/4]

MdcROOTGeo::MdcROOTGeo ( Bool_t  cgem_flag = 0)

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 1042 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

1043{
1044 TString opt = option;
1045 opt.ToUpper();
1046
1047 if (!m_2DGeoInit) cout << "MdcROOTGeo::Draw2D(), 2D Geometry not initialized!" << endl;
1048 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
1049 if (!view) cout << "MdcROOTGeo::Draw(), BesView not found" << endl;
1050
1051 if (view->GetVisMdcGlobal()) { // MdcVisGlobal
1052 if (opt.Contains("XY")) {
1053 m_MdcXY->Draw("");
1054 //Long Peixun's update: Annotate
1055 // for (Int_t i = 0; i < 4; i++) {
1056 // m_MdcXYSuper[i]->Draw("");
1057 // }
1058 }
1059
1060 if (opt.Contains("ZR")) {
1061 for (Int_t i = 0; i < 2; i++) {
1062 //m_MdcZR[i]->SetRotatable(true); //Long Peixun's update: Move to initializer
1063 m_MdcZR[i]->Draw("");
1064 }
1065 }
1066
1067 TString wireOpt;
1068 if (view->GetVisMdcTubes()) wireOpt += "TUBE";
1069 if (view->GetVisMdcWires()) wireOpt += ",WIRE";
1070
1071 Int_t replicaDraw = 0; // change draw sequence in a circle, (-1: 0->Max; 1: Max->0)
1072 //Long Peixun's update: Ignore layer 0~7 if detector contains CGEM
1073 for (Int_t layer = m_StartLayer; layer < m_kTrueLayer; layer++) {
1074 Int_t simuLayer = GetSimuLayer(layer);
1075 for (int replica = 0; replica < m_kReplica[simuLayer]; replica++) {
1076 if (m_kStereoDir[layer] == -1) replicaDraw = replica;
1077 else if (m_kStereoDir[layer] == 1) replicaDraw = m_kReplica[simuLayer]-1 - replica;
1078 else replicaDraw = replica;
1079
1080 if (m_Mdc2DWire[layer][replicaDraw]) {
1081 //cout << layer << " " << replicaDraw << endl;
1082 //m_Mdc2DWire[layer][replicaDraw]->SetHighlighted(false);
1083 m_Mdc2DWire[layer][replicaDraw]->SetFired(false);
1084 m_Mdc2DWire[layer][replicaDraw]->Draw(wireOpt);
1085 }
1086 }
1087 }
1088 }
1089}
virtual void Draw(Option_t *option="")
virtual void Draw(Option_t *option="")
virtual void Draw(Option_t *option="")
Definition: Mdc2DWire.cxx:282
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 1092 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

1093{
1094 // cout << "Draw Hits" << endl;
1095 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
1096 if (!view) cout << "MdcROOTGeo::DrawHits(), BesView not found" << endl;
1097
1098 //cout << "VisMdcHitsGlobal " << view->GetVisMdcHitsGlobal() << endl;
1099 //cout << "VisMdcHits " << view->GetVisMdcHits() << endl;
1100
1101
1102 if (view->GetVisMdcHitsGlobal()) {
1103 TString wireOpt("");
1104 if (view->GetVisMdcTubes()) wireOpt += ",TUBE";
1105 if (view->GetVisMdcHits()) wireOpt += ",WIRE";
1106
1107 //Long Peixun's update: Use m_2DHitsArray which contains ready hits rather than rebuild hits
1108 for (int i = 0; i < m_2DHitsArray->GetEntries(); ++i)
1109 {
1110 Mdc2DWire* aWire = (Mdc2DWire*)m_2DHitsArray->At(i);
1111 if (aWire)
1112 {
1113 if ((k_TFire) && (aWire->GetTimeChannel() == 0x7FFFFFFF))
1114 continue;
1115 if ((k_QFire) && (aWire->GetChargeChannel() == 0x7FFFFFFF))
1116 continue;
1117 if ((k_QNotOverflow) && aWire->GetQOverflow() )
1118 continue;
1119 aWire->SetFired(true);
1120 aWire->SetColorfulWire(k_ColorfulWire, k_MdcTimeSubEvTime);
1121 aWire->Draw(wireOpt);
1122 }
1123 }
1124
1125/* if (m_MdcDigiCol) {
1126 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) {
1127 TMdcDigi *aMdcDigi = (TMdcDigi*)m_MdcDigiCol->At(i);
1128
1129 Identifier aMdcID( aMdcDigi->getIntId() );
1130 int layer = MdcID::layer( aMdcID );
1131 int wire = MdcID::wire( aMdcID );
1132 unsigned int overflow = aMdcDigi->getOverflow();
1133
1134 Mdc2DWire *aWire = 0;
1135 aWire = m_Mdc2DWire[layer][wire];
1136 if (aWire){
1137 if ((k_TFire) && (aMdcDigi->getTimeChannel() == 0x7FFFFFFF)){
1138 continue;
1139 }
1140 if ((k_QFire) && (aMdcDigi->getChargeChannel() == 0x7FFFFFFF)){
1141 continue;
1142 }
1143 //if ((!k_TOverflow) && ((overflow&1)>0) ){
1144 // continue;
1145 //}
1146 if ((k_QNotOverflow) && ((overflow&2)>0) ){
1147 continue;
1148 }
1149 aWire->SetFired(true);
1150 aWire->SetColorfulWire(k_ColorfulWire,k_MdcTimeSubEvTime);
1151 aWire->Draw(wireOpt);
1152 }
1153 }
1154 } */
1155 }
1156}
void SetColorfulWire(Bool_t colorfulWire, Bool_t subEvTime)
Definition: Mdc2DWire.cxx:535

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 1012 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

1013{
1014 if (m_Mdc2DWire[layer][wire]) return m_Mdc2DWire[layer][wire];
1015 else return 0;
1016}

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 97 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/MdcROOTGeo.h.

97{ return m_kLayer; }

◆ GetLayerNb() [3/4]

int MdcROOTGeo::GetLayerNb ( )
inline

Get number of layers;.

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

97{ 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 BesEvent::ConstructMdcTrackFromRec(), BesGeometry::GetPhysicalMdcReplica(), Init2DGeometry(), SetHits(), BesVisDisplay::SetMdcFiredCell(), and SetPhysicalDefaultVis().

◆ 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 988 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

989{
990 if (m_PhysicalSegment[segment] != 0) {
991 return m_PhysicalSegment[segment];
992 }
993 else {
994 //std::cout << "PhysicalNode: " << "Segment" << segment << " not found" << std::endl;
995 return 0;
996 }
997}

◆ 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 100 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/MdcROOTGeo.h.

100{ return m_kReplica[layer]; }

◆ GetReplicaNb() [3/4]

int MdcROOTGeo::GetReplicaNb ( int  layer)
inline

Get number of replicas on each layer;.

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

100{ 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 94 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/MdcROOTGeo.h.

94{ return m_kSegment; }

◆ GetSegmentNb() [3/4]

int MdcROOTGeo::GetSegmentNb ( )
inline

Get number of segments;.

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

94{ 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 1019 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

1020{
1021 if (trueLayer < 36 || trueLayer >= m_kTrueLayer) return trueLayer;
1022 if (trueLayer >= 36) return (36 + 2*(trueLayer-36));
1023 return trueLayer;
1024}

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 106 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/MdcROOTGeo.h.

106{ return m_Mdc; }

◆ GetVolumeMdc() [3/4]

TGeoVolume * MdcROOTGeo::GetVolumeMdc ( )
inline

Get Mdc volume;.

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

106{ 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 125 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

126{
127 if (m_ROOTGeoInit != 1 && m_ROOTGeoInit != 2) {
128 cout << "MdcROOTGeo::Init2DGeometry, ROOT Geometry not Initialized yet!" << endl;
129 return;
130 }
131
132 m_2DGeoInit = 1;
133 Int_t mdcColor = 11; //1002; // 41, 29
134 Int_t mdcLineColor = 15;
135 Int_t mdcXYStyle = 1001;//3001;
136 Int_t mdcZRStyle = 1001;//3007;
137 Int_t mdcStereoSuperColor = 38;
138 Int_t mdcAxialSuperColor = 4;
139
140 Double_t local[3] = {0.0, 0.0, 0.0};
141 Double_t master[3] = {0.0, 0.0, 0.0};
142 //Int_t nPoints = 4;
143 Double_t P[306] = {0.0}; //Long Peixun's update: 300 -> 306, at most 102 points
144 Double_t center[3] = {0.0, 0.0, 0.0};
145 TString name;
146
147 //----------XY-----------
148 // Mdc
149 TGeoTube *mdcShape = (TGeoTube*)GetVolumeMdc()->GetShape();
150 //Long Peixun's update: Consider CGEM detector
151 Double_t rmin = mdcShape->GetRmin();
152 if (m_StartLayer > 0) //if contains CGEM
153 {
154 TGeoTube *mdcShapeOuter = (TGeoTube*)(GetLayer(m_StartLayer)->GetVolume())->GetShape();
155 rmin = mdcShapeOuter->GetRmin();
156 }
157
158 m_MdcXY = new BesCircle2D("Mdc", "Mdc", rmin, mdcShape->GetRmax(), &center[0]);
159 m_MdcXY->SetNSegment(360);
160 m_MdcXY->SetFillColor(mdcColor);
161 m_MdcXY->SetFillStyle(mdcXYStyle);
162 m_MdcXY->SetLineColor(mdcLineColor);
163
164 //Long Peixun's update: Annotate
165/* // Mdc Supers
166 Int_t layerIn[4] = {0,
167 m_kStereoLayerIn,
168 m_kStereoLayerIn+m_kAxialLayerIn,
169 m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut
170 };
171 Int_t layerOut[4] = {m_kStereoLayerIn-1,
172 m_kStereoLayerIn+m_kAxialLayerIn-1,
173 m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut-1,
174 m_kLayer-1
175 };
176 for (Int_t i = 0; i < 4; i++) {
177 TGeoTube *mdcSuperShapeIn = (TGeoTube*)(GetLayer(layerIn[i])->GetVolume())->GetShape();
178 TGeoTube *mdcSuperShapeOut = (TGeoTube*)(GetLayer(layerOut[i])->GetVolume())->GetShape();
179 name = TString("MdcSuper" + i);
180 m_MdcXYSuper[i] = new BesCircle2D(name, name, mdcSuperShapeIn->GetRmin(), mdcSuperShapeOut->GetRmax(), &center[0]);
181 if (i%2 == 0) m_MdcXYSuper[i]->SetFillColor(mdcStereoSuperColor);
182 else m_MdcXYSuper[i]->SetFillColor(mdcAxialSuperColor);
183 } */
184
185 // Mdc Wires
186 //Long Peixun's update: Ignore layer 0~7 if detector contains CGEM
187 for (Int_t layer = m_StartLayer; layer < m_kTrueLayer; layer++) {
188 Int_t simuLayer = GetSimuLayer(layer);
189 for (int replica = 0; replica < m_kReplica[simuLayer]; replica++) {
190 //cout << "layer " << layer << " replica " << replica << endl;
191 TGeoPhysicalNode *wirePhyNode = GetPhysicalReplica(simuLayer, replica);
192 name = TString("Mdc Layer ");
193 name += layer;
194 name += " Wire ";
195 name += replica;
196
197 if (m_kStereoDir[layer] != 0) { // stereo Layer
198 TGeoArb8 *wireShape = (TGeoArb8*)wirePhyNode->GetShape();
199 Double_t *localArb8Point, masterArb8Point[24];
200 localArb8Point = wireShape->GetVertices();
201 for (Int_t i = 0; i < 8; i++) {
202 local[0] = localArb8Point[2*i];
203 local[1] = localArb8Point[2*i+1];
204 if (i < 4) local[2] = wireShape->GetDz() * (-1.0);
205 else local[2] = wireShape->GetDz();
206
207 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel())
208 ->LocalToMaster(local, &master[0]); // transform to top
209 for (Int_t j = 0; j < 3; j++) {
210 masterArb8Point[3*i+j] = master[j];
211 }
212 }
213
214 m_Mdc2DWire[layer][replica] = new Mdc2DWire(name, name, 8, &masterArb8Point[0]);
215
216 }
217 else { // axial Layer
218
219 TGeoTubeSeg *wireShape = (TGeoTubeSeg*)wirePhyNode->GetShape();
220
221 Double_t centerR = 0.5*(wireShape->GetRmin() + wireShape->GetRmax());
222 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut)
223 centerR = wireShape->GetRmax();
224 Double_t centerPhi =
225 0.5*(wireShape->GetPhi1() + wireShape->GetPhi2()) * TMath::DegToRad();
226 local[0] = centerR * cos(centerPhi);
227 local[1] = centerR * sin(centerPhi);
228 local[2] = 0.0;
229 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel())
230 ->LocalToMaster(local, &master[0]); // transform to top
231
232 Double_t rmin = wireShape->GetRmin();
233 Double_t rmax = wireShape->GetRmax();
234 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut)
235 rmax = rmin + 2*(rmax-rmin);
236 m_Mdc2DWire[layer][replica] =
237 new Mdc2DWire( name, name, rmin, rmax, wireShape->GetDz(),centerPhi, &master[0] );
238 }
239 }
240 }
241
242 //----------ZR-----------
243 // Mdc
244 Int_t iPoint = 0;
245 TGeoTube *aMdcLayer = 0;
246
247 //Long Peixun's update: Ignore layer 0~7 if detector contains CGEM
248 for (Int_t layer = m_StartLayer; layer < m_kLayer; layer++) {
249 aMdcLayer = (TGeoTube*)GetLayer(layer)->GetVolume()->GetShape();
250 P[3*iPoint] = 0.0;
251 P[3*iPoint+1] = aMdcLayer->GetRmin();
252 P[3*iPoint+2] = aMdcLayer->GetDz();
253 iPoint++;
254 }
255
256 P[3*iPoint] = 0.0;
257 P[3*iPoint+1] = aMdcLayer->GetRmax();
258 P[3*iPoint+2] = aMdcLayer->GetDz();
259 iPoint++;
260 P[3*iPoint] = 0.0;
261 P[3*iPoint+1] = aMdcLayer->GetRmax();
262 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0);
263 iPoint++;
264
265 for (Int_t layer = m_kLayer-1; layer >= m_StartLayer; layer--) {
266 aMdcLayer = (TGeoTube*)GetLayer(layer)->GetVolume()->GetShape();
267 P[3*iPoint] = 0.0;
268 P[3*iPoint+1] = aMdcLayer->GetRmin();
269 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0);
270 iPoint++;
271 }
272
273
274 m_MdcZR[0] = new BesPolygon2D("MdcZRUp", "MdcZRUp", iPoint, &P[0]);
275
276 for (Int_t i = 0; i < iPoint; i++)
277 P[3*i+1] *= -1.0;
278
279 m_MdcZR[1] = new BesPolygon2D("MdcZRDown", "MdcZRDown", iPoint, &P[0]);
280
281 for (Int_t i = 0; i < 2; i++) {
282 m_MdcZR[i]->SetFillColor(mdcColor);
283 m_MdcZR[i]->SetFillStyle(mdcZRStyle);
284 m_MdcZR[i]->SetLineColor(mdcLineColor);
285 m_MdcZR[i]->SetRotatable(true); //Long Peixun's update
286 }
287}
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 109 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

110{
111 m_ROOTGeoInit = 2;
112 ReadGdml(gdmlFile, setupName);
113 SetNode();
114}

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 117 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

118{
119 m_ROOTGeoInit = 1;
120 SetVolumeMdc(vol);
121 SetNode();
122}
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 1027 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

1028{
1029 if (m_MdcDigiCol) {
1030 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) {
1031 Identifier mdcID( ((TMdcDigi*)m_MdcDigiCol->At(i))->getIntId() );
1032 if (layer == MdcID::layer( mdcID ) && wire == MdcID::wire( mdcID )) {
1033 return kTRUE;
1034 }
1035 }
1036 }
1037
1038 return kFALSE;
1039}
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

◆ 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;.

◆ 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 829 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

829 {
830 k_ColorfulWire = input;
831}

◆ 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 ( )

Draw Detecor (what is detector depends on you)

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

628{
629 BesView *view = 0;
630 if (gPad) view = dynamic_cast<BesView*>(gPad->GetView());
631 //if (view) cout << "viewVisFull3DMdc " << view->GetVisFull3DMdc() << endl;
632
633 m_DetectorsArray->Clear();
634 for (int segment = 0; segment < 2*m_kSegment-2; segment++) {
635 TGeoPhysicalNode *phyNode = 0;
636 phyNode = m_PhysicalSegment[segment];
637 //cout << m_PhysicalSegment[segment]->GetName() << endl;
638 if (phyNode) {
639 phyNode->SetVisibility(0); // set all invisible before set any visible
640 if ( (segment >= 2 && segment <= 3) || segment > 59) {
641 m_DetectorsArray->Add( phyNode );
642 }
643 else if (view && view->GetVisFull3DMdc()) {
644 m_DetectorsArray->Add( phyNode );
645 }
646 }
647 }
648 /*
649 for (int part = 0; part < m_kPart; part++) {
650 int nPhi = (part == 1 ? m_kPhiBr : m_kPhiEc);
651 for (int phi = 0; phi < nPhi; phi++) {
652 int nTheta = (part == 1 ? m_kThetaBr : m_kThetaEc);
653 for (int theta = 0; theta < nTheta; theta++) {
654 // This is you detector, set it on
655 if ( (part == 1 && theta != 0 && theta != 43 && ((phi != 0 && phi != 60) || theta%2 == 0)) ||
656 (part != 1 && theta != 0) ) {
657 m_PhysicalCrystal[part][phi][theta]->SetVisibility(0);
658 }
659
660 // This is you hit
661 // when you are to set fired hits to another color, say red,
662 // SetIsVolAtt(kFALSE) and to then SetLineColor(kRed);
663 if (phi == 12 && theta == 5) {
664 m_PhysicalCrystal[part][phi][theta]->SetVisibility(1);
665 m_PhysicalCrystal[part][phi][theta]->SetLineColor(2);
666 }
667 }
668 }
669 }
670 std::cout << "end of set detector on" << std::endl;
671 */
672}

Referenced by BesClient::HandleViewOptionMenu().

◆ SetDetector() [2/2]

void MdcROOTGeo::SetDetector ( )

Draw Detecor (what is detector depends on you)

◆ SetHalfVisible() [1/2]

void MdcROOTGeo::SetHalfVisible ( )

Set half visible;.

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

512{
513 for (int segment = 1; segment <= m_kSegment; segment++) {
514 GetVolumeSegment(segment)->SetVisibility(0);
515 }
516
517 //Long Peixun's update: Ignore layer 0~7 if detector contains CGEM
518 for (int layer = m_StartLayer; layer < m_kLayer; layer++) {
519 GetVolumeLayer(layer)->SetVisibility(0);
520 GetVolumeReplica(layer)->SetVisibility(1);
521 }
522
523 for (int segment = 1; segment <= m_kSegment; segment++) {
524 for (int no = 0; no < 2; no++) {
525 GetSegment(segment, no)->SetVisibility(0);
526 }
527 }
528
529 //Long Peixun's update: Ignore layer 0~7 if detector contains CGEM
530 for (int layer = m_StartLayer; layer < m_kLayer; layer++) {
531 GetLayer(layer)->SetVisibility(0);
532 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
533 if (replica < m_kReplica[layer]/4 ||
534 replica > m_kReplica[layer]*3/4 ) GetReplica(layer, replica)->SetVisibility(1);
535 else GetReplica(layer, replica)->SetVisibility(0);
536 }
537 }
538}

◆ SetHalfVisible() [2/2]

void MdcROOTGeo::SetHalfVisible ( )

Set half visible;.

◆ SetHits() [1/2]

void MdcROOTGeo::SetHits ( )

Set all physicalNodes corresponding to digiCol;.

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

676{
677 // set previous event hits to default vis
678 //Long Peixun's update: Annotate cout
679 // cout << "m_HitsArray size(): " << m_HitsArray->GetEntries() << endl;
680 // cout << "m_2DHitsArray size(): " << m_2DHitsArray->GetEntries() << endl;
681 for (int i = 0; i < m_HitsArray->GetEntries(); i++) {
682 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i);
683 phyNode->SetVisibility(0);
684 }
685 m_HitsArray->Clear("C");
686
687 // set previous event 2D hits info to default
688 for (int i = 0; i < m_2DHitsArray->GetEntries(); i++) {
689 Mdc2DWire *aWire = (Mdc2DWire*)m_2DHitsArray->At(i);
690 aWire->ClearInfo();
691 aWire->AddInfo(aWire->GetTitle());
692 aWire->CloseInfo();
693 }
694 m_2DHitsArray->Clear("C");
695
696 // set new hits
697 //Long Peixun's update: Consider gEvent == NULL
698 int NDigiCol = 0;
699 if (gEvent)
700 {
701 m_MdcDigiCol = gEvent->GetMdcDigiCol();
702 //Long Peixun's update: Consider m_MdcDigiCol == NULL
703 if (m_MdcDigiCol) NDigiCol = m_MdcDigiCol->GetEntries();
704 else NDigiCol = 0;
705 }
706
707 for (int i = 0; i < NDigiCol; i++) {
708 TMdcDigi *aMdcDigi = (TMdcDigi*)m_MdcDigiCol->At(i);
709 Identifier aMdcID( aMdcDigi->getIntId() );
710 int layer = MdcID::layer( aMdcID );
711 int wire = MdcID::wire( aMdcID );
712
713 Double_t time = RawDataUtil::MdcTime(aMdcDigi->getTimeChannel());
714 Int_t charge = RawDataUtil::MdcCharge(aMdcDigi->getChargeChannel());
715
716 TGeoPhysicalNode *phyNode = 0;
717 if (layer < 36) { // number of layers in the three inner
718 phyNode = GetPhysicalReplica(layer, wire);
719 if (phyNode) m_HitsArray->Add( phyNode );
720 }
721 else {
722 phyNode = GetPhysicalReplica( GetSimuLayer(layer), wire );
723 if (phyNode) m_HitsArray->Add( phyNode );
724 phyNode = GetPhysicalReplica( GetSimuLayer(layer)+1, wire);
725 if (phyNode) m_HitsArray->Add( phyNode );
726 }
727
728 Mdc2DWire *aWire = 0;
729 aWire = m_Mdc2DWire[layer][wire];
730 if (aWire) {
731 aWire->ClearInfo();
732 aWire->AddInfo(aWire->GetTitle());
733 double evTime = gEvent->GetHeader().GetEvTime();
734
735 char data[200]; //Long Peixun's update: 100 -> 200
736 if(time>1000000) {
737 sprintf(data, "NO time");
738 }else{
739 sprintf(data, "time=%-.1f ns", time);
740 if(fabs(evTime)>0.0001){
741 sprintf(data, "%s, Tdrift(Raw)=%-.1f ns", data, time - evTime +230);
742 }
743 }
744 if(charge>1000000) {
745 sprintf(data, "%s, NO charge", data);
746 }else{
747 sprintf(data, "%s, charge=%d", data,charge);
748 }
749 aWire->AddInfo( TString(data) );
750 sprintf(data, "Fired");
751 aWire->AddInfo( TString(data) );
752
753 aWire->SetTime(time);//yzhang
754 aWire->SetCharge(charge);//yzhang
755 unsigned int overflow = aMdcDigi->getOverflow();
756 aWire->SetQOverflow(overflow&2);//yzhang
757 aWire->SetEvTime(evTime);
758
759 //Long Peixun's update: Set raw channel data of aWire
760 aWire->SetTimeChannel(aMdcDigi->getTimeChannel());
761 aWire->SetChargeChannel(aMdcDigi->getChargeChannel());
762
763 aWire->CloseInfo();
764
765 m_2DHitsArray->Add(aWire);
766 }
767
768 }
769}
TTree * data
Double_t time
void SetChargeChannel(UInt_t cc)
Definition: Mdc2DWire.cxx:528
virtual void ClearInfo()
Definition: Mdc2DWire.cxx:185
void SetQOverflow(Bool_t qOvfl)
Definition: Mdc2DWire.cxx:510
virtual void CloseInfo()
Definition: Mdc2DWire.cxx:191
void SetTime(Double_t time)
Definition: Mdc2DWire.cxx:496
void SetEvTime(Double_t time)
Definition: Mdc2DWire.cxx:517
void SetTimeChannel(UInt_t tc)
Definition: Mdc2DWire.cxx:524
void SetCharge(Double_t charge)
Definition: Mdc2DWire.cxx:503
static double MdcCharge(int chargeChannel)
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
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)

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 834 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

834 {
835 k_MdcTimeSubEvTime = input;
836}

◆ 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;.

◆ SetPhysicalDefaultVis() [1/2]

void MdcROOTGeo::SetPhysicalDefaultVis ( )

Set default physical node attributes;.

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

591{
592 // for (int part = 0; part < m_kPart; part++)
593 // {
594 // int nPhi = (part == 1 ? m_kPhiBr : m_kPhiEc);
595 // for (int phi = 0; phi < nPhi; phi++)
596 // {
597 // int nTheta = (part == 1 ? m_kThetaBr : m_kThetaEc);
598 // for (int theta = 0; theta < nTheta; theta++)
599 // {
600 // m_PhysicalCrystal[part][phi][theta]->SetIsVolAtt(kFALSE);
601 // if (part == 1) m_PhysicalCrystal[part][phi][theta]->SetLineColor(m_brCrystalColor);
602 // else m_PhysicalCrystal[part][phi][theta]->SetLineColor(m_ecCrystalColor);
603 // }
604 // }
605 // }
606
607 for (int layer = m_StartLayer; layer < m_kLayer; layer++)
608 {
609 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
610 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
611 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) )
612 {
613 for (int replica = 0; replica < m_kReplica[layer]; replica++)
614 GetPhysicalReplica(layer, replica)->SetLineColor(m_twistedTubsColor);
615 }
616 else
617 {
618 for (int replica = 0; replica < m_kReplica[layer]; replica++)
619 GetPhysicalReplica(layer, replica)->SetLineColor(m_replicaColor);
620 }
621 }
622 //std::cout << "end of set defaultvis" << std::endl;
623}

Referenced by BesGeometry::Draw3D(), and BesGeometry::SetPhysicalDefaultVis().

◆ SetPhysicalDefaultVis() [2/2]

void MdcROOTGeo::SetPhysicalDefaultVis ( )

Set default physical node attributes;.

◆ 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 823 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

823 {
824 k_QFire = input;
825 //cout << "Mdc ROOT Geometry ADC Match: " << k_QMatch << endl;
826}

◆ SetQFire() [2/2]

void MdcROOTGeo::SetQFire ( Bool_t  input)

◆ SetQNotOverflow() [1/2]

void MdcROOTGeo::SetQNotOverflow ( Bool_t  input)

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

817 {
818 k_QNotOverflow = input;
819 //cout << "Mdc ROOT Geometry TDC Match: " << k_TMatch << endl;
820}

◆ 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 805 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

805 {
806 k_TFire= input;
807 //cout << "Mdc ROOT Geometry TDC Match: " << k_TMatch << endl;
808}

◆ SetTFire() [2/2]

void MdcROOTGeo::SetTFire ( Bool_t  input)

◆ SetVisMdcDetector() [1/2]

void MdcROOTGeo::SetVisMdcDetector ( )

Set Mdc default detector visibility;.

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

773{
774 BesView *view = 0;
775 if (gPad) view = dynamic_cast<BesView*>(gPad->GetView());
776
777 for (int i = 0; i < m_DetectorsArray->GetEntries(); i++) {
778 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_DetectorsArray->At(i);
779 if (view && view->GetVisMdcGlobal()) {
780 phyNode->SetVisibility(1);
781 continue;
782 }
783 phyNode->SetVisibility(0);
784 }
785}

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 788 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

789{
790 BesView *view = 0;
791 if (gPad) view = dynamic_cast<BesView*>(gPad->GetView());
792
793 for (int i = 0; i < m_HitsArray->GetEntries(); i++) {
794 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i);
795 if (view && view->GetVisMdcHitsGlobal()) {
796 phyNode->SetVisibility(1);
797 }
798 else {
799 phyNode->SetVisibility(0);
800 }
801 }
802}

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 389 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/src/MdcROOTGeo.cxx.

390{
391 //std::cout << "begin of set defaultvis" << std::endl;
392 m_Mdc->SetLineColor(m_MdcColor);
393 m_Mdc->SetVisibility(0);
394
395 for (int segment = 1; segment <= m_kSegment; segment++) {
396 GetVolumeSegment(segment)->SetLineColor(m_segmentColor);
397 //if (segment > 3) GetVolumeSegment(segment)->SetVisibility(0);
398 GetVolumeSegment(segment)->SetVisibility(1);
399 }
400
401 //Long Peixun's update: Ignore layer 0~7 if detector contains CGEM
402 for (int layer = m_StartLayer; layer < m_kLayer; layer++) {
403 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
404 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
405 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) {
406 GetVolumeLayer(layer)->SetLineColor(m_hypeColor);
407 GetVolumeReplica(layer)->SetLineColor(m_twistedTubsColor);
408 }
409 else {
410 GetVolumeLayer(layer)->SetLineColor(m_tubeColor);
411 GetVolumeReplica(layer)->SetLineColor(m_replicaColor);
412 }
413 GetVolumeLayer(layer)->SetVisibility(0);
414 GetVolumeReplica(layer)->SetVisibility(1);
415 }
416
417 for (int segment = 1; segment <= m_kSegment; segment++) {
418 for (int no = 0; no < 2; no++) {
419 GetSegment(segment, no)->SetVisibility(0);
420 }
421 }
422
423 //Long Peixun's update: Ignore layer 0~7 if detector contains CGEM
424 for (int layer = m_StartLayer; layer < m_kLayer; layer++) {
425 GetLayer(layer)->SetVisibility(0);
426 for (int replica = 0; replica < m_kReplica[layer]; replica++) {
427 GetReplica(layer, replica)->SetVisibility(0);
428 }
429 }
430
431 //std::cout << "end of set defaultvis" << std::endl;
432}

◆ 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 103 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/MdcROOTGeo.h.

103{ 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 103 of file InstallArea/include/BesVisLib/BesVisLib/MdcROOTGeo.h.

103{ m_Mdc = vol; }

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