CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
BesCgemConstruction Class Reference

#include <BesCgemConstruction.hh>

+ Inheritance diagram for BesCgemConstruction:

Public Member Functions

 BesCgemConstruction ()
 
 ~BesCgemConstruction ()
 
void Construct (G4LogicalVolume *)
 
 BesCgemConstruction ()
 
 ~BesCgemConstruction ()
 
void Construct (G4LogicalVolume *)
 
- Public Member Functions inherited from BesSubdetector
 BesSubdetector ()
 
virtual ~BesSubdetector ()
 
virtual void Construct (G4LogicalVolume *bes)=0
 
G4LogicalVolume * FindLogicalVolume (const G4String &vn)
 
 BesSubdetector ()
 
virtual ~BesSubdetector ()
 
virtual void Construct (G4LogicalVolume *bes)=0
 
G4LogicalVolume * FindLogicalVolume (const G4String &vn)
 

Additional Inherited Members

- Protected Attributes inherited from BesSubdetector
SAXProcessor m_sxp
 
ProcessingConfigurator m_config
 

Detailed Description

Constructor & Destructor Documentation

◆ BesCgemConstruction() [1/2]

BesCgemConstruction::BesCgemConstruction ( )

Definition at line 72 of file BesCgemConstruction.cc.

73 : m_CheckOverlaps(true), m_CreateHole(false)
74{
75 IMessageSvc* msgSvc;
76 Gaudi::svcLocator() -> service("MessageSvc", msgSvc);
77 MsgStream log(msgSvc, "BesCgemConstruction::BesCgemConstruction(): initialization of the geometry service");
78
79 ISvcLocator* svcLocator = Gaudi::svcLocator();
80 ICgemGeomSvc* ISvc;
81 StatusCode sc=svcLocator->service("CgemGeomSvc", ISvc);
82
83 m_cgem_geomsvc=dynamic_cast<CgemGeomSvc *>(ISvc);
84 if (!sc.isSuccess()) log<< MSG::INFO << "BesCgemConsruction::BesCgemConstruction(): could not open geometry file" << endreq;
85
86
87}

◆ ~BesCgemConstruction() [1/2]

BesCgemConstruction::~BesCgemConstruction ( )

Definition at line 90 of file BesCgemConstruction.cc.

91{
92}

◆ BesCgemConstruction() [2/2]

BesCgemConstruction::BesCgemConstruction ( )

◆ ~BesCgemConstruction() [2/2]

BesCgemConstruction::~BesCgemConstruction ( )

Member Function Documentation

◆ Construct() [1/2]

void BesCgemConstruction::Construct ( G4LogicalVolume *  logicBes)
virtual

Implements BesSubdetector.

Definition at line 95 of file BesCgemConstruction.cc.

96{
97 IMessageSvc* msgSvc;
98 Gaudi::svcLocator() -> service("MessageSvc", msgSvc);
99 MsgStream log(msgSvc, "BesCgemConstruction::Construct()");
100
101 // ---------------------- CHECK
102 G4LogicalVolume *logicContainer = NULL; cout << "logicBes daughters " << logicBes->GetNoDaughters() << endl;
103
104 for(int i=0; i<logicBes->GetNoDaughters(); i++) {
105 G4VPhysicalVolume *daughter = logicBes->GetDaughter(i);
106 if(daughter->GetName()=="physicalMdc") {
107 logicContainer = daughter->GetLogicalVolume();
108 }
109 }
110 if(logicContainer == NULL) {
111 log<< MSG::INFO << "BesCgemConstruction::Construct, CGEM must stay inside MDC mother volume, you must build MDC!" << endreq;
112 cout<< "BesCgemConstruction::Construct, MDC not built --> put CGEM in WORLD" << endl;
113 logicContainer= logicBes;
114 }
115 else cout<< "BesCgemConstruction::Construct, MDC built --> put CGEM in MDC container logical volume" << endl;
116 // -------------------------
117
118
119
120 /* Construct Sensitive detectors */
121 G4SDManager* gv_SDman = G4SDManager::GetSDMpointer();
122 G4String lvs_cgemSDname = "BesCgemSD";
123 //G4String lvs_CuSDname = "CuSD";
124 m_CgemSD = new BesCgemSD(lvs_cgemSDname);
125 //m_CuSD = new BesCgemSD(lvs_CuSDname);
126 gv_SDman->AddNewDetector(m_CgemSD);
127 //gv_SDman->AddNewDetector(m_CuSD);
128
129 /* When tuning, no construct CGEM */
131 {
132 log<< MSG::INFO << "BesCgemConstruction::Construct, Tunning! DO NOT CONSTRUCT CGEM!" << endreq;
133 return ;
134 }
135
136 /* Construct CGEM from GDML */
137 if (ReadBoostRoot::GetCgem()==2)
138 {
139 log<< MSG::INFO << "BesCgemConstruciton::Construct, Construct CGEM from GDML!" << endreq;
140 }
141 /* Construct CGEM from G4code */
142 else
143 {
144 log<< MSG::INFO << "BesCgemConstruction::Construct, Construct CGEM from G4code!" << endreq;
145 ConstructMaterial();
146 G4LogicalVolume *logicCgem = ConstructFromCode(logicContainer,m_CgemSD);
147 //if(m_cgem_geomsvc->isPassive() == true && ReadBoostRoot::GetCgem()!=3) ConstructPassiveElements(logicCgem);
148 if(ReadBoostRoot::GetCgem()!=3) ConstructPassiveElements(logicCgem);
149 }
150}

Referenced by BesDetectorConstruction::Construct().

◆ Construct() [2/2]

void BesCgemConstruction::Construct ( G4LogicalVolume *  )
virtual

Implements BesSubdetector.


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