#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 () |
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;. | |
Mdc2DWire * | Get2DWire (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. | |
void | ReadGdml (const char *gdmlFile, const char *setupName) |
Initialize the instance of ROOTGeo. | |
virtual void | ReadGdml (const char *gdmlFile, const char *setupName) |
Initialize the instance of ROOTGeo. | |
int | IsInitialized () |
If the ROOT geometry of this subdetctor is initialized;. | |
virtual int | IsInitialized () |
If the ROOT geometry of this subdetctor is initialized;. | |
void | SetChildNo (int childNo) |
virtual void | SetChildNo (int childNo) |
TGeoVolume * | GetLogicalVolume (const std::string &vn) |
Get a logical volume by name;. | |
virtual TGeoVolume * | GetLogicalVolume (const std::string &vn) |
Get a logical volume by name;. | |
TGeoVolume * | GetTopVolume () |
Get the top(world) volume;. | |
virtual TGeoVolume * | GetTopVolume () |
Get the top(world) volume;. | |
TGeoVolumeAssembly * | GetAssemblyVolume (const std::string &an) |
Get an assembly by name;. | |
virtual TGeoVolumeAssembly * | GetAssemblyVolume (const std::string &an) |
Get an assembly by name;. | |
TGeoNode * | GetNode (const std::string &nn) |
Get a node(physical volume) 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;. | |
Protected Attributes | |
int | m_ROOTGeoInit |
int | m_childNo |
TGeoVolume * | m_TopVolume |
TGeoVolume * | m_TopVolume |
int | m_2DGeoInit |
TObjArray * | m_DetectorsArray |
TObjArray * | m_HitsArray |
TObjArray * | m_2DHitsArray |
Private Types | |
typedef std::map< int, int > | intMap |
typedef std::map< int, int > | intMap |
Private Attributes | |
std::map< int,int > | m_CorrectMap |
TGeoVolume * | m_Mdc |
TGeoNode * | m_NodeReplica [m_kLayer][m_kReplicaMax] |
TGeoPhysicalNode * | m_PhysicalReplica [m_kLayer][m_kReplicaMax] |
Bool_t | k_TFire |
Bool_t | k_QFire |
Bool_t | k_QNotOverflow |
Bool_t | k_ColorfulWire |
Bool_t | k_MdcTimeSubEvTime |
int | m_MdcColor |
int | m_segmentColor |
int | m_hypeColor |
int | m_tubeColor |
int | m_twistedTubsColor |
int | m_replicaColor |
std::map< int,int > | m_CorrectMap |
TGeoVolume * | m_Mdc |
TGeoNode * | m_NodeLayer [m_kLayer] |
TGeoNode * | m_NodeReplica [m_kLayer][m_kReplicaMax] |
TGeoPhysicalNode * | m_PhysicalSegment [m_kSegment *2] |
TGeoPhysicalNode * | m_PhysicalReplica [m_kLayer][m_kReplicaMax] |
const TObjArray * | m_MdcDigiCol |
BesCircle2D * | m_MdcXY |
BesCircle2D * | m_MdcXYSuper [4] |
Mdc2DWire * | m_Mdc2DWire [m_kTrueLayer][m_kReplicaMax] |
BesPolygon2D * | m_MdcZR [2] |
Static Private Attributes | |
static const int | m_kSegment = 66 |
static const int | m_kStereoLayerIn = 8 |
static const int | m_kAxialLayerIn = 12 |
static const int | m_kStereoLayerOut = 16 |
static const int | m_kAxialLayerOut = 7 |
static const int | m_kLayer = 50 |
static const int | m_kReplicaMax = 288 |
static const int | m_kReplica [m_kLayer] |
static const int | m_kCorrectLayer = 10 |
static const int | m_kiCorrectLayer [m_kCorrectLayer] = {9, 11, 13, 15, 17, 19, 36, 38, 40, 42} |
static const int | m_kiCorrectReplica [m_kCorrectLayer] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
static const int | m_kTrueLayer = 43 |
static const int | m_kStereoDir [m_kTrueLayer] |
static const int | MDC_TIME_FACTOR = 100000 |
static const int | MDC_CHARGE_FACTOR = 1000000 |
Definition at line 29 of file MdcROOTGeo.h.
typedef std::map<int, int> MdcROOTGeo::intMap [private] |
Definition at line 179 of file MdcROOTGeo.h.
typedef std::map<int, int> MdcROOTGeo::intMap [private] |
Definition at line 108 of file MdcROOTGeo.h.
MdcROOTGeo::MdcROOTGeo | ( | ) |
Constructor.
Definition at line 36 of file MdcROOTGeo.cxx.
References genRecEmupikp::i, m_CorrectMap, m_kCorrectLayer, m_kiCorrectLayer, m_kiCorrectReplica, m_kLayer, m_kReplicaMax, m_NodeReplica, and m_PhysicalReplica.
00037 { 00038 // Default constructor. 00039 for (int layer = 0; layer < m_kLayer; layer++) { 00040 for (int replica = 0; replica < m_kReplicaMax; replica++) { 00041 m_NodeReplica[layer][replica] = 0; 00042 m_PhysicalReplica[layer][replica] = 0; 00043 } 00044 } 00045 00046 for (int i = 0; i < m_kCorrectLayer; i++) { 00047 m_CorrectMap[m_kiCorrectLayer[i]] = m_kiCorrectReplica[i]; 00048 } 00049 }
MdcROOTGeo::~MdcROOTGeo | ( | ) |
MdcROOTGeo::MdcROOTGeo | ( | ) |
Constructor.
MdcROOTGeo::~MdcROOTGeo | ( | ) |
Destructor.
int MdcROOTGeo::CorrectReplica | ( | int | layer, | |
int | replica | |||
) |
Correct some axial layer id to copyNo;.
int MdcROOTGeo::CorrectReplica | ( | int | layer, | |
int | replica | |||
) |
Correct some axial layer id to copyNo;.
Definition at line 103 of file MdcROOTGeo.cxx.
References iter(), m_CorrectMap, m_kAxialLayerIn, m_kAxialLayerOut, m_kReplica, m_kStereoLayerIn, and m_kStereoLayerOut.
Referenced by SetNode().
00104 { 00105 int rep = replica; 00106 for (intMap::iterator iter = m_CorrectMap.begin(); iter != m_CorrectMap.end(); iter++) { 00107 if (layer == (*iter).first || 00108 (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut && 00109 layer - m_kAxialLayerOut == (*iter).first)) { 00110 rep -= (*iter).second; 00111 if (rep < 0) rep += m_kReplica[layer]; 00112 } 00113 } 00114 00115 //std::cout << "layer" << layer << " " << replica << "->" << rep << std::endl; 00116 return rep; 00117 }
void MdcROOTGeo::Draw | ( | Option_t * | option | ) |
Draw function.
Definition at line 968 of file MdcROOTGeo.cxx.
References Mdc2DWire::Draw(), BesPolygon2D::Draw(), BesCircle2D::Draw(), GetSimuLayer(), BesView::GetVisMdcGlobal(), BesView::GetVisMdcTubes(), BesView::GetVisMdcWires(), genRecEmupikp::i, SubDetectorROOTGeo::m_2DGeoInit, m_kStereoDir, m_Mdc2DWire, m_MdcXY, and m_MdcZR.
Referenced by BesGeometry::Draw2DXY(), and BesGeometry::Draw2DZR().
00969 { 00970 TString opt = option; 00971 opt.ToUpper(); 00972 00973 if (!m_2DGeoInit) cout << "MdcROOTGeo::Draw2D(), 2D Geometry not initialized!" << endl; 00974 BesView *view = (BesView*)gPad->GetView(); 00975 if (!view) cout << "MdcROOTGeo::Draw(), BesView not found" << endl; 00976 00977 if (view->GetVisMdcGlobal()) { // MdcVisGlobal 00978 if (opt.Contains("XY")) { 00979 m_MdcXY->Draw(""); 00980 for (Int_t i = 0; i < 4; i++) { 00981 //m_MdcXYSuper[i]->Draw(""); 00982 } 00983 } 00984 00985 if (opt.Contains("ZR")) { 00986 for (Int_t i = 0; i < 2; i++) { 00987 m_MdcZR[i]->SetRotatable(true); 00988 m_MdcZR[i]->Draw(""); 00989 } 00990 } 00991 00992 TString wireOpt; 00993 if (view->GetVisMdcTubes()) wireOpt += "TUBE"; 00994 if (view->GetVisMdcWires()) wireOpt += ",WIRE"; 00995 00996 Int_t replicaDraw = 0; // change draw sequence in a circle, (-1: 0->Max; 1: Max->0) 00997 for (Int_t layer = 0; layer < m_kTrueLayer; layer++) { 00998 Int_t simuLayer = GetSimuLayer(layer); 00999 for (int replica = 0; replica < m_kReplica[simuLayer]; replica++) { 01000 if (m_kStereoDir[layer] == -1) replicaDraw = replica; 01001 else if (m_kStereoDir[layer] == 1) replicaDraw = m_kReplica[simuLayer]-1 - replica; 01002 else replicaDraw = replica; 01003 01004 if (m_Mdc2DWire[layer][replicaDraw]) { 01005 //cout << layer << " " << replicaDraw << endl; 01006 //m_Mdc2DWire[layer][replicaDraw]->SetHighlighted(false); 01007 m_Mdc2DWire[layer][replicaDraw]->SetFired(false); 01008 m_Mdc2DWire[layer][replicaDraw]->Draw(wireOpt); 01009 } 01010 } 01011 } 01012 } 01013 }
void MdcROOTGeo::DrawHits | ( | Option_t * | option | ) |
Draw 2D hits.
Definition at line 1016 of file MdcROOTGeo.cxx.
References Mdc2DWire::Draw(), BesView::GetVisMdcHits(), BesView::GetVisMdcHitsGlobal(), BesView::GetVisMdcTubes(), genRecEmupikp::i, k_ColorfulWire, k_MdcTimeSubEvTime, k_QFire, k_QNotOverflow, k_TFire, MdcID::layer(), m_Mdc2DWire, m_MdcDigiCol, Mdc2DWire::SetColorfulWire(), Mdc2DWire::SetFired(), and MdcID::wire().
Referenced by BesEvent::DrawHits().
01017 { 01018 // cout << "Draw Hits" << endl; 01019 BesView *view = (BesView*)gPad->GetView(); 01020 if (!view) cout << "MdcROOTGeo::DrawHits(), BesView not found" << endl; 01021 01022 //cout << "VisMdcHitsGlobal " << view->GetVisMdcHitsGlobal() << endl; 01023 //cout << "VisMdcHits " << view->GetVisMdcHits() << endl; 01024 01025 01026 if (view->GetVisMdcHitsGlobal()) { 01027 TString wireOpt(""); 01028 if (view->GetVisMdcTubes()) wireOpt += ",TUBE"; 01029 if (view->GetVisMdcHits()) wireOpt += ",WIRE"; 01030 01031 if (m_MdcDigiCol) { 01032 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) { 01033 TMdcDigi *aMdcDigi = (TMdcDigi*)m_MdcDigiCol->At(i); 01034 01035 Identifier aMdcID( aMdcDigi->getIntId() ); 01036 int layer = MdcID::layer( aMdcID ); 01037 int wire = MdcID::wire( aMdcID ); 01038 unsigned int overflow = aMdcDigi->getOverflow(); 01039 01040 Mdc2DWire *aWire = 0; 01041 aWire = m_Mdc2DWire[layer][wire]; 01042 if (aWire){ 01043 if ((k_TFire) && (aMdcDigi->getTimeChannel() == 0x7FFFFFFF)){ 01044 continue; 01045 } 01046 if ((k_QFire) && (aMdcDigi->getChargeChannel() == 0x7FFFFFFF)){ 01047 continue; 01048 } 01049 //if ((!k_TOverflow) && ((overflow&1)>0) ){ 01050 // continue; 01051 //} 01052 if ((k_QNotOverflow) && ((overflow&2)>0) ){ 01053 continue; 01054 } 01055 aWire->SetFired(true); 01056 aWire->SetColorfulWire(k_ColorfulWire,k_MdcTimeSubEvTime); 01057 aWire->Draw(wireOpt); 01058 } 01059 } 01060 } 01061 } 01062 }
Mdc2DWire * MdcROOTGeo::Get2DWire | ( | Int_t | layer, | |
Int_t | replica | |||
) |
Get Mdc2DWire;.
Definition at line 938 of file MdcROOTGeo.cxx.
References m_Mdc2DWire.
Referenced by BesEvent::ConstructMdcTrackFromRec().
00939 { 00940 if (m_Mdc2DWire[layer][wire]) return m_Mdc2DWire[layer][wire]; 00941 else return 0; 00942 }
virtual TGeoVolumeAssembly* SubDetectorROOTGeo::GetAssemblyVolume | ( | const std::string & | an | ) | [virtual, inherited] |
Get an assembly by name;.
TGeoVolumeAssembly * SubDetectorROOTGeo::GetAssemblyVolume | ( | const std::string & | an | ) | [inherited] |
Get an assembly by name;.
Definition at line 52 of file SubDetectorROOTGeo.cxx.
Referenced by TofROOTGeo::GetVolumeAssembly().
00053 { 00054 TGeoVolumeAssembly *av = (TGeoVolumeAssembly*)TGDMLProcessor::GetInstance()->GetAssemblyVolume(an); 00055 if (!av) std::cout << "Assembly Volume " << an << " not found " << std::endl; 00056 return av; 00057 }
TGeoPhysicalNode * SubDetectorROOTGeo::GetHit | ( | int | i | ) | [virtual, inherited] |
Get ith hit in HitsArray;.
Definition at line 65 of file SubDetectorROOTGeo.cxx.
References SubDetectorROOTGeo::m_HitsArray.
00066 { 00067 if (i < m_HitsArray->GetEntries()) 00068 return (TGeoPhysicalNode*)m_HitsArray->At(i); 00069 else 00070 return 0; 00071 }
virtual int SubDetectorROOTGeo::GetHitsNum | ( | ) | [inline, virtual, inherited] |
Get number of hits in HitsArray;.
Definition at line 61 of file SubDetectorROOTGeo.h.
References SubDetectorROOTGeo::m_HitsArray.
00061 { return m_HitsArray->GetEntries(); }
TGeoNode* MdcROOTGeo::GetLayer | ( | int | layer | ) |
Get layer node;.
TGeoNode * MdcROOTGeo::GetLayer | ( | int | layer | ) |
Get layer node;.
Definition at line 334 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::GetNode(), m_kAxialLayerIn, m_kAxialLayerOut, m_kLayer, m_kStereoLayerIn, and m_kStereoLayerOut.
Referenced by Init2DGeometry(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetPhysicalNode(), SetQuarterVisible(), and SetVolumeDefaultVis().
00335 { 00336 std::stringstream osname; 00337 if (layer >= 0 && layer < m_kStereoLayerIn) { 00338 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "_" << layer; 00339 } 00340 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) { 00341 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_" << layer; 00342 } 00343 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn && 00344 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) { 00345 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "_" << layer; 00346 } 00347 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut && 00348 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) { 00349 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0" << "_" 00350 << 2*layer - m_kStereoLayerIn - m_kAxialLayerIn - m_kStereoLayerOut; 00351 } 00352 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut && 00353 layer < m_kLayer) { 00354 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1" << "_" 00355 << 2*(layer - m_kAxialLayerOut) - m_kStereoLayerIn - m_kAxialLayerIn - m_kStereoLayerOut + 1; 00356 } 00357 00358 //std::cout << osname.str() << std::endl; 00359 return GetNode( osname.str() ); 00360 }
int MdcROOTGeo::GetLayerNb | ( | ) | [inline] |
Get number of layers;.
Definition at line 96 of file MdcROOTGeo.h.
References m_kLayer.
00096 { return m_kLayer; }
int MdcROOTGeo::GetLayerNb | ( | ) |
Get number of layers;.
virtual TGeoVolume* SubDetectorROOTGeo::GetLogicalVolume | ( | const std::string & | vn | ) | [virtual, inherited] |
Get a logical volume by name;.
TGeoVolume * SubDetectorROOTGeo::GetLogicalVolume | ( | const std::string & | vn | ) | [inherited] |
Get a logical volume by name;.
Definition at line 45 of file SubDetectorROOTGeo.cxx.
Referenced by MucROOTGeo::GetVolumeAbsorber(), MucROOTGeo::GetVolumeAbsorberPanel(), MucROOTGeo::GetVolumeAbsorberSmallBlock(), TofROOTGeo::GetVolumeAl(), MucROOTGeo::GetVolumeAluminumBox(), MucROOTGeo::GetVolumeBakelite(), MucROOTGeo::GetVolumeBox(), MucROOTGeo::GetVolumeBoxSurface(), TofROOTGeo::GetVolumeBucket(), EmcROOTGeo::GetVolumeCrystal(), MucROOTGeo::GetVolumeGap(), MucROOTGeo::GetVolumeGasBorder(), MucROOTGeo::GetVolumeGasChamber(), GetVolumeLayer(), TofROOTGeo::GetVolumePart(), EmcROOTGeo::GetVolumePart(), EmcROOTGeo::GetVolumePhi(), TofROOTGeo::GetVolumePVF(), GetVolumeReplica(), TofROOTGeo::GetVolumeScin(), GetVolumeSegment(), MucROOTGeo::GetVolumeStrip(), MucROOTGeo::GetVolumeStripPlane(), EmcROOTGeo::GetVolumeTheta(), MucROOTGeo::SetNode(), EmcROOTGeo::SetNode(), EmcROOTGeo::SetPhysicalNode(), and EmcROOTGeo::SetVolumeAppendInVis().
00046 { 00047 TGeoVolume *lv = (TGeoVolume*)TGDMLProcessor::GetInstance()->GetLogicalVolume(vn); 00048 if (!lv) std::cout << "Logical Volume " << vn << " not found " << std::endl; 00049 return lv; 00050 }
virtual TGeoNode* SubDetectorROOTGeo::GetNode | ( | const std::string & | nn | ) | [virtual, inherited] |
Get a node(physical volume) by name;.
TGeoNode * SubDetectorROOTGeo::GetNode | ( | const std::string & | nn | ) | [inherited] |
Get a node(physical volume) by name;.
Definition at line 59 of file SubDetectorROOTGeo.cxx.
Referenced by TofROOTGeo::GetBucket(), GetLayer(), EmcROOTGeo::GetPart(), EmcROOTGeo::GetPhi(), GetSegment(), MucROOTGeo::Init2DGeometry(), TofROOTGeo::SetNode(), MucROOTGeo::SetNode(), and SetNode().
00060 { 00061 TGeoNode *node = (TGeoNode*)TGDMLProcessor::GetInstance()->GetPhysicalVolume(nn); 00062 if (!node) std::cout << "Physical Volume " << nn << " not found " << std::endl; 00063 return node; 00064 }
TGeoPhysicalNode* MdcROOTGeo::GetPhysicalReplica | ( | int | layer, | |
int | replica | |||
) |
Get replica physical node;.
TGeoPhysicalNode * MdcROOTGeo::GetPhysicalReplica | ( | int | layer, | |
int | replica | |||
) |
Get replica physical node;.
Definition at line 376 of file MdcROOTGeo.cxx.
References m_PhysicalReplica.
Referenced by BesGeometry::GetPhysicalMdcReplica(), Init2DGeometry(), SetHits(), and BesVisDisplay::SetMdcFiredCell().
00377 { 00378 if (m_PhysicalReplica[layer][replica] != 0) { 00379 return m_PhysicalReplica[layer][replica]; 00380 } 00381 else { 00382 std::cout << "PhysicalNode: " << "Layer" << layer << "Replica" << replica << " not found" << std::endl; 00383 return 0; 00384 } 00385 }
TGeoPhysicalNode * MdcROOTGeo::GetPhysicalSegment | ( | int | segment | ) |
Get segment physical node;.
Definition at line 914 of file MdcROOTGeo.cxx.
References m_PhysicalSegment.
00915 { 00916 if (m_PhysicalSegment[segment] != 0) { 00917 return m_PhysicalSegment[segment]; 00918 } 00919 else { 00920 //std::cout << "PhysicalNode: " << "Segment" << segment << " not found" << std::endl; 00921 return 0; 00922 } 00923 }
TGeoNode* MdcROOTGeo::GetReplica | ( | int | layer, | |
int | replica | |||
) |
Get replica node;.
TGeoNode * MdcROOTGeo::GetReplica | ( | int | layer, | |
int | replica | |||
) |
Get replica node;.
Definition at line 363 of file MdcROOTGeo.cxx.
References m_NodeReplica.
Referenced by SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetPhysicalNode(), SetQuarterVisible(), and SetVolumeDefaultVis().
00364 { 00365 if (m_NodeReplica[layer][replica] != 0) { 00366 //std::cout << " replica " << layer << " " << replica << " found " << std::endl; 00367 return m_NodeReplica[layer][replica]; 00368 } 00369 else { 00370 std::cout << "Node: " << "Layer" << layer << "Replica" << replica << " not found" << std::endl; 00371 return 0; 00372 } 00373 }
int MdcROOTGeo::GetReplicaNb | ( | int | layer | ) | [inline] |
Get number of replicas on each layer;.
Definition at line 99 of file MdcROOTGeo.h.
References m_kReplica.
00099 { return m_kReplica[layer]; }
int MdcROOTGeo::GetReplicaNb | ( | int | layer | ) | [inline] |
Get number of replicas on each layer;.
Definition at line 67 of file MdcROOTGeo.h.
References m_kReplica.
00067 { return m_kReplica[layer]; }
TGeoNode* MdcROOTGeo::GetSegment | ( | int | segment, | |
int | no | |||
) |
Get segment node;.
TGeoNode * MdcROOTGeo::GetSegment | ( | int | segment, | |
int | no | |||
) |
Get segment node;.
Definition at line 320 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::GetNode(), and m_kLayer.
Referenced by SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
00321 { 00322 std::stringstream osname; 00323 if (segment == 1 || segment == 2) { 00324 osname << "pv_" << "logical" << "Mdc" << "Segment" << segment << "_" << m_kLayer + segment - 1; 00325 } 00326 else { 00327 osname << "pv_" << "logical" << "Mdc" << "Segment" << segment << "_" << m_kLayer + 2 + (segment - 3)*2 + no; 00328 } 00329 00330 return GetNode( osname.str() ); 00331 }
int MdcROOTGeo::GetSegmentNb | ( | ) | [inline] |
Get number of segments;.
Definition at line 93 of file MdcROOTGeo.h.
References m_kSegment.
00093 { return m_kSegment; }
int MdcROOTGeo::GetSegmentNb | ( | ) |
Get number of segments;.
Int_t MdcROOTGeo::GetSimuLayer | ( | Int_t | trueLayer | ) |
Trans trueLayer to simuLayer (0~42)->(0~49).
Definition at line 945 of file MdcROOTGeo.cxx.
Referenced by Draw(), Init2DGeometry(), and SetHits().
00946 { 00947 if (trueLayer < 36 || trueLayer >= m_kTrueLayer) return trueLayer; 00948 if (trueLayer >= 36) return (36 + 2*(trueLayer-36)); 00949 return trueLayer; 00950 }
virtual TGeoVolume* SubDetectorROOTGeo::GetTopVolume | ( | ) | [inline, virtual, inherited] |
Get the top(world) volume;.
Definition at line 52 of file SubDetectorROOTGeo.h.
References SubDetectorROOTGeo::m_TopVolume.
00052 { return m_TopVolume; }
TGeoVolume* SubDetectorROOTGeo::GetTopVolume | ( | ) | [inline, inherited] |
Get the top(world) volume;.
Definition at line 51 of file SubDetectorROOTGeo.h.
References SubDetectorROOTGeo::m_TopVolume.
Referenced by MucROOTGeo::Init2DGeometry(), TofROOTGeo::SetNode(), MucROOTGeo::SetNode(), SetNode(), and EmcROOTGeo::SetNode().
00051 { return m_TopVolume; }
TGeoVolume* MdcROOTGeo::GetVolumeLayer | ( | int | layer | ) |
Get layer volume;.
TGeoVolume * MdcROOTGeo::GetVolumeLayer | ( | int | layer | ) |
Get layer volume;.
Definition at line 268 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume(), m_kAxialLayerIn, m_kAxialLayerOut, m_kLayer, m_kStereoLayerIn, and m_kStereoLayerOut.
Referenced by BesGeometry::GetVolumeMdcLayer(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
00269 { 00270 std::stringstream osname; 00271 if (layer >= 0 && layer < m_kStereoLayerIn) { 00272 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer; 00273 } 00274 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) { 00275 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer; 00276 } 00277 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn && 00278 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) { 00279 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer; 00280 } 00281 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut && 00282 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) { 00283 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0"; 00284 } 00285 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut && 00286 layer < m_kLayer) { 00287 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1"; 00288 } 00289 00290 return GetLogicalVolume( osname.str() ); 00291 }
TGeoVolume* MdcROOTGeo::GetVolumeMdc | ( | ) | [inline] |
Get Mdc volume;.
Definition at line 105 of file MdcROOTGeo.h.
References m_Mdc.
00105 { return m_Mdc; }
TGeoVolume* MdcROOTGeo::GetVolumeMdc | ( | ) | [inline] |
Get Mdc volume;.
Definition at line 70 of file MdcROOTGeo.h.
References m_Mdc.
Referenced by BesEvent::ConstructMdcTrackFromRec(), BesGeometry::GetVolumeMdc(), Init2DGeometry(), and BesGeometry::InitFromGDML().
00070 { return m_Mdc; }
TGeoVolume* MdcROOTGeo::GetVolumeReplica | ( | int | layer | ) |
Get replica volume;.
TGeoVolume * MdcROOTGeo::GetVolumeReplica | ( | int | layer | ) |
Get replica volume;.
Definition at line 294 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume(), m_kAxialLayerIn, m_kAxialLayerOut, m_kLayer, m_kStereoLayerIn, and m_kStereoLayerOut.
Referenced by BesGeometry::GetVolumeMdcReplica(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
00295 { 00296 std::stringstream osname; 00297 if (layer >= 0 && layer < m_kStereoLayerIn) { 00298 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs"; 00299 } 00300 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) { 00301 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer << "Replica"; 00302 } 00303 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn && 00304 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) { 00305 osname << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs"; 00306 } 00307 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut && 00308 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) { 00309 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0" << "Replica"; 00310 } 00311 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut && 00312 layer < m_kLayer) { 00313 osname << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1" << "Replica"; 00314 } 00315 00316 return GetLogicalVolume( osname.str() ); 00317 }
TGeoVolume* MdcROOTGeo::GetVolumeSegment | ( | int | segment | ) |
Get segment volume;.
TGeoVolume * MdcROOTGeo::GetVolumeSegment | ( | int | segment | ) |
Get segment volume;.
Definition at line 260 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by BesGeometry::GetVolumeMdcSegment(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
00261 { 00262 std::stringstream osname; 00263 osname << "logical" << "Mdc" << "Segment" << segment; 00264 return GetLogicalVolume( osname.str() ); 00265 }
void MdcROOTGeo::Init2DGeometry | ( | ) |
Initialize 2D Geometry.
Definition at line 107 of file MdcROOTGeo.cxx.
References cos(), GetLayer(), GetPhysicalReplica(), GetSimuLayer(), GetVolumeMdc(), genRecEmupikp::i, ganga-rec::j, SubDetectorROOTGeo::m_2DGeoInit, m_kAxialLayerIn, m_kReplica, m_kStereoDir, m_kStereoLayerIn, m_kStereoLayerOut, m_Mdc2DWire, m_MdcXY, m_MdcXYSuper, m_MdcZR, SubDetectorROOTGeo::m_ROOTGeoInit, P(), BesCircle2D::SetNSegment(), and sin().
Referenced by BesGeometry::InitGeometry().
00108 { 00109 if (m_ROOTGeoInit != 1 && m_ROOTGeoInit != 2) { 00110 cout << "MdcROOTGeo::Init2DGeometry, ROOT Geometry not Initialized yet!" << endl; 00111 return; 00112 } 00113 m_2DGeoInit = 1; 00114 00115 Int_t mdcColor = 11; //1002; // 41, 29 00116 Int_t mdcLineColor = 15; 00117 Int_t mdcXYStyle = 1001;//3001; 00118 Int_t mdcZRStyle = 1001;//3007; 00119 00120 Int_t mdcStereoSuperColor = 38; 00121 Int_t mdcAxialSuperColor = 4; 00122 00123 Double_t local[3] = {0.0, 0.0, 0.0}; 00124 Double_t master[3] = {0.0, 0.0, 0.0}; 00125 //Int_t nPoints = 4; 00126 Double_t P[300] = {0.0}; 00127 Double_t center[3] = {0.0, 0.0, 0.0}; 00128 TString name; 00129 00130 //----------XY----------- 00131 // Mdc 00132 TGeoTube *mdcShape = (TGeoTube*)GetVolumeMdc()->GetShape(); 00133 m_MdcXY = new BesCircle2D("Mdc", "Mdc", mdcShape->GetRmin(), mdcShape->GetRmax(), ¢er[0]); 00134 m_MdcXY->SetNSegment(360); 00135 m_MdcXY->SetFillColor(mdcColor); 00136 m_MdcXY->SetFillStyle(mdcXYStyle); 00137 m_MdcXY->SetLineColor(mdcLineColor); 00138 00139 // Mdc Supers 00140 Int_t layerIn[4] = {0, 00141 m_kStereoLayerIn, 00142 m_kStereoLayerIn+m_kAxialLayerIn, 00143 m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut 00144 }; 00145 Int_t layerOut[4] = {m_kStereoLayerIn-1, 00146 m_kStereoLayerIn+m_kAxialLayerIn-1, 00147 m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut-1, 00148 m_kLayer-1 00149 }; 00150 for (Int_t i = 0; i < 4; i++) { 00151 TGeoTube *mdcSuperShapeIn = (TGeoTube*)(GetLayer(layerIn[i])->GetVolume())->GetShape(); 00152 TGeoTube *mdcSuperShapeOut = (TGeoTube*)(GetLayer(layerOut[i])->GetVolume())->GetShape(); 00153 name = TString("MdcSuper" + i); 00154 m_MdcXYSuper[i] = new BesCircle2D(name, name, mdcSuperShapeIn->GetRmin(), mdcSuperShapeOut->GetRmax(), ¢er[0]); 00155 if (i%2 == 0) m_MdcXYSuper[i]->SetFillColor(mdcStereoSuperColor); 00156 else m_MdcXYSuper[i]->SetFillColor(mdcAxialSuperColor); 00157 } 00158 00159 // Mdc Wires 00160 for (Int_t layer = 0; layer < m_kTrueLayer; layer++) { 00161 Int_t simuLayer = GetSimuLayer(layer); 00162 for (int replica = 0; replica < m_kReplica[simuLayer]; replica++) { 00163 //cout << "layer " << layer << " replica " << replica << endl; 00164 TGeoPhysicalNode *wirePhyNode = GetPhysicalReplica(simuLayer, replica); 00165 name = TString("Mdc Layer "); 00166 name += layer; 00167 name += " Wire "; 00168 name += replica; 00169 00170 if (m_kStereoDir[layer] != 0) { // stereo Layer 00171 TGeoArb8 *wireShape = (TGeoArb8*)wirePhyNode->GetShape(); 00172 Double_t *localArb8Point, masterArb8Point[24]; 00173 localArb8Point = wireShape->GetVertices(); 00174 for (Int_t i = 0; i < 8; i++) { 00175 local[0] = localArb8Point[2*i]; 00176 local[1] = localArb8Point[2*i+1]; 00177 if (i < 4) local[2] = wireShape->GetDz() * (-1.0); 00178 else local[2] = wireShape->GetDz(); 00179 00180 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel()) 00181 ->LocalToMaster(local, &master[0]); // transform to top 00182 for (Int_t j = 0; j < 3; j++) { 00183 masterArb8Point[3*i+j] = master[j]; 00184 } 00185 } 00186 00187 m_Mdc2DWire[layer][replica] = new Mdc2DWire(name, name, 8, &masterArb8Point[0]); 00188 00189 } 00190 else { // axial Layer 00191 00192 TGeoTubeSeg *wireShape = (TGeoTubeSeg*)wirePhyNode->GetShape(); 00193 00194 Double_t centerR = 0.5*(wireShape->GetRmin() + wireShape->GetRmax()); 00195 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut) 00196 centerR = wireShape->GetRmax(); 00197 Double_t centerPhi = 00198 0.5*(wireShape->GetPhi1() + wireShape->GetPhi2()) * TMath::DegToRad(); 00199 local[0] = centerR * cos(centerPhi); 00200 local[1] = centerR * sin(centerPhi); 00201 local[2] = 0.0; 00202 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel()) 00203 ->LocalToMaster(local, &master[0]); // transform to top 00204 00205 Double_t rmin = wireShape->GetRmin(); 00206 Double_t rmax = wireShape->GetRmax(); 00207 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut) 00208 rmax = rmin + 2*(rmax-rmin); 00209 m_Mdc2DWire[layer][replica] = 00210 new Mdc2DWire( name, name, rmin, rmax, wireShape->GetDz(),centerPhi, &master[0] ); 00211 } 00212 } 00213 } 00214 00215 //----------ZR----------- 00216 // Mdc 00217 Int_t iPoint = 0; 00218 TGeoTube *aMdcLayer = 0; 00219 00220 for (Int_t layer = 0; layer < m_kLayer; layer++) { 00221 aMdcLayer = (TGeoTube*)GetLayer(layer)->GetVolume()->GetShape(); 00222 P[3*iPoint] = 0.0; 00223 P[3*iPoint+1] = aMdcLayer->GetRmin(); 00224 P[3*iPoint+2] = aMdcLayer->GetDz(); 00225 iPoint++; 00226 } 00227 00228 P[3*iPoint] = 0.0; 00229 P[3*iPoint+1] = aMdcLayer->GetRmax(); 00230 P[3*iPoint+2] = aMdcLayer->GetDz(); 00231 iPoint++; 00232 P[3*iPoint] = 0.0; 00233 P[3*iPoint+1] = aMdcLayer->GetRmax(); 00234 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0); 00235 iPoint++; 00236 00237 for (Int_t layer = m_kLayer-1; layer >= 0; layer--) { 00238 aMdcLayer = (TGeoTube*)GetLayer(layer)->GetVolume()->GetShape(); 00239 P[3*iPoint] = 0.0; 00240 P[3*iPoint+1] = aMdcLayer->GetRmin(); 00241 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0); 00242 iPoint++; 00243 } 00244 00245 00246 m_MdcZR[0] = new BesPolygon2D("MdcZRUp", "MdcZRUp", iPoint, &P[0]); 00247 00248 for (Int_t i = 0; i < iPoint; i++) 00249 P[3*i+1] *= -1.0; 00250 00251 m_MdcZR[1] = new BesPolygon2D("MdcZRDown", "MdcZRDown", iPoint, &P[0]); 00252 00253 for (Int_t i = 0; i < 2; i++) { 00254 m_MdcZR[i]->SetFillColor(mdcColor); 00255 m_MdcZR[i]->SetFillStyle(mdcZRStyle); 00256 m_MdcZR[i]->SetLineColor(mdcLineColor); 00257 } 00258 }
void MdcROOTGeo::InitFromGDML | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) |
Initialize ROOTGeo from GDML.
Definition at line 90 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::m_ROOTGeoInit, SubDetectorROOTGeo::ReadGdml(), and SetNode().
Referenced by BesGeometry::InitFromGDML().
00091 { 00092 m_ROOTGeoInit = 2; 00093 ReadGdml(gdmlFile, setupName); 00094 SetNode(); 00095 }
void MdcROOTGeo::InitFromGdml | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) |
Initialize the instance of ROOTGeo.
Definition at line 55 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::m_ROOTGeoInit, SubDetectorROOTGeo::ReadGdml(), SetDefaultVis(), and SetNode().
00056 { 00057 ReadGdml(gdmlFile, setupName); 00058 SetNode(); 00059 SetDefaultVis(); 00060 00061 m_ROOTGeoInit = 1; 00062 }
void MdcROOTGeo::InitFromROOT | ( | TGeoVolume * | vol | ) |
Initialize ROOTGeo from TGeoVolume logicalMdc.
Definition at line 98 of file MdcROOTGeo.cxx.
References SubDetectorROOTGeo::m_ROOTGeoInit, SetNode(), and SetVolumeMdc().
Referenced by BesGeometry::InitFromROOT().
00099 { 00100 m_ROOTGeoInit = 1; 00101 00102 SetVolumeMdc(vol); 00103 SetNode(); 00104 }
Bool_t MdcROOTGeo::IsHit | ( | Int_t | layer, | |
Int_t | wire | |||
) |
Judge whether the digiCol contains (layer, wire).
Definition at line 953 of file MdcROOTGeo.cxx.
References genRecEmupikp::i, MdcID::layer(), m_MdcDigiCol, and MdcID::wire().
00954 { 00955 if (m_MdcDigiCol) { 00956 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) { 00957 Identifier mdcID( ((TMdcDigi*)m_MdcDigiCol->At(i))->getIntId() ); 00958 if (layer == MdcID::layer( mdcID ) && wire == MdcID::wire( mdcID )) { 00959 return kTRUE; 00960 } 00961 } 00962 } 00963 00964 return kFALSE; 00965 }
virtual int SubDetectorROOTGeo::IsInitialized | ( | ) | [inline, virtual, inherited] |
If the ROOT geometry of this subdetctor is initialized;.
Definition at line 43 of file SubDetectorROOTGeo.h.
References SubDetectorROOTGeo::m_ROOTGeoInit.
00043 { return m_ROOTGeoInit; }
int SubDetectorROOTGeo::IsInitialized | ( | ) | [inline, inherited] |
If the ROOT geometry of this subdetctor is initialized;.
Definition at line 42 of file SubDetectorROOTGeo.h.
References SubDetectorROOTGeo::m_ROOTGeoInit.
00042 { return m_ROOTGeoInit; }
virtual void SubDetectorROOTGeo::ReadGdml | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) | [virtual, inherited] |
Initialize the instance of ROOTGeo.
void SubDetectorROOTGeo::ReadGdml | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) | [inherited] |
Initialize the instance of ROOTGeo.
Definition at line 31 of file SubDetectorROOTGeo.cxx.
References SubDetectorROOTGeo::m_config, SubDetectorROOTGeo::m_sxp, and SubDetectorROOTGeo::m_TopVolume.
Referenced by TofROOTGeo::InitFromGDML(), TofROOTGeo::InitFromGdml(), MucROOTGeo::InitFromGDML(), MucROOTGeo::InitFromGdml(), InitFromGDML(), InitFromGdml(), EmcROOTGeo::InitFromGDML(), and EmcROOTGeo::InitFromGdml().
00032 { 00033 m_config.SetURI( gdmlFile ); 00034 m_config.SetSetupName( setupName ); 00035 m_config.SetType ( "ROOT" ); 00036 00037 m_sxp.Configure( &m_config ); 00038 m_sxp.Initialize(); 00039 m_sxp.Run(); 00040 00041 m_TopVolume = (TGeoVolume*)TGDMLProcessor::GetInstance()->GetWorldVolume(); 00042 if (!m_TopVolume) std::cout << "Top Volume not found " << std::endl; 00043 }
void MdcROOTGeo::SetAllVisible | ( | ) |
Set all visible;.
void MdcROOTGeo::SetAllVisible | ( | ) |
Set all visible;.
Definition at line 170 of file MdcROOTGeo.cxx.
References GetLayer(), GetReplica(), GetSegment(), GetVolumeLayer(), GetVolumeReplica(), GetVolumeSegment(), m_kLayer, m_kReplica, and m_kSegment.
Referenced by BesGeometry::SetDefaultVis().
00171 { 00172 for (int segment = 1; segment <= m_kSegment; segment++) { 00173 GetVolumeSegment(segment)->SetVisibility(0); 00174 } 00175 00176 for (int layer = 0; layer < m_kLayer; layer++) { 00177 GetVolumeLayer(layer)->SetVisibility(1); 00178 GetVolumeReplica(layer)->SetVisibility(0); 00179 } 00180 00181 for (int segment = 1; segment <= m_kSegment; segment++) { 00182 for (int no = 0; no < 2; no++) { 00183 GetSegment(segment, no)->SetVisibility(1); 00184 } 00185 } 00186 00187 for (int layer = 0; layer < m_kLayer; layer++) { 00188 GetLayer(layer)->SetVisibility(1); 00189 for (int replica = 0; replica < m_kReplica[layer]; replica++) { 00190 GetReplica(layer, replica)->SetVisibility(0); 00191 } 00192 } 00193 }
virtual void SubDetectorROOTGeo::SetChildNo | ( | int | childNo | ) | [inline, virtual, inherited] |
Definition at line 46 of file SubDetectorROOTGeo.h.
References SubDetectorROOTGeo::m_childNo.
00046 { m_childNo = childNo; }
void SubDetectorROOTGeo::SetChildNo | ( | int | childNo | ) | [inline, inherited] |
Definition at line 45 of file SubDetectorROOTGeo.h.
References SubDetectorROOTGeo::m_childNo.
Referenced by BesGeometry::InitFromGDML(), BesGeometry::InitFromROOT(), MucGeoGeneral::InitFromXML(), and EmcROOTGeo::SetPhysicalNode().
00045 { m_childNo = childNo; }
void MdcROOTGeo::SetColorfulWire | ( | Bool_t | input | ) |
Definition at line 757 of file MdcROOTGeo.cxx.
References k_ColorfulWire.
Referenced by BesClient::SetMdcColorfulWire().
00757 { 00758 k_ColorfulWire = input; 00759 }
void MdcROOTGeo::SetDefaultVis | ( | ) |
Set default visual attributes;.
Definition at line 120 of file MdcROOTGeo.cxx.
References GetLayer(), GetReplica(), GetSegment(), GetVolumeLayer(), GetVolumeReplica(), GetVolumeSegment(), m_kAxialLayerIn, m_kLayer, m_kReplica, m_kSegment, m_kStereoLayerIn, m_kStereoLayerOut, and m_Mdc.
Referenced by InitFromGdml().
00121 { 00122 //std::cout << "begin of set defaultvis" << std::endl; 00123 int mdcColor = 3; 00124 int segmentColor = 0; 00125 int hypeColor = 3; 00126 int tubeColor = 4; 00127 int twistedTubsColor = 3; 00128 int replicaColor = 4; 00129 00130 m_Mdc->SetLineColor(mdcColor); 00131 m_Mdc->SetVisibility(0); 00132 00133 for (int segment = 1; segment <= m_kSegment; segment++) { 00134 GetVolumeSegment(segment)->SetLineColor(segmentColor); 00135 GetVolumeSegment(segment)->SetVisibility(0); 00136 } 00137 00138 for (int layer =0; layer < m_kLayer; layer++) { 00139 if ( (layer >= 0 && layer < m_kStereoLayerIn) || 00140 (layer >= m_kStereoLayerIn + m_kAxialLayerIn && 00141 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) { 00142 GetVolumeLayer(layer)->SetLineColor(hypeColor); 00143 GetVolumeReplica(layer)->SetLineColor(twistedTubsColor); 00144 } 00145 else { 00146 GetVolumeLayer(layer)->SetLineColor(tubeColor); 00147 GetVolumeReplica(layer)->SetLineColor(replicaColor); 00148 } 00149 GetVolumeLayer(layer)->SetVisibility(0); 00150 GetVolumeReplica(layer)->SetVisibility(1); 00151 } 00152 00153 for (int segment = 1; segment <= m_kSegment; segment++) { 00154 for (int no = 0; no < 2; no++) { 00155 GetSegment(segment, no)->SetVisibility(0); 00156 } 00157 } 00158 00159 for (int layer = 0; layer < m_kLayer; layer++) { 00160 GetLayer(layer)->SetVisibility(0); 00161 for (int replica = 0; replica < m_kReplica[layer]; replica++) { 00162 GetReplica(layer, replica)->SetVisibility(0); 00163 } 00164 } 00165 00166 //std::cout << "end of set defaultvis" << std::endl; 00167 }
void MdcROOTGeo::SetDetector | ( | ) |
Draw Detecor (what is detector depends on you).
Definition at line 568 of file MdcROOTGeo.cxx.
References BesView::GetVisFull3DMdc(), SubDetectorROOTGeo::m_DetectorsArray, and m_PhysicalSegment.
Referenced by BesClient::HandleViewOptionMenu().
00569 { 00570 BesView *view = 0; 00571 if (gPad) view = (BesView*)gPad->GetView(); 00572 //if (view) cout << "viewVisFull3DMdc " << view->GetVisFull3DMdc() << endl; 00573 00574 m_DetectorsArray->Clear(); 00575 for (int segment = 0; segment < 2*m_kSegment-2; segment++) { 00576 TGeoPhysicalNode *phyNode = 0; 00577 phyNode = m_PhysicalSegment[segment]; 00578 //cout << m_PhysicalSegment[segment]->GetName() << endl; 00579 if (phyNode) { 00580 phyNode->SetVisibility(0); // set all invisible before set any visible 00581 if ( (segment >= 2 && segment <= 3) || segment > 59) { 00582 m_DetectorsArray->Add( phyNode ); 00583 } 00584 else if (view && view->GetVisFull3DMdc()) { 00585 m_DetectorsArray->Add( phyNode ); 00586 } 00587 } 00588 } 00589 /* 00590 for (int part = 0; part < m_kPart; part++) { 00591 int nPhi = (part == 1 ? m_kPhiBr : m_kPhiEc); 00592 for (int phi = 0; phi < nPhi; phi++) { 00593 int nTheta = (part == 1 ? m_kThetaBr : m_kThetaEc); 00594 for (int theta = 0; theta < nTheta; theta++) { 00595 // This is you detector, set it on 00596 if ( (part == 1 && theta != 0 && theta != 43 && ((phi != 0 && phi != 60) || theta%2 == 0)) || 00597 (part != 1 && theta != 0) ) { 00598 m_PhysicalCrystal[part][phi][theta]->SetVisibility(0); 00599 } 00600 00601 // This is you hit 00602 // when you are to set fired hits to another color, say red, 00603 // SetIsVolAtt(kFALSE) and to then SetLineColor(kRed); 00604 if (phi == 12 && theta == 5) { 00605 m_PhysicalCrystal[part][phi][theta]->SetVisibility(1); 00606 m_PhysicalCrystal[part][phi][theta]->SetLineColor(2); 00607 } 00608 } 00609 } 00610 } 00611 std::cout << "end of set detector on" << std::endl; 00612 */ 00613 }
void SubDetectorROOTGeo::SetDetectorOn | ( | ) | [virtual, inherited] |
Set all physicalNodes in m_DeteorsArray visible;.
Definition at line 73 of file SubDetectorROOTGeo.cxx.
References genRecEmupikp::i, and SubDetectorROOTGeo::m_DetectorsArray.
00074 { 00075 for (Int_t i = 0; i < m_DetectorsArray->GetEntries(); i++) { 00076 TGeoPhysicalNode *pNode = (TGeoPhysicalNode*)m_DetectorsArray->At(i); 00077 if (pNode) pNode->SetVisibility(1); 00078 } 00079 }
void MdcROOTGeo::SetHalfVisible | ( | ) |
Set half visible;.
Definition at line 474 of file MdcROOTGeo.cxx.
References GetLayer(), GetReplica(), GetSegment(), GetVolumeLayer(), GetVolumeReplica(), GetVolumeSegment(), and m_kSegment.
00475 { 00476 for (int segment = 1; segment <= m_kSegment; segment++) { 00477 GetVolumeSegment(segment)->SetVisibility(0); 00478 } 00479 00480 for (int layer = 0; layer < m_kLayer; layer++) { 00481 GetVolumeLayer(layer)->SetVisibility(0); 00482 GetVolumeReplica(layer)->SetVisibility(1); 00483 } 00484 00485 for (int segment = 1; segment <= m_kSegment; segment++) { 00486 for (int no = 0; no < 2; no++) { 00487 GetSegment(segment, no)->SetVisibility(0); 00488 } 00489 } 00490 00491 for (int layer = 0; layer < m_kLayer; layer++) { 00492 GetLayer(layer)->SetVisibility(0); 00493 for (int replica = 0; replica < m_kReplica[layer]; replica++) { 00494 if (replica < m_kReplica[layer]/4 || 00495 replica > m_kReplica[layer]*3/4 ) GetReplica(layer, replica)->SetVisibility(1); 00496 else GetReplica(layer, replica)->SetVisibility(0); 00497 } 00498 } 00499 }
void MdcROOTGeo::SetHits | ( | ) |
Set all physicalNodes corresponding to digiCol;.
Definition at line 616 of file MdcROOTGeo.cxx.
References Mdc2DWire::AddInfo(), Mdc2DWire::ClearInfo(), Mdc2DWire::CloseInfo(), BesEventHeader::GetEvTime(), BesEvent::GetHeader(), BesEvent::GetMdcDigiCol(), GetPhysicalReplica(), GetSimuLayer(), gEvent, genRecEmupikp::i, MdcID::layer(), SubDetectorROOTGeo::m_2DHitsArray, SubDetectorROOTGeo::m_HitsArray, m_Mdc2DWire, m_MdcDigiCol, RawDataUtil::MdcCharge(), RawDataUtil::MdcTime(), Mdc2DWire::SetCharge(), Mdc2DWire::SetEvTime(), Mdc2DWire::SetQOverflow(), Mdc2DWire::SetTime(), and MdcID::wire().
Referenced by BesEvent::SetHits().
00617 { 00618 // set previous event hits to default vis 00619 cout << "m_HitsArray size(): " << m_HitsArray->GetEntries() << endl; 00620 cout << "m_2DHitsArray size(): " << m_2DHitsArray->GetEntries() << endl; 00621 for (int i = 0; i < m_HitsArray->GetEntries(); i++) { 00622 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i); 00623 phyNode->SetVisibility(0); 00624 } 00625 m_HitsArray->Clear("C"); 00626 00627 // set previous event 2D hits info to default 00628 for (int i = 0; i < m_2DHitsArray->GetEntries(); i++) { 00629 Mdc2DWire *aWire = (Mdc2DWire*)m_2DHitsArray->At(i); 00630 aWire->ClearInfo(); 00631 aWire->AddInfo(aWire->GetTitle()); 00632 aWire->CloseInfo(); 00633 } 00634 m_2DHitsArray->Clear("C"); 00635 00636 // set new hits 00637 if (gEvent) m_MdcDigiCol = gEvent->GetMdcDigiCol(); 00638 00639 for (int i = 0; i < m_MdcDigiCol->GetEntries(); i++) { 00640 TMdcDigi *aMdcDigi = (TMdcDigi*)m_MdcDigiCol->At(i); 00641 Identifier aMdcID( aMdcDigi->getIntId() ); 00642 int layer = MdcID::layer( aMdcID ); 00643 int wire = MdcID::wire( aMdcID ); 00644 00645 Double_t time = RawDataUtil::MdcTime(aMdcDigi->getTimeChannel()); 00646 Int_t charge = RawDataUtil::MdcCharge(aMdcDigi->getChargeChannel()); 00647 00648 TGeoPhysicalNode *phyNode = 0; 00649 if (layer < 36) { // number of layers in the three inner 00650 phyNode = GetPhysicalReplica(layer, wire); 00651 if (phyNode) m_HitsArray->Add( phyNode ); 00652 } 00653 else { 00654 phyNode = GetPhysicalReplica( GetSimuLayer(layer), wire ); 00655 if (phyNode) m_HitsArray->Add( phyNode ); 00656 phyNode = GetPhysicalReplica( GetSimuLayer(layer)+1, wire); 00657 if (phyNode) m_HitsArray->Add( phyNode ); 00658 } 00659 00660 Mdc2DWire *aWire = 0; 00661 aWire = m_Mdc2DWire[layer][wire]; 00662 if (aWire) { 00663 aWire->ClearInfo(); 00664 aWire->AddInfo(aWire->GetTitle()); 00665 double evTime = gEvent->GetHeader().GetEvTime(); 00666 00667 char data[100]; 00668 if(time>1000000) { 00669 sprintf(data, "NO time"); 00670 }else{ 00671 sprintf(data, "time=%-.1f ns", time); 00672 if(fabs(evTime)>0.0001){ 00673 sprintf(data, "%s, Tdrift(Raw)=%-.1f ns", data, time - evTime +230); 00674 } 00675 } 00676 if(charge>1000000) { 00677 sprintf(data, "%s, NO charge", data); 00678 }else{ 00679 sprintf(data, "%s, charge=%d", data,charge); 00680 } 00681 aWire->AddInfo( TString(data) ); 00682 sprintf(data, "Fired"); 00683 aWire->AddInfo( TString(data) ); 00684 00685 aWire->SetTime(time);//yzhang 00686 aWire->SetCharge(charge);//yzhang 00687 unsigned int overflow = aMdcDigi->getOverflow(); 00688 aWire->SetQOverflow(overflow&2);//yzhang 00689 aWire->SetEvTime(evTime); 00690 00691 aWire->CloseInfo(); 00692 00693 m_2DHitsArray->Add(aWire); 00694 } 00695 00696 } 00697 }
void MdcROOTGeo::SetMdcTimeSubEvTime | ( | Bool_t | input | ) |
Definition at line 762 of file MdcROOTGeo.cxx.
References k_MdcTimeSubEvTime.
Referenced by BesClient::SetMdcTimeSubEvTime().
00762 { 00763 k_MdcTimeSubEvTime = input; 00764 }
void MdcROOTGeo::SetNode | ( | ) |
Set the pointers to theirs nodes;.
void MdcROOTGeo::SetNode | ( | ) |
Set the pointers to theirs nodes;.
Definition at line 65 of file MdcROOTGeo.cxx.
References CorrectReplica(), SubDetectorROOTGeo::GetNode(), SubDetectorROOTGeo::GetTopVolume(), m_kAxialLayerIn, m_kAxialLayerOut, m_kLayer, m_kReplica, m_kStereoLayerIn, m_kStereoLayerOut, m_Mdc, and m_NodeReplica.
Referenced by InitFromGDML(), InitFromGdml(), and InitFromROOT().
00066 { 00067 m_Mdc = GetTopVolume(); 00068 if(!m_Mdc) std::cout << "m_Mdc = 0" << std::endl; 00069 00070 for (int layer = 0; layer < m_kLayer; layer++) { 00071 //std::cout << "Layer " << layer << std::endl; 00072 for (int replica = 0; replica < m_kReplica[layer]; replica++) { 00073 std::stringstream osname; 00074 int rep = replica; 00075 if (layer >= 0 && layer < m_kStereoLayerIn) { 00076 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs" << "_" << rep; 00077 } 00078 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) { 00079 rep = CorrectReplica(layer, rep); 00080 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "Replica" << "_" << rep; 00081 } 00082 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn && 00083 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) { 00084 osname << "pv_" << "logical" << "Mdc" << "Stereo" << "Layer" << layer << "TwistedTubs" << "_" << rep; 00085 } 00086 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut && 00087 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) { 00088 rep = CorrectReplica(layer, rep); 00089 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer << "_0" << "Replica" << "_" << rep; 00090 } 00091 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut && 00092 layer < m_kLayer) { 00093 rep = CorrectReplica(layer, rep); 00094 osname << "pv_" << "logical" << "Mdc" << "Axial" << "Layer" << layer - m_kAxialLayerOut << "_1" << "Replica" << "_" << rep; 00095 } 00096 00097 m_NodeReplica[layer][replica] = GetNode( osname.str() ); 00098 } 00099 } 00100 }
void MdcROOTGeo::SetPhysicalNode | ( | ) |
Set the pointers to the physical nodes;.
void MdcROOTGeo::SetPhysicalNode | ( | ) |
Set the pointers to the physical nodes;.
Definition at line 223 of file MdcROOTGeo.cxx.
References GetLayer(), GetReplica(), SubDetectorROOTGeo::m_childNo, m_kAxialLayerIn, m_kLayer, m_kReplica, m_kStereoLayerIn, m_kStereoLayerOut, m_PhysicalReplica, and mdc.
Referenced by BesGeometry::InitGeometry().
00224 { 00225 int twistedTubsColor = 3; 00226 int replicaColor = 4; 00227 00228 if (gGeoManager == 0) std::cout << "Create gGeoManager first" << std::endl; 00229 TGeoNode *bes = gGeoManager->GetTopNode(); 00230 //std::cout << "m_childNo " << m_childNo << std::endl; 00231 TGeoNode *mdc = bes->GetDaughter(m_childNo); 00232 00233 //if(!m_Mdc) std::cout << "m_Mdc = 0" << std::endl; 00234 00235 for (int layer = 0; layer < m_kLayer; layer++) { 00236 TGeoNode *nodeLayer = GetLayer(layer); 00237 //std::cout << "Layer " << layer << std::endl; 00238 for (int replica = 0; replica < m_kReplica[layer]; replica++) { 00239 TGeoNode *nodeReplica = GetReplica(layer, replica); 00240 m_PhysicalReplica[layer][replica] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() + 00241 TString("/") + mdc->GetName() + 00242 TString("/") + nodeLayer->GetName() + 00243 TString("/") + nodeReplica->GetName()); 00244 m_PhysicalReplica[layer][replica]->SetVisibility(0); 00245 m_PhysicalReplica[layer][replica]->SetIsVolAtt(kFALSE); 00246 if ( (layer >= 0 && layer < m_kStereoLayerIn) || 00247 (layer >= m_kStereoLayerIn + m_kAxialLayerIn && 00248 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) { 00249 m_PhysicalReplica[layer][replica]->SetLineColor(twistedTubsColor); 00250 } 00251 else { 00252 m_PhysicalReplica[layer][replica]->SetLineColor(replicaColor); 00253 } 00254 //if (m_PhysicalReplica[layer][replica]->IsVolAttributes()) std::cout << "yes " << std::endl; 00255 } 00256 } 00257 }
void MdcROOTGeo::SetQFire | ( | Bool_t | input | ) |
Definition at line 751 of file MdcROOTGeo.cxx.
References k_QFire.
Referenced by BesClient::SetMdcQFire().
00751 { 00752 k_QFire = input; 00753 //cout << "Mdc ROOT Geometry ADC Match: " << k_QMatch << endl; 00754 }
void MdcROOTGeo::SetQNotOverflow | ( | Bool_t | input | ) |
Definition at line 745 of file MdcROOTGeo.cxx.
References k_QNotOverflow.
Referenced by BesClient::SetMdcQNotOverflow().
00745 { 00746 k_QNotOverflow = input; 00747 //cout << "Mdc ROOT Geometry TDC Match: " << k_TMatch << endl; 00748 }
void MdcROOTGeo::SetQuarterVisible | ( | ) |
Set quater visible;.
void MdcROOTGeo::SetQuarterVisible | ( | ) |
Set quater visible;.
Definition at line 196 of file MdcROOTGeo.cxx.
References GetLayer(), GetReplica(), GetSegment(), GetVolumeLayer(), GetVolumeReplica(), GetVolumeSegment(), m_kLayer, m_kReplica, and m_kSegment.
00197 { 00198 for (int segment = 1; segment <= m_kSegment; segment++) { 00199 GetVolumeSegment(segment)->SetVisibility(0); 00200 } 00201 00202 for (int layer = 0; layer < m_kLayer; layer++) { 00203 GetVolumeLayer(layer)->SetVisibility(0); 00204 GetVolumeReplica(layer)->SetVisibility(1); 00205 } 00206 00207 for (int segment = 1; segment <= m_kSegment; segment++) { 00208 for (int no = 0; no < 2; no++) { 00209 GetSegment(segment, no)->SetVisibility(0); 00210 } 00211 } 00212 00213 for (int layer = 0; layer < m_kLayer; layer++) { 00214 GetLayer(layer)->SetVisibility(0); 00215 for (int replica = 0; replica < m_kReplica[layer]; replica++) { 00216 if (replica < m_kReplica[layer]/4) GetReplica(layer, replica)->SetVisibility(0); 00217 else GetReplica(layer, replica)->SetVisibility(1); 00218 } 00219 } 00220 }
void MdcROOTGeo::SetTFire | ( | Bool_t | input | ) |
Definition at line 733 of file MdcROOTGeo.cxx.
References k_TFire.
Referenced by BesClient::SetMdcTFire().
00733 { 00734 k_TFire= input; 00735 //cout << "Mdc ROOT Geometry TDC Match: " << k_TMatch << endl; 00736 }
void MdcROOTGeo::SetVisMdcDetector | ( | ) |
Set Mdc default detector visibility;.
Definition at line 700 of file MdcROOTGeo.cxx.
References BesView::GetVisMdcGlobal(), genRecEmupikp::i, and SubDetectorROOTGeo::m_DetectorsArray.
Referenced by BesClient::HandleViewOptionMenu().
00701 { 00702 BesView *view = 0; 00703 if (gPad) view = (BesView*)gPad->GetView(); 00704 00705 for (int i = 0; i < m_DetectorsArray->GetEntries(); i++) { 00706 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_DetectorsArray->At(i); 00707 if (view && view->GetVisMdcGlobal()) { 00708 phyNode->SetVisibility(1); 00709 continue; 00710 } 00711 phyNode->SetVisibility(0); 00712 } 00713 }
void MdcROOTGeo::SetVisMdcHits | ( | ) |
Set Mdc hits visibility;.
Definition at line 716 of file MdcROOTGeo.cxx.
References BesView::GetVisMdcHitsGlobal(), genRecEmupikp::i, and SubDetectorROOTGeo::m_HitsArray.
00717 { 00718 BesView *view = 0; 00719 if (gPad) view = (BesView*)gPad->GetView(); 00720 00721 for (int i = 0; i < m_HitsArray->GetEntries(); i++) { 00722 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i); 00723 if (view && view->GetVisMdcHitsGlobal()) { 00724 phyNode->SetVisibility(1); 00725 } 00726 else { 00727 phyNode->SetVisibility(0); 00728 } 00729 } 00730 }
void MdcROOTGeo::SetVolumeDefaultVis | ( | ) |
Set default visual attributes;.
Definition at line 358 of file MdcROOTGeo.cxx.
References GetLayer(), GetReplica(), GetSegment(), GetVolumeLayer(), GetVolumeReplica(), GetVolumeSegment(), m_hypeColor, m_kAxialLayerIn, m_kSegment, m_kStereoLayerIn, m_kStereoLayerOut, m_Mdc, m_MdcColor, m_replicaColor, m_segmentColor, m_tubeColor, and m_twistedTubsColor.
00359 { 00360 //std::cout << "begin of set defaultvis" << std::endl; 00361 m_Mdc->SetLineColor(m_MdcColor); 00362 m_Mdc->SetVisibility(0); 00363 00364 for (int segment = 1; segment <= m_kSegment; segment++) { 00365 GetVolumeSegment(segment)->SetLineColor(m_segmentColor); 00366 //if (segment > 3) GetVolumeSegment(segment)->SetVisibility(0); 00367 GetVolumeSegment(segment)->SetVisibility(1); 00368 } 00369 00370 for (int layer =0; layer < m_kLayer; layer++) { 00371 if ( (layer >= 0 && layer < m_kStereoLayerIn) || 00372 (layer >= m_kStereoLayerIn + m_kAxialLayerIn && 00373 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) { 00374 GetVolumeLayer(layer)->SetLineColor(m_hypeColor); 00375 GetVolumeReplica(layer)->SetLineColor(m_twistedTubsColor); 00376 } 00377 else { 00378 GetVolumeLayer(layer)->SetLineColor(m_tubeColor); 00379 GetVolumeReplica(layer)->SetLineColor(m_replicaColor); 00380 } 00381 GetVolumeLayer(layer)->SetVisibility(0); 00382 GetVolumeReplica(layer)->SetVisibility(1); 00383 } 00384 00385 for (int segment = 1; segment <= m_kSegment; segment++) { 00386 for (int no = 0; no < 2; no++) { 00387 GetSegment(segment, no)->SetVisibility(0); 00388 } 00389 } 00390 00391 for (int layer = 0; layer < m_kLayer; layer++) { 00392 GetLayer(layer)->SetVisibility(0); 00393 for (int replica = 0; replica < m_kReplica[layer]; replica++) { 00394 GetReplica(layer, replica)->SetVisibility(0); 00395 } 00396 } 00397 00398 //std::cout << "end of set defaultvis" << std::endl; 00399 }
void MdcROOTGeo::SetVolumeMdc | ( | TGeoVolume * | vol | ) | [inline] |
Set Mdc volume, while initializing from ROOT;.
Definition at line 102 of file MdcROOTGeo.h.
References m_Mdc.
Referenced by InitFromROOT().
00102 { m_Mdc = vol; }
Bool_t MdcROOTGeo::k_ColorfulWire [private] |
Bool_t MdcROOTGeo::k_MdcTimeSubEvTime [private] |
Bool_t MdcROOTGeo::k_QFire [private] |
Bool_t MdcROOTGeo::k_QNotOverflow [private] |
Bool_t MdcROOTGeo::k_TFire [private] |
int SubDetectorROOTGeo::m_2DGeoInit [protected, inherited] |
Definition at line 79 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::Draw(), MucROOTGeo::Draw(), Draw(), EmcROOTGeo::Draw(), TofROOTGeo::Init2DGeometry(), MucROOTGeo::Init2DGeometry(), Init2DGeometry(), and EmcROOTGeo::Init2DGeometry().
TObjArray* SubDetectorROOTGeo::m_2DHitsArray [protected, inherited] |
Definition at line 85 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::SetHits(), MucROOTGeo::SetHits(), SetHits(), and EmcROOTGeo::SetHits().
int SubDetectorROOTGeo::m_childNo [protected, inherited] |
Definition at line 67 of file SubDetectorROOTGeo.h.
Referenced by SubDetectorROOTGeo::SetChildNo(), TofROOTGeo::SetPhysicalNode(), MucROOTGeo::SetPhysicalNode(), and SetPhysicalNode().
std::map<int ,int> MdcROOTGeo::m_CorrectMap [private] |
Definition at line 178 of file MdcROOTGeo.h.
std::map<int ,int> MdcROOTGeo::m_CorrectMap [private] |
TObjArray* SubDetectorROOTGeo::m_DetectorsArray [protected, inherited] |
Definition at line 83 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::SetDetector(), MucROOTGeo::SetDetector(), SetDetector(), EmcROOTGeo::SetDetector(), SubDetectorROOTGeo::SetDetectorOn(), EmcROOTGeo::SetVisEmcDetector(), SetVisMdcDetector(), MucROOTGeo::SetVisMucDetector(), and TofROOTGeo::SetVisTofDetector().
TObjArray* SubDetectorROOTGeo::m_HitsArray [protected, inherited] |
Definition at line 84 of file SubDetectorROOTGeo.h.
Referenced by SubDetectorROOTGeo::GetHit(), SubDetectorROOTGeo::GetHitsNum(), TofROOTGeo::SetHits(), MucROOTGeo::SetHits(), SetHits(), EmcROOTGeo::SetHits(), EmcROOTGeo::SetVisEmcHits(), SetVisMdcHits(), MucROOTGeo::SetVisMucHits(), and TofROOTGeo::SetVisTofHits().
int MdcROOTGeo::m_hypeColor [private] |
static const int MdcROOTGeo::m_kAxialLayerIn = 12 [static, private] |
Definition at line 97 of file MdcROOTGeo.h.
Referenced by CorrectReplica(), GetLayer(), GetVolumeLayer(), GetVolumeReplica(), Init2DGeometry(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetVolumeDefaultVis().
static const int MdcROOTGeo::m_kAxialLayerOut = 7 [static, private] |
Definition at line 99 of file MdcROOTGeo.h.
Referenced by CorrectReplica(), GetLayer(), GetVolumeLayer(), GetVolumeReplica(), and SetNode().
static const int MdcROOTGeo::m_kCorrectLayer = 10 [static, private] |
const int MdcROOTGeo::m_kiCorrectLayer = {9, 11, 13, 15, 17, 19, 36, 38, 40, 42} [static, private] |
const int MdcROOTGeo::m_kiCorrectReplica = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} [static, private] |
static const int MdcROOTGeo::m_kLayer = 50 [static, private] |
Definition at line 100 of file MdcROOTGeo.h.
Referenced by GetLayer(), GetLayerNb(), GetSegment(), GetVolumeLayer(), GetVolumeReplica(), MdcROOTGeo(), SetAllVisible(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetQuarterVisible().
const int MdcROOTGeo::m_kReplica [static, private] |
Initial value:
{ 40, 44, 48, 56, 64, 72, 80, 80, 76, 76, 88, 88, 100, 100, 112, 112, 128, 128, 140, 140, 160, 160, 160, 160, 192, 192, 192, 192, 208, 208, 208, 208, 240, 240, 240, 240, 256, 256, 256, 256, 288, 288, 288, 256, 256, 256, 256, 288, 288, 288 }
Definition at line 102 of file MdcROOTGeo.h.
Referenced by CorrectReplica(), GetReplicaNb(), Init2DGeometry(), SetAllVisible(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetQuarterVisible().
static const int MdcROOTGeo::m_kReplicaMax = 288 [static, private] |
static const int MdcROOTGeo::m_kSegment = 66 [static, private] |
Definition at line 95 of file MdcROOTGeo.h.
Referenced by GetSegmentNb(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
const int MdcROOTGeo::m_kStereoDir [static, private] |
Initial value:
{ 1, 1, 1, 1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0 }
Definition at line 157 of file MdcROOTGeo.h.
Referenced by Draw(), and Init2DGeometry().
static const int MdcROOTGeo::m_kStereoLayerIn = 8 [static, private] |
Definition at line 96 of file MdcROOTGeo.h.
Referenced by CorrectReplica(), GetLayer(), GetVolumeLayer(), GetVolumeReplica(), Init2DGeometry(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetVolumeDefaultVis().
static const int MdcROOTGeo::m_kStereoLayerOut = 16 [static, private] |
Definition at line 98 of file MdcROOTGeo.h.
Referenced by CorrectReplica(), GetLayer(), GetVolumeLayer(), GetVolumeReplica(), Init2DGeometry(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetVolumeDefaultVis().
const int MdcROOTGeo::m_kTrueLayer = 43 [static, private] |
Definition at line 154 of file MdcROOTGeo.h.
TGeoVolume* MdcROOTGeo::m_Mdc [private] |
Definition at line 181 of file MdcROOTGeo.h.
TGeoVolume* MdcROOTGeo::m_Mdc [private] |
Definition at line 110 of file MdcROOTGeo.h.
Referenced by GetVolumeMdc(), SetDefaultVis(), SetNode(), SetVolumeDefaultVis(), and SetVolumeMdc().
Mdc2DWire* MdcROOTGeo::m_Mdc2DWire[m_kTrueLayer][m_kReplicaMax] [private] |
Definition at line 192 of file MdcROOTGeo.h.
Referenced by Draw(), DrawHits(), Get2DWire(), Init2DGeometry(), and SetHits().
int MdcROOTGeo::m_MdcColor [private] |
const TObjArray* MdcROOTGeo::m_MdcDigiCol [private] |
BesCircle2D* MdcROOTGeo::m_MdcXY [private] |
BesCircle2D* MdcROOTGeo::m_MdcXYSuper[4] [private] |
BesPolygon2D* MdcROOTGeo::m_MdcZR[2] [private] |
TGeoNode* MdcROOTGeo::m_NodeLayer[m_kLayer] [private] |
Definition at line 182 of file MdcROOTGeo.h.
TGeoNode* MdcROOTGeo::m_NodeReplica[m_kLayer][m_kReplicaMax] [private] |
Definition at line 183 of file MdcROOTGeo.h.
TGeoNode* MdcROOTGeo::m_NodeReplica[m_kLayer][m_kReplicaMax] [private] |
Definition at line 111 of file MdcROOTGeo.h.
Referenced by GetReplica(), MdcROOTGeo(), and SetNode().
TGeoPhysicalNode* MdcROOTGeo::m_PhysicalReplica[m_kLayer][m_kReplicaMax] [private] |
Definition at line 185 of file MdcROOTGeo.h.
TGeoPhysicalNode* MdcROOTGeo::m_PhysicalReplica[m_kLayer][m_kReplicaMax] [private] |
Definition at line 112 of file MdcROOTGeo.h.
Referenced by GetPhysicalReplica(), MdcROOTGeo(), and SetPhysicalNode().
TGeoPhysicalNode* MdcROOTGeo::m_PhysicalSegment[m_kSegment *2] [private] |
int MdcROOTGeo::m_replicaColor [private] |
int SubDetectorROOTGeo::m_ROOTGeoInit [protected, inherited] |
Definition at line 66 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::Init2DGeometry(), MucROOTGeo::Init2DGeometry(), Init2DGeometry(), EmcROOTGeo::Init2DGeometry(), TofROOTGeo::InitFromGDML(), TofROOTGeo::InitFromGdml(), MucROOTGeo::InitFromGDML(), MucROOTGeo::InitFromGdml(), InitFromGDML(), InitFromGdml(), EmcROOTGeo::InitFromGDML(), EmcROOTGeo::InitFromGdml(), TofROOTGeo::InitFromROOT(), MucROOTGeo::InitFromROOT(), InitFromROOT(), EmcROOTGeo::InitFromROOT(), and SubDetectorROOTGeo::IsInitialized().
int MdcROOTGeo::m_segmentColor [private] |
TGeoVolume* SubDetectorROOTGeo::m_TopVolume [protected, inherited] |
Definition at line 81 of file SubDetectorROOTGeo.h.
TGeoVolume* SubDetectorROOTGeo::m_TopVolume [protected, inherited] |
Definition at line 69 of file SubDetectorROOTGeo.h.
Referenced by SubDetectorROOTGeo::GetTopVolume(), and SubDetectorROOTGeo::ReadGdml().
int MdcROOTGeo::m_tubeColor [private] |
int MdcROOTGeo::m_twistedTubsColor [private] |
const int MdcROOTGeo::MDC_CHARGE_FACTOR = 1000000 [static, private] |
Definition at line 169 of file MdcROOTGeo.h.
const int MdcROOTGeo::MDC_TIME_FACTOR = 100000 [static, private] |
Definition at line 168 of file MdcROOTGeo.h.