BOSS 8.0.0
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 23 of file ExtBesDetectorConstruction.h.

Constructor & Destructor Documentation

◆ ExtBesDetectorConstruction()

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

Definition at line 23 of file ExtBesDetectorConstruction.cxx.

23 {
24 if ( bFieldOn ) besField = new ExtBesMagneticField();
25 fWorld = 0;
26 m_detVer = detVer;
27}

◆ ~ExtBesDetectorConstruction()

ExtBesDetectorConstruction::~ExtBesDetectorConstruction ( )

Definition at line 29 of file ExtBesDetectorConstruction.cxx.

29 {
30 if ( besField ) delete besField;
31}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * ExtBesDetectorConstruction::Construct ( )

Definition at line 33 of file ExtBesDetectorConstruction.cxx.

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

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