CGEM BOSS 6.6.5.i
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_tofversion=tofversion;
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 G4Exception("World volume not set properly check your setup selection criteria or GDML input!");
47 }
48
49 delete aBesG4Geo;
50
51 G4LogicalVolume* logicalBes = const_cast<G4LogicalVolume*>( GDMLProcessor::GetInstance()->GetLogicalVolume("logicalWorld" ) );
52 Mdc.Construct(logicalBes);
53
54 if(m_tofversion==2)
55 {
56 std::cout << "ExBesDetectorConstruction: You are using the old Tofdetector " << std::endl;
57 Tof.Construct(logicalBes);
58 }
59 else if(m_tofversion==4)
60 {
61 std::cout << "ExBesDetectorConstruction: You are using the new (MRPC) Tofdetector with single end read out" << std::endl;
62 Tof.Construct_mrpc(logicalBes);
63 }
64 else if(m_tofversion==6)
65 {
66 std::cout << "ExBesDetectorConstruction: You are using the new (MRPC) Tofdetector with double sided read out" << std::endl;
67 Tof.Construct_mrpc_dbs(logicalBes);
68 }
69
70 else
71 {
72 std::cout << "ExBesDetectorConstruction: TofDetector is not well defined! \n " << std::endl;
73 std::cout << " Use in your jobOption script " << std::endl;
74 std::cout << " TrkExtAlg.Tof = 6; for the new Tof (MRPC Endcaps, double sided readout) " << std::endl;
75 std::cout << " TrkExtAlg.Tof = 4; for the new Tof (MRPC Endcaps, single end readout) " << std::endl;
76 std::cout << " TrkExtAlg.Tof = 2; for the old Tof. " << std::endl;
77 }
78
79
80 Emc.Construct(logicalBes);
81 Muc.Construct(logicalBes);
82
83 return fWorld;
84}
void Construct(G4LogicalVolume *)
void Construct(G4LogicalVolume *)
void Construct(G4LogicalVolume *logicBes)
void Construct_mrpc(G4LogicalVolume *logicBes)
void Construct(G4LogicalVolume *logicBes)
void Construct_mrpc_dbs(G4LogicalVolume *logicBes)

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