Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BesGeometry Class Reference

#include <BesGeometry.h>

List of all members.

Public Member Functions

 BesGeometry ()
 BesGeometry ()
virtual void Draw (Option_t *option="3D")
virtual void Draw (Option_t *option="3D")
virtual void Draw2DXY ()
virtual void Draw2DXY ()
virtual void Draw2DZR ()
virtual void Draw2DZR ()
virtual void Draw3D ()
virtual void Draw3D ()
Float_t GetBesR ()
Float_t GetBesR ()
Float_t GetBesZ ()
Float_t GetBesZ ()
EmcROOTGeoGetEmcROOTGeo ()
EmcROOTGeoGetEmcROOTGeo ()
const char * GetFilename (const char *RunPeriod)
const char * GetFilename (const char *RunPeriod)
MdcROOTGeoGetMdcROOTGeo ()
MdcROOTGeoGetMdcROOTGeo ()
MucROOTGeoGetMucROOTGeo ()
MucROOTGeoGetMucROOTGeo ()
TGeoPhysicalNode * GetPhysicalEmcCrystal (int part, int phi, int theta)
TGeoPhysicalNode * GetPhysicalEmcCrystal (int part, int phi, int theta)
TGeoPhysicalNode * GetPhysicalMdcReplica (int layer, int replica)
TGeoPhysicalNode * GetPhysicalMdcReplica (int layer, int replica)
TGeoPhysicalNode * GetPhysicalMucGap (int part, int seg, int gap)
TGeoPhysicalNode * GetPhysicalMucGap (int part, int seg, int gap)
TGeoPhysicalNode * GetPhysicalMucStrip (int part, int seg, int gap, int strip)
TGeoPhysicalNode * GetPhysicalMucStrip (int part, int seg, int gap, int strip)
TGeoPhysicalNode * GetPhysicalTofScin (int part, int layer, int scin)
TGeoPhysicalNode * GetPhysicalTofScin (int part, int layer, int scin)
TofROOTGeoGetTofROOTGeo ()
TofROOTGeoGetTofROOTGeo ()
TGeoVolume * GetVolBes ()
TGeoVolume * GetVolBes ()
TGeoVolume * GetVolumeBeamPipe ()
TGeoVolume * GetVolumeBeamPipe ()
TGeoVolume * GetVolumeEmc ()
TGeoVolume * GetVolumeEmc ()
TGeoVolume * GetVolumeEmcCrystal (int part, int phi, int theta)
TGeoVolume * GetVolumeEmcCrystal (int part, int phi, int theta)
TGeoVolume * GetVolumeEmcPart (int part)
TGeoVolume * GetVolumeEmcPart (int part)
TGeoVolume * GetVolumeEmcPhi (int part, int phi)
TGeoVolume * GetVolumeEmcPhi (int part, int phi)
TGeoVolume * GetVolumeEmcTheta (int part, int phi, int theta)
TGeoVolume * GetVolumeEmcTheta (int part, int phi, int theta)
TGeoVolume * GetVolumeMdc ()
TGeoVolume * GetVolumeMdc ()
TGeoVolume * GetVolumeMdcLayer (int layer)
TGeoVolume * GetVolumeMdcLayer (int layer)
TGeoVolume * GetVolumeMdcReplica (int layer)
TGeoVolume * GetVolumeMdcReplica (int layer)
TGeoVolume * GetVolumeMdcSegment (int segment)
TGeoVolume * GetVolumeMdcSegment (int segment)
TGeoVolume * GetVolumeMuc ()
TGeoVolume * GetVolumeMuc ()
TGeoVolume * GetVolumeMucAbsorber (int part, int seg, int absorber)
TGeoVolume * GetVolumeMucAbsorber (int part, int seg, int absorber)
TGeoVolume * GetVolumeMucAbsorberPanel (int part, int seg, int absorber, int panel)
TGeoVolume * GetVolumeMucAbsorberPanel (int part, int seg, int absorber, int panel)
TGeoVolume * GetVolumeMucBakelite (int part, int seg, int gap, int RpcUpDown, int panel, int bakelite)
TGeoVolume * GetVolumeMucBakelite (int part, int seg, int gap, int RpcUpDown, int panel, int bakelite)
TGeoVolume * GetVolumeMucGap (int part, int seg, int gap)
TGeoVolume * GetVolumeMucGap (int part, int seg, int gap)
TGeoVolume * GetVolumeMucGasChamber (int part, int seg, int gap, int panel, int gasChamber)
TGeoVolume * GetVolumeMucGasChamber (int part, int seg, int gap, int panel, int gasChamber)
TGeoVolume * GetVolumeMucStrip (int part, int seg, int gap, int strip)
TGeoVolume * GetVolumeMucStrip (int part, int seg, int gap, int strip)
TGeoVolume * GetVolumeMucStripPlane (int part, int seg, int gap)
TGeoVolume * GetVolumeMucStripPlane (int part, int seg, int gap)
TGeoVolume * GetVolumeTof ()
TGeoVolume * GetVolumeTof ()
virtual void InitFromGDML (const TString fPath)
virtual void InitFromGDML (const TString fPath)
virtual void InitFromROOT (TGeoVolume *volBes)
virtual void InitFromROOT (TGeoVolume *volBes)
virtual void InitGeometry ()
virtual void InitGeometry ()
virtual void SetDefaultVis ()
virtual void SetDefaultVis ()
virtual ~BesGeometry ()
virtual ~BesGeometry ()

Private Attributes

TGeoVolume * m_BeamPipe
TGeoVolume * m_BeamPipe
Double_t m_BeamPipeRMax
Double_t m_BeamPipeRMin
BesCircle2Dm_BeamPipeXY
BesCircle2Dm_BeamPipeXY
Double_t m_BeamPipeZ
BesPolygon2Dm_BeamPipeZR
BesPolygon2Dm_BeamPipeZR
TGeoVolume * m_Bes
TGeoVolume * m_Bes
Double_t m_BesR
Double_t m_BesZ
TGeoVolume * m_Emc
TGeoVolume * m_Emc
EmcROOTGeom_EmcROOTGeo
EmcROOTGeom_EmcROOTGeo
TGeoVolume * m_Mdc
TGeoVolume * m_Mdc
MdcROOTGeom_MdcROOTGeo
MdcROOTGeom_MdcROOTGeo
TGeoVolume * m_Muc
TGeoVolume * m_Muc
MucROOTGeom_MucROOTGeo
MucROOTGeom_MucROOTGeo
TGeoVolume * m_Tof
TGeoVolume * m_Tof
TofROOTGeom_TofROOTGeo
TofROOTGeom_TofROOTGeo
BesPolygon2Dm_ZRPlaneOnXY
BesPolygon2Dm_ZRPlaneOnXY


Constructor & Destructor Documentation

BesGeometry::BesGeometry  ) 
 

BesGeometry::~BesGeometry  )  [virtual]
 

00053 {
00054     delete m_Bes;
00055     delete m_BeamPipe;
00056 
00057     delete m_MdcROOTGeo;
00058     delete m_TofROOTGeo;
00059     delete m_EmcROOTGeo;
00060     delete m_MucROOTGeo;
00061 }

BesGeometry::BesGeometry  ) 
 

virtual BesGeometry::~BesGeometry  )  [virtual]
 


Member Function Documentation

virtual void BesGeometry::Draw Option_t *  option = "3D"  )  [virtual]
 

void BesGeometry::Draw Option_t *  option = "3D"  )  [virtual]
 

00280 {
00281     //
00282     // BesGeometry draw function
00283     TString opt = option;
00284     opt.ToUpper();
00285 
00286     if ( opt.Contains("3D") ) {
00287         Draw3D();
00288     }
00289     else if ( opt.Contains("XY") ) {
00290         Draw2DXY();
00291     }
00292     else if ( opt.Contains("ZR") ) {
00293         Draw2DZR();
00294     }
00295 }

virtual void BesGeometry::Draw2DXY  )  [virtual]
 

void BesGeometry::Draw2DXY  )  [virtual]
 

00341 {
00342     BesView *view = (BesView*)gPad->GetView();
00343 
00344     if (view && view->GetVisBeamPipe())    m_BeamPipeXY->Draw();
00345 
00346     if (m_MdcROOTGeo) m_MdcROOTGeo->Draw("XY");
00347     if (m_TofROOTGeo) m_TofROOTGeo->Draw("XY");
00348     if (m_EmcROOTGeo) m_EmcROOTGeo->Draw("XY");
00349     if (m_MucROOTGeo) m_MucROOTGeo->Draw("XY");
00350 
00351     if (view && view->GetVisZRPlaneOnXY()) m_ZRPlaneOnXY->Draw();
00352     if (view && view->GetVisAxis())        view->ShowAxis();
00353 }

virtual void BesGeometry::Draw2DZR  )  [virtual]
 

void BesGeometry::Draw2DZR  )  [virtual]
 

00356 {
00357     BesView *view = (BesView*)gPad->GetView();
00358 
00359     if (view && view->GetVisBeamPipe()) m_BeamPipeZR->Draw();
00360 
00361     if (m_MdcROOTGeo) m_MdcROOTGeo->Draw("ZR");
00362     if (m_TofROOTGeo) m_TofROOTGeo->Draw("ZR");
00363     if (m_EmcROOTGeo) m_EmcROOTGeo->Draw("ZR");
00364     if (m_MucROOTGeo) m_MucROOTGeo->Draw("ZR");
00365 
00366     if (view && view->GetVisAxis())     view->ShowAxis();
00367 }

virtual void BesGeometry::Draw3D  )  [virtual]
 

void BesGeometry::Draw3D  )  [virtual]
 

00298 {
00299     BesView *view = (BesView*)gPad->GetView();
00300 
00301     if (view && view->GetViewType() == k3DView) {
00302 
00303         if (m_MdcROOTGeo) {
00304             m_MdcROOTGeo->SetVisMdcDetector();
00305             m_MdcROOTGeo->SetVisMdcHits();
00306         }
00307 
00308         if (m_TofROOTGeo) {
00309             m_TofROOTGeo->SetVisTofDetector();
00310             m_TofROOTGeo->SetVisTofHits();
00311         }
00312 
00313         if (m_EmcROOTGeo) {
00314             m_EmcROOTGeo->SetVisEmcDetector();
00315             m_EmcROOTGeo->SetVisEmcHits();
00316         }
00317 
00318         if (m_MucROOTGeo) {
00319             m_MucROOTGeo->SetVisMucDetector();
00320             m_MucROOTGeo->SetVisMucHits();
00321         }
00322     }
00323 
00324     //if (gGeoManager) {
00325     //    cout << "gGeoManager exit" << endl;
00326     //}
00327     //else {
00328     //    cout << "gGeoManager do not exit" << endl;
00329     //}
00330 
00331     //if (m_Bes){
00332     //    cout << "m_Bes address:" << m_Bes << endl;
00333     //}
00334 
00335 
00336     //if (m_Bes) m_Bes->Draw();
00337     //if (view && view->GetVisAxis()) view->ShowAxis();
00338 }

Float_t BesGeometry::GetBesR  )  [inline]
 

00035 { return m_BesR; }

Float_t BesGeometry::GetBesR  )  [inline]
 

00035 { return m_BesR; }

Float_t BesGeometry::GetBesZ  )  [inline]
 

00036 { return m_BesZ; }

Float_t BesGeometry::GetBesZ  )  [inline]
 

00036 { return m_BesZ; }

EmcROOTGeo* BesGeometry::GetEmcROOTGeo  )  [inline]
 

00043 { return m_EmcROOTGeo; }

EmcROOTGeo* BesGeometry::GetEmcROOTGeo  )  [inline]
 

00043 { return m_EmcROOTGeo; }

const char* BesGeometry::GetFilename const char *  RunPeriod  ) 
 

const char * BesGeometry::GetFilename const char *  RunPeriod  ) 
 

00260 {
00261     return RunPeriod;
00262 }

MdcROOTGeo* BesGeometry::GetMdcROOTGeo  )  [inline]
 

00041 { return m_MdcROOTGeo; }

MdcROOTGeo* BesGeometry::GetMdcROOTGeo  )  [inline]
 

00041 { return m_MdcROOTGeo; }

MucROOTGeo* BesGeometry::GetMucROOTGeo  )  [inline]
 

00044 { return m_MucROOTGeo; }

MucROOTGeo* BesGeometry::GetMucROOTGeo  )  [inline]
 

00044 { return m_MucROOTGeo; }

TGeoPhysicalNode* BesGeometry::GetPhysicalEmcCrystal int  part,
int  phi,
int  theta
[inline]
 

00063 { return m_EmcROOTGeo->GetPhysicalCrystal(part, phi, theta); }

TGeoPhysicalNode* BesGeometry::GetPhysicalEmcCrystal int  part,
int  phi,
int  theta
[inline]
 

00063 { return m_EmcROOTGeo->GetPhysicalCrystal(part, phi, theta); }

TGeoPhysicalNode* BesGeometry::GetPhysicalMdcReplica int  layer,
int  replica
[inline]
 

00050 { return m_MdcROOTGeo->GetPhysicalReplica(layer, replica); }

TGeoPhysicalNode* BesGeometry::GetPhysicalMdcReplica int  layer,
int  replica
[inline]
 

00050 { return m_MdcROOTGeo->GetPhysicalReplica(layer, replica); }

TGeoPhysicalNode* BesGeometry::GetPhysicalMucGap int  part,
int  seg,
int  gap
[inline]
 

00073 { return m_MucROOTGeo->GetPhysicalGap(part, seg, gap); }

TGeoPhysicalNode* BesGeometry::GetPhysicalMucGap int  part,
int  seg,
int  gap
[inline]
 

00073 { return m_MucROOTGeo->GetPhysicalGap(part, seg, gap); }

TGeoPhysicalNode* BesGeometry::GetPhysicalMucStrip int  part,
int  seg,
int  gap,
int  strip
[inline]
 

00074 { return m_MucROOTGeo->GetPhysicalStrip(part, seg, gap, strip); }

TGeoPhysicalNode* BesGeometry::GetPhysicalMucStrip int  part,
int  seg,
int  gap,
int  strip
[inline]
 

00074 { return m_MucROOTGeo->GetPhysicalStrip(part, seg, gap, strip); }

TGeoPhysicalNode* BesGeometry::GetPhysicalTofScin int  part,
int  layer,
int  scin
[inline]
 

00056 { return m_TofROOTGeo->GetPhysicalScin(part, layer, scin); }

TGeoPhysicalNode* BesGeometry::GetPhysicalTofScin int  part,
int  layer,
int  scin
[inline]
 

00056 { return m_TofROOTGeo->GetPhysicalScin(part, layer, scin); }

TofROOTGeo* BesGeometry::GetTofROOTGeo  )  [inline]
 

00042 { return m_TofROOTGeo; }

TofROOTGeo* BesGeometry::GetTofROOTGeo  )  [inline]
 

00042 { return m_TofROOTGeo; }

TGeoVolume* BesGeometry::GetVolBes  )  [inline]
 

00038 { return m_Bes; }

TGeoVolume* BesGeometry::GetVolBes  )  [inline]
 

00038 { return m_Bes; }

TGeoVolume* BesGeometry::GetVolumeBeamPipe  )  [inline]
 

00039 { return m_BeamPipe; } 

TGeoVolume* BesGeometry::GetVolumeBeamPipe  )  [inline]
 

00039 { return m_BeamPipe; } 

TGeoVolume* BesGeometry::GetVolumeEmc  )  [inline]
 

00058 { return m_EmcROOTGeo->GetVolumeEmc(); }

TGeoVolume* BesGeometry::GetVolumeEmc  )  [inline]
 

00058 { return m_EmcROOTGeo->GetVolumeEmc(); }

TGeoVolume* BesGeometry::GetVolumeEmcCrystal int  part,
int  phi,
int  theta
[inline]
 

00062 { return m_EmcROOTGeo->GetVolumeCrystal(part, phi, theta); }

TGeoVolume* BesGeometry::GetVolumeEmcCrystal int  part,
int  phi,
int  theta
[inline]
 

00062 { return m_EmcROOTGeo->GetVolumeCrystal(part, phi, theta); }

TGeoVolume* BesGeometry::GetVolumeEmcPart int  part  )  [inline]
 

00059 { return m_EmcROOTGeo->GetVolumePart(part); }

TGeoVolume* BesGeometry::GetVolumeEmcPart int  part  )  [inline]
 

00059 { return m_EmcROOTGeo->GetVolumePart(part); }

TGeoVolume* BesGeometry::GetVolumeEmcPhi int  part,
int  phi
[inline]
 

00060 { return m_EmcROOTGeo->GetVolumePhi(part, phi); }

TGeoVolume* BesGeometry::GetVolumeEmcPhi int  part,
int  phi
[inline]
 

00060 { return m_EmcROOTGeo->GetVolumePhi(part, phi); }

TGeoVolume* BesGeometry::GetVolumeEmcTheta int  part,
int  phi,
int  theta
[inline]
 

00061 { return m_EmcROOTGeo->GetVolumeTheta(part, phi, theta); }

TGeoVolume* BesGeometry::GetVolumeEmcTheta int  part,
int  phi,
int  theta
[inline]
 

00061 { return m_EmcROOTGeo->GetVolumeTheta(part, phi, theta); }

TGeoVolume* BesGeometry::GetVolumeMdc  )  [inline]
 

00046 { return m_MdcROOTGeo->GetVolumeMdc(); }

TGeoVolume* BesGeometry::GetVolumeMdc  )  [inline]
 

00046 { return m_MdcROOTGeo->GetVolumeMdc(); }

TGeoVolume* BesGeometry::GetVolumeMdcLayer int  layer  )  [inline]
 

00048 { return m_MdcROOTGeo->GetVolumeLayer(layer); }

TGeoVolume* BesGeometry::GetVolumeMdcLayer int  layer  )  [inline]
 

00048 { return m_MdcROOTGeo->GetVolumeLayer(layer); }

TGeoVolume* BesGeometry::GetVolumeMdcReplica int  layer  )  [inline]
 

00049 { return m_MdcROOTGeo->GetVolumeReplica(layer); }

TGeoVolume* BesGeometry::GetVolumeMdcReplica int  layer  )  [inline]
 

00049 { return m_MdcROOTGeo->GetVolumeReplica(layer); }

TGeoVolume* BesGeometry::GetVolumeMdcSegment int  segment  )  [inline]
 

00047 { return m_MdcROOTGeo->GetVolumeSegment(segment); }

TGeoVolume* BesGeometry::GetVolumeMdcSegment int  segment  )  [inline]
 

00047 { return m_MdcROOTGeo->GetVolumeSegment(segment); }

TGeoVolume* BesGeometry::GetVolumeMuc  )  [inline]
 

00065 { return m_MucROOTGeo->GetVolumeMuc(); }

TGeoVolume* BesGeometry::GetVolumeMuc  )  [inline]
 

00065 { return m_MucROOTGeo->GetVolumeMuc(); }

TGeoVolume* BesGeometry::GetVolumeMucAbsorber int  part,
int  seg,
int  absorber
[inline]
 

00066 {  return m_MucROOTGeo->GetVolumeAbsorber(part, seg, absorber); }

TGeoVolume* BesGeometry::GetVolumeMucAbsorber int  part,
int  seg,
int  absorber
[inline]
 

00066 {  return m_MucROOTGeo->GetVolumeAbsorber(part, seg, absorber); }

TGeoVolume* BesGeometry::GetVolumeMucAbsorberPanel int  part,
int  seg,
int  absorber,
int  panel
[inline]
 

00067 { return m_MucROOTGeo->GetVolumeAbsorberPanel(part, seg, absorber, panel); }

TGeoVolume* BesGeometry::GetVolumeMucAbsorberPanel int  part,
int  seg,
int  absorber,
int  panel
[inline]
 

00067 { return m_MucROOTGeo->GetVolumeAbsorberPanel(part, seg, absorber, panel); }

TGeoVolume* BesGeometry::GetVolumeMucBakelite int  part,
int  seg,
int  gap,
int  RpcUpDown,
int  panel,
int  bakelite
[inline]
 

00072 { return m_MucROOTGeo->GetVolumeBakelite(part, seg, gap, RpcUpDown, panel, bakelite); }

TGeoVolume* BesGeometry::GetVolumeMucBakelite int  part,
int  seg,
int  gap,
int  RpcUpDown,
int  panel,
int  bakelite
[inline]
 

00072 { return m_MucROOTGeo->GetVolumeBakelite(part, seg, gap, RpcUpDown, panel, bakelite); }

TGeoVolume* BesGeometry::GetVolumeMucGap int  part,
int  seg,
int  gap
[inline]
 

00068 { return m_MucROOTGeo->GetVolumeGap(part, seg, gap); }

TGeoVolume* BesGeometry::GetVolumeMucGap int  part,
int  seg,
int  gap
[inline]
 

00068 { return m_MucROOTGeo->GetVolumeGap(part, seg, gap); }

TGeoVolume* BesGeometry::GetVolumeMucGasChamber int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber
[inline]
 

00071 { return m_MucROOTGeo->GetVolumeGasChamber(part, seg, gap, panel, gasChamber); }

TGeoVolume* BesGeometry::GetVolumeMucGasChamber int  part,
int  seg,
int  gap,
int  panel,
int  gasChamber
[inline]
 

00071 { return m_MucROOTGeo->GetVolumeGasChamber(part, seg, gap, panel, gasChamber); }

TGeoVolume* BesGeometry::GetVolumeMucStrip int  part,
int  seg,
int  gap,
int  strip
[inline]
 

00070 { return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }

TGeoVolume* BesGeometry::GetVolumeMucStrip int  part,
int  seg,
int  gap,
int  strip
[inline]
 

00070 { return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }

TGeoVolume* BesGeometry::GetVolumeMucStripPlane int  part,
int  seg,
int  gap
[inline]
 

00069 { return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }

TGeoVolume* BesGeometry::GetVolumeMucStripPlane int  part,
int  seg,
int  gap
[inline]
 

00069 { return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }

TGeoVolume* BesGeometry::GetVolumeTof  )  [inline]
 

00052 { return m_TofROOTGeo->GetVolumeTof(); }

TGeoVolume* BesGeometry::GetVolumeTof  )  [inline]
 

00052 { return m_TofROOTGeo->GetVolumeTof(); }

virtual void BesGeometry::InitFromGDML const TString  fPath  )  [virtual]
 

void BesGeometry::InitFromGDML const TString  fPath  )  [virtual]
 

00064 {
00065     gGeoManager->SetVisOption(0);  // to show all visible volumes.
00066     gGeoManager->SetVisLevel(5);
00067 
00068     TGeoIdentity *identity = new TGeoIdentity();
00069 
00070     TGeoMaterial *mat = new TGeoMaterial("VOID",0,0,0);
00071     mat->SetTransparency(20);
00072     TGeoMedium   *med = new TGeoMedium("MED",1,mat);
00073     m_Bes = gGeoManager->MakeBox("volBes", med, m_BesR, m_BesR, 0.5*m_BesZ);
00074 
00075     TGeoVolume *topVolume = new TGeoVolume(); // temp top volume for load geometry more than once
00076     gGeoManager->SetTopVolume(topVolume);
00077     gGeoManager->SetTopVolume(m_Bes);
00078 
00079     Int_t iChildNo = 0;
00080     m_MdcROOTGeo = new MdcROOTGeo();
00081     m_MdcROOTGeo->InitFromGDML( (fPath + TString("Mdc.gdml")).Data(), "Mdc" );
00082     cout<<"in BesGeometry construct mdc1"<<endl;
00083     m_Mdc = m_MdcROOTGeo->GetVolumeMdc();
00084     if (m_Mdc)  cout << "Construct Mdc" << endl;
00085     else       cout << "Volume Mdc not found " << endl;
00086     m_Bes->AddNode(m_Mdc, iChildNo, identity);
00087     m_MdcROOTGeo->SetChildNo(iChildNo);//Connect bes with mdc, form physcialnode path.  m_Bes->GetNdaughters()-1
00088 
00089     iChildNo++;
00090     m_TofROOTGeo = new TofROOTGeo();
00091     m_TofROOTGeo->InitFromGDML( (fPath + TString("Tof.gdml")).Data(), "Tof" );
00092     cout<<"construct tof"<<endl;
00093     m_Tof = m_TofROOTGeo->GetVolumeTof();
00094     if (m_Tof)  cout << "Construct Tof" << endl;
00095     else       cout << "Volume Tof not found " << endl;
00096     m_Bes->AddNode(m_Tof, iChildNo, identity);
00097     m_TofROOTGeo->SetChildNo(iChildNo);
00098 
00099     iChildNo++;
00100     m_EmcROOTGeo = new EmcROOTGeo();
00101     m_EmcROOTGeo->InitFromGDML( (fPath + TString("Emc.gdml")).Data(), "Emc" );
00102     m_Emc = m_EmcROOTGeo->GetVolumeEmc();
00103     if (m_Emc)  cout << "Construct Emc" << endl;
00104     else       cout << "Volume Emc not found " << endl;
00105     m_Bes->AddNode(m_Emc, iChildNo, identity);
00106     m_EmcROOTGeo->SetChildNo(iChildNo);
00107 
00108     iChildNo++;
00109     m_MucROOTGeo = new MucROOTGeo();
00110     m_MucROOTGeo->InitFromGDML( (fPath + TString("Muc.gdml")).Data(), "Muc" );
00111     m_Muc = m_MucROOTGeo->GetVolumeMuc();
00112     if (m_Muc)  cout << "Construct Muc" << endl;
00113     else       cout << "Volume Muc not found " << endl;
00114     m_Bes->AddNode(m_Muc, iChildNo, identity);
00115     m_MucROOTGeo->SetChildNo(iChildNo);
00116 
00117     iChildNo++;
00118     Int_t beamPipeColor = 3;
00119     m_BeamPipe = gGeoManager->MakeTube("volBeamPipe", med, m_BeamPipeRMin, m_BeamPipeRMax, m_BeamPipeZ);
00120     m_BeamPipe->SetLineColor(beamPipeColor);
00121     m_Bes->AddNode(m_BeamPipe, iChildNo, identity);
00122 
00123     Int_t nDaughters = m_Bes->GetNodes()->GetEntries();
00124     cout << "volBes contains " << nDaughters  << " nodes : " << endl;
00125     for (Int_t i = 0; i < nDaughters; i++) {
00126         cout << i << " : " << m_Bes->GetNode(i)->GetName() << endl;
00127     }
00128 
00129     InitGeometry();
00130 }

virtual void BesGeometry::InitFromROOT TGeoVolume *  volBes  )  [virtual]
 

void BesGeometry::InitFromROOT TGeoVolume *  volBes  )  [virtual]
 

00133 {
00134     gGeoManager->SetVisOption(0);  // to show all visible volumes.
00135     gGeoManager->SetVisLevel(5);
00136 
00137     m_Bes = volBes;
00138     m_BesR = ((TGeoBBox*)m_Bes->GetShape())->GetDX();
00139     m_BesZ = ((TGeoBBox*)m_Bes->GetShape())->GetDZ()*2.0;
00140 
00141     TGeoVolume *topVolume = new TGeoVolume();
00142     gGeoManager->SetTopVolume(topVolume);
00143     gGeoManager->SetTopVolume(m_Bes);
00144 
00145     Int_t nDaughters = m_Bes->GetNodes()->GetEntries();
00146 
00147     //cout << "volBes contains " << nDaughters  << " nodes : " << endl;
00148     //for (Int_t i = 0; i < nDaughters; i++) {
00149     //    cout << i << " : " << m_Bes->GetNode(i)->GetName() << endl;
00150     //}
00151 
00152     Int_t iChildNo = 0;
00153     m_MdcROOTGeo = new MdcROOTGeo();
00154     TGeoNode *nodeMdc = m_Bes->GetNode(iChildNo);
00155     if (nodeMdc) m_Mdc = nodeMdc->GetVolume();
00156     //else cout << "Node logicalMdc not found" << endl;
00157     //if (m_Mdc)  cout << "Set Mdc" << endl;
00158     //else       cout << "Volume Mdc not found " << endl;
00159     m_MdcROOTGeo->InitFromROOT( m_Mdc );
00160     m_MdcROOTGeo->SetChildNo(iChildNo);//Connect bes with mdc, form physcialnode path.  m_Bes->GetNdaughters()-1
00161 
00162     iChildNo++;
00163     m_TofROOTGeo = new TofROOTGeo();
00164     TGeoNode *nodeTof = m_Bes->GetNode(iChildNo);
00165     if (nodeTof) m_Tof = nodeTof->GetVolume();
00166     //else cout << "Node logicalTof not found" << endl;
00167     //if (m_Tof)  cout << "Set Tof" << endl;
00168     //else       cout << "Volume Tof not found " << endl;
00169     m_TofROOTGeo->InitFromROOT( m_Tof );
00170     m_TofROOTGeo->SetChildNo(iChildNo);
00171 
00172     iChildNo++;
00173     m_EmcROOTGeo = new EmcROOTGeo();
00174     TGeoNode *nodeEmc = m_Bes->GetNode(iChildNo);
00175     if (nodeEmc) m_Emc = nodeEmc->GetVolume();
00176     //else cout << "Node logicalEmc not found" << endl;
00177     //if (m_Emc)  cout << "Set Emc" << endl;
00178     //else       cout << "Volume Emc not found " << endl;
00179     m_EmcROOTGeo->InitFromROOT( m_Emc );
00180     m_EmcROOTGeo->SetChildNo(iChildNo);
00181 
00182     iChildNo++;
00183     m_MucROOTGeo = new MucROOTGeo();
00184     TGeoNode *nodeMuc = m_Bes->GetNode(iChildNo);
00185     if (nodeMuc) m_Muc = nodeMuc->GetVolume();
00186     //else cout << "Node logicalMuc not found" << endl;
00187     //if (m_Muc)  cout << "Set Muc" << endl;
00188     //else       cout << "Volume Muc not found " << endl;
00189     m_MucROOTGeo->InitFromROOT( m_Muc );
00190     m_MucROOTGeo->SetChildNo(iChildNo);
00191 
00192     iChildNo++;
00193     TGeoNode *nodeBeamPipe = m_Bes->GetNode(iChildNo);
00194     if (nodeBeamPipe) {
00195         m_BeamPipe = nodeBeamPipe->GetVolume();
00196         m_BeamPipe->SetLineColor(4);
00197     }
00198     //else cout << "Node volBeamPipe not found " << endl;
00199     //cout << "Set beanmpi complete" << endl;
00200     InitGeometry();
00201     //cout << "init root ok" << endl;
00202 }

virtual void BesGeometry::InitGeometry  )  [virtual]
 

void BesGeometry::InitGeometry  )  [virtual]
 

00205 {
00206     gGeoManager->SetDrawExtraPaths();  // draw physical node or not;
00207     gGeoManager->CloseGeometry();
00208     gGeoManager->SetNsegments(20);  // devide a circle to 20 slides
00209 
00210     // PhysicalNode necessary for fast setting node visible or not in an event
00211     // Should be set after gGeoManager closed
00212     m_MdcROOTGeo->SetPhysicalNode();    //here liang
00213     m_TofROOTGeo->SetPhysicalNode();    //here liang
00214     m_EmcROOTGeo->SetPhysicalNode();    //here liang
00215     m_MucROOTGeo->SetPhysicalNode();
00216 
00217     // 2D Geometry initialization should be after SetPhysicalNode();
00218     m_MdcROOTGeo->Init2DGeometry();    //here liang
00219     m_TofROOTGeo->Init2DGeometry();    //here liang
00220     m_EmcROOTGeo->Init2DGeometry();    //here liang
00221     m_MucROOTGeo->Init2DGeometry();
00222 
00223     Double_t  P[3*4] = {0.0};
00224 
00225     // BeamPipe
00226     Double_t beamPipeCenter[3] = {0.0, 0.0, 0.0};
00227     m_BeamPipeXY =
00228       new BesCircle2D("BeamPipe", "BeamPipe", m_BeamPipeRMin, m_BeamPipeRMax, &beamPipeCenter[0]);
00229 
00230     for (Int_t i = 0; i < 4; i++) {
00231         P[3*i]   = 0.0;
00232         if (i == 0 || i == 3) P[3*i+1] = -1.0*m_BeamPipeRMax;
00233         else P[3*i+1] = m_BeamPipeRMax;
00234         if (i == 0 || i == 1) P[3*i+2] = -1.0*m_BeamPipeZ;
00235         else P[3*i+2] = m_BeamPipeZ;
00236     }
00237     m_BeamPipeZR = new BesPolygon2D("BeamPipe", "BeamPipe", 4, &P[0]);
00238 
00239     // Auxiliary line
00240     if (!m_Bes) cout << "BesGeometry:InitGeometry, top volume m_Bes not found" << endl;
00241     TGeoBBox *besShape = (TGeoBBox*)m_Bes->GetShape();
00242     m_BesR = besShape->GetDX();
00243     m_BesZ = besShape->GetDZ()*2.0;
00244     for (Int_t i = 0; i < 4; i++) {
00245         P[3*i]   = 0.0;
00246         if (i == 0 || i == 3) P[3*i+1] = -1.0*m_BesR;
00247         else P[3*i+1] = m_BesR;
00248         if (i == 0 || i == 1) P[3*i+2] = -1.0*m_BesZ;
00249         else P[3*i+2] = m_BesZ;
00250     }
00251 
00252     m_ZRPlaneOnXY = new BesPolygon2D("ZRPlaneOnXY", "ZRPlaneOnXY", 4, &P[0]);
00253     m_ZRPlaneOnXY->SetRotatable(true);
00254     m_ZRPlaneOnXY->SetLineWidth(1);
00255     m_ZRPlaneOnXY->SetLineStyle(3);
00256     m_ZRPlaneOnXY->SetFillStyle(4000);
00257 }

virtual void BesGeometry::SetDefaultVis  )  [virtual]
 

void BesGeometry::SetDefaultVis  )  [virtual]
 

00265 {
00266     m_Bes->SetLineColor(2);
00267     m_Bes->SetVisibility(0);
00268 
00269     m_BeamPipe->SetLineColor(4);
00270     m_BeamPipe->SetVisibility(0);
00271 
00272     m_MdcROOTGeo->SetAllVisible();
00273     m_TofROOTGeo->SetAllVisible();
00274     m_EmcROOTGeo->SetAllVisible();
00275     m_MucROOTGeo->SetAllVisible();
00276 
00277 }


Member Data Documentation

TGeoVolume* BesGeometry::m_BeamPipe [private]
 

TGeoVolume* BesGeometry::m_BeamPipe [private]
 

Double_t BesGeometry::m_BeamPipeRMax [private]
 

Double_t BesGeometry::m_BeamPipeRMin [private]
 

BesCircle2D* BesGeometry::m_BeamPipeXY [private]
 

BesCircle2D* BesGeometry::m_BeamPipeXY [private]
 

Double_t BesGeometry::m_BeamPipeZ [private]
 

BesPolygon2D* BesGeometry::m_BeamPipeZR [private]
 

BesPolygon2D* BesGeometry::m_BeamPipeZR [private]
 

TGeoVolume* BesGeometry::m_Bes [private]
 

TGeoVolume* BesGeometry::m_Bes [private]
 

Double_t BesGeometry::m_BesR [private]
 

Double_t BesGeometry::m_BesZ [private]
 

TGeoVolume* BesGeometry::m_Emc [private]
 

TGeoVolume* BesGeometry::m_Emc [private]
 

EmcROOTGeo* BesGeometry::m_EmcROOTGeo [private]
 

EmcROOTGeo* BesGeometry::m_EmcROOTGeo [private]
 

TGeoVolume* BesGeometry::m_Mdc [private]
 

TGeoVolume* BesGeometry::m_Mdc [private]
 

MdcROOTGeo* BesGeometry::m_MdcROOTGeo [private]
 

MdcROOTGeo* BesGeometry::m_MdcROOTGeo [private]
 

TGeoVolume* BesGeometry::m_Muc [private]
 

TGeoVolume* BesGeometry::m_Muc [private]
 

MucROOTGeo* BesGeometry::m_MucROOTGeo [private]
 

MucROOTGeo* BesGeometry::m_MucROOTGeo [private]
 

TGeoVolume* BesGeometry::m_Tof [private]
 

TGeoVolume* BesGeometry::m_Tof [private]
 

TofROOTGeo* BesGeometry::m_TofROOTGeo [private]
 

TofROOTGeo* BesGeometry::m_TofROOTGeo [private]
 

BesPolygon2D* BesGeometry::m_ZRPlaneOnXY [private]
 

BesPolygon2D* BesGeometry::m_ZRPlaneOnXY [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 15:52:29 2011 for BOSS6.5.5 by  doxygen 1.3.9.1