#include <MucROOTGeo.h>
Inheritance diagram for MucROOTGeo:
Public Member Functions | |
MucROOTGeo () | |
Constructor. | |
~MucROOTGeo () | |
Destructor. | |
void | InitFromGdml (const char *gdmlFile, const char *setupName) |
Initialize the instance of ROOTGeo. | |
void | SetNode () |
Set the pointers to theirs nodes;. | |
void | SetDefaultVis () |
Set default visual attributes;. | |
void | SetAllVisible () |
Set all visible;. | |
void | SetQuarterVisible () |
Set quater visible;. | |
void | SetPhysicalNode () |
Set the pointers to the physical nodes;. | |
int | GetPartNum () |
Get number of part;. | |
int | GetSegNum (int part) |
Get number of segment on part;. | |
int | GetGapNum (int part) |
Get number of gap on part;. | |
int | GetStripNum (int part, int seg, int gap) |
Get number of strip on gap;. | |
TGeoVolume * | GetVolumeMuc () |
Get Muc volume;. | |
TGeoVolume * | GetVolumeAbsorber (int part, int seg, int absorber) |
Get absorber volume;. | |
float | GetAbsorberThickness (int part, int seg, int absorber) |
Get thickness of an absorber;. | |
TGeoVolume * | GetVolumeAbsorberPanel (int part, int seg, int absorber, int panel) |
Get absorber panel volume;. | |
TGeoVolume * | GetVolumeGap (int part, int seg, int gap) |
Get gap volume;. | |
TGeoVolume * | GetVolumeAluminumBox (int part, int seg, int gap) |
Get box volume;. | |
TGeoVolume * | GetVolumeStripPlane (int part, int seg, int gap) |
Get strip plane volume;. | |
TGeoVolume * | GetVolumeStrip (int part, int seg, int gap, int strip) |
Get strip volume;. | |
TGeoVolume * | GetVolumeGasChamber (int part, int seg, int gap, int panel, int gasChamber) |
Get rpc gas chamber volume;. | |
TGeoVolume * | GetVolumeBakelite (int part, int seg, int gap, int panel, int bakelite) |
Get rpc bakelite volume;. | |
TGeoNode * | GetGap (int part, int seg, int gap) |
Get gap node;. | |
TGeoNode * | GetStripPlane (int part, int seg, int gap) |
Get strip plane node;. | |
TGeoNode * | GetStrip (int part, int seg, int gap, int strip) |
Get strip node;. | |
TGeoPhysicalNode * | GetPhysicalGap (int part, int seg, int gap) |
Get gap physical node;. | |
TGeoPhysicalNode * | GetPhysicalAluminumBox (int part, int seg, int gap) |
Get box physical node;. | |
TGeoPhysicalNode * | GetPhysicalStrip (int part, int seg, int gap, int strip) |
Get strip physical node;. | |
MucROOTGeo () | |
Constructor. | |
~MucROOTGeo () | |
Destructor. | |
void | InitFromGDML (const char *gdmlFile, const char *setupName) |
Initialize ROOTGeo from GDML. | |
void | InitFromROOT (TGeoVolume *vol) |
Initialize ROOTGeo from TGeoVolume logicalMuc. | |
void | Init2DGeometry () |
Initialize 2D Geometry. | |
void | SetNode () |
Set the pointers to theirs nodes;. | |
void | SetVolumeDefaultVis () |
Set default visual attributes;. | |
void | SetAllVisible () |
Set all visible;. | |
void | SetQuarterVisible () |
Set quater visible;. | |
void | SetHalfVisible () |
Set half visible;. | |
void | SetNoEndVisible () |
Set noend visible;. | |
void | SetPhysicalNode () |
Set the pointers to the physical nodes;. | |
void | SetDetector () |
Set Detecor (what is detector depends on you). | |
void | SetHits () |
Set all physicalNodes corresponding to digiCol;. | |
void | SetVisMucDetector () |
Set Muc detector visibility;. | |
void | SetVisMucHits () |
Set Muc hits visibility;. | |
int | GetPartNb () |
Get number of part;. | |
int | GetSegNb (int part) |
Get number of segment on part;. | |
int | GetGapNb (int part) |
Get number of gap on part;. | |
int | GetStripNb (int part, int seg, int gap) |
Get number of strip on gap;. | |
int | GetAbsorberNb (int part) |
Get number of absorber on part;. | |
void | SetVolumeMuc (TGeoVolume *vol) |
Set Muc volume, while initializing from ROOT;. | |
TGeoVolume * | GetVolumeMuc () |
Get Muc volume;. | |
TGeoVolume * | GetVolumeAbsorber (int part, int seg, int absorber) |
Get absorber volume;. | |
TGeoVolume * | GetVolumeAbsorberSmallBlock (int gap, int sb) |
Get absorber small block;. | |
TGeoVolume * | GetVolumeAbsorberPanel (int part, int seg, int absorber, int panel) |
Get absorber panel volume;. | |
TGeoVolume * | GetVolumeGap (int part, int seg, int gap) |
Get gap volume;. | |
TGeoVolume * | GetVolumeBox (int part, int seg, int gap) |
Get box volume;. | |
TGeoVolume * | GetVolumeBoxSurface (int part, int seg, int gap, int up) |
Get box surface volume;. | |
TGeoVolume * | GetVolumeStripPlane (int part, int seg, int gap) |
Get strip plane volume;. | |
TGeoVolume * | GetVolumeStrip (int part, int seg, int gap, int strip) |
Get strip volume;. | |
TGeoVolume * | GetVolumeGasChamber (int part, int seg, int gap, int panel, int gasChamber) |
Get rpc gas chamber volume;. | |
TGeoVolume * | GetVolumeGasBorder (int part, int seg, int gap, int panel, int gasChamber) |
Get rpc gas border volume;. | |
TGeoVolume * | GetVolumeBakelite (int part, int seg, int gap, int RpcUpDown, int panel, int bakelite) |
Get rpc bakelite volume;. | |
TGeoNode * | GetAbsorber (int part, int seg, int absorber) |
Get absorber node;. | |
TGeoNode * | GetAbsorberPanel (int part, int seg, int absorber, int panel) |
Get absorber panel node;. | |
TGeoNode * | GetGap (int part, int seg, int gap) |
Get gap node;. | |
TGeoNode * | GetStripPlane (int part, int seg, int gap) |
Get strip plane node;. | |
TGeoNode * | GetStrip (int part, int seg, int gap, int strip) |
Get strip node;. | |
TGeoPhysicalNode * | GetPhysicalAbsorber (int part, int seg, int gap, int panel) |
Get absorber physical node;. | |
TGeoPhysicalNode * | GetPhysicalGap (int part, int seg, int gap) |
Get gap physical node;. | |
TGeoPhysicalNode * | GetPhysicalStrip (int part, int seg, int gap, int strip) |
Get strip physical node;. | |
Muc2DStrip * | Get2DStrip (int part, int seg, int gap, int strip) |
Get Muc2DStrip;. | |
Int_t | GetPart (TGeoPhysicalNode *phyNode) |
Get part no of a physcial node. | |
Bool_t | IsZRVisible (int part, int seg) |
Is a segment visible in ZR view. | |
Double_t | Range360 (Double_t input) |
Get input value 0~360. | |
void | Draw (Option_t *option) |
Draw function. | |
void | DrawHits (Option_t *option) |
Draw 2D hits. | |
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 Attributes | |
int | m_StripNum [m_kPart][m_kSegMax][m_kGapMax] |
TGeoVolume * | m_Muc |
TGeoNode * | m_NodeGap [m_kPart][m_kSegMax][m_kGapMax] |
TGeoNode * | m_NodeStripPlane [m_kPart][m_kSegMax][m_kGapMax] |
TGeoNode * | m_NodeStrip [m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] |
TGeoPhysicalNode * | m_PhysicalGap [m_kPart][m_kSegMax][m_kGapMax] |
TGeoPhysicalNode * | m_PhysicalStrip [m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] |
int | m_MucColor |
int | m_absorberColor |
int | m_gapColor |
int | m_gasChamberColor |
int | m_bakeliteColor |
int | m_stripColor |
TGeoVolume * | m_Muc |
TGeoNode * | m_NodeAbsorber [m_kPart][m_kSegMax][m_kAbsorberMax] |
TGeoNode * | m_NodeAbsorberPanel [m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax] |
TGeoNode * | m_NodeGap [m_kPart][m_kSegMax][m_kGapMax] |
TGeoNode * | m_NodeStripPlane [m_kPart][m_kSegMax][m_kGapMax] |
TGeoNode * | m_NodeStrip [m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] |
TGeoPhysicalNode * | m_PhysicalAbsorber [m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax] |
TGeoPhysicalNode * | m_PhysicalGap [m_kPart][m_kSegMax][m_kGapMax] |
TGeoPhysicalNode * | m_PhysicalStrip [m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] |
const TObjArray * | m_MucDigiCol |
BesPolygon2D * | m_MucXY [m_kPart][m_kSegMax] |
BesPolygon2D * | m_MucZR [m_kPart][m_kSegMax] |
BesPolygon2D * | m_MucXYGap [m_kPart][m_kSegMax][m_kGapMax] |
BesPolygon2D * | m_MucZRGap [m_kPart][m_kSegMax][m_kGapMax] |
Muc2DStrip * | m_Muc2DStrip [m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] |
Static Private Attributes | |
static const int | m_kPart = 3 |
static const int | m_kSegMax = 8 |
static const int | m_kAbsorberMax = 9 |
static const int | m_kGapMax = 9 |
static const int | m_kPanelMax = 4 |
static const int | m_kStripMax = 112 |
static const int | m_kBakelite = 4 |
static const int | m_kGasChamber = 2 |
static const int | m_kSeg [m_kPart] = {4, 8, 4} |
static const int | m_kAbsorber [m_kPart] = {9, 9, 9} |
static const int | m_kGap [m_kPart] = {8, 9, 8} |
static const int | m_kPanel [m_kPart] = {4, 3, 4} |
static const int | m_kSmallBlockMax = 2 |
static const int | m_kUpDown = 2 |
static const int | m_kBakelitePanel [m_kPart][m_kUpDown] = {3, 5, 4, 4, 3, 5} |
static const Int_t | m_kStripZMuliple = 12 |
Definition at line 27 of file MucROOTGeo.h.
MucROOTGeo::MucROOTGeo | ( | ) |
Constructor.
Definition at line 29 of file MucROOTGeo.cxx.
References InitFromGdml(), m_kGapMax, m_kPart, m_kSegMax, m_kStripMax, m_NodeGap, m_NodeStrip, m_PhysicalGap, m_PhysicalStrip, and deljobs::string.
00030 { 00031 // Default constructor. 00032 for (int part = 0; part < m_kPart; part++) { 00033 for (int seg = 0; seg < m_kSegMax; seg++) { 00034 for (int gap = 0; gap < m_kGapMax; gap++) { 00035 m_NodeGap[part][seg][gap] = 0; 00036 m_PhysicalGap[part][seg][gap] = 0; 00037 // m_NodeBox[part][seg][gap] = 0; 00038 // m_PhysicalBox[part][seg][gap] = 0; 00039 for (int strip = 0; strip < m_kStripMax; strip++) { 00040 m_NodeStrip[part][seg][gap][strip] = 0; 00041 m_PhysicalStrip[part][seg][gap][strip] = 0; 00042 } 00043 } 00044 } 00045 } 00046 00047 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT"); 00048 //cout << "MucGeoGeneral::InitFromXML(), GdmlManagementPath not found" << endl; 00049 string GdmlFile = GdmlManagementPath + string("/dat/Muc.gdml"); 00050 //string GdmlFile = string("Muc.gdml"); 00051 cout << "GdmlFile " << GdmlFile << endl; 00052 InitFromGdml( GdmlFile.c_str(), "Muc" ); 00053 }
MucROOTGeo::~MucROOTGeo | ( | ) |
MucROOTGeo::MucROOTGeo | ( | ) |
Constructor.
MucROOTGeo::~MucROOTGeo | ( | ) |
Destructor.
void MucROOTGeo::Draw | ( | Option_t * | option | ) |
Draw function.
Definition at line 1433 of file MucROOTGeo.cxx.
References Muc2DStrip::Draw(), BesPolygon2D::Draw(), GetGapNb(), GetPartNb(), GetSegNb(), GetStripNb(), BesView::GetVisMucBarrel(), BesView::GetVisMucEast(), BesView::GetVisMucGlobal(), BesView::GetVisMucWest(), SubDetectorROOTGeo::m_2DGeoInit, m_Muc2DStrip, m_MucXY, m_MucXYGap, m_MucZR, m_MucZRGap, Muc2DStrip::SetFired(), and BesPolygon2D::SetRotatable().
Referenced by BesGeometry::Draw2DXY(), and BesGeometry::Draw2DZR().
01434 { 01435 TString opt = option; 01436 opt.ToUpper(); 01437 01438 if (!m_2DGeoInit) cout << "MucROOTGeo::Draw2D(), 2D Geometry not initialized!" << endl; 01439 BesView *view = (BesView*)gPad->GetView(); 01440 if (!view) cout << "MucROOTGeo::Draw(), BesView not found" << endl; 01441 01442 if (view->GetVisMucGlobal()) { // MucVisGlobal 01443 // seg and gap 01444 for (Int_t part = GetPartNb()-1; part >= 0; part--) { // draw west first 01445 if ( (part == 0 && view->GetVisMucEast()) || 01446 (part == 1 && view->GetVisMucBarrel()) || 01447 (part == 2 && view->GetVisMucWest()) ) { 01448 for (Int_t seg = 0; seg < GetSegNb(part); seg++) { 01449 if (opt.Contains("XY")) { 01450 if (m_MucXY[part][seg]) m_MucXY[part][seg]->Draw(""); 01451 for (Int_t gap = 0; gap < GetGapNb(part); gap++) { 01452 if (m_MucXYGap[part][seg][gap]) m_MucXYGap[part][seg][gap]->Draw(""); 01453 } 01454 } 01455 if (opt.Contains("ZR")) { 01456 if ( m_MucZR[part][seg] ) { // && IsZRVisible(part, seg) ) { 01457 if (part == 1) m_MucZR[part][seg]->SetRotatable(true); 01458 m_MucZR[part][seg]->Draw(""); 01459 } 01460 for (Int_t gap = 0; gap < GetGapNb(part); gap++) { 01461 if (m_MucZRGap[part][seg][gap]) { 01462 if (part == 1) m_MucZRGap[part][seg][gap]->SetRotatable(true); 01463 m_MucZRGap[part][seg][gap]->Draw(""); 01464 } 01465 } 01466 } 01467 } 01468 } 01469 } 01470 01471 // strips, should be drawn after all segs and gaps have been drawn 01472 for (Int_t part = GetPartNb()-1; part >= 0; part--) { // draw west first 01473 for (Int_t seg = 0; seg < GetSegNb(part); seg++) { 01474 for (Int_t gap = 0; gap < GetGapNb(part); gap++) { 01475 for (Int_t strip = 0; strip < GetStripNb(part, seg, gap); strip++) { 01476 if (m_Muc2DStrip[part][seg][gap][strip]) { 01477 m_Muc2DStrip[part][seg][gap][strip]->SetFired(false); 01478 if ( (part == 0 && view->GetVisMucEast()) || 01479 (part == 1 && view->GetVisMucBarrel()) || 01480 (part == 2 && view->GetVisMucWest()) ) { 01481 m_Muc2DStrip[part][seg][gap][strip]->Draw(""); 01482 } 01483 } 01484 } 01485 } 01486 } 01487 } 01488 01489 } 01490 }
void MucROOTGeo::DrawHits | ( | Option_t * | option | ) |
Draw 2D hits.
Definition at line 1493 of file MucROOTGeo.cxx.
References Muc2DStrip::Draw(), MucID::gap(), BesView::GetVisMucHitsBarrel(), BesView::GetVisMucHitsEast(), BesView::GetVisMucHitsGlobal(), BesView::GetVisMucHitsWest(), genRecEmupikp::i, m_Muc2DStrip, m_MucDigiCol, MucID::part(), MucID::seg(), Muc2DStrip::SetFired(), and MucID::strip().
Referenced by BesEvent::DrawHits().
01494 { 01495 BesView *view = (BesView*)gPad->GetView(); 01496 if (!view) cout << "MucROOTGeo::DrawHits(), BesView not found" << endl; 01497 01498 01499 if (view->GetVisMucHitsGlobal()) { 01500 01501 /* 01502 for (Int_t part = GetPartNb()-1; part >= 0; part--) { // draw west first 01503 for (Int_t seg = 0; seg < GetSegNb(part); seg++) { 01504 for (Int_t gap = 0; gap < GetGapNb(part); gap++) { 01505 for (Int_t strip = 0; strip < GetStripNb(part, seg, gap); strip++) { 01506 if (m_Muc2DStrip[part][seg][gap][strip]) m_Muc2DStrip[part][seg][gap][strip]->ClearInfo(); 01507 } 01508 } 01509 } 01510 }*/ 01511 01512 if (m_MucDigiCol) { 01513 for (int i = 0; i < m_MucDigiCol->GetEntries(); i++) { 01514 TMucDigi *aMucDigi = (TMucDigi*)m_MucDigiCol->At(i); 01515 01516 //cout << aMucDigi->getIntId() << endl; 01517 Identifier aMucID( aMucDigi->getIntId() ); 01518 int part = MucID::part( aMucID ); 01519 int seg = MucID::seg( aMucID ); 01520 int gap = MucID::gap( aMucID ); 01521 int strip = MucID::strip( aMucID ); 01522 01523 Muc2DStrip *aStrip = 0; 01524 aStrip = m_Muc2DStrip[part][seg][gap][strip]; 01525 if (aStrip) { 01526 if ( (part == 0 && view->GetVisMucHitsEast()) || 01527 (part == 1 && view->GetVisMucHitsBarrel()) || 01528 (part == 2 && view->GetVisMucHitsWest()) ) { 01529 aStrip->SetFired(true); 01530 aStrip->Draw(); 01531 } 01532 } 01533 } 01534 } 01535 } 01536 }
Muc2DStrip * MucROOTGeo::Get2DStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) |
Get Muc2DStrip;.
Definition at line 1358 of file MucROOTGeo.cxx.
References m_Muc2DStrip.
Referenced by BesEvent::ConstructMucTrackFromRec().
01359 { 01360 if (m_Muc2DStrip[part][seg][gap][strip]) return m_Muc2DStrip[part][seg][gap][strip]; 01361 else return 0; 01362 }
TGeoNode * MucROOTGeo::GetAbsorber | ( | int | part, | |
int | seg, | |||
int | absorber | |||
) |
Get absorber node;.
Definition at line 1275 of file MucROOTGeo.cxx.
References m_NodeAbsorber.
Referenced by Init2DGeometry().
01276 { 01277 if (m_NodeAbsorber[part][seg][absorber] != 0) { 01278 return m_NodeAbsorber[part][seg][absorber]; 01279 } 01280 else { 01281 return 0; 01282 } 01283 }
int MucROOTGeo::GetAbsorberNb | ( | int | part | ) |
Get number of absorber on part;.
Definition at line 1147 of file MucROOTGeo.cxx.
Referenced by GetPart(), Init2DGeometry(), SetDetector(), and SetVolumeDefaultVis().
01148 { 01149 int absorber = m_kAbsorber[part]; 01150 return absorber; 01151 }
TGeoNode * MucROOTGeo::GetAbsorberPanel | ( | int | part, | |
int | seg, | |||
int | absorber, | |||
int | panel | |||
) |
Get absorber panel node;.
Definition at line 1286 of file MucROOTGeo.cxx.
References m_NodeAbsorberPanel.
01287 { 01288 if (m_NodeAbsorberPanel[part][seg][absorber][panel] != 0) { 01289 return m_NodeAbsorberPanel[part][seg][absorber][panel]; 01290 } 01291 else { 01292 return 0; 01293 } 01294 }
float MucROOTGeo::GetAbsorberThickness | ( | int | part, | |
int | seg, | |||
int | absorber | |||
) |
Get thickness of an absorber;.
Definition at line 362 of file MucROOTGeo.cxx.
References GetVolumeAbsorber().
Referenced by MucGeoGeneral::InitFromXML().
00363 { 00364 float thickness = 0.0; 00365 TGeoVolume *vol = GetVolumeAbsorber(part, seg, absorber); 00366 if (vol) { 00367 thickness = 2.0*((TGeoBBox*)vol->GetShape())->GetDZ(); 00368 } 00369 00370 return thickness; 00371 }
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 }
TGeoNode* MucROOTGeo::GetGap | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get gap node;.
TGeoNode * MucROOTGeo::GetGap | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get gap node;.
Definition at line 446 of file MucROOTGeo.cxx.
References m_NodeGap.
Referenced by Init2DGeometry(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetNoEndVisible(), SetPhysicalNode(), SetQuarterVisible(), and SetVolumeDefaultVis().
00447 { 00448 if (m_NodeGap[part][seg][gap] != 0) { 00449 return m_NodeGap[part][seg][gap]; 00450 } 00451 else { 00452 std::cout << "Node: " << "Part" << part << "Seg" << seg << "Gap" << gap << " not found" << std::endl; 00453 return 0; 00454 } 00455 }
int MucROOTGeo::GetGapNb | ( | int | part | ) |
Get number of gap on part;.
Definition at line 1133 of file MucROOTGeo.cxx.
Referenced by Draw(), GetPart(), Init2DGeometry(), SetDetector(), and SetVolumeDefaultVis().
01134 { 01135 int gap = m_kGap[part]; 01136 return gap; 01137 }
int MucROOTGeo::GetGapNum | ( | int | part | ) |
Get number of gap on part;.
Definition at line 339 of file MucROOTGeo.cxx.
References m_kGap.
Referenced by MucGeoGeneral::InitFromXML().
00340 { 00341 int gap = m_kGap[part]; 00342 return gap; 00343 }
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(); }
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 GetVolumeAbsorber(), GetVolumeAbsorberPanel(), GetVolumeAbsorberSmallBlock(), TofROOTGeo::GetVolumeAl(), GetVolumeAluminumBox(), GetVolumeBakelite(), GetVolumeBox(), GetVolumeBoxSurface(), TofROOTGeo::GetVolumeBucket(), EmcROOTGeo::GetVolumeCrystal(), GetVolumeGap(), GetVolumeGasBorder(), GetVolumeGasChamber(), MdcROOTGeo::GetVolumeLayer(), TofROOTGeo::GetVolumePart(), EmcROOTGeo::GetVolumePart(), EmcROOTGeo::GetVolumePhi(), TofROOTGeo::GetVolumePVF(), MdcROOTGeo::GetVolumeReplica(), TofROOTGeo::GetVolumeScin(), MdcROOTGeo::GetVolumeSegment(), GetVolumeStrip(), GetVolumeStripPlane(), EmcROOTGeo::GetVolumeTheta(), 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(), MdcROOTGeo::GetLayer(), EmcROOTGeo::GetPart(), EmcROOTGeo::GetPhi(), MdcROOTGeo::GetSegment(), Init2DGeometry(), TofROOTGeo::SetNode(), SetNode(), and MdcROOTGeo::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 }
int MucROOTGeo::GetPart | ( | TGeoPhysicalNode * | phyNode | ) |
Get part no of a physcial node.
Definition at line 1365 of file MucROOTGeo.cxx.
References GetAbsorberNb(), GetGapNb(), GetPartNb(), GetPhysicalAbsorber(), GetPhysicalGap(), GetPhysicalStrip(), GetSegNb(), and m_kPanelMax.
Referenced by SetVisMucDetector(), and SetVisMucHits().
01366 { 01367 for (int part = 0; part < GetPartNb(); part++) { 01368 for (int seg = 0; seg < GetSegNb(part); seg++) { 01369 for (int gap = 0; gap < GetGapNb(part); gap++) { 01370 if (phyNode == GetPhysicalGap(part, seg, gap)) { 01371 return part; 01372 } 01373 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 01374 if (phyNode == GetPhysicalStrip(part, seg, gap, strip)) { 01375 return part; 01376 } 01377 } 01378 } 01379 for (int absorber = 0; absorber < GetAbsorberNb(part); absorber++) { 01380 for (int panel = 0; panel < m_kPanelMax; panel++) { 01381 if (phyNode == GetPhysicalAbsorber(part, seg, absorber, panel)) { 01382 return part; 01383 } 01384 } 01385 } 01386 } 01387 } 01388 01389 return -1; 01390 }
int MucROOTGeo::GetPartNb | ( | ) |
Get number of part;.
Definition at line 1119 of file MucROOTGeo.cxx.
Referenced by Draw(), GetPart(), Init2DGeometry(), SetDetector(), and SetVolumeDefaultVis().
01120 { 01121 int part = m_kPart; 01122 return part; 01123 }
int MucROOTGeo::GetPartNum | ( | ) |
Get number of part;.
Definition at line 325 of file MucROOTGeo.cxx.
References m_kPart.
Referenced by MucGeoGeneral::InitFromXML().
00326 { 00327 int part = m_kPart; 00328 return part; 00329 }
TGeoPhysicalNode * MucROOTGeo::GetPhysicalAbsorber | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | panel | |||
) |
Get absorber physical node;.
Definition at line 1330 of file MucROOTGeo.cxx.
References m_PhysicalAbsorber.
Referenced by GetPart(), and SetDetector().
01331 { 01332 return m_PhysicalAbsorber[part][seg][absorber][panel]; 01333 }
TGeoPhysicalNode* MucROOTGeo::GetPhysicalAluminumBox | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get box physical node;.
TGeoPhysicalNode* MucROOTGeo::GetPhysicalGap | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get gap physical node;.
TGeoPhysicalNode * MucROOTGeo::GetPhysicalGap | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get gap physical node;.
Definition at line 495 of file MucROOTGeo.cxx.
References m_PhysicalGap.
Referenced by GetPart(), BesGeometry::GetPhysicalMucGap(), Init2DGeometry(), MucGeoGeneral::InitFromXML(), and SetDetector().
00496 { 00497 if (m_PhysicalGap[part][seg][gap] != 0) { 00498 return m_PhysicalGap[part][seg][gap]; 00499 } 00500 else { 00501 std::cout << "PhysicalNode: " << "Part" << part << "Seg" << seg << "Gap" << gap << " not found" << std::endl; 00502 return 0; 00503 } 00504 }
TGeoPhysicalNode* MucROOTGeo::GetPhysicalStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) |
Get strip physical node;.
TGeoPhysicalNode * MucROOTGeo::GetPhysicalStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) |
Get strip physical node;.
Definition at line 519 of file MucROOTGeo.cxx.
References m_PhysicalStrip.
Referenced by GetPart(), BesGeometry::GetPhysicalMucStrip(), Init2DGeometry(), MucGeoGeneral::InitFromXML(), SetHits(), and BesVisDisplay::SetMucFiredCell().
00520 { 00521 if (m_PhysicalStrip[part][seg][gap][strip] != 0) { 00522 return m_PhysicalStrip[part][seg][gap][strip]; 00523 } 00524 else { 00525 std::cout << "PhysicalNode: " << "Part" << part << "Seg" << seg << "Gap" << gap << "Strip" << strip << " not found" << std::endl; 00526 return 0; 00527 } 00528 }
int MucROOTGeo::GetSegNb | ( | int | part | ) |
Get number of segment on part;.
Definition at line 1126 of file MucROOTGeo.cxx.
Referenced by Draw(), GetPart(), Init2DGeometry(), SetDetector(), and SetVolumeDefaultVis().
01127 { 01128 int seg = m_kSeg[part]; 01129 return seg; 01130 }
int MucROOTGeo::GetSegNum | ( | int | part | ) |
Get number of segment on part;.
Definition at line 332 of file MucROOTGeo.cxx.
References m_kSeg.
Referenced by MucGeoGeneral::InitFromXML().
00333 { 00334 int seg = m_kSeg[part]; 00335 return seg; 00336 }
TGeoNode* MucROOTGeo::GetStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) |
Get strip node;.
TGeoNode * MucROOTGeo::GetStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) |
Get strip node;.
Definition at line 483 of file MucROOTGeo.cxx.
References m_NodeStrip.
Referenced by SetAllVisible(), SetDefaultVis(), SetPhysicalNode(), and SetVolumeDefaultVis().
00484 { 00485 if (m_NodeStrip[part][seg][gap][strip] != 0) { 00486 return m_NodeStrip[part][seg][gap][strip]; 00487 } 00488 else { 00489 std::cout << "Node: " << "Part" << part << "Seg" << "0" << "Gap" << gap << "Strip" << strip << " not found" << std::endl; 00490 return 0; 00491 } 00492 }
int MucROOTGeo::GetStripNb | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get number of strip on gap;.
Definition at line 1140 of file MucROOTGeo.cxx.
Referenced by Draw(), Init2DGeometry(), and SetVolumeDefaultVis().
01141 { 01142 int strip = m_StripNum[part][seg][gap]; 01143 return strip; 01144 }
int MucROOTGeo::GetStripNum | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get number of strip on gap;.
Definition at line 346 of file MucROOTGeo.cxx.
References m_StripNum.
Referenced by MucGeoGeneral::InitFromXML().
00347 { 00348 int strip = m_StripNum[part][seg][gap]; 00349 return strip; 00350 }
TGeoNode* MucROOTGeo::GetStripPlane | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get strip plane node;.
TGeoNode * MucROOTGeo::GetStripPlane | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get strip plane node;.
Definition at line 471 of file MucROOTGeo.cxx.
References m_NodeStripPlane.
Referenced by Init2DGeometry(), and SetPhysicalNode().
00472 { 00473 if (m_NodeStripPlane[part][seg][gap] != 0) { 00474 return m_NodeStripPlane[part][seg][gap]; 00475 } 00476 else { 00477 std::cout << "Node: " << "Part" << part << "Seg" << seg << "Gap" << gap << "StripPlane" << " not found" << std::endl; 00478 return 0; 00479 } 00480 }
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 Init2DGeometry(), TofROOTGeo::SetNode(), SetNode(), MdcROOTGeo::SetNode(), and EmcROOTGeo::SetNode().
00051 { return m_TopVolume; }
TGeoVolume* MucROOTGeo::GetVolumeAbsorber | ( | int | part, | |
int | seg, | |||
int | absorber | |||
) |
Get absorber volume;.
TGeoVolume * MucROOTGeo::GetVolumeAbsorber | ( | int | part, | |
int | seg, | |||
int | absorber | |||
) |
Get absorber volume;.
Definition at line 353 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by GetAbsorberThickness(), BesGeometry::GetVolumeMucAbsorber(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetNoEndVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
00354 { 00355 std::stringstream osname; 00356 osname << "l" << "Muc" << "P" << part << "S" << seg << "Ab" << absorber; 00357 00358 return GetLogicalVolume( osname.str() ); 00359 }
TGeoVolume* MucROOTGeo::GetVolumeAbsorberPanel | ( | int | part, | |
int | seg, | |||
int | absorber, | |||
int | panel | |||
) |
Get absorber panel volume;.
TGeoVolume * MucROOTGeo::GetVolumeAbsorberPanel | ( | int | part, | |
int | seg, | |||
int | absorber, | |||
int | panel | |||
) |
Get absorber panel volume;.
Definition at line 374 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by BesGeometry::GetVolumeMucAbsorberPanel(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), and SetQuarterVisible().
00375 { 00376 std::stringstream osname; 00377 osname << "l" << "Muc" << "P" << part << "S" << seg << "Ab" << absorber << "Pn" << panel; 00378 00379 return GetLogicalVolume( osname.str() ); 00380 }
TGeoVolume * MucROOTGeo::GetVolumeAbsorberSmallBlock | ( | int | gap, | |
int | sb | |||
) |
Get absorber small block;.
Definition at line 1163 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by SetVolumeDefaultVis().
01164 { 01165 std::stringstream osname; 01166 osname << "VolumeSmallBlock" << "Gap" << gap << "SB" << sb; 01167 01168 return GetLogicalVolume( osname.str() ); 01169 }
TGeoVolume * MucROOTGeo::GetVolumeAluminumBox | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get box volume;.
Definition at line 392 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
00393 { 00394 std::stringstream osname; 00395 osname <<"l" << "Muc" << "P" << part << "S" << seg << "G" << gap <<"Al"; 00396 00397 return GetLogicalVolume( osname.str() ); 00398 }
TGeoVolume * MucROOTGeo::GetVolumeBakelite | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | RpcUpDown, | |||
int | panel, | |||
int | bakelite | |||
) |
Get rpc bakelite volume;.
Definition at line 1264 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
01265 { 01266 std::stringstream osname; 01267 int segment = 0; 01268 if (part ==1 && seg ==2) segment = 2; 01269 osname << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "R" << RpcUpDown << "Pn" << panel<< "B" << bakelite; 01270 01271 return GetLogicalVolume( osname.str() ); 01272 }
TGeoVolume * MucROOTGeo::GetVolumeBakelite | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | panel, | |||
int | bakelite | |||
) |
Get rpc bakelite volume;.
Definition at line 437 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by BesGeometry::GetVolumeMucBakelite(), SetAllVisible(), SetDefaultVis(), SetQuarterVisible(), and SetVolumeDefaultVis().
00438 { 00439 std::stringstream osname; 00440 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "R" << panel << "B" << bakelite; 00441 00442 return GetLogicalVolume( osname.str() ); 00443 }
TGeoVolume * MucROOTGeo::GetVolumeBox | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get box volume;.
Definition at line 1192 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by SetVolumeDefaultVis().
01193 { 01194 std::stringstream osname; 01195 osname << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap << "Al"; 01196 01197 return GetLogicalVolume( osname.str() ); 01198 }
TGeoVolume * MucROOTGeo::GetVolumeBoxSurface | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | up | |||
) |
Get box surface volume;.
Definition at line 1201 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by SetVolumeDefaultVis().
01202 { 01203 std::stringstream osname; 01204 int segment = 0; 01205 if (part ==1 && seg ==2) segment = 2; 01206 osname << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "AlSf" <<up; 01207 01208 return GetLogicalVolume( osname.str() ); 01209 }
TGeoVolume* MucROOTGeo::GetVolumeGap | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get gap volume;.
TGeoVolume * MucROOTGeo::GetVolumeGap | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get gap volume;.
Definition at line 383 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by BesGeometry::GetVolumeMucGap(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetNoEndVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
00384 { 00385 std::stringstream osname; 00386 osname << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap; 00387 00388 return GetLogicalVolume( osname.str() ); 00389 }
TGeoVolume * MucROOTGeo::GetVolumeGasBorder | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | panel, | |||
int | gasChamber | |||
) |
Get rpc gas border volume;.
Definition at line 1253 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by SetVolumeDefaultVis().
01254 { 01255 std::stringstream osname; 01256 int segment = 0; 01257 if (part ==1 && seg ==2) segment = 2; 01258 osname << "l" << "Muc" << "P" << part%2 << "S" << segment << "G" << gap << "R" << rpcUpDown << "Pn" << panel << "GB"; 01259 01260 return GetLogicalVolume( osname.str() ); 01261 }
TGeoVolume* MucROOTGeo::GetVolumeGasChamber | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | panel, | |||
int | gasChamber | |||
) |
Get rpc gas chamber volume;.
TGeoVolume * MucROOTGeo::GetVolumeGasChamber | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | panel, | |||
int | gasChamber | |||
) |
Get rpc gas chamber volume;.
Definition at line 428 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by BesGeometry::GetVolumeMucGasChamber(), SetAllVisible(), SetDefaultVis(), SetQuarterVisible(), and SetVolumeDefaultVis().
00429 { 00430 std::stringstream osname; 00431 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "R" << gasChamber << "Pn" << panel << "C"; 00432 00433 return GetLogicalVolume( osname.str() ); 00434 }
TGeoVolume* MucROOTGeo::GetVolumeMuc | ( | ) | [inline] |
Get Muc volume;.
Definition at line 101 of file MucROOTGeo.h.
References m_Muc.
00101 { return m_Muc; }
TGeoVolume* MucROOTGeo::GetVolumeMuc | ( | ) | [inline] |
Get Muc volume;.
Definition at line 68 of file MucROOTGeo.h.
References m_Muc.
Referenced by BesEvent::ConstructMucTrackFromRec(), BesGeometry::GetVolumeMuc(), Init2DGeometry(), BesGeometry::InitFromGDML(), and MucGeoGeneral::InitFromXML().
00068 { return m_Muc; }
TGeoVolume* MucROOTGeo::GetVolumeStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) |
Get strip volume;.
TGeoVolume * MucROOTGeo::GetVolumeStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) |
Get strip volume;.
Definition at line 411 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetQuarterVisible(), and SetVolumeDefaultVis().
00412 { 00413 std::stringstream osname; 00414 if(strip < 10) { 00415 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "s" << "00" << strip; 00416 } 00417 else if(strip<100){ 00418 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "s" << "0" << strip; 00419 } 00420 else { 00421 osname << "l" << "Muc" << "P" << part << "S" << "0" << "G" << gap << "s" << strip; 00422 } 00423 00424 return GetLogicalVolume( osname.str() ); 00425 }
TGeoVolume* MucROOTGeo::GetVolumeStripPlane | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get strip plane volume;.
TGeoVolume * MucROOTGeo::GetVolumeStripPlane | ( | int | part, | |
int | seg, | |||
int | gap | |||
) |
Get strip plane volume;.
Definition at line 401 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume().
Referenced by BesGeometry::GetVolumeMucStrip(), BesGeometry::GetVolumeMucStripPlane(), Init2DGeometry(), SetDefaultVis(), SetNode(), and SetVolumeDefaultVis().
00402 { 00403 int segment = 0; if(part==1&&seg==2) segment = 2; 00404 std::stringstream osname; 00405 osname << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "SP"; 00406 00407 return GetLogicalVolume( osname.str() ); 00408 }
void MucROOTGeo::Init2DGeometry | ( | ) |
Initialize 2D Geometry.
Definition at line 100 of file MucROOTGeo.cxx.
References GetAbsorber(), GetAbsorberNb(), GetGap(), GetGapNb(), SubDetectorROOTGeo::GetNode(), GetPartNb(), GetPhysicalGap(), GetPhysicalStrip(), GetSegNb(), GetStripNb(), GetStripPlane(), SubDetectorROOTGeo::GetTopVolume(), GetVolumeMuc(), GetVolumeStripPlane(), genRecEmupikp::i, ganga-rec::j, SubDetectorROOTGeo::m_2DGeoInit, m_kStripZMuliple, m_Muc, m_Muc2DStrip, m_MucXY, m_MucXYGap, m_MucZR, m_MucZRGap, m_NodeAbsorber, m_NodeGap, m_NodeStrip, m_NodeStripPlane, SubDetectorROOTGeo::m_ROOTGeoInit, m_StripNum, P(), SetNode(), and x.
Referenced by BesGeometry::InitGeometry().
00101 { 00102 if (m_ROOTGeoInit != 1 && m_ROOTGeoInit != 2) { 00103 cout << "MucROOTGeo::Init2DGeometry, ROOT Geometry not Initialized yet!" << endl; 00104 return; 00105 } 00106 m_2DGeoInit = 1; 00107 00108 Int_t mucColor = 1002; 00109 Int_t mucLineColor = 15; //15; 00110 Int_t mucXYStyle = 1001;//3001; 00111 Int_t mucZRStyle = 1001;//3007; 00112 00113 Int_t mucGapColor = 10; // 1002 00114 Int_t mucGapStyle = 1001; //1001; 00115 Int_t mucGapXYECStyle = 4000; //1001; 00116 Int_t mucGapLineColor = 15; 00117 00118 Double_t x = 0.0, y = 0.0, z = 0.0; 00119 Double_t r = 0.0, phi = 0.0; 00120 Double_t local[3] = {0.0, 0.0, 0.0}; 00121 Double_t master[3] = {0.0, 0.0, 0.0}; 00122 //Int_t nPoints = 4; 00123 Double_t P[300] = {0.0}; 00124 //Double_t center[3] = {0.0, 0.0, 0.0}; 00125 TString name; 00126 00127 Int_t part = 0, seg = 0, gap = 0, strip = 0; 00128 00129 //----------XY----------- 00130 // Muc 00131 TGeoCompositeShape *mucShape = (TGeoCompositeShape*)GetVolumeMuc()->GetShape(); 00132 if (mucShape) ; 00133 00134 TGeoBoolNode *mucBoolNode = mucShape->GetBoolNode(); 00135 TGeoBBox *mucOuterShape = (TGeoBBox*)mucBoolNode->GetLeftShape(); 00136 TGeoTube *mucInnerShape = (TGeoTube*)mucBoolNode->GetRightShape(); 00137 if (mucOuterShape) ; 00138 //if (mucInnerShape) cout << "mucInnerShape name : " << mucInnerShape->GetName() << endl; 00139 //else cout << "MucROOTGeo:Init2DGeoometry, mucInnerShape not found" << endl; 00140 00141 Double_t mucOuterR = mucOuterShape->GetDX(); 00142 Double_t mucInnerR = mucInnerShape->GetRmax() + 40.0; // 40.0 is the height of first gap 00143 00144 // Barrel 00145 // barrel segment XY view 00146 00147 part = 1; 00148 Int_t xySegPointSeq[4] = {0,1,1,0}; // point 0,1,2,3 -> 0,1,1,0 00149 for (seg = 0; seg < GetSegNb(part); seg++) { 00150 name = TString("MucBarrelSeg"); 00151 name += seg; 00152 for (Int_t iPoint = 0; iPoint < 4; iPoint++) { 00153 if (iPoint < 2) r = mucInnerR/TMath::Cos(TMath::Pi()/8.0); 00154 else r = mucOuterR/TMath::Cos(TMath::Pi()/8.0); 00155 phi = TMath::Pi()/8.0 * (2*seg-1 + 2*xySegPointSeq[iPoint]); 00156 x = r * TMath::Cos(phi); 00157 y = r * TMath::Sin(phi); 00158 z = 0.0; 00159 P[3*iPoint] = x; 00160 P[3*iPoint+1] = y; 00161 P[3*iPoint+2] = z; 00162 } 00163 m_MucXY[part][seg] = new BesPolygon2D(name, name, 4, &P[0]); 00164 m_MucXY[part][seg]->SetFillColor(mucColor); 00165 m_MucXY[part][seg]->SetFillStyle(mucXYStyle); 00166 m_MucXY[part][seg]->SetLineColor(mucLineColor); 00167 } 00168 00169 // barrel segment ZR view 00170 00171 part = 1; 00172 for (seg = 0; seg < GetSegNb(part); seg++) { 00173 for (Int_t iPoint = 0; iPoint < 4; iPoint++) { 00174 if (iPoint == 0 || iPoint == 3 ) r = mucInnerR; 00175 else r = mucOuterR; 00176 phi = TMath::Pi()/4.0 * seg; 00177 00178 x = r * TMath::Cos(phi); 00179 y = r * TMath::Sin(phi); 00180 00181 TGeoVolume *volAbsorber = 0; 00182 volAbsorber= GetAbsorber(part, seg, 0)->GetVolume(); 00183 TGeoBBox *absorberShape = (TGeoBBox*)volAbsorber->GetShape(); 00184 if (seg == 2)cout<<"in MucROOTGeo::Init2DGeometry() x,y,z = "<<absorberShape->GetDX()<<" "<<absorberShape->GetDY()<<" "<<absorberShape->GetDZ()<<endl; 00185 Double_t dy = absorberShape->GetDY(); 00186 z = dy; 00187 if (iPoint < 2) z = -dy; 00188 00189 P[3*iPoint] = x; 00190 P[3*iPoint+1] = y; 00191 P[3*iPoint+2] = z; 00192 } 00193 00194 if (seg == 2 || seg == 6) { 00195 if (seg == 2) name = TString("MucBarrelUpSeg"); 00196 if (seg == 6) name = TString("MucBarrelDownSeg"); 00197 00198 m_MucZR[part][seg] = new BesPolygon2D(name, name, 4, &P[0]); 00199 m_MucZR[part][seg]->SetFillColor(mucColor); 00200 m_MucZR[part][seg]->SetFillStyle(mucZRStyle); 00201 m_MucZR[part][seg]->SetLineColor(mucLineColor); 00202 } 00203 } 00204 00205 // barrel gap 00206 00207 part = 1; 00208 for (seg = 0; seg < GetSegNb(part); seg++) { 00209 for (gap = 0; gap < GetGapNb(part); gap++) { 00210 00211 TGeoPhysicalNode *phyNode = 0; 00212 phyNode = GetPhysicalGap(part, seg, gap); 00213 00214 TGeoBBox *gapShape = (TGeoBBox*)phyNode->GetShape(); 00215 Double_t dx = gapShape->GetDX(); 00216 Double_t dy = gapShape->GetDY(); 00217 Double_t dz = gapShape->GetDZ(); 00218 00219 // barrel gap XY view 00220 for (Int_t i = 0; i < 4; i++) { 00221 local[1] = 0.0; // y 00222 switch (i) { 00223 case 0: 00224 local[0] = -dx; 00225 local[2] = -dz; 00226 break; 00227 case 1: 00228 local[0] = dx; 00229 local[2] = -dz; 00230 break; 00231 case 2: 00232 local[0] = dx; 00233 local[2] = dz; 00234 break; 00235 case 3: 00236 local[0] = -dx; 00237 local[2] = dz; 00238 break; 00239 } 00240 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top 00241 for (Int_t j = 0; j < 3; j++) P[3*i+j] = master[j]; 00242 } 00243 00244 name = TString("MucBarrelSeg"); 00245 name += seg; 00246 name += TString("Gap"); 00247 name += gap; 00248 00249 m_MucXYGap[part][seg][gap] = new BesPolygon2D(name, name, 4, &P[0]); 00250 m_MucXYGap[part][seg][gap]->SetFillColor(mucGapColor); 00251 m_MucXYGap[part][seg][gap]->SetFillStyle(mucGapStyle); 00252 m_MucXYGap[part][seg][gap]->SetLineColor(mucGapLineColor); 00253 00254 // barrel gap ZR view 00255 for (Int_t i = 0; i < 4; i++) { 00256 local[0] = 0.0; // x 00257 switch (i) { 00258 case 0: 00259 local[1] = -dy; 00260 local[2] = -dz; 00261 break; 00262 case 1: 00263 local[1] = -dy; 00264 local[2] = dz; 00265 break; 00266 case 2: 00267 local[1] = dy; 00268 local[2] = dz; 00269 break; 00270 case 3: 00271 local[1] = dy; 00272 local[2] = -dz; 00273 break; 00274 } 00275 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top 00276 for (Int_t j = 0; j < 3; j++) P[3*i+j] = master[j]; 00277 } 00278 00279 if (seg == 2 || seg == 6) { 00280 if (seg == 2) { 00281 name = TString("MucBarrelUpSegGap"); 00282 name += gap; 00283 } 00284 else if (seg == 6) { 00285 name = TString("MucBarrelDownSegGap"); 00286 name += gap; 00287 } 00288 00289 m_MucZRGap[part][seg][gap] = new BesPolygon2D(name, name, 4, &P[0]); 00290 m_MucZRGap[part][seg][gap]->SetFillColor(mucGapColor); 00291 m_MucZRGap[part][seg][gap]->SetFillStyle(mucGapStyle); 00292 m_MucZRGap[part][seg][gap]->SetLineColor(mucGapLineColor); 00293 } 00294 } 00295 } 00296 // End cap 00297 for (part = 0; part < GetPartNb(); part++) { 00298 if (part == 1) continue; 00299 for (seg = 0; seg < GetSegNb(part); seg++) { 00300 Double_t segP[100]; 00301 Int_t iSegPoint = 0; 00302 00303 for (gap = 0; gap < GetGapNb(part); gap++) { 00304 TGeoPhysicalNode *phyNode = 0; 00305 phyNode = GetPhysicalGap(part, seg, gap); 00306 00307 Int_t ixyPoint = 0, izrPoint = 0; 00308 Int_t nPanel = 3; //4 00309 //TGeoCompositeShape *addPanelShape[nPanel]; 00310 //TGeoTrap *panelShape[nPanel]; 00311 TGeoCompositeShape *addPanelShape[4]; 00312 TGeoTrap *panelShape[4]; 00313 00314 00315 for (Int_t panel = nPanel-1; panel >= 0; panel--) { 00316 if (panel == nPanel-1) addPanelShape[panel] = (TGeoCompositeShape*)GetGap(part, seg, gap)->GetVolume()->GetShape(); 00317 else addPanelShape[panel] = (TGeoCompositeShape*)addPanelShape[panel+1]->GetBoolNode()->GetLeftShape(); 00318 00319 panelShape[panel] = (TGeoTrap*)addPanelShape[panel]->GetBoolNode()->GetRightShape(); 00320 00321 Double_t *localArb8Point, masterArb8Point[3*8]; 00322 localArb8Point = panelShape[panel]->GetVertices(); 00323 for (Int_t i = 0; i < 8; i++) { 00324 local[0] = localArb8Point[2*i]; 00325 local[1] = localArb8Point[2*i+1]; 00326 if (i < 4) local[2] = panelShape[panel]->GetDz() * (-1.0); 00327 else local[2] = panelShape[panel]->GetDz(); 00328 00329 addPanelShape[panel]->GetBoolNode()->GetRightMatrix()->LocalToMaster(local, &master[0]); // transform to gap coordinate 00330 00331 for (Int_t j = 0; j < 3; j++) local[j] = master[j]; 00332 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top 00333 for (Int_t j = 0; j < 3; j++) { 00334 masterArb8Point[3*i+j] = master[j]; 00335 } 00336 } 00337 00338 // xy, add point on panel 3 and panel 0 //panel 3 -> panel 2(new geom) 00339 if (panel == 2) { 00340 Int_t xyPanelPointSeq[4] = {0, 3, 7, 4}; 00341 for (Int_t i = 0; i < 4; i++) { 00342 for (Int_t j = 0; j < 3; j++) { 00343 P[3*ixyPoint+j] = masterArb8Point[3*xyPanelPointSeq[i]+j]; 00344 } 00345 ixyPoint++; 00346 } 00347 } 00348 if (panel == 0) { 00349 Int_t xyPanelPointSeq[4] = {7, 4, 0, 3}; 00350 for (Int_t i = 0; i < 4; i++) { 00351 for (Int_t j = 0; j < 3; j++) { 00352 P[3*ixyPoint+j] = masterArb8Point[3*xyPanelPointSeq[i]+j]; 00353 } 00354 ixyPoint++; 00355 } 00356 } 00357 00358 // zr, add point on panel 3 and panel 0, use P from P[100] //panel 3 -> panel 2(new geom) 00359 if (panel == 2) { 00360 Int_t zrPanelPointSeq[4] = {4, 7, 6, 5}; 00361 for (Int_t i = 0; i < 4; i++) { 00362 for (Int_t j = 0; j < 3; j++) { 00363 P[100+3*izrPoint+j] = masterArb8Point[3*zrPanelPointSeq[i]+j]; 00364 } 00365 izrPoint++; 00366 } 00367 } 00368 if (panel == 0) { 00369 Int_t zrPanelPointSeq[4] = {6, 5, 4, 7}; 00370 for (Int_t i = 0; i < 4; i++) { 00371 for (Int_t j = 0; j < 3; j++) { 00372 P[100+3*izrPoint+j] = masterArb8Point[3*zrPanelPointSeq[i]+j]; 00373 } 00374 izrPoint++; 00375 } 00376 } 00377 } 00378 00379 if (part == 0) name = TString("MucEastEc"); 00380 else if (part == 2) name = TString("MucWestEc"); 00381 name += TString("Seg"); 00382 name += seg; 00383 name += TString("Gap"); 00384 name += gap; 00385 00386 //cout << name << endl; 00387 m_MucXYGap[part][seg][gap] = new BesPolygon2D(name, name, ixyPoint, &P[0]); // ixyPoint = 8 00388 m_MucXYGap[part][seg][gap]->SetFillColor(mucGapColor); 00389 m_MucXYGap[part][seg][gap]->SetFillStyle(mucGapXYECStyle); 00390 m_MucXYGap[part][seg][gap]->SetLineColor(mucGapLineColor); 00391 00392 m_MucZRGap[part][seg][gap] = new BesPolygon2D(name, name, izrPoint, &P[100]); // izrPoint = 8 00393 m_MucZRGap[part][seg][gap]->SetFillColor(mucGapColor); 00394 m_MucZRGap[part][seg][gap]->SetFillStyle(mucGapStyle); 00395 m_MucZRGap[part][seg][gap]->SetLineColor(mucGapLineColor); 00396 00397 // end cap segment ZR view 00398 00399 if (gap == 0) { 00400 Double_t zrFirstAbsorberHeight = ((TGeoBBox*)GetAbsorber(part, seg, 0)->GetVolume()->GetShape())->GetDZ()*2.0; 00401 for (Int_t i = 0; i < 4; i++) { 00402 for (Int_t j = 0; j < 3; j++) { 00403 if ( (part == 0 && (seg == 0 || seg == 2)) || (part == 2 && (seg == 1 || seg == 3)) ) { 00404 Int_t zrSegPointSeq[4] = {6, 7, 0, 1}; 00405 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j]; 00406 } 00407 else { 00408 Int_t zrSegPointSeq[4] = {5, 4, 3, 2}; 00409 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j]; 00410 } 00411 00412 if (j == 2) { 00413 if (part == 0) segP[3*iSegPoint+j] -= zrFirstAbsorberHeight; 00414 else if (part == 2) segP[3*iSegPoint+j] += zrFirstAbsorberHeight; 00415 } 00416 } 00417 iSegPoint++; 00418 } 00419 } 00420 else if (gap == 7) { 00421 Double_t zrLastAbsorberHeight = ((TGeoBBox*)GetAbsorber(part, seg, 8)->GetVolume()->GetShape())->GetDZ()*2.0; 00422 for (Int_t i = 0; i < 4; i++) { 00423 for (Int_t j = 0; j < 3; j++) { 00424 if ( (part == 0 && (seg == 0 || seg == 2)) || (part == 2 && (seg == 1 || seg == 3)) ){ 00425 Int_t zrSegPointSeq[4] = {2, 3, 4, 5}; 00426 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j]; 00427 } 00428 else { 00429 Int_t zrSegPointSeq[4] = {1, 0, 7, 6}; 00430 segP[3*iSegPoint+j] = P[100+3*zrSegPointSeq[i]+j]; 00431 } 00432 00433 if (j == 2) { 00434 if (part == 0) segP[3*iSegPoint+j] += zrLastAbsorberHeight; 00435 else if (part == 2) segP[3*iSegPoint+j] -= zrLastAbsorberHeight; 00436 } 00437 } 00438 iSegPoint++; 00439 } 00440 } 00441 00442 } 00443 if (part == 0) name = TString("MucEastEc"); 00444 else if (part == 2) name = TString("MucWestEc"); 00445 name += TString("Seg"); 00446 name += seg; 00447 m_MucZR[part][seg] = new BesPolygon2D(name, name, iSegPoint, &segP[0]); // izrPoint = 8 00448 m_MucZR[part][seg]->SetFillColor(mucColor); 00449 m_MucZR[part][seg]->SetFillStyle(mucZRStyle); 00450 m_MucZR[part][seg]->SetLineColor(mucLineColor); 00451 } 00452 } 00453 00454 for (part = 0; part < GetPartNb(); part++) { 00455 for (seg = 0; seg < GetSegNb(part); seg++) { 00456 for (gap = 0; gap < GetGapNb(part); gap++) { 00457 for (strip = 0; strip < GetStripNb(part, seg, gap); strip++) { 00458 TGeoPhysicalNode *phyNode = 0; 00459 phyNode = GetPhysicalStrip(part, seg, gap, strip); 00460 TGeoBBox *stripShape = (TGeoBBox*)phyNode->GetShape(); 00461 Double_t dx = stripShape->GetDX(); 00462 Double_t dy = stripShape->GetDY(); 00463 Double_t dz = stripShape->GetDZ(); 00464 dz *= m_kStripZMuliple; 00465 00466 for (Int_t i = 0; i < 8; i++) { 00467 switch (i) { 00468 case 0: 00469 local[0] = -dx; 00470 local[1] = -dy; 00471 local[2] = -dz; 00472 break; 00473 case 1: 00474 local[0] = dx; 00475 local[1] = -dy; 00476 local[2] = -dz; 00477 break; 00478 case 2: 00479 local[0] = dx; 00480 local[1] = dy; 00481 local[2] = -dz; 00482 break; 00483 case 3: 00484 local[0] = -dx; 00485 local[1] = dy; 00486 local[2] = -dz; 00487 break; 00488 case 4: 00489 local[0] = -dx; 00490 local[1] = -dy; 00491 local[2] = dz; 00492 break; 00493 case 5: 00494 local[0] = dx; 00495 local[1] = -dy; 00496 local[2] = dz; 00497 break; 00498 case 6: 00499 local[0] = dx; 00500 local[1] = dy; 00501 local[2] = dz; 00502 break; 00503 case 7: 00504 local[0] = -dx; 00505 local[1] = dy; 00506 local[2] = dz; 00507 break; 00508 } 00509 00510 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]); // transform to top 00511 for (Int_t j = 0; j < 3; j++) P[3*i+j] = master[j]; 00512 } 00513 00514 name = TString("Muc Part"); 00515 name += part; 00516 name += TString(" Seg"); 00517 name += seg; 00518 name += TString(" Gap"); 00519 name += gap; 00520 name += TString(" Strip"); 00521 name += strip; 00522 00523 m_Muc2DStrip[part][seg][gap][strip] = new Muc2DStrip(name, name, 8, &P[0], part, seg, gap, strip); 00524 } 00525 } 00526 } 00527 } 00528 }
void MucROOTGeo::InitFromGDML | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) |
Initialize ROOTGeo from GDML.
Definition at line 82 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::m_ROOTGeoInit, SubDetectorROOTGeo::ReadGdml(), and SetNode().
Referenced by BesGeometry::InitFromGDML().
00083 { 00084 m_ROOTGeoInit = 2; 00085 00086 ReadGdml(gdmlFile, setupName); 00087 SetNode(); 00088 }
void MucROOTGeo::InitFromGdml | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) |
Initialize the instance of ROOTGeo.
Definition at line 59 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::m_ROOTGeoInit, SubDetectorROOTGeo::ReadGdml(), and SetNode().
Referenced by MucROOTGeo().
00060 { 00061 ReadGdml(gdmlFile, setupName); 00062 SetNode(); 00063 //SetDefaultVis(); 00064 00065 m_ROOTGeoInit = 1; 00066 }
void MucROOTGeo::InitFromROOT | ( | TGeoVolume * | vol | ) |
Initialize ROOTGeo from TGeoVolume logicalMuc.
Definition at line 91 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::m_ROOTGeoInit, SetNode(), and SetVolumeMuc().
Referenced by BesGeometry::InitFromROOT().
00092 { 00093 m_ROOTGeoInit = 1; 00094 00095 SetVolumeMuc(vol); 00096 SetNode(); 00097 }
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; }
Bool_t MucROOTGeo::IsZRVisible | ( | int | part, | |
int | seg | |||
) |
Is a segment visible in ZR view.
Definition at line 1393 of file MucROOTGeo.cxx.
References BesTView::GetLongitude(), and Range360().
01394 { 01395 if (part != 1) return true; 01396 01397 BesView *view = (BesView*)gPad->GetView(); 01398 Double_t viewPhi = view->GetLongitude(); 01399 viewPhi = Range360(viewPhi); 01400 01401 Int_t viewSeg = Int_t(viewPhi/45.0+0.5); 01402 Int_t upSeg = viewSeg+2; 01403 Int_t downSeg = viewSeg-2; 01404 if (upSeg < 0) upSeg += 8; 01405 else if (upSeg >= 8) upSeg -= 8; 01406 if (downSeg < 0) downSeg += 8; 01407 else if (downSeg >= 8) downSeg -= 8; 01408 01409 if (seg == upSeg || seg == downSeg) return true; 01410 else return false; 01411 }
Double_t MucROOTGeo::Range360 | ( | Double_t | input | ) |
Get input value 0~360.
Definition at line 1414 of file MucROOTGeo.cxx.
Referenced by IsZRVisible().
01415 { 01416 if (input >= 360.0) { 01417 do { 01418 input -= 360.0; 01419 } 01420 while (input >= 360.0); 01421 } 01422 else if (input < 0.0) { 01423 do { 01424 input += 360.0; 01425 } 01426 while (input < 0.0); 01427 } 01428 01429 return input; 01430 }
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(), InitFromGDML(), InitFromGdml(), MdcROOTGeo::InitFromGDML(), MdcROOTGeo::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 MucROOTGeo::SetAllVisible | ( | ) |
Set all visible;.
void MucROOTGeo::SetAllVisible | ( | ) |
Set all visible;.
Definition at line 187 of file MucROOTGeo.cxx.
References GetGap(), GetStrip(), GetVolumeAbsorber(), GetVolumeAbsorberPanel(), GetVolumeBakelite(), GetVolumeGap(), GetVolumeGasChamber(), GetVolumeStrip(), m_kAbsorber, m_kBakelite, m_kGap, m_kGasChamber, m_kPanel, m_kPart, m_kSeg, and m_StripNum.
Referenced by BesGeometry::SetDefaultVis().
00188 { 00189 for (int part = 0; part < m_kPart; part++) { 00190 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00191 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) { 00192 if(part == 1) { 00193 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1); 00194 } 00195 else { 00196 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0); 00197 for (int panel = 0; panel < m_kPanel[part]; panel++) { 00198 GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(1); 00199 } 00200 } 00201 } 00202 00203 for (int gap = 0; gap < m_kGap[part]; gap++) { 00204 GetVolumeGap(part, seg, gap)->SetVisibility(0); 00205 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00206 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0); 00207 } 00208 00209 for (int panel = 0; panel < m_kPanel[part]; panel++) { 00210 for(int bakelite = 0; bakelite < m_kBakelite; bakelite++) { 00211 GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(1); 00212 } 00213 for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) { 00214 GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(1); 00215 } 00216 } 00217 } 00218 } 00219 } 00220 00221 for (int part = 0; part < m_kPart; part++) { 00222 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00223 for (int gap = 0; gap < m_kGap[part]; gap++) { 00224 GetGap(part, seg, gap)->SetVisibility(1); 00225 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00226 GetStrip(part, seg, gap, strip)->SetVisibility(0); 00227 } 00228 } 00229 } 00230 } 00231 }
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 MucROOTGeo::SetDefaultVis | ( | ) |
Set default visual attributes;.
Definition at line 121 of file MucROOTGeo.cxx.
References GetGap(), GetStrip(), GetVolumeAbsorber(), GetVolumeAbsorberPanel(), GetVolumeBakelite(), GetVolumeGap(), GetVolumeGasChamber(), GetVolumeStrip(), GetVolumeStripPlane(), m_kAbsorber, m_kBakelite, m_kGap, m_kGasChamber, m_kPanel, m_kPart, m_kSeg, m_Muc, and m_StripNum.
00122 { 00123 //std::cout << "begin of set defaultvis" << std::endl; 00124 int mucColor = 2; 00125 int absorberColor = 2; 00126 int gapColor = 8; 00127 int gasChamberColor = 8; 00128 int bakeliteColor = 8; 00129 int stripColor = 6; 00130 00131 m_Muc->SetLineColor(mucColor); 00132 m_Muc->SetVisibility(0); 00133 00134 for (int part = 0; part < m_kPart; part++) { 00135 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00136 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) { 00137 GetVolumeAbsorber(part, seg, absorber)->SetLineColor(absorberColor); 00138 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0); 00139 if (part != 1) { 00140 for (int panel = 0; panel < m_kPanel[part]; panel++) { 00141 GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetLineColor(absorberColor); 00142 GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(0); 00143 } 00144 } 00145 } 00146 00147 for (int gap = 0; gap < m_kGap[part]; gap++) { 00148 GetVolumeGap(part, seg, gap)->SetLineColor(gapColor); 00149 GetVolumeGap(part, seg, gap)->SetVisibility(0); 00150 GetVolumeStripPlane(part, seg, gap)->SetLineColor(gapColor); 00151 GetVolumeStripPlane(part, seg, gap)->SetVisibility(0); 00152 00153 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00154 GetVolumeStrip(part, seg, gap, strip)->SetLineColor(stripColor); 00155 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(1); 00156 } 00157 00158 for (int panel = 0; panel < m_kPanel[part]; panel++) { 00159 for(int bakelite = 0; bakelite < m_kBakelite; bakelite++) { 00160 GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetLineColor(bakeliteColor); 00161 GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(0); 00162 } 00163 for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) { 00164 GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetLineColor(gasChamberColor); 00165 GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(0); 00166 } 00167 } 00168 } 00169 } 00170 } 00171 00172 for (int part = 0; part < m_kPart; part++) { 00173 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00174 for (int gap = 0; gap < m_kGap[part]; gap++) { 00175 GetGap(part, seg, gap)->SetVisibility(0); 00176 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00177 GetStrip(part, seg, gap, strip)->SetVisibility(0); 00178 } 00179 } 00180 } 00181 } 00182 00183 //std::cout << "end of set defaultvis" << std::endl; 00184 }
void MucROOTGeo::SetDetector | ( | ) |
Set Detecor (what is detector depends on you).
Definition at line 981 of file MucROOTGeo.cxx.
References GetAbsorberNb(), GetGapNb(), GetPartNb(), GetPhysicalAbsorber(), GetPhysicalGap(), GetSegNb(), BesView::GetVisFull3DMuc(), SubDetectorROOTGeo::m_DetectorsArray, and m_kPanelMax.
Referenced by BesClient::HandleViewOptionMenu().
00982 { 00983 BesView *view = 0; 00984 if (gPad) view = (BesView*)gPad->GetView(); 00985 00986 m_DetectorsArray->Clear(); 00987 for (int part = 0; part < GetPartNb(); part++) { 00988 for (int seg = 0; seg < GetSegNb(part); seg++) { 00989 for (int gap = 0; gap < GetGapNb(part); gap++) { 00990 TGeoPhysicalNode *phyNode = 0; 00991 phyNode = GetPhysicalGap(part, seg, gap); 00992 if (phyNode) { 00993 phyNode->SetVisibility(0); // set all invisible before set any visible 00994 if ( (part == 1 && seg <= 8) || 00995 (part == 0 && seg <= 3) || 00996 (part == 2 && seg <= 3) ) { 00997 m_DetectorsArray->Add( phyNode ); 00998 } 00999 else if (view && view->GetVisFull3DMuc()) { 01000 m_DetectorsArray->Add( phyNode ); 01001 } 01002 } 01003 } 01004 for (int absorber = 0; absorber < GetAbsorberNb(part); absorber++) { 01005 for (int panel = 0; panel < m_kPanelMax; panel++) { 01006 TGeoPhysicalNode *phyNode = 0; 01007 phyNode = GetPhysicalAbsorber(part, seg, absorber, panel); 01008 if (phyNode) { 01009 phyNode->SetVisibility(0); 01010 if ( (part == 1 && seg <= 8) || 01011 (part == 0 && seg <= 3) || 01012 (part == 2 && seg <= 3) ) { 01013 m_DetectorsArray->Add( phyNode ); 01014 } 01015 else if (view && view->GetVisFull3DMuc()) { 01016 m_DetectorsArray->Add( phyNode ); 01017 } 01018 } 01019 } 01020 } 01021 } 01022 } 01023 01024 }
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 MucROOTGeo::SetHalfVisible | ( | ) |
Set half visible;.
Definition at line 852 of file MucROOTGeo.cxx.
References GetGap(), GetVolumeAbsorber(), GetVolumeAbsorberPanel(), GetVolumeGap(), GetVolumeStrip(), and m_StripNum.
00853 { 00854 for (int part = 0; part < m_kPart; part++) { 00855 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00856 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) { 00857 if (part == 1) { 00858 if (seg < 3 || seg > 5) GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1); 00859 } 00860 else { 00861 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0); 00862 for (int panel = 0; panel < m_kPanel[part]; panel++) { 00863 if (seg == 0 || seg == 3) GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(1); 00864 } 00865 } 00866 } 00867 00868 for (int gap = 0; gap < m_kGap[part]; gap++) { 00869 if (part == 1 && (seg < 3 || seg > 5)) { 00870 GetVolumeGap(part, seg, gap)->SetVisibility(1); 00871 GetGap(part, seg, gap)->SetVisibility(1); 00872 } 00873 else { 00874 GetVolumeGap(part, seg, gap)->SetVisibility(0); 00875 GetGap(part, seg, gap)->SetVisibility(0); 00876 } 00877 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00878 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0); 00879 } 00880 00881 // for (int panel = 0; panel < m_kPanel[part]; panel++) { 00882 // for (int bakelite = 0; bakelite < m_kBakelite; bakelite++) { 00883 // if (part != 1 && (seg == 0 || seg == 3)) GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(1); 00884 // } 00885 // for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) { 00886 // if (part != 1 && (seg == 0 || seg == 3)) GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(1); 00887 // } 00888 // } 00889 } 00890 } 00891 } 00892 }
void MucROOTGeo::SetHits | ( | ) |
Set all physicalNodes corresponding to digiCol;.
Definition at line 1027 of file MucROOTGeo.cxx.
References Muc2DStrip::AddInfo(), Muc2DStrip::ClearInfo(), Muc2DStrip::CloseInfo(), MucID::gap(), BesEvent::GetMucDigiCol(), GetPhysicalStrip(), gEvent, genRecEmupikp::i, SubDetectorROOTGeo::m_2DHitsArray, SubDetectorROOTGeo::m_HitsArray, m_Muc2DStrip, m_MucDigiCol, MucID::part(), MucID::seg(), and MucID::strip().
Referenced by BesEvent::SetHits().
01028 { 01029 // set previous event hits to default vis 01030 for (int i = 0; i < m_HitsArray->GetEntries(); i++) { 01031 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i); 01032 phyNode->SetLineColor(m_stripColor); 01033 phyNode->SetVisibility(0); 01034 } 01035 m_HitsArray->Clear("C"); 01036 01037 // set previous event 2D hits info to default 01038 for (int i = 0; i < m_2DHitsArray->GetEntries(); i++) { 01039 Muc2DStrip *aStrip = (Muc2DStrip*)m_2DHitsArray->At(i); 01040 aStrip->ClearInfo(); 01041 aStrip->AddInfo(aStrip->GetTitle()); 01042 aStrip->CloseInfo(); 01043 } 01044 m_2DHitsArray->Clear("C"); 01045 01046 if (gEvent) m_MucDigiCol = gEvent->GetMucDigiCol(); 01047 01048 for (int i = 0; i < m_MucDigiCol->GetEntries(); i++) { 01049 Identifier aMucID( ((TMucDigi*)m_MucDigiCol->At(i))->getIntId() ); 01050 int part = MucID::part( aMucID ); 01051 int seg = MucID::seg( aMucID ); 01052 int gap = MucID::gap( aMucID ); 01053 int strip = MucID::strip( aMucID ); 01054 01055 TGeoPhysicalNode *phyNode = 0; 01056 phyNode = GetPhysicalStrip( part, seg, gap, strip ); 01057 if (phyNode) m_HitsArray->Add( phyNode ); 01058 01059 Muc2DStrip *aStrip = 0; 01060 aStrip = m_Muc2DStrip[part][seg][gap][strip]; 01061 if (aStrip) { 01062 aStrip->ClearInfo(); 01063 aStrip->AddInfo(aStrip->GetTitle()); 01064 01065 char data[100]; 01066 sprintf(data, "Fired"); 01067 aStrip->AddInfo( TString(data) ); 01068 01069 aStrip->CloseInfo(); 01070 01071 m_2DHitsArray->Add(aStrip); 01072 } 01073 } 01074 }
void MucROOTGeo::SetNode | ( | ) |
Set the pointers to theirs nodes;.
void MucROOTGeo::SetNode | ( | ) |
Set the pointers to theirs nodes;.
Definition at line 69 of file MucROOTGeo.cxx.
References SubDetectorROOTGeo::GetLogicalVolume(), SubDetectorROOTGeo::GetNode(), SubDetectorROOTGeo::GetTopVolume(), GetVolumeStripPlane(), m_kGap, m_kPart, m_kSeg, m_Muc, m_NodeGap, m_NodeStrip, m_NodeStripPlane, m_StripNum, and subSeperate::temp.
Referenced by Init2DGeometry(), InitFromGDML(), InitFromGdml(), and InitFromROOT().
00070 { 00071 m_Muc = GetTopVolume(); 00072 if(!m_Muc) { 00073 m_Muc = GetLogicalVolume("logicalMuc"); 00074 } 00075 if(!m_Muc) std::cout << "m_Muc = 0" << std::endl; 00076 00077 int gapCount = 0; 00078 for (int part = 0; part < m_kPart; part++) { 00079 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00080 for (int gap = 0; gap < m_kGap[part]; gap++) { 00081 m_StripNum[part][seg][gap] = GetVolumeStripPlane(part, seg, gap)->GetNdaughters(); 00082 //std::cout << part << " " << seg << " " << gap << " " << m_StripNum[part][seg][gap] <<" "<<GetVolumeStripPlane(part, seg, gap)->GetName()<< std::endl; 00083 00084 std::stringstream osnameGap; 00085 osnameGap << "pv_" << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap << "_" << gapCount; 00086 m_NodeGap[part][seg][gap] = GetNode( osnameGap.str() ); 00087 gapCount++; 00088 00089 //cout<<"in MucROOTGeo "<<m_NodeGap[part][seg][gap]->GetName()<<" "<<m_NodeGap[part][seg][gap]->GetDaughter(0)->GetName()<<endl; 00090 00091 std::stringstream osnameBox; 00092 osnameBox << "pv_" << "l" << "Muc" << "P" << part << "S" << seg << "G" << gap << "Al" << "_" << "0"; 00093 // m_NodeAluminumBox[part][seg][gap] = GetNode( osnameBox.str() ); 00094 TGeoNode *temp = GetNode( osnameBox.str() ); 00095 00096 int segment = 0; if(part==1&&seg==2) segment = 2; 00097 std::stringstream osnameStripPlane; 00098 osnameStripPlane << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "SP" << "_" << "0"; 00099 m_NodeStripPlane[part][seg][gap] = GetNode( osnameStripPlane.str() ); 00100 00101 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00102 std::stringstream osnameStrip; 00103 if(strip < 10) { 00104 osnameStrip << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "s" << "00" << strip << "_" << strip; 00105 } 00106 else if(strip < 100) { 00107 osnameStrip << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "s" << "0" << strip << "_" << strip; 00108 } 00109 else { 00110 osnameStrip << "pv_" << "l" << "Muc" << "P" << part << "S" << segment << "G" << gap << "s" << strip << "_" << strip; 00111 } 00112 00113 m_NodeStrip[part][seg][gap][strip] = GetNode( osnameStrip.str() ); 00114 } 00115 } 00116 } 00117 } 00118 }
void MucROOTGeo::SetNoEndVisible | ( | ) |
Set noend visible;.
Definition at line 895 of file MucROOTGeo.cxx.
References GetGap(), GetVolumeAbsorber(), and GetVolumeGap().
00896 { 00897 int part = 1; 00898 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00899 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) { 00900 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1); 00901 } 00902 00903 for (int gap = 0; gap < m_kGap[part]; gap++) { 00904 GetVolumeGap(part, seg, gap)->SetVisibility(1); 00905 GetGap(part, seg, gap)->SetVisibility(1); 00906 } 00907 } 00908 }
void MucROOTGeo::SetPhysicalNode | ( | ) |
Set the pointers to the physical nodes;.
void MucROOTGeo::SetPhysicalNode | ( | ) |
Set the pointers to the physical nodes;.
Definition at line 278 of file MucROOTGeo.cxx.
References GetGap(), GetStrip(), GetStripPlane(), SubDetectorROOTGeo::m_childNo, m_kGap, m_kPart, m_kSeg, m_PhysicalGap, m_PhysicalStrip, and m_StripNum.
Referenced by MucGeoGeneral::InitFromXML(), and BesGeometry::InitGeometry().
00279 { 00280 int stripColor = 2; 00281 00282 if (gGeoManager == 0) std::cout << "Create gGeoManager first" << std::endl; 00283 TGeoNode *bes = gGeoManager->GetTopNode(); 00284 TGeoNode *muc = bes->GetDaughter(m_childNo); 00285 00286 for (int part = 0; part < m_kPart; part++) { 00287 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00288 for (int gap = 0; gap < m_kGap[part]; gap++) { 00289 TGeoNode *nodeGap = GetGap(part, seg, gap); 00290 m_PhysicalGap[part][seg][gap] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() + 00291 TString("/") + muc->GetName() + 00292 TString("/") + nodeGap->GetName() + 00293 TString("/") + nodeGap->GetDaughter(0)->GetName()); 00294 m_PhysicalGap[part][seg][gap]->SetVisibility(0); 00295 m_PhysicalGap[part][seg][gap]->SetIsVolAtt(kFALSE); 00296 00297 TGeoNode *nodeStripPlane = GetStripPlane(part, seg, gap); 00298 //std::cout << nodeGap->GetName() << " " << nodeStripPlane->GetName() << endl; 00299 00300 //TGeoNode *nodeBox = GetAluminumBox(part, seg, gap); 00301 // m_PhysicalAluminumBox[part][seg][gap] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() + 00302 // TString("/") + muc->GetName() + 00303 // TString("/") + nodeGap->GetName() + 00304 // TString("/") + nodeGap->GetDaughter(0)->GetName() ); 00305 00306 00307 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00308 TGeoNode *nodeStrip = GetStrip(part, seg, gap, strip); 00309 m_PhysicalStrip[part][seg][gap][strip] = gGeoManager->MakePhysicalNode( TString("/") + bes->GetName() + 00310 TString("/") + muc->GetName() + 00311 TString("/") + nodeGap->GetName() + 00312 TString("/") + nodeGap->GetDaughter(0)->GetName() + 00313 TString("/") + nodeStripPlane->GetName() + 00314 TString("/") + nodeStrip->GetName() ); 00315 m_PhysicalStrip[part][seg][gap][strip]->SetVisibility(0); 00316 m_PhysicalStrip[part][seg][gap][strip]->SetIsVolAtt(kFALSE); 00317 m_PhysicalStrip[part][seg][gap][strip]->SetLineColor(stripColor); 00318 } 00319 } 00320 } 00321 } 00322 }
void MucROOTGeo::SetQuarterVisible | ( | ) |
Set quater visible;.
void MucROOTGeo::SetQuarterVisible | ( | ) |
Set quater visible;.
Definition at line 234 of file MucROOTGeo.cxx.
References GetGap(), GetVolumeAbsorber(), GetVolumeAbsorberPanel(), GetVolumeBakelite(), GetVolumeGap(), GetVolumeGasChamber(), GetVolumeStrip(), m_kAbsorber, m_kBakelite, m_kGap, m_kGasChamber, m_kPanel, m_kPart, m_kSeg, and m_StripNum.
00235 { 00236 for (int part = 0; part < m_kPart; part++) { 00237 for (int seg = 0; seg < m_kSeg[part]; seg++) { 00238 for (int absorber = 0; absorber < m_kAbsorber[part]; absorber++) { 00239 if(part == 1) { 00240 if(seg > 2) GetVolumeAbsorber(part, seg, absorber)->SetVisibility(1); 00241 } 00242 else { 00243 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0); 00244 for (int panel = 0; panel < m_kPanel[part]; panel++) { 00245 if(seg > 0 && seg < 3) GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(1); 00246 } 00247 } 00248 } 00249 00250 for (int gap = 0; gap < m_kGap[part]; gap++) { 00251 if (part == 1 && seg > 2) { 00252 GetVolumeGap(part, seg, gap)->SetVisibility(1); 00253 GetGap(part, seg, gap)->SetVisibility(1); 00254 } 00255 else { 00256 GetVolumeGap(part, seg, gap)->SetVisibility(0); 00257 GetGap(part, seg, gap)->SetVisibility(0); 00258 } 00259 for (int strip = 0; strip < m_StripNum[part][seg][gap]; strip++) { 00260 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0); 00261 } 00262 00263 for (int panel = 0; panel < m_kPanel[part]; panel++) { 00264 for (int bakelite = 0; bakelite < m_kBakelite; bakelite++) { 00265 if ((part != 1 && seg > 0 && seg < 3) || (part == 1 && seg > 2)) GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(1); 00266 } 00267 for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) { 00268 if ((part != 1 && seg > 0 && seg < 3) || (part == 1 && seg > 2)) GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(1); 00269 } 00270 } 00271 } 00272 } 00273 } 00274 00275 }
void MucROOTGeo::SetVisMucDetector | ( | ) |
Set Muc detector visibility;.
Definition at line 1077 of file MucROOTGeo.cxx.
References GetPart(), BesView::GetVisMucBarrel(), BesView::GetVisMucEast(), BesView::GetVisMucGlobal(), BesView::GetVisMucWest(), genRecEmupikp::i, and SubDetectorROOTGeo::m_DetectorsArray.
Referenced by BesGeometry::Draw3D(), and BesClient::HandleViewOptionMenu().
01078 { 01079 BesView *view = 0; 01080 if (gPad) view = (BesView*)gPad->GetView(); 01081 01082 for (int i = 0; i < m_DetectorsArray->GetEntries(); i++) { 01083 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_DetectorsArray->At(i); 01084 phyNode->SetVisibility(0); 01085 01086 if (view && view->GetVisMucGlobal()) { 01087 int part = GetPart(phyNode); 01088 if (part == 0 && view->GetVisMucEast() || 01089 part == 1 && view->GetVisMucBarrel() || 01090 part == 2 && view->GetVisMucWest() ) 01091 phyNode->SetVisibility(1); 01092 } 01093 } 01094 }
void MucROOTGeo::SetVisMucHits | ( | ) |
Set Muc hits visibility;.
Definition at line 1097 of file MucROOTGeo.cxx.
References GetPart(), BesView::GetVisMucHitsBarrel(), BesView::GetVisMucHitsEast(), BesView::GetVisMucHitsGlobal(), BesView::GetVisMucHitsWest(), genRecEmupikp::i, and SubDetectorROOTGeo::m_HitsArray.
Referenced by BesGeometry::Draw3D().
01098 { 01099 BesView *view = 0; 01100 if (gPad) view = (BesView*)gPad->GetView(); 01101 01102 for (int i = 0; i < m_HitsArray->GetEntries(); i++) { 01103 TGeoPhysicalNode *phyNode = (TGeoPhysicalNode*)m_HitsArray->At(i); 01104 if (view && view->GetVisMucHitsGlobal()) { 01105 int part = GetPart(phyNode); 01106 if (part == 0 && view->GetVisMucHitsEast() || 01107 part == 1 && view->GetVisMucHitsBarrel() || 01108 part == 2 && view->GetVisMucHitsWest() ) { 01109 phyNode->SetVisibility(1); 01110 //phyNode->SetLineColor(kRed); 01111 continue; 01112 } 01113 } 01114 phyNode->SetVisibility(0); 01115 } 01116 }
void MucROOTGeo::SetVolumeDefaultVis | ( | ) |
Set default visual attributes;.
Definition at line 629 of file MucROOTGeo.cxx.
References GetAbsorberNb(), GetGap(), GetGapNb(), GetPartNb(), GetSegNb(), GetStrip(), GetStripNb(), GetVolumeAbsorber(), GetVolumeAbsorberSmallBlock(), GetVolumeBakelite(), GetVolumeBox(), GetVolumeBoxSurface(), GetVolumeGap(), GetVolumeGasBorder(), GetVolumeGasChamber(), GetVolumeStrip(), GetVolumeStripPlane(), m_absorberColor, m_bakeliteColor, m_gapColor, m_gasChamberColor, m_kBakelite, m_kBakelitePanel, m_kPanel, m_kSmallBlockMax, m_Muc, m_MucColor, and m_stripColor.
00630 { 00631 m_Muc->SetLineColor(m_MucColor); 00632 m_Muc->SetVisibility(0); 00633 00634 for (int part = 0; part < GetPartNb(); part++) { 00635 for (int seg = 0; seg < GetSegNb(part); seg++) { 00636 for (int absorber = 0; absorber < GetAbsorberNb(part); absorber++) { 00637 GetVolumeAbsorber(part, seg, absorber)->SetLineColor(m_absorberColor); 00638 GetVolumeAbsorber(part, seg, absorber)->SetVisibility(0); 00639 // if (part != 1) { 00640 // for (int panel = 0; panel < m_kPanel[part]; panel++) { 00641 // GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetLineColor(m_absorberColor); 00642 // GetVolumeAbsorberPanel(part, seg, absorber, panel)->SetVisibility(0); 00643 // } 00644 // } 00645 } 00646 00647 for (int gap = 0; gap < GetGapNb(part); gap++) { 00648 GetVolumeGap(part, seg, gap)->SetLineColor(m_gapColor); 00649 GetVolumeGap(part, seg, gap)->SetVisibility(0); 00650 00651 GetVolumeBox(part, seg, gap)->SetLineColor(m_gapColor); 00652 GetVolumeBox(part, seg, gap)->SetVisibility(0); 00653 00654 if (part == 1){ 00655 for (int sb = 0; sb < m_kSmallBlockMax; sb++){ 00656 GetVolumeAbsorberSmallBlock( gap, sb)->SetLineColor(m_absorberColor); 00657 GetVolumeAbsorberSmallBlock( gap, sb)->SetVisibility(0); 00658 } 00659 } 00660 00661 GetVolumeStripPlane(part, seg, gap)->SetLineColor(m_gapColor); 00662 GetVolumeStripPlane(part, seg, gap)->SetVisibility(0); 00663 00664 for (int strip = 0; strip < GetStripNb(part, seg, gap); strip++) { 00665 GetVolumeStrip(part, seg, gap, strip)->SetLineColor(m_stripColor); 00666 GetVolumeStrip(part, seg, gap, strip)->SetVisibility(0); 00667 } 00668 00669 for (int up = 0; up < 2; up ++){ 00670 GetVolumeBoxSurface(part, seg, gap, up)->SetLineColor(m_bakeliteColor); //need change 00671 GetVolumeBoxSurface(part, seg, gap, up)->SetVisibility(0); 00672 int seg_shift = 0; 00673 if (part == 1 && seg == 2)seg_shift = 1; 00674 for (int panel = 0; panel < m_kPanel[part] + seg_shift; panel++) { 00675 GetVolumeGasChamber(part, seg, gap, up, panel)->SetLineColor(m_gasChamberColor); 00676 GetVolumeGasChamber(part, seg, gap, up, panel)->SetVisibility(0); 00677 00678 GetVolumeGasBorder(part, seg, gap, up, panel)->SetLineColor(m_bakeliteColor); 00679 GetVolumeGasBorder(part, seg, gap, up, panel)->SetVisibility(0); 00680 00681 } 00682 for (int panel = 0; panel < m_kBakelitePanel[part][up] + seg_shift; panel++) { 00683 for (int bakelite = 0; bakelite < m_kBakelite; bakelite++) { 00684 GetVolumeBakelite(part, seg, gap, up, panel, bakelite)->SetLineColor(m_bakeliteColor); 00685 GetVolumeBakelite(part, seg, gap, up, panel, bakelite)->SetVisibility(0); 00686 } 00687 } 00688 } 00689 00690 // for (int panel = 0; panel < m_kPanel[part]; panel++) { //comment out 2007.1.2 00691 // for(int bakelite = 0; bakelite < m_kBakelite; bakelite++) { 00692 // GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetLineColor(m_bakeliteColor); 00693 // GetVolumeBakelite(part, seg, gap, panel, bakelite)->SetVisibility(0); 00694 // } 00695 // for (int gasChamber = 0; gasChamber < m_kGasChamber; gasChamber++) { 00696 // GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetLineColor(m_gasChamberColor); 00697 // GetVolumeGasChamber(part, seg, gap, panel, gasChamber)->SetVisibility(0); 00698 // } 00699 // } 00700 } 00701 } 00702 } 00703 00704 for (int part = 0; part < GetPartNb(); part++) { 00705 for (int seg = 0; seg < GetSegNb(part); seg++) { 00706 for (int gap = 0; gap < GetGapNb(part); gap++) { 00707 GetGap(part, seg, gap)->SetVisibility(0); 00708 for (int strip = 0; strip < GetStripNb(part, seg, gap); strip++) { 00709 GetStrip(part, seg, gap, strip)->SetVisibility(0); 00710 } 00711 } 00712 } 00713 } 00714 00715 }
void MucROOTGeo::SetVolumeMuc | ( | TGeoVolume * | vol | ) | [inline] |
Set Muc volume, while initializing from ROOT;.
Definition at line 98 of file MucROOTGeo.h.
References m_Muc.
Referenced by InitFromROOT().
00098 { m_Muc = vol; }
int SubDetectorROOTGeo::m_2DGeoInit [protected, inherited] |
Definition at line 79 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::Draw(), Draw(), MdcROOTGeo::Draw(), EmcROOTGeo::Draw(), TofROOTGeo::Init2DGeometry(), Init2DGeometry(), MdcROOTGeo::Init2DGeometry(), and EmcROOTGeo::Init2DGeometry().
TObjArray* SubDetectorROOTGeo::m_2DHitsArray [protected, inherited] |
Definition at line 85 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::SetHits(), SetHits(), MdcROOTGeo::SetHits(), and EmcROOTGeo::SetHits().
int MucROOTGeo::m_absorberColor [private] |
int MucROOTGeo::m_bakeliteColor [private] |
int SubDetectorROOTGeo::m_childNo [protected, inherited] |
Definition at line 67 of file SubDetectorROOTGeo.h.
Referenced by SubDetectorROOTGeo::SetChildNo(), TofROOTGeo::SetPhysicalNode(), SetPhysicalNode(), and MdcROOTGeo::SetPhysicalNode().
TObjArray* SubDetectorROOTGeo::m_DetectorsArray [protected, inherited] |
Definition at line 83 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::SetDetector(), SetDetector(), MdcROOTGeo::SetDetector(), EmcROOTGeo::SetDetector(), SubDetectorROOTGeo::SetDetectorOn(), EmcROOTGeo::SetVisEmcDetector(), MdcROOTGeo::SetVisMdcDetector(), SetVisMucDetector(), and TofROOTGeo::SetVisTofDetector().
int MucROOTGeo::m_gapColor [private] |
int MucROOTGeo::m_gasChamberColor [private] |
TObjArray* SubDetectorROOTGeo::m_HitsArray [protected, inherited] |
Definition at line 84 of file SubDetectorROOTGeo.h.
Referenced by SubDetectorROOTGeo::GetHit(), SubDetectorROOTGeo::GetHitsNum(), TofROOTGeo::SetHits(), SetHits(), MdcROOTGeo::SetHits(), EmcROOTGeo::SetHits(), EmcROOTGeo::SetVisEmcHits(), MdcROOTGeo::SetVisMdcHits(), SetVisMucHits(), and TofROOTGeo::SetVisTofHits().
const int MucROOTGeo::m_kAbsorber = {9, 9, 9} [static, private] |
Definition at line 143 of file MucROOTGeo.h.
Referenced by SetAllVisible(), SetDefaultVis(), and SetQuarterVisible().
static const int MucROOTGeo::m_kAbsorberMax = 9 [static, private] |
Definition at line 135 of file MucROOTGeo.h.
static const int MucROOTGeo::m_kBakelite = 4 [static, private] |
Definition at line 139 of file MucROOTGeo.h.
Referenced by SetAllVisible(), SetDefaultVis(), SetQuarterVisible(), and SetVolumeDefaultVis().
const int MucROOTGeo::m_kBakelitePanel = {3, 5, 4, 4, 3, 5} [static, private] |
const int MucROOTGeo::m_kGap = {8, 9, 8} [static, private] |
Definition at line 144 of file MucROOTGeo.h.
Referenced by GetGapNum(), SetAllVisible(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetQuarterVisible().
static const int MucROOTGeo::m_kGapMax = 9 [static, private] |
static const int MucROOTGeo::m_kGasChamber = 2 [static, private] |
Definition at line 140 of file MucROOTGeo.h.
Referenced by SetAllVisible(), SetDefaultVis(), and SetQuarterVisible().
const int MucROOTGeo::m_kPanel = {4, 3, 4} [static, private] |
Definition at line 145 of file MucROOTGeo.h.
Referenced by SetAllVisible(), SetDefaultVis(), SetQuarterVisible(), and SetVolumeDefaultVis().
static const int MucROOTGeo::m_kPanelMax = 4 [static, private] |
static const int MucROOTGeo::m_kPart = 3 [static, private] |
Definition at line 133 of file MucROOTGeo.h.
Referenced by GetPartNum(), MucROOTGeo(), SetAllVisible(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetQuarterVisible().
const int MucROOTGeo::m_kSeg = {4, 8, 4} [static, private] |
Definition at line 142 of file MucROOTGeo.h.
Referenced by GetSegNum(), SetAllVisible(), SetDefaultVis(), SetNode(), SetPhysicalNode(), and SetQuarterVisible().
static const int MucROOTGeo::m_kSegMax = 8 [static, private] |
const int MucROOTGeo::m_kSmallBlockMax = 2 [static, private] |
static const int MucROOTGeo::m_kStripMax = 112 [static, private] |
const Int_t MucROOTGeo::m_kStripZMuliple = 12 [static, private] |
const int MucROOTGeo::m_kUpDown = 2 [static, private] |
Definition at line 195 of file MucROOTGeo.h.
TGeoVolume* MucROOTGeo::m_Muc [private] |
Definition at line 214 of file MucROOTGeo.h.
TGeoVolume* MucROOTGeo::m_Muc [private] |
Definition at line 149 of file MucROOTGeo.h.
Referenced by GetVolumeMuc(), Init2DGeometry(), SetDefaultVis(), SetNode(), SetVolumeDefaultVis(), and SetVolumeMuc().
Muc2DStrip* MucROOTGeo::m_Muc2DStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] [private] |
Definition at line 233 of file MucROOTGeo.h.
Referenced by Draw(), DrawHits(), Get2DStrip(), Init2DGeometry(), and SetHits().
int MucROOTGeo::m_MucColor [private] |
const TObjArray* MucROOTGeo::m_MucDigiCol [private] |
BesPolygon2D* MucROOTGeo::m_MucXY[m_kPart][m_kSegMax] [private] |
BesPolygon2D* MucROOTGeo::m_MucXYGap[m_kPart][m_kSegMax][m_kGapMax] [private] |
BesPolygon2D* MucROOTGeo::m_MucZR[m_kPart][m_kSegMax] [private] |
BesPolygon2D* MucROOTGeo::m_MucZRGap[m_kPart][m_kSegMax][m_kGapMax] [private] |
TGeoNode* MucROOTGeo::m_NodeAbsorber[m_kPart][m_kSegMax][m_kAbsorberMax] [private] |
TGeoNode* MucROOTGeo::m_NodeAbsorberPanel[m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax] [private] |
TGeoNode* MucROOTGeo::m_NodeGap[m_kPart][m_kSegMax][m_kGapMax] [private] |
Definition at line 217 of file MucROOTGeo.h.
TGeoNode* MucROOTGeo::m_NodeGap[m_kPart][m_kSegMax][m_kGapMax] [private] |
Definition at line 150 of file MucROOTGeo.h.
Referenced by GetGap(), Init2DGeometry(), MucROOTGeo(), and SetNode().
TGeoNode* MucROOTGeo::m_NodeStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] [private] |
Definition at line 219 of file MucROOTGeo.h.
TGeoNode* MucROOTGeo::m_NodeStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] [private] |
Definition at line 153 of file MucROOTGeo.h.
Referenced by GetStrip(), Init2DGeometry(), MucROOTGeo(), and SetNode().
TGeoNode* MucROOTGeo::m_NodeStripPlane[m_kPart][m_kSegMax][m_kGapMax] [private] |
Definition at line 218 of file MucROOTGeo.h.
TGeoNode* MucROOTGeo::m_NodeStripPlane[m_kPart][m_kSegMax][m_kGapMax] [private] |
Definition at line 152 of file MucROOTGeo.h.
Referenced by GetStripPlane(), Init2DGeometry(), and SetNode().
TGeoPhysicalNode* MucROOTGeo::m_PhysicalAbsorber[m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax] [private] |
TGeoPhysicalNode* MucROOTGeo::m_PhysicalGap[m_kPart][m_kSegMax][m_kGapMax] [private] |
Definition at line 222 of file MucROOTGeo.h.
TGeoPhysicalNode* MucROOTGeo::m_PhysicalGap[m_kPart][m_kSegMax][m_kGapMax] [private] |
Definition at line 155 of file MucROOTGeo.h.
Referenced by GetPhysicalGap(), MucROOTGeo(), and SetPhysicalNode().
TGeoPhysicalNode* MucROOTGeo::m_PhysicalStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] [private] |
Definition at line 223 of file MucROOTGeo.h.
TGeoPhysicalNode* MucROOTGeo::m_PhysicalStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax] [private] |
Definition at line 157 of file MucROOTGeo.h.
Referenced by GetPhysicalStrip(), MucROOTGeo(), and SetPhysicalNode().
int SubDetectorROOTGeo::m_ROOTGeoInit [protected, inherited] |
Definition at line 66 of file SubDetectorROOTGeo.h.
Referenced by TofROOTGeo::Init2DGeometry(), Init2DGeometry(), MdcROOTGeo::Init2DGeometry(), EmcROOTGeo::Init2DGeometry(), TofROOTGeo::InitFromGDML(), TofROOTGeo::InitFromGdml(), InitFromGDML(), InitFromGdml(), MdcROOTGeo::InitFromGDML(), MdcROOTGeo::InitFromGdml(), EmcROOTGeo::InitFromGDML(), EmcROOTGeo::InitFromGdml(), TofROOTGeo::InitFromROOT(), InitFromROOT(), MdcROOTGeo::InitFromROOT(), EmcROOTGeo::InitFromROOT(), and SubDetectorROOTGeo::IsInitialized().
int MucROOTGeo::m_stripColor [private] |
int MucROOTGeo::m_StripNum [private] |
Definition at line 147 of file MucROOTGeo.h.
Referenced by GetStripNum(), Init2DGeometry(), SetAllVisible(), SetDefaultVis(), SetHalfVisible(), SetNode(), SetPhysicalNode(), and SetQuarterVisible().
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().