ExtBesDetectorConstruction Class Reference

#include <ExtBesDetectorConstruction.h>

List of all members.

Public Member Functions

 ExtBesDetectorConstruction (const bool bFieldOn, int tofversion)
 ~ExtBesDetectorConstruction ()
G4VPhysicalVolume * Construct ()

Private Attributes

G4VPhysicalVolume * fWorld
ExtBesMagneticFieldbesField
ExtBesMdcConstruction Mdc
ExtBesTofConstruction Tof
ExtBesEmcConstruction Emc
ExtBesMucConstruction Muc
int m_detVer


Detailed Description

Definition at line 24 of file ExtBesDetectorConstruction.h.


Constructor & Destructor Documentation

ExtBesDetectorConstruction::ExtBesDetectorConstruction ( const bool  bFieldOn,
int  tofversion 
)

Definition at line 25 of file ExtBesDetectorConstruction.cxx.

References besField, fWorld, and m_detVer.

00026 {
00027         if(bFieldOn) besField = new ExtBesMagneticField();
00028         fWorld=0;
00029         m_detVer = detVer;
00030 }

ExtBesDetectorConstruction::~ExtBesDetectorConstruction (  ) 

Definition at line 33 of file ExtBesDetectorConstruction.cxx.

References besField.

00034 {
00035         if(besField)
00036         delete besField;
00037 }


Member Function Documentation

G4VPhysicalVolume * ExtBesDetectorConstruction::Construct (  ) 

Definition at line 40 of file ExtBesDetectorConstruction.cxx.

References ExtBesMucConstruction::Construct(), ExtBesEmcConstruction::Construct(), ExtBesTofConstruction::Construct(), ExtBesMdcConstruction::Construct(), ExtBesTofConstruction::ConstructETF(), Emc, fWorld, m_detVer, Mdc, Muc, and Tof.

00041 {
00042         BesG4Geo* aBesG4Geo = new BesG4Geo();
00043 
00044         fWorld=(G4VPhysicalVolume *)GDMLProcessor::GetInstance()->GetWorldVolume();  
00045         if( fWorld == 0 ) {
00046                   G4Exception("World volume not set properly check your setup selection criteria or GDML input!");
00047         }
00048 
00049         delete aBesG4Geo;
00050                             
00051         G4LogicalVolume* logicalBes = const_cast<G4LogicalVolume*>( GDMLProcessor::GetInstance()->GetLogicalVolume("logicalWorld" ) );
00052         Mdc.Construct(logicalBes);
00053 
00054         
00055         if( m_detVer==1 || m_detVer==2 ) { 
00056           std::cout << "ExBesDetectorConstruction:     You are using the Sintillator Tof Detector!" << std::endl;
00057           Tof.Construct(logicalBes);
00058         }
00059         else if( m_detVer==3 ) {
00060           std::cout << "ExBesDetectorConstruction:     You are using the upgraded (MRPC) Tof Detector!" << std::endl;
00061           Tof.ConstructETF(logicalBes);
00062         }
00063         else {
00064           std::cout << "ExBesDetectorConstruction:     Detector Version is not well defined! " << m_detVer << " \n  " << std::endl;
00065           std::cout << "                               Use in your jobOption script " << std::endl;
00066           std::cout << "                               TrkExtAlg.Tof = 1; for the upgraded Tof (MRPC Endcaps, double sided readout) " << std::endl;
00067           std::cout << "                               TrkExtAlg.Tof = 0; for the Sintillator Tof. " << std::endl;
00068         }
00069 
00070         
00071         Emc.Construct(logicalBes);
00072         Muc.Construct(logicalBes);
00073         
00074         return fWorld;
00075 }


Member Data Documentation

ExtBesMagneticField* ExtBesDetectorConstruction::besField [private]

Definition at line 34 of file ExtBesDetectorConstruction.h.

Referenced by ExtBesDetectorConstruction(), and ~ExtBesDetectorConstruction().

ExtBesEmcConstruction ExtBesDetectorConstruction::Emc [private]

Definition at line 39 of file ExtBesDetectorConstruction.h.

Referenced by Construct().

G4VPhysicalVolume* ExtBesDetectorConstruction::fWorld [private]

Definition at line 33 of file ExtBesDetectorConstruction.h.

Referenced by Construct(), and ExtBesDetectorConstruction().

int ExtBesDetectorConstruction::m_detVer [private]

Definition at line 41 of file ExtBesDetectorConstruction.h.

Referenced by Construct(), and ExtBesDetectorConstruction().

ExtBesMdcConstruction ExtBesDetectorConstruction::Mdc [private]

Definition at line 35 of file ExtBesDetectorConstruction.h.

Referenced by Construct().

ExtBesMucConstruction ExtBesDetectorConstruction::Muc [private]

Definition at line 40 of file ExtBesDetectorConstruction.h.

Referenced by Construct().

ExtBesTofConstruction ExtBesDetectorConstruction::Tof [private]

Definition at line 36 of file ExtBesDetectorConstruction.h.

Referenced by Construct().


Generated on Tue Nov 29 23:19:33 2016 for BOSS_7.0.2 by  doxygen 1.4.7