BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
ExtBesDetectorConstruction Class Reference

#include <ExtBesDetectorConstruction.h>

+ Inheritance diagram for ExtBesDetectorConstruction:

Public Member Functions

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

Detailed Description

Definition at line 24 of file ExtBesDetectorConstruction.h.

Constructor & Destructor Documentation

◆ ExtBesDetectorConstruction()

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

Definition at line 25 of file ExtBesDetectorConstruction.cxx.

26{
27 if(bFieldOn) besField = new ExtBesMagneticField();
28 fWorld=0;
29 m_detVer = detVer;
30}

◆ ~ExtBesDetectorConstruction()

ExtBesDetectorConstruction::~ExtBesDetectorConstruction ( )

Definition at line 33 of file ExtBesDetectorConstruction.cxx.

34{
35 if(besField)
36 delete besField;
37}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * ExtBesDetectorConstruction::Construct ( )

Definition at line 40 of file ExtBesDetectorConstruction.cxx.

41{
42 BesG4Geo* aBesG4Geo = new BesG4Geo();
43
44 fWorld=(G4VPhysicalVolume *)GDMLProcessor::GetInstance()->GetWorldVolume();
45 if( fWorld == 0 ) {
46 G4cout<<"World volume not set properly check your setup selection criteria or GDML input!"<<G4endl;
47 exit(-1);
48 }
49
50 delete aBesG4Geo;
51
52 G4LogicalVolume* logicalBes = const_cast<G4LogicalVolume*>( GDMLProcessor::GetInstance()->GetLogicalVolume("logicalWorld" ) );
53 Mdc.Construct(logicalBes);
54
55
56 if( m_detVer==1 || m_detVer==2 ) {
57 std::cout << "ExBesDetectorConstruction: You are using the Sintillator Tof Detector!" << std::endl;
58 Tof.Construct(logicalBes);
59 }
60 else if( m_detVer==3 ) {
61 std::cout << "ExBesDetectorConstruction: You are using the upgraded (MRPC) Tof Detector!" << std::endl;
62 Tof.ConstructETF(logicalBes);
63 }
64 else {
65 std::cout << "ExBesDetectorConstruction: Detector Version is not well defined! " << m_detVer << " \n " << std::endl;
66 std::cout << " Use in your jobOption script " << std::endl;
67 std::cout << " TrkExtAlg.Tof = 1; for the upgraded Tof (MRPC Endcaps, double sided readout) " << std::endl;
68 std::cout << " TrkExtAlg.Tof = 0; for the Sintillator Tof. " << std::endl;
69 }
70
71
72 Emc.Construct(logicalBes);
73 Muc.Construct(logicalBes);
74
75 return fWorld;
76}
void Construct(G4LogicalVolume *)
void Construct(G4LogicalVolume *)
void Construct(G4LogicalVolume *logicBes)
void ConstructETF(G4LogicalVolume *logicBes)
void Construct(G4LogicalVolume *logicBes)

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