BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEmcConstruction Class Reference

#include <BesEmcConstruction.hh>

+ Inheritance diagram for BesEmcConstruction:

Public Member Functions

 BesEmcConstruction ()
 
 ~BesEmcConstruction ()
 
void SetVerboseLevel (G4int val)
 
void SetCrystalMaterial (G4String)
 
void SetCasingMaterial (G4String)
 
void SetCasingThickness (G4ThreeVector)
 
void SetBSCRmin (G4double)
 
void SetBSCNbPhi (G4int)
 
void SetBSCNbTheta (G4int)
 
void SetStartIDTheta (G4int)
 
void SetBSCCrystalLength (G4double)
 
void SetBSCYFront0 (G4double)
 
void SetBSCYFront (G4double)
 
void SetBSCPosition0 (G4double)
 
void SetBSCPosition1 (G4double)
 
void SetMagField (G4double)
 
void Construct (G4LogicalVolume *)
 
void UpdateGeometry ()
 
void ThreeVectorTrans (G4ThreeVector fPnt[8], double x[8], double y[8], double z[8])
 
void TransformToArb8 (const G4ThreeVector fPnt[8], G4ThreeVector newfPnt[8], G4ThreeVector &center, G4ThreeVector &rotAngle)
 
Hep3Vector RotAngleFromNewZ (Hep3Vector newZ)
 
void PrintEMCParameters ()
 
G4int GetVerboseLevel ()
 
G4double GetMagField ()
 
G4int GetStartIDTheta ()
 
G4Material * GetCrystalMaterial ()
 
G4Material * GetCasingMaterial ()
 
const G4VPhysicalVolume * GetEMC ()
 
const G4VPhysicalVolume * GetBSCPhi ()
 
const G4VPhysicalVolume * GetBSCTheta ()
 
const G4VPhysicalVolume * GetBSCCrystal ()
 
const G4VPVParameterisation * GetCrystalParam ()
 
void ConstructSPFrame (G4LogicalVolume *, BesEmcGeometry *)
 
void ConstructEndGeometry (G4LogicalVolume *)
 
void GetLogicalVolume ()
 
void SetVisAndSD ()
 
G4int ComputeEndCopyNb (G4int)
 
- Public Member Functions inherited from BesSubdetector
 BesSubdetector ()
 
virtual ~BesSubdetector ()
 
G4LogicalVolume * FindLogicalVolume (const G4String &vn)
 

Static Public Member Functions

static BesEmcConstructionGetBesEmcConstruction ()
 

Additional Inherited Members

- Protected Attributes inherited from BesSubdetector
SAXProcessor m_sxp
 
ProcessingConfigurator m_config
 

Detailed Description

Definition at line 52 of file BesEmcConstruction.hh.

Constructor & Destructor Documentation

◆ BesEmcConstruction()

BesEmcConstruction::BesEmcConstruction ( )

Definition at line 71 of file BesEmcConstruction.cc.

72 :verboseLevel(0),
73 solidEMC(0),logicEMC(0),physiEMC(0),logicBSCWorld(0),
74 solidBSCPhi(0),logicBSCPhi(0),physiBSCPhi(0),
75 solidBSCTheta(0),logicBSCTheta(0),physiBSCTheta(0),
76 solidBSCCrystal(0),logicBSCCrystal(0),physiBSCCrystal(0),
77 magField(0),detectorMessenger(0),besEMCSD(0),crystalParam(0),
78 logicEnd(0),logicEndPhi(0),logicEndCasing(0),logicEndCrystal(0),
79 logicRear(0),logicRearCasing(0),logicOrgGlass(0),logicPD(0),
80 logicAlPlate(0),logicPreAmpBox(0),logicAirInPABox(0),
81 logicHangingPlate(0),logicOCGirder(0),logicCable(0),logicWaterPipe(0),
82 logicSupportBar(0),logicSupportBar1(0),logicEndRing(0),logicGear(0),
83 logicTaperRing1(0),logicTaperRing2(0),logicTaperRing3(0)
84{
85 if(fBesEmcConstruction)
86 { G4cout<<"BesEmcConstruction constructed twice."<<G4endl; exit(-1);
87 }
88 fBesEmcConstruction=this;
89 //for debug
90 // G4Exception("BesEmcConstruction::BesEmcConstruction() starting........");
91 startID = 1;
92 phiNbCrystals = 0;
93 thetaNbCrystals = 0;
94 besEMCGeometry = new BesEmcGeometry();
95 emcEnd = new BesEmcEndGeometry();
96}

◆ ~BesEmcConstruction()

BesEmcConstruction::~BesEmcConstruction ( )

Definition at line 98 of file BesEmcConstruction.cc.

99{
100 if(detectorMessenger) delete detectorMessenger;
101 if(crystalParam) delete crystalParam;
102 if(besEMCGeometry) delete besEMCGeometry;
103 if(emcEnd) delete emcEnd;
104
106}
static void Kill()

Member Function Documentation

◆ ComputeEndCopyNb()

G4int BesEmcConstruction::ComputeEndCopyNb ( G4int num)

Definition at line 1242 of file BesEmcConstruction.cc.

1243{
1244 G4int copyNb;
1245 switch(num){
1246 case 30:
1247 copyNb = 5;
1248 break;
1249 case 31:
1250 copyNb = 6;
1251 break;
1252 case 32:
1253 copyNb = 14;
1254 break;
1255 case 33:
1256 copyNb = 15;
1257 break;
1258 case 34:
1259 copyNb = 16;
1260 break;
1261 default:
1262 copyNb = num;
1263 break;
1264 }
1265 return copyNb;
1266}

◆ Construct()

void BesEmcConstruction::Construct ( G4LogicalVolume * logicBes)
virtual

Implements BesSubdetector.

Definition at line 108 of file BesEmcConstruction.cc.

109{
110 gErrorIgnoreLevel = kFatal;
111 besEMCGeometry->ComputeEMCParameters();
112 detectorMessenger = new BesEmcDetectorMessenger(this,besEMCGeometry);
113 emcEnd->ComputeParameters();
114
115 G4SDManager* SDman = G4SDManager::GetSDMpointer();
116 if (!besEMCSD) {
117 besEMCSD = new BesEmcSD("CalorSD",this,besEMCGeometry);
118 SDman->AddNewDetector( besEMCSD );
119 }
120
121 // Construction
122 G4cout<<"--------ReadBoostRoot::GetEmc()="<<ReadBoostRoot::GetEmc()<<G4endl;
123 if(ReadBoostRoot::GetEmc()==2)
124 {
125 logicEMC = EmcG4Geo::Instance()->GetTopVolume();
126
127 if(logicEMC){
128 physiEMC = new G4PVPlacement(0,
129 G4ThreeVector(0.0 ,0.0 ,0.0),
130 logicEMC, "physicalEMC",logicBes, false, 0, CHECKLV0);
131 G4cout<<"logicEmc: === "<<logicEMC<<" physiEmc "<<physiEMC<<G4endl;
132
134 SetVisAndSD();
135 }
136 }
137 else {
138 //for debug
139 // G4Exception("BesEmcConstruction::Construct() starting............");
140 //
141 DefineMaterials();
142 phiNbCrystals = (*besEMCGeometry).BSCNbPhi;
143 thetaNbCrystals = (*besEMCGeometry).BSCNbTheta*2;
144
145 G4double da=0.001*deg; //delta angle to avoid overlap
146
147 //
148 //BSC
149 //
150 solidBSC = new G4Tubs("solidBSC",
151 (*besEMCGeometry).TaperRingRmin1,
152 (*besEMCGeometry).BSCRmax+(*besEMCGeometry).SPBarThickness+(*besEMCGeometry).SPBarThickness1+2.1*mm, //radius from 942mm to 940 mm
153 (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz,
154 0.*deg,
155 360.*deg);
156
157 solidESC = new G4Cons("solidESC",(*emcEnd).WorldRmin1,(*emcEnd).WorldRmax1,
158 (*emcEnd).WorldRmin2,(*emcEnd).WorldRmax2,
159 (*emcEnd).WorldDz/2,0.*deg,360.*deg);
160
161 solidEMC = new G4UnionSolid("solidEMC0",
162 solidBSC,
163 solidESC,
164 0,
165 G4ThreeVector(0,0,(*emcEnd).WorldZPosition));
166
167 G4RotationMatrix *rotateESC = new G4RotationMatrix();
168 rotateESC->rotateY(180.*deg);
169
170 solidEMC = new G4UnionSolid("solidEMC",
171 solidEMC,
172 solidESC,
173 rotateESC,
174 G4ThreeVector(0,0,-(*emcEnd).WorldZPosition));
175
176 logicEMC = new G4LogicalVolume(solidEMC,
177 G4Material::GetMaterial("Air"),
178 "logicalEMC");
179
180 physiEMC = new G4PVPlacement(0,
181 G4ThreeVector(),
182 logicEMC,
183 "physicalEMC",
184 logicBes,
185 false,
186 0,CHECKLV0);
187
188 solidBSCWorld = new G4SubtractionSolid("solidBSCWorld0",
189 solidBSC,
190 solidESC,
191 0,
192 G4ThreeVector(0,0,(*emcEnd).WorldZPosition));
193
194 solidBSCWorld = new G4SubtractionSolid("solidBSCWorld",
195 solidBSCWorld,
196 solidESC,
197 rotateESC,
198 G4ThreeVector(0,0,-(*emcEnd).WorldZPosition));
199
200 logicBSCWorld = new G4LogicalVolume(solidBSCWorld,
201 G4Material::GetMaterial("Air"),
202 "logicalBSCWorld");
203
204 G4RotationMatrix *rotBSC = new G4RotationMatrix();
205 rotBSC->rotateY(180.*deg);
206 physiBSCWorld = new G4PVPlacement(rotBSC,
207 G4ThreeVector(),
208 logicBSCWorld,
209 "physicalBSCWorld",
210 logicEMC,
211 false,
212 0,CHECKLV1);
213
214 G4RotationMatrix *rotateMatrix[200];
215 G4double oOp,ox,oy,oz;
216 G4double delta = 0*deg;
217 G4ThreeVector axis = G4ThreeVector(0,0,0);
218 oOp=(*besEMCGeometry).BSCRmin/sin(0.5*(*besEMCGeometry).BSCPhiDphi+90*deg)
219 *sin((*besEMCGeometry).BSCAngleRotat);
220 G4double ll=(*besEMCGeometry).BSCCryLength;
221 G4double rr=(*besEMCGeometry).BSCRmin;
222 G4double oj=sqrt(ll*ll+rr*rr-2*ll*rr*cos(180.*deg-(*besEMCGeometry).BSCAngleRotat));
223 G4double oij=90.*deg-(*besEMCGeometry).BSCPhiDphi/2.-(*besEMCGeometry).BSCAngleRotat;
224 G4double doj=asin(sin(180.*deg-(*besEMCGeometry).BSCAngleRotat)/oj*ll);
225 G4double ioj=(*besEMCGeometry).BSCPhiDphi/2.+doj;
226 G4double ij=oj/sin(oij)*sin(ioj);
227 G4double dOp=rr/sin(90.*deg-(*besEMCGeometry).BSCPhiDphi/2.)
228 *sin(90.*deg+(*besEMCGeometry).BSCPhiDphi/2.-(*besEMCGeometry).BSCAngleRotat);
229 G4double cOp=rr/sin(90.*deg+(*besEMCGeometry).BSCPhiDphi/2.)
230 *sin(90.*deg-(*besEMCGeometry).BSCPhiDphi/2.-(*besEMCGeometry).BSCAngleRotat);
231 G4double ch=(dOp+ll)/cos((*besEMCGeometry).BSCPhiDphi)-cOp;
232 G4double hi=(dOp+ll)*tan((*besEMCGeometry).BSCPhiDphi)-ij;
233 G4double oh=sqrt(ch*ch+rr*rr-2*ch*rr*cos(180*deg-(*besEMCGeometry).BSCAngleRotat));
234 G4double hoi=asin(sin(180*deg-oij)/oh*hi);
235 G4double dok=asin(sin(180*deg-(*besEMCGeometry).BSCAngleRotat)/oh*ch);
236 if(verboseLevel>3)
237 G4cout << "oj=" <<oj/cm<<G4endl
238 << "oij="<<oij/deg<<G4endl
239 << "doj="<<doj/deg<<G4endl
240 << "ioj="<<ioj/deg<<G4endl
241 << "ij="<<ij/cm<<G4endl
242 << "dOp="<<dOp/cm<<G4endl
243 << "cOp="<<cOp/cm<<G4endl
244 << "ch="<<ch/cm<<G4endl
245 << "hi="<<hi/cm<<G4endl
246 << "oh="<<oh/cm<<G4endl
247 << "hoi="<<hoi/deg<<G4endl
248 << "dok="<<dok/deg<<G4endl;
249
250 // Phi Cell
251 G4double cmo = asin(sin(180*degree-(*besEMCGeometry).BSCAngleRotat)/(*besEMCGeometry).BSCRmax2*dOp);
252 G4double cm = (*besEMCGeometry).BSCRmax2/sin(180*degree-(*besEMCGeometry).BSCAngleRotat)*sin((*besEMCGeometry).BSCAngleRotat-cmo);
253 G4ThreeVector Pout(dOp+cm*cos((*besEMCGeometry).BSCAngleRotat),-cm*sin((*besEMCGeometry).BSCAngleRotat),(*besEMCGeometry).BSCDz);
254
255 G4double rTaperRingOuter1 = (*besEMCGeometry).TaperRingRmin1+(*besEMCGeometry).TaperRingThickness1;
256 G4double rTaperRingOuter2 = (*besEMCGeometry).TaperRingRmin2+(*besEMCGeometry).TaperRingDr;
257 G4double zTaperRing1 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3-(*besEMCGeometry).TaperRingDz;
258 G4double zTaperRing2 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3;
259
260 G4RotationMatrix* rotIntersection = new G4RotationMatrix();
261 rotIntersection->rotateZ(-(*besEMCGeometry).BSCAngleRotat-(*besEMCGeometry).BSCPhiDphi/2.-hoi);
262 G4ThreeVector P(oOp*cos(-90.*deg+(*besEMCGeometry).BSCAngleRotat+hoi), oOp*sin(-90.*deg+(*besEMCGeometry).BSCAngleRotat+hoi), 0);
263 G4AffineTransform Td(rotIntersection, P);
264 G4ThreeVector md = Td.Inverse().TransformPoint(G4ThreeVector(0,0,0));
265 G4ThreeVector vd = Td.Inverse().TransformPoint(Pout);
266
267 G4double zPlane0[4]={-(*besEMCGeometry).BSCDz,-zTaperRing1,zTaperRing1,(*besEMCGeometry).BSCDz};
268 G4double rInner0[4]={vd.perp(),cOp,cOp,vd.perp()};
269 G4double rOuter0[4]={(*besEMCGeometry).BSCPhiRmax,(*besEMCGeometry).BSCPhiRmax,(*besEMCGeometry).BSCPhiRmax,(*besEMCGeometry).BSCPhiRmax};
270
271 G4double zPlane1[4]={-zTaperRing2,-zTaperRing1,zTaperRing1,zTaperRing2};
272 G4double rInner1[4]={rTaperRingOuter2,rTaperRingOuter1,rTaperRingOuter1,rTaperRingOuter2};
273 G4double rOuter1[4]={(*besEMCGeometry).BSCRmax,(*besEMCGeometry).BSCRmax,(*besEMCGeometry).BSCRmax,(*besEMCGeometry).BSCRmax};
274
275 G4VSolid* solidBSCPhi1 = new G4Polycone("solidBSCPhi1",0,360*deg,4,zPlane1,rInner1,rOuter1);
276 G4VSolid* solidBSCPhi0 = new G4Polyhedra("solidBSCPhi0",360.*deg-(*besEMCGeometry).BSCPhiDphi,(*besEMCGeometry).BSCPhiDphi,(*besEMCGeometry).BSCNbPhi/2,4,zPlane0,rInner0,rOuter0);
277 G4IntersectionSolid* solidBSCPhi = new G4IntersectionSolid("solidBSCPhi", solidBSCPhi0, solidBSCPhi1, 0, md);
278
279 logicBSCPhi = new G4LogicalVolume(solidBSCPhi,
280 G4Material::GetMaterial("Air"),
281 "logicalBSCPhi");
282
283 G4int i;
284 for(G4int j=0;j<(*besEMCGeometry).BSCNbPhi;j++) //=============
285 {
286 if(j<(*besEMCGeometry).BSCNbPhi/2) { //0~59
287 i=(*besEMCGeometry).BSCNbPhi/2-j-1;
288 } else { //60~119
289 i=(*besEMCGeometry).BSCNbPhi*3/2-j-1;
290 }
291 rotateMatrix[i] = new G4RotationMatrix();
292 rotateMatrix[i]->rotateZ(-i*(*besEMCGeometry).BSCPhiDphi
293 -(*besEMCGeometry).BSCAngleRotat
294 -(*besEMCGeometry).BSCPhiDphi/2.
295 -hoi);
296 rotateMatrix[i]->getAngleAxis(delta, axis);
297 //G4cout << "The axis of crystals in the world system is: "
298 // << delta/deg << "(deg)(delta) "
299 //<< axis << "(Z axis)"<< G4endl;
300 ox=oOp*cos(-90.*deg+(*besEMCGeometry).BSCAngleRotat+hoi
301 +i*(*besEMCGeometry).BSCPhiDphi);
302 oy=oOp*sin(-90.*deg+(*besEMCGeometry).BSCAngleRotat+hoi
303 +i*(*besEMCGeometry).BSCPhiDphi);
304 oz=0*cm;
305
306 ostringstream strPhi;
307 strPhi << "physicalBSCPhi" << j;
308
309 physiBSCPhi = new G4PVPlacement(rotateMatrix[i],
310 G4ThreeVector(ox,oy,oz),
311 logicBSCPhi,
312 strPhi.str(),
313 logicBSCWorld,
314 false,
315 j,CHECKLV2);
316 //G4cout << G4ThreeVector(ox/cm,oy/cm,oz/cm) <<"(cm)" << G4endl
317 // << (-(*besEMCGeometry).BSCAngleRotat+(i-1)*(*besEMCGeometry).BSCPhiDphi)/deg <<"(degree)" << G4endl;
318 }
319
320 //
321 //Crystals
322 //
323 G4double zHalfLength[50];
324 G4double thetaAxis[50];
325 G4double phiAxis[50];
326 G4double yHalfLength1[50];
327 G4double xHalfLength2[50];
328 G4double xHalfLength1[50];
329 G4double tanAlpha1[50];
330 G4double yHalfLength2[50];
331 G4double xHalfLength4[50];
332 G4double xHalfLength3[50];
333 G4double tanAlpha2[50];
334 G4double xPosition[50];
335 G4double yPosition[50];
336 G4double zPosition[50];
337 G4double thetaPosition[50];
338 for(i=0;i<(*besEMCGeometry).BSCNbTheta;i++)
339 {
340 zHalfLength[i] = (*besEMCGeometry).zHalfLength[i];
341 thetaAxis[i] = (*besEMCGeometry).thetaAxis[i];
342 phiAxis[i] = (*besEMCGeometry).phiAxis[i];
343 yHalfLength1[i] = (*besEMCGeometry).yHalfLength1[i];
344 xHalfLength2[i] = (*besEMCGeometry).xHalfLength2[i];
345 xHalfLength1[i] = (*besEMCGeometry).xHalfLength1[i];
346 tanAlpha1[i] = (*besEMCGeometry).tanAlpha1[i];
347 yHalfLength2[i] = (*besEMCGeometry).yHalfLength2[i];
348 xHalfLength4[i] = (*besEMCGeometry).xHalfLength4[i];
349 xHalfLength3[i] = (*besEMCGeometry).xHalfLength3[i];
350 tanAlpha2[i] = (*besEMCGeometry).tanAlpha2[i];
351 xPosition[i] = (*besEMCGeometry).xPosition[i];
352 yPosition[i] = (*besEMCGeometry).yPosition[i];
353 zPosition[i] = (*besEMCGeometry).zPosition[i];
354 thetaPosition[i]= (*besEMCGeometry).thetaPosition[i];
355 if(verboseLevel>4)
356 G4cout << "The sizes of the "<<i+1<<" crystal are:" << G4endl
357 <<"zHalfLength ="<<zHalfLength[i]/cm<< "(cm)," << G4endl
358 << "thetaAxis ="<<thetaAxis[i]/deg << "(deg),"<< G4endl
359 << "phiAxis ="<< phiAxis[i]/deg << "(deg),"<< G4endl
360 << "yHalfLength1="<<yHalfLength1[i]/cm<<"(cm),"<< G4endl
361 << "xHalfLength1="<<xHalfLength1[i]/cm<<"(cm),"<< G4endl
362 << "xHalfLength2="<<xHalfLength2[i]/cm<<"(cm),"<< G4endl
363 << "tanAlpha1 ="<< tanAlpha1[i] << G4endl
364 << "yHalfLength2="<<yHalfLength2[i]/cm<<"(cm),"<< G4endl
365 << "xHalfLength3="<<xHalfLength3[i]/cm<<"(cm),"<< G4endl
366 << "xHalfLength4="<<xHalfLength4[i]/cm<<"(cm),"<< G4endl
367 << "tanAlpha2 =" << tanAlpha2[i] << "." << G4endl;
368 }
369 besEMCGeometry->ModifyForCasing();
370
371 solidBSCCrystal = new G4Trap("solidCrystal",
372 100*cm, 100*deg, 100*deg,
373 100*cm, 100*cm, 100*cm, 100*deg,
374 100*cm, 100*cm, 100*cm, 100*deg);
375
376 logicBSCCrystal = new G4LogicalVolume(solidBSCCrystal,
377 fCrystalMaterial,
378 "logicalCrystal");
379
380 crystalParam = new BesCrystalParameterisation
381 (startID,
382 thetaNbCrystals,
383 (*besEMCGeometry).BSCNbTheta*2,
384 besEMCGeometry,
385 verboseLevel);
386
387 //---------------------------------------------------------------------------------
388 //rear substance
389 solidRear = new G4Box("solidRearBox",
390 (*besEMCGeometry).rearBoxLength/2,
391 (*besEMCGeometry).rearBoxLength/2,
392 (*besEMCGeometry).rearBoxDz/2);
393
394 logicRear = new G4LogicalVolume(solidRear,
395 G4Material::GetMaterial("Air"),
396 "logicalRearBox");
397
398 //organic glass
399 solidOrgGlass = new G4Box("solidOrganicGlass",
400 (*besEMCGeometry).orgGlassLengthX/2,
401 (*besEMCGeometry).orgGlassLengthY/2,
402 (*besEMCGeometry).orgGlassLengthZ/2);
403
404 logicOrgGlass = new G4LogicalVolume(solidOrgGlass,
405 organicGlass,
406 "logicalOrganicGlass");
407
408 physiOrgGlass = new G4PVPlacement(0,
409 G4ThreeVector(0,0,-((*besEMCGeometry).rearBoxDz-(*besEMCGeometry).orgGlassLengthZ)/2),
410 logicOrgGlass,
411 "physicalOrganicGlass",
412 logicRear,
413 false,
414 0,CHECKLV4);
415
416 //casing
417 solidCasingBox = new G4Box("solidCasingBox",
418 (*besEMCGeometry).rearBoxLength/2,
419 (*besEMCGeometry).rearBoxLength/2,
420 (*besEMCGeometry).rearCasingThickness/2);
421
422 solidAirHole = new G4Box("solidAirHole",
423 (*besEMCGeometry).orgGlassLengthX/2,
424 (*besEMCGeometry).orgGlassLengthY/2,
425 (*besEMCGeometry).rearBoxDz/2); //any value more than casing thickness
426
427 solidRearCasing = new G4SubtractionSolid("solidRearCasing",
428 solidCasingBox,
429 solidAirHole,
430 0,
431 G4ThreeVector());
432
433 logicRearCasing = new G4LogicalVolume(solidRearCasing,
434 rearCasingMaterial,
435 "logicalRearCasing");
436
437 physiRearCasing = new G4PVPlacement(0,
438 G4ThreeVector(0,0,-((*besEMCGeometry).rearBoxDz-(*besEMCGeometry).rearCasingThickness)/2),
439 logicRearCasing,
440 "physicalRearCasing",
441 logicRear,
442 false,
443 0,CHECKLV4);
444
445 //Al Plate
446 solidAlBox = new G4Box("solidAlBox",
447 (*besEMCGeometry).rearBoxLength/2,
448 (*besEMCGeometry).rearBoxLength/2,
449 (*besEMCGeometry).AlPlateDz/2);
450
451 solidAlPlate = new G4SubtractionSolid("solidAlPlate",
452 solidAlBox,
453 solidAirHole,
454 0,
455 G4ThreeVector());
456
457 logicAlPlate = new G4LogicalVolume(solidAlPlate,
458 G4Material::GetMaterial("Aluminium"),
459 "logicalAlPlate");
460
461 physiAlPlate = new G4PVPlacement(0,
462 G4ThreeVector(0,0,-((*besEMCGeometry).rearBoxDz/2
463 -(*besEMCGeometry).rearCasingThickness
464 -(*besEMCGeometry).AlPlateDz/2)),
465 logicAlPlate,
466 "physicalAlPlate",
467 logicRear,
468 false,
469 0,CHECKLV4);
470
471 //photodiode
472 solidPD = new G4Box("solidPD",
473 (*besEMCGeometry).PDLengthX, //two PD
474 (*besEMCGeometry).PDLengthY/2,
475 (*besEMCGeometry).PDLengthZ/2);
476
477 logicPD = new G4LogicalVolume(solidPD,
478 G4Material::GetMaterial("M_Silicon"),
479 "logicalPD");
480
481 physiPD = new G4PVPlacement(0,
482 G4ThreeVector(0,0,-((*besEMCGeometry).rearBoxDz/2
483 -(*besEMCGeometry).orgGlassLengthZ
484 -(*besEMCGeometry).PDLengthZ/2)),
485 logicPD,
486 "physicalPD",
487 logicRear,
488 false,
489 0,CHECKLV4);
490
491 //preamplifier box
492 solidPreAmpBox = new G4Box("solidPreAmpBox",
493 (*besEMCGeometry).rearBoxLength/2,
494 (*besEMCGeometry).rearBoxLength/2,
495 (*besEMCGeometry).PABoxDz/2);
496
497 logicPreAmpBox = new G4LogicalVolume(solidPreAmpBox,
498 G4Material::GetMaterial("Aluminium"),
499 "logicalPreAmpBox");
500
501 physiPreAmpBox = new G4PVPlacement(0,
502 G4ThreeVector(0,0,-((*besEMCGeometry).rearBoxDz/2
503 -(*besEMCGeometry).rearCasingThickness
504 -(*besEMCGeometry).AlPlateDz
505 -(*besEMCGeometry).PABoxDz/2)),
506 logicPreAmpBox,
507 "physicalPreAmpBox",
508 logicRear,
509 false,
510 0,CHECKLV4);
511
512 //air in preamplifier box
513 solidAirInPABox = new G4Box("solidAirInPABox",
514 (*besEMCGeometry).rearBoxLength/2-(*besEMCGeometry).PABoxThickness,
515 (*besEMCGeometry).rearBoxLength/2-(*besEMCGeometry).PABoxThickness,
516 (*besEMCGeometry).PABoxDz/2-(*besEMCGeometry).PABoxThickness);
517
518 logicAirInPABox = new G4LogicalVolume(solidAirInPABox,
519 G4Material::GetMaterial("Air"),
520 "logicalAirInPABox");
521
522 physiAirInPABox = new G4PVPlacement(0,
523 G4ThreeVector(),
524 logicAirInPABox,
525 "physicalAirInPABox",
526 logicPreAmpBox,
527 false,
528 0,CHECKLV5);
529
530 //stainless steel for hanging the crystal
531 solidHangingPlate = new G4Box("solidHangingPlate",
532 (*besEMCGeometry).rearBoxLength/2,
533 (*besEMCGeometry).rearBoxLength/2,
534 (*besEMCGeometry).HangingPlateDz/2);
535
536 logicHangingPlate = new G4LogicalVolume(solidHangingPlate,stainlessSteel,"logicalHangingPlate");
537
538 physiHangingPlate = new G4PVPlacement(0,
539 G4ThreeVector(0,0,-((*besEMCGeometry).rearBoxDz/2
540 -(*besEMCGeometry).rearCasingThickness
541 -(*besEMCGeometry).AlPlateDz
542 -(*besEMCGeometry).PABoxDz
543 -(*besEMCGeometry).HangingPlateDz/2)),
544 logicHangingPlate,
545 "physicalHangingPlate",
546 logicRear,
547 false,
548 0,CHECKLV4);
549
550 //water pipe
551 solidWaterPipe = new G4Tubs("solidWaterPipe",
552 0,
553 (*besEMCGeometry).waterPipeDr,
554 (*besEMCGeometry).BSCDz,
555 0.*deg,
556 360.*deg);
557
558 logicWaterPipe = new G4LogicalVolume(solidWaterPipe,waterPipe,"logicalWaterPipe");
559
560 physiWaterPipe = new G4PVPlacement(0,
561 G4ThreeVector((*besEMCGeometry).cablePosX[0]-2*(*besEMCGeometry).cableDr,
562 (*besEMCGeometry).cablePosY[0]-(*besEMCGeometry).cableDr-(*besEMCGeometry).waterPipeDr,
563 0),
564 logicWaterPipe,
565 "physicalWaterPipe",
566 logicBSCPhi,
567 false,
568 0,CHECKLV3);
569 //---------------------------------------------------------------------------------
570
571
572 //
573 //Theta Cell
574 //
575 G4String nameCrystalAndCasing="CrystalAndCasing";
576
577 G4int id=0; //ID of crystals after distinguishing left and right
578 for(i=startID;i<=thetaNbCrystals;i++) //================
579 {
580 ostringstream strSolidCasing;
581 strSolidCasing << "solidBSCCasing" << i-1;
582 ostringstream strVolumeCasing;
583 strVolumeCasing << "logicalBSCCasing" << i-1;
584 ostringstream strPhysiCasing;
585 strPhysiCasing << "physicalBSCCasing" << i-1;
586
587 if(i>(*besEMCGeometry).BSCNbTheta)
588 {
589 id=i-(*besEMCGeometry).BSCNbTheta-1;
590 solidBSCTheta = new G4Trap(strSolidCasing.str(),
591 zHalfLength[id],
592 thetaAxis[id],
593 -phiAxis[id],
594 yHalfLength1[id],
595 xHalfLength2[id],
596 xHalfLength1[id],
597 -tanAlpha1[id],
598 yHalfLength2[id],
599 xHalfLength4[id],
600 xHalfLength3[id],
601 -tanAlpha2[id]);
602
603 //G4cout<<"in EmcConstr1: "<<strSolidCasing.str()<<" x1="<<xHalfLength1[id]<<" y1="<<yHalfLength1[id]<<" theta="<<thetaAxis[id]
604 //<<" phi="<<-phiAxis[id]<<" a1="<<-tanAlpha1[id]<<G4endl;
605
606 logicBSCTheta = new G4LogicalVolume(solidBSCTheta,
607 fCasingMaterial,
608 strVolumeCasing.str());
609
610 rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1] = new G4RotationMatrix();
611 rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1]->rotateZ(-90*deg);
612 rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1]
613 ->rotateX(-thetaPosition[id]);
614
615
616 physiBSCTheta =
617 new G4PVPlacement(rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1],
618 G4ThreeVector(xPosition[id],
619 yPosition[id],
620 zPosition[id]),
621 strPhysiCasing.str(),
622 logicBSCTheta,
623 physiBSCPhi,
624 false,
625 i-1,CHECKLV3);
626
627 if(logicBSCTheta)
628 {
629 G4VisAttributes* rightVisAtt= new G4VisAttributes(G4Colour(1.0,0.,0.));
630 rightVisAtt->SetVisibility(true);
631 logicBSCTheta->SetVisAttributes(rightVisAtt);
632 logicBSCTheta->SetVisAttributes(G4VisAttributes::Invisible);
633 }
634
635 ostringstream strRear;
636 strRear << "physicalRearBox_1_" << i-1;
637
638 physiRear = new G4PVPlacement(rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1],
639 G4ThreeVector((*besEMCGeometry).rearBoxPosX[id],
640 (*besEMCGeometry).rearBoxPosY[id],
641 (*besEMCGeometry).rearBoxPosZ[id]),
642 strRear.str(),
643 logicRear,
644 physiBSCPhi,
645 false,
646 i-1,CHECKLV3);
647
648 ostringstream strGirder;
649 strGirder << "solidOpenningCutGirder_1_" << i-1;
650 solidOCGirder = new G4Cons(strGirder.str(),
651 (*besEMCGeometry).OCGirderRmin1[id],
652 (*besEMCGeometry).BSCPhiRmax,
653 (*besEMCGeometry).OCGirderRmin2[id],
654 (*besEMCGeometry).BSCPhiRmax,
655 (*besEMCGeometry).OCGirderDz[id]/2,
656 360.*deg-(*besEMCGeometry).OCGirderAngle/2,
657 (*besEMCGeometry).OCGirderAngle/2-da);
658
659 ostringstream strVGirder;
660 strVGirder << "logicalOpenningCutGirder_1_" << i-1;
661 logicOCGirder = new G4LogicalVolume(solidOCGirder,stainlessSteel,strVGirder.str());
662 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
663
664 ostringstream strPGirder;
665 strPGirder << "physicalOpenningCutGirder_1_" << i-1;
666 physiOCGirder = new G4PVPlacement(0,
667 G4ThreeVector(0,0,(*besEMCGeometry).OCGirderPosZ[id]),
668 logicOCGirder,
669 strPGirder.str(),
670 logicBSCPhi,
671 false,
672 0,CHECKLV3);
673
674 if(id<(*besEMCGeometry).BSCNbTheta-1)
675 {
676 G4double zLength = (*besEMCGeometry).OCGirderPosZ[id+1]
677 -(*besEMCGeometry).OCGirderPosZ[id]
678 -(*besEMCGeometry).OCGirderDz[id+1]/2-(*besEMCGeometry).OCGirderDz[id]/2;
679 G4double zPositionOCGirder = (*besEMCGeometry).OCGirderPosZ[id+1]
680 -(*besEMCGeometry).OCGirderDz[id+1]/2-zLength/2;
681
682 ostringstream strGirder2;
683 strGirder2 << "solidOpenningCutGirder_2_" << i-1;
684 solidOCGirder = new G4Cons(strGirder2.str(),
685 (*besEMCGeometry).OCGirderRmin2[id],
686 (*besEMCGeometry).BSCPhiRmax,
687 (*besEMCGeometry).OCGirderRmin1[id+1],
688 (*besEMCGeometry).BSCPhiRmax,
689 zLength/2,
690 360.*deg-(*besEMCGeometry).OCGirderAngle/2,
691 (*besEMCGeometry).OCGirderAngle/2-da);
692
693 ostringstream strVGirder2;
694 strVGirder2 << "logicalOpenningCutGirder_2_" << i-1;
695 logicOCGirder = new G4LogicalVolume(solidOCGirder,stainlessSteel,strVGirder2.str());
696 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
697
698 ostringstream strPGirder2;
699 strPGirder2 << "physicalOpenningCutGirder_2_" << i-1;
700 physiOCGirder = new G4PVPlacement(0,
701 G4ThreeVector(0,0,zPositionOCGirder),
702 logicOCGirder,
703 strPGirder2.str(),
704 logicBSCPhi,
705 false,
706 0,CHECKLV3);
707 }
708
709 ostringstream strBSCCable;
710 strBSCCable << "solidBSCCable_1_" << i-1;
711 solidCable = new G4Tubs(strBSCCable.str(),
712 0,
713 (*besEMCGeometry).cableDr,
714 (*besEMCGeometry).cableLength[id]/2,
715 0.*deg,
716 360.*deg);
717
718 ostringstream strVBSCCable;
719 strVBSCCable << "logicalBSCCable_1_" << i-1;
720 logicCable = new G4LogicalVolume(solidCable,cable,strVBSCCable.str());
721
722 ostringstream strPBSCCable;
723 strPBSCCable << "physicalBSCCable_1_" << i-1;
724 physiCable = new G4PVPlacement(0,
725 G4ThreeVector((*besEMCGeometry).cablePosX[id],
726 (*besEMCGeometry).cablePosY[id],
727 (*besEMCGeometry).cablePosZ[id]),
728 logicCable,
729 strPBSCCable.str(),
730 logicBSCPhi,
731 false,
732 0,CHECKLV3);
733 logicCable->SetVisAttributes(G4VisAttributes::Invisible);
734 }
735 else
736 {
737 id=(*besEMCGeometry).BSCNbTheta-i;
738 solidBSCTheta = new G4Trap(strSolidCasing.str(),
739 zHalfLength[id],
740 thetaAxis[id],
741 phiAxis[id],
742 yHalfLength1[id],
743 xHalfLength1[id],
744 xHalfLength2[id],
745 tanAlpha1[id],
746 yHalfLength2[id],
747 xHalfLength3[id],
748 xHalfLength4[id],
749 tanAlpha2[id]);
750
751 // G4cout<<"in EmcConstr2: "<<strSolidCasing.str()<<" x1="<<xHalfLength1[id]<<" y1="<<yHalfLength1[id]<<" theta="<<thetaAxis[id]
752 // <<" phi="<<phiAxis[id]<<" a1="<<tanAlpha1[id]<<G4endl;
753
754 logicBSCTheta = new G4LogicalVolume(solidBSCTheta,
755 fCasingMaterial,
756 strVolumeCasing.str());
757
758 rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1] = new G4RotationMatrix();
759 rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1]->rotateZ(-90*deg);
760 rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1]
761 ->rotateX(-180*deg+thetaPosition[id]);
762 physiBSCTheta =
763 new G4PVPlacement(rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1],
764 G4ThreeVector(xPosition[id],
765 yPosition[id],
766 -zPosition[id]),
767 strPhysiCasing.str(),
768 logicBSCTheta,
769 physiBSCPhi,
770 false,
771 i-1,CHECKLV3);
772 if(logicBSCTheta)
773 {
774 G4VisAttributes* rightVisAtt= new G4VisAttributes(G4Colour(1.0,0.,0.));
775 rightVisAtt->SetVisibility(true);
776 logicBSCTheta->SetVisAttributes(rightVisAtt);
777 logicBSCTheta->SetVisAttributes(G4VisAttributes::Invisible);
778 }
779
780 ostringstream strRear;
781 strRear << "physicalRearBox_2_" << i-1;
782
783 physiRear = new G4PVPlacement(rotateMatrix[(*besEMCGeometry).BSCNbPhi+i-1],
784 G4ThreeVector((*besEMCGeometry).rearBoxPosX[id],
785 (*besEMCGeometry).rearBoxPosY[id],
786 -(*besEMCGeometry).rearBoxPosZ[id]),
787 strRear.str(),
788 logicRear,
789 physiBSCPhi,
790 false,
791 i-1,CHECKLV3);
792
793 ostringstream strGirder;
794 strGirder << "solidOpenningCutGirder_3_" << i-1;
795 solidOCGirder = new G4Cons(strGirder.str(),
796 (*besEMCGeometry).OCGirderRmin2[id],
797 (*besEMCGeometry).BSCPhiRmax,
798 (*besEMCGeometry).OCGirderRmin1[id],
799 (*besEMCGeometry).BSCPhiRmax,
800 (*besEMCGeometry).OCGirderDz[id]/2,
801 360.*deg-(*besEMCGeometry).OCGirderAngle/2,
802 (*besEMCGeometry).OCGirderAngle/2-da);
803
804 ostringstream strVGirder;
805 strVGirder << "logicalOpenningCutGirder_3_" << i-1;
806 logicOCGirder = new G4LogicalVolume(solidOCGirder,stainlessSteel,strVGirder.str());
807 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
808
809 ostringstream strPGirder;
810 strPGirder << "physicalOpenningCutGirder_3_" << i-1;
811 physiOCGirder = new G4PVPlacement(0,
812 G4ThreeVector(0,0,-(*besEMCGeometry).OCGirderPosZ[id]),
813 logicOCGirder,
814 strPGirder.str(),
815 logicBSCPhi,
816 false,
817 0,CHECKLV3);
818
819 if(id<(*besEMCGeometry).BSCNbTheta-1)
820 {
821 G4double zLength = (*besEMCGeometry).OCGirderPosZ[id+1]-(*besEMCGeometry).OCGirderPosZ[id]
822 -(*besEMCGeometry).OCGirderDz[id+1]/2-(*besEMCGeometry).OCGirderDz[id]/2;
823 G4double zPositionOCGirder = (*besEMCGeometry).OCGirderPosZ[id+1]-(*besEMCGeometry).OCGirderDz[id+1]/2-zLength/2;
824
825 ostringstream strGirder2;
826 strGirder2 << "solidOpenningCutGirder_4_" << i-1;
827 solidOCGirder = new G4Cons(strGirder2.str(),
828 (*besEMCGeometry).OCGirderRmin1[id+1],
829 (*besEMCGeometry).BSCPhiRmax,
830 (*besEMCGeometry).OCGirderRmin2[id],
831 (*besEMCGeometry).BSCPhiRmax,
832 zLength/2,
833 360.*deg-(*besEMCGeometry).OCGirderAngle/2,
834 (*besEMCGeometry).OCGirderAngle/2-da);
835
836 ostringstream strVGirder2;
837 strVGirder2 << "logicalOpenningCutGirder_4_" << i-1;
838 logicOCGirder
839 = new G4LogicalVolume(solidOCGirder,stainlessSteel,strVGirder2.str());
840 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
841
842 ostringstream strPGirder2;
843 strPGirder2 << "physicalOpenningCutGirder_4_" << i-1;
844 physiOCGirder = new G4PVPlacement(0,
845 G4ThreeVector(0,0,-zPositionOCGirder),
846 logicOCGirder,
847 strPGirder2.str(),
848 logicBSCPhi,
849 false,
850 0,CHECKLV3);
851 }
852
853 ostringstream strBSCCable;
854 strBSCCable << "solidBSCCable_2_" << i-1;
855 solidCable = new G4Tubs(strBSCCable.str(),
856 0,
857 (*besEMCGeometry).cableDr,
858 (*besEMCGeometry).cableLength[id]/2,
859 0.*deg,
860 360.*deg);
861
862 ostringstream strVBSCCable;
863 strVBSCCable << "logicalBSCCable_2_" << i-1;
864 logicCable = new G4LogicalVolume(solidCable,cable,strVBSCCable.str());
865
866 ostringstream strPBSCCable;
867 strPBSCCable << "physicalBSCCable_2_" << i-1;
868 physiCable = new G4PVPlacement(0,
869 G4ThreeVector((*besEMCGeometry).cablePosX[id],
870 (*besEMCGeometry).cablePosY[id],
871 -(*besEMCGeometry).cablePosZ[id]),
872 logicCable,
873 strPBSCCable.str(),
874 logicBSCPhi,
875 false,
876 0,CHECKLV3);
877 logicCable->SetVisAttributes(G4VisAttributes::Invisible);
878
879 }
880
881 ostringstream strCrystal;
882 strCrystal << "physicalCrystal" << i-1;
883 physiBSCCrystal = new G4PVParameterised(
884 strCrystal.str(),
885 logicBSCCrystal,
886 physiBSCTheta,
887 kZAxis,
888 1,//for this method,it must be 1.
889 crystalParam);
890 (*besEMCGeometry).physiBSCCrystal[i]=physiBSCCrystal;
891 //G4cout << (*besEMCGeometry).physiBSCCrystal[i] << G4endl;
892 physiBSCCrystal->SetCopyNo(i);
893 if(CHECKLV4) physiBSCCrystal->CheckOverlaps();
894
895 if(verboseLevel>4)
896 G4cout << "BesEmcConstruction*****************************"<< G4endl
897 << "point of crystal =" <<physiBSCCrystal << G4endl
898 // << "point of mother =" <<physiBSCCrystal->GetMotherPhysical() << G4endl
899 << "point of excepted=" <<physiBSCTheta << G4endl;
900 //G4Exception("BesEMCConstruction::Construct() starting............");
901 }
902 //
903 //always return the physical World
904 //
905 if(verboseLevel>0)PrintEMCParameters();
906 // return physiBSC;
907
908 ConstructSPFrame(logicBSCWorld,besEMCGeometry);
909 ConstructEndGeometry(logicEMC);
910 }
911
912 //Set vis attributes and sensitive detector
913 SetVisAndSD();
914
915 //list geo tree
916 if(logicEMC&&physiEMC&&verboseLevel>4){
917 G4cout<<"logicEmc "<<logicEMC<<" physiEmc "<<physiEMC<<G4endl;
918 G4cout<<"list geo tree"<<G4endl;
919
920 int NdaughterofEMC = logicEMC->GetNoDaughters();
921
922 for(int i = 0; i < NdaughterofEMC; i++)
923 {
924 G4LogicalVolume *daughterofEmc = logicEMC->GetDaughter(i)->GetLogicalVolume();
925 G4cout<<i<<"/"<<NdaughterofEMC<<" name: "<<daughterofEmc->GetName()<<" "<<daughterofEmc<<" shape: "<<daughterofEmc->GetSolid()->GetName()<<G4endl;
926 int NdaughterofEmc_2 = daughterofEmc->GetNoDaughters();
927 for(int j = 0; j < NdaughterofEmc_2; j++)
928 {
929 G4LogicalVolume *daughterofEmc_2 = daughterofEmc->GetDaughter(j)->GetLogicalVolume();
930 G4cout<<" --> "<<j<<"/"<<NdaughterofEmc_2<<" name: "<<daughterofEmc_2->GetName()<<" "<<daughterofEmc_2<<" shape: "<<daughterofEmc_2->GetSolid()->GetName()<<G4endl;
931 int NdaughterofEmc_3 = daughterofEmc_2->GetNoDaughters();
932 for(int k = 0; k < NdaughterofEmc_3; k++)
933 {
934 G4LogicalVolume *daughterofEmc_3 = daughterofEmc_2->GetDaughter(k)->GetLogicalVolume();
935 G4cout<<" --> "<<k<<"/"<<NdaughterofEmc_3<<" name: "<<daughterofEmc_3->GetName()<<" "<<daughterofEmc_3<<" shape: "<<daughterofEmc_3->GetSolid()->GetName()<<G4endl;
936 int NdaughterofEmc_4 = daughterofEmc_3->GetNoDaughters();
937 for(int m = 0; m < NdaughterofEmc_4; m++)
938 {
939 G4LogicalVolume *daughterofEmc_4 = daughterofEmc_3->GetDaughter(m)->GetLogicalVolume();
940 G4cout<<" --> "<<m<<"/"<<NdaughterofEmc_4<<" name: "<<daughterofEmc_4->GetName()<<" "<<daughterofEmc_4<<" shape: "<<daughterofEmc_4->GetSolid()->GetName()<<G4endl;
941 if(daughterofEmc_3->GetSolid()->GetName().contains("solidBSCCasing"))
942 {
943 G4Trap *Crystal = (G4Trap *)daughterofEmc_3->GetSolid();
944 double hz = Crystal->GetZHalfLength();
945 double hx1 = Crystal->GetXHalfLength1();
946 double hx2 = Crystal->GetXHalfLength2();
947 double hx3 = Crystal->GetXHalfLength3();
948 double hx4 = Crystal->GetXHalfLength4();
949 double hy1 = Crystal->GetYHalfLength1();
950 double hy2 = Crystal->GetYHalfLength2();
951 double tanalpha1 = Crystal->GetTanAlpha1();
952 double tanalpha2 = Crystal->GetTanAlpha2();
953 G4cout<<" --> "<<hx1<<" "<<hx2<<" "<<hx3<<" "<<hx4<<" "<<hy1<<" "<<hy2<<" "<<hz<<" "<<tanalpha1<<" "<<tanalpha2<<G4endl;
954
955 }//if(SolidCrystal)
956 }//4
957 }//3
958 }//2
959 }//1
960 }
961
962}
double tan(const BesAngle a)
Definition BesAngle.h:216
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
#define CHECKLV0
#define CHECKLV4
#define CHECKLV2
#define CHECKLV3
#define CHECKLV1
#define CHECKLV5
double P(RecMdcKalTrack *trk)
const double delta
void ConstructSPFrame(G4LogicalVolume *, BesEmcGeometry *)
void ConstructEndGeometry(G4LogicalVolume *)
void ComputeEMCParameters()
static EmcG4Geo * Instance()
Get a pointer to the single instance of EmcG4Geo.
Definition EmcG4Geo.cxx:52
static G4int GetEmc()
G4LogicalVolume * GetTopVolume()
Get the top(world) volume;.

Referenced by BesDetectorConstruction::Construct().

◆ ConstructEndGeometry()

void BesEmcConstruction::ConstructEndGeometry ( G4LogicalVolume * logEMC)

Definition at line 964 of file BesEmcConstruction.cc.

965{ // logicEMC is not necessary, since it is a member of this class
966 if(logEMC!=logicEMC) G4cout << "BesEmcConstruction::ConstructEndGeometry parameter transmit error!" << G4endl;
967 //has gotten in DefineMaterials()
968 //G4Material* fCrystalMaterial = G4Material::GetMaterial("Cesiumiodide");
969 G4VisAttributes* crystalVisAtt= new G4VisAttributes(G4Colour(0.5,0,1.0));
970 crystalVisAtt->SetVisibility(false);
971 G4VisAttributes* endPhiVisAtt= new G4VisAttributes(G4Colour(0,1.0,0));
972 endPhiVisAtt->SetVisibility(false);
973 const G4double zoomConst = 0.995;
974 const G4double da=0.001*deg;
975
976 //world volume of endcap
977 //east end
978 solidEnd = new G4Cons("solidEndWorld",(*emcEnd).WorldRmin1,(*emcEnd).WorldRmax1,
979 (*emcEnd).WorldRmin2,(*emcEnd).WorldRmax2,
980 (*emcEnd).WorldDz/2,0.*deg,360.*deg);
981 logicEnd = new G4LogicalVolume(solidEnd, G4Material::GetMaterial("Aluminium"), "logicalEndWorld", 0, 0, 0);
982 physiEnd = new G4PVPlacement(0, // no rotation
983 G4ThreeVector(0,0,(*emcEnd).WorldZPosition),
984 logicEnd, // its logical volume
985 "physicalEndWorld0", // its name
986 logicEMC, // its mother volume
987 false, // no boolean operations
988 0,CHECKLV1); // no field specific to volume
989 if(logicEnd)
990 logicEnd->SetVisAttributes(G4VisAttributes::Invisible);
991
992
993 //west end
994 G4RotationMatrix *rotateEnd = new G4RotationMatrix();
995 rotateEnd->rotateY(180.*deg);
996 physiEnd = new G4PVPlacement(rotateEnd,
997 G4ThreeVector(0,0,-(*emcEnd).WorldZPosition),
998 logicEnd,
999 "physicalEndWorld2",
1000 logicEMC,
1001 false,
1002 2,CHECKLV1);
1003
1004 ////////////////////////////////////////////////////////////////////////
1005 // emc endcap sectors (east) //
1006 //////////////////////////////////////////////////////////////////////////
1007 // 20mm gap //
1008 // || //
1009 // \ 7 || 6 / //
1010 // - 8 \ || / 5 - //
1011 // - \ || / - //
1012 // _ 9 - \ || / - 4 _ //
1013 // - _ - \ || / - _ - //
1014 // - _ - \||/ - _ - //
1015 // 10 - -||- - 3 //
1016 // ----------------||---------------- //
1017 // 11 - -||- - 2 //
1018 // _ - - /||\ - - _ //
1019 // _ - - / || \ - - _ //
1020 // - 12 - / || \ - 1 - //
1021 // - / || \ - //
1022 // - 13 / || \ 0 - //
1023 // / 14 || 15 \ //
1024 // || //
1025 ////////////////////////////////////////////////////////////////////////
1026
1027 // 1/16 of endcap world,which has some symmetry
1028 // sector 0-6,8-14
1029 solidEndPhi = new G4Cons("solidEndPhi0",
1030 (*emcEnd).SectorRmin1,(*emcEnd).SectorRmax1,(*emcEnd).SectorRmin2,(*emcEnd).SectorRmax2,
1031 (*emcEnd).SectorDz/2,0.*deg,22.5*deg-da);
1032 logicEndPhi = new G4LogicalVolume(solidEndPhi, G4Material::GetMaterial("Air"), "logicalEndPhi0", 0, 0, 0);
1033 for(G4int i=0;i<14;i++)
1034 {
1035 if((i!=6)&&(i!=7))
1036 {
1037 G4RotationMatrix *rotatePhi = new G4RotationMatrix();
1038 rotatePhi->rotateZ(-i*22.5*deg+67.5*deg);
1039 ostringstream strEndPhi;
1040 strEndPhi << "physicalEndPhi" << i;
1041 physiEndPhi = new G4PVPlacement(rotatePhi,//0,logicEndPhi,strEndPhi.str(),logicEnd,false,i);
1042 G4ThreeVector(0,0,(*emcEnd).SectorZPosition),logicEndPhi,strEndPhi.str(),logicEnd,false,i,CHECKLV2);
1043 }
1044 }
1045 if(logicEndPhi)
1046 logicEndPhi->SetVisAttributes(endPhiVisAtt);
1047
1048 for(G4int i=0;i<35;i++)
1049 {
1050 ostringstream strEndCasing;
1051 strEndCasing << "solidEndCasing_0_" << i;
1052
1053 //-************tranform to new coodinate! liangyt 2007.5.7 *******
1054 G4ThreeVector newfPnt[8];
1055 G4ThreeVector center(0.0, 0.0, 0.0);
1056 G4ThreeVector rotAngle(0.0, 0.0, 0.0);
1057
1058 TransformToArb8( (*emcEnd).fPnt[i], newfPnt, center, rotAngle );
1059
1060 emcEnd->Zoom(newfPnt,zoomConst); //change emcEnd.fPnt[i] to newfPnt
1061
1062 G4RotationMatrix *rotatePhiIrregBox = new G4RotationMatrix();
1063 rotatePhiIrregBox->rotateX(rotAngle.x());
1064 rotatePhiIrregBox->rotateY(rotAngle.y());
1065 rotatePhiIrregBox->rotateZ(rotAngle.z());
1066 //-*******************************************************************
1067
1068 solidEndCasing = new G4IrregBox(strEndCasing.str(),(*emcEnd).zoomPoint); //liangyt
1069
1070 ostringstream strVEndCasing;
1071 strVEndCasing << "logicalEndCasing_0_" << i;
1072 logicEndCasing = new G4LogicalVolume(solidEndCasing,fCasingMaterial,strVEndCasing.str());
1073
1074 ostringstream strPEndCasing;
1075 strPEndCasing << "physicalEndCasing_0_" << i;
1076 physiEndCasing = new G4PVPlacement(rotatePhiIrregBox,center,
1077 logicEndCasing,strPEndCasing.str(),logicEndPhi,false,i,CHECKIrreg); //change with rot and pos now!
1078
1079 ostringstream strEndCrystal;
1080 strEndCrystal << "solidEndCrystal_0_" << i;
1081
1082 emcEnd->ModifyForCasing((*emcEnd).zoomPoint,i);
1083 solidEndCrystal = new G4IrregBox(strEndCrystal.str(),(*emcEnd).cryPoint);
1084
1085 ostringstream strVEndCrystal;
1086 strVEndCrystal << "logicalEndCrystal_0_" << i;
1087 logicEndCrystal = new G4LogicalVolume(solidEndCrystal,fCrystalMaterial,strVEndCrystal.str());
1088
1089 ostringstream strPEndCrystal;
1090 strPEndCrystal << "physicalEndCrystal_0_" << i;
1091 physiEndCrystal = new G4PVPlacement(0,G4ThreeVector(),logicEndCrystal,strPEndCrystal.str(),logicEndCasing,false,i,CHECKIrreg);
1092
1093 logicEndCasing->SetVisAttributes(G4VisAttributes::Invisible);
1094 logicEndCrystal->SetVisAttributes(crystalVisAtt);
1095 logicEndCrystal->SetSensitiveDetector(besEMCSD);
1096 }
1097
1098 // the top area which has 20 mm gap
1099 // sector 6,14
1100 G4double rmin2 = (*emcEnd).WorldRmin1+((*emcEnd).WorldRmin2-(*emcEnd).WorldRmin1)*(*emcEnd).SectorDz/(*emcEnd).WorldDz;
1101 G4double rmax2 = (*emcEnd).WorldRmax1+((*emcEnd).WorldRmax2-(*emcEnd).WorldRmax1)*(*emcEnd).SectorDz/(*emcEnd).WorldDz;
1102 solidEndPhi = new G4Cons("solidEndPhi1",
1103 (*emcEnd).WorldRmin1, (*emcEnd).WorldRmax1, rmin2, rmax2,
1104 (*emcEnd).SectorDz/2,67.5*deg,22.5*deg-da);
1105 logicEndPhi = new G4LogicalVolume(solidEndPhi, G4Material::GetMaterial("Air"), "logicalEndPhi1", 0, 0, 0);
1106 for(G4int i=0;i<2;i++)
1107 {
1108 G4RotationMatrix *rotatePhi = new G4RotationMatrix();
1109 rotatePhi->rotateZ(-i*180.*deg);
1110 ostringstream strEndPhi;
1111 strEndPhi << "physicalEndPhi" << i*8+6;
1112 physiEndPhi = new G4PVPlacement(rotatePhi,G4ThreeVector(0,0,(*emcEnd).SectorZPosition),
1113 logicEndPhi,strEndPhi.str(),logicEnd,false,i*8+6,CHECKLV2);
1114 }
1115 if(logicEndPhi)
1116 logicEndPhi->SetVisAttributes(endPhiVisAtt);
1117
1118 for(G4int i=0;i<35;i++)
1119 {
1120 ostringstream strEndCasing;
1121 strEndCasing << "solidEndCasing_1_" << i;
1122
1123 //-************tranform to new coodinate! liangyt 2007.5.7 *******
1124 G4ThreeVector newfPnt[8];
1125 G4ThreeVector center(0.0, 0.0, 0.0);
1126 G4ThreeVector rotAngle(0.0, 0.0, 0.0);
1127
1128 TransformToArb8( (*emcEnd).fPnt1[i], newfPnt, center, rotAngle );
1129
1130 emcEnd->Zoom(newfPnt,zoomConst); //change emcEnd.fPnt[i] to newfPnt
1131
1132 G4RotationMatrix *rotatePhiIrregBox = new G4RotationMatrix();
1133 rotatePhiIrregBox->rotateX(rotAngle.x());
1134 rotatePhiIrregBox->rotateY(rotAngle.y());
1135 rotatePhiIrregBox->rotateZ(rotAngle.z());
1136 //-*******************************************************************
1137
1138 solidEndCasing = new G4IrregBox(strEndCasing.str(),(*emcEnd).zoomPoint);
1139
1140 ostringstream strVEndCasing;
1141 strVEndCasing << "logicalEndCasing_1_" << i;
1142 logicEndCasing = new G4LogicalVolume(solidEndCasing,fCasingMaterial,strVEndCasing.str());
1143
1144 ostringstream strPEndCasing;
1145 strPEndCasing << "physicalEndCasing_1_" << i;
1146 physiEndCasing = new G4PVPlacement(rotatePhiIrregBox,center,
1147 logicEndCasing,strPEndCasing.str(),logicEndPhi,false,i,CHECKIrreg); //change with rot and pos now!
1148
1149 ostringstream strEndCrystal;
1150 strEndCrystal << "solidEndCrystal_1_" << i;
1151
1152 emcEnd->ModifyForCasing((*emcEnd).zoomPoint,i);
1153 solidEndCrystal = new G4IrregBox(strEndCrystal.str(),(*emcEnd).cryPoint);
1154
1155 ostringstream strVEndCrystal;
1156 strVEndCrystal << "logicalEndCrystal_1_" << i;
1157 logicEndCrystal = new G4LogicalVolume(solidEndCrystal,fCrystalMaterial,strVEndCrystal.str());
1158
1159 ostringstream strPEndCrystal;
1160 strPEndCrystal << "physicalEndCrystal_1_" << i;
1161 physiEndCrystal = new G4PVPlacement(0,G4ThreeVector(),logicEndCrystal,strPEndCrystal.str(),logicEndCasing,false,i,CHECKIrreg);
1162
1163 logicEndCasing->SetVisAttributes(G4VisAttributes::Invisible);
1164 logicEndCrystal->SetVisAttributes(crystalVisAtt);
1165 logicEndCrystal->SetSensitiveDetector(besEMCSD);
1166 }
1167
1168 (*emcEnd).ReflectX();
1169
1170 // sector 7,15
1171 for(G4int i=0;i<35;i++)
1172 for (G4int j=0;j<8;j++)
1173 (*emcEnd).fPnt1[i][j].rotateZ(-90.*deg);
1174
1175 solidEndPhi = new G4Cons("solidEndPhi2",
1176 (*emcEnd).WorldRmin1, (*emcEnd).WorldRmax1, rmin2, rmax2,
1177 (*emcEnd).SectorDz/2,0*deg,22.5*deg-da);
1178 logicEndPhi = new G4LogicalVolume(solidEndPhi, G4Material::GetMaterial("Air"), "logicalEndPhi2", 0, 0, 0);
1179 for(G4int i=0;i<2;i++)
1180 {
1181 G4RotationMatrix *rotatePhi = new G4RotationMatrix();
1182 rotatePhi->rotateZ(-i*180.*deg-90.*deg);
1183 ostringstream strEndPhi;
1184 strEndPhi << "physicalEndPhi" << i*8+7;
1185 physiEndPhi = new G4PVPlacement(rotatePhi,G4ThreeVector(0,0,(*emcEnd).SectorZPosition),
1186 logicEndPhi,strEndPhi.str(),logicEnd,false,i*8+7,CHECKLV2);
1187 }
1188 if(logicEndPhi)
1189 logicEndPhi->SetVisAttributes(endPhiVisAtt);
1190
1191 for(G4int i=0;i<35;i++)
1192 {
1193 ostringstream strEndCasing;
1194 strEndCasing << "solidEndCasing_2_" << i;
1195
1196 //-************tranform to new coodinate! liangyt 2007.5.7 *******
1197 G4ThreeVector newfPnt[8];
1198 G4ThreeVector center(0.0, 0.0, 0.0);
1199 G4ThreeVector rotAngle(0.0, 0.0, 0.0);
1200
1201 TransformToArb8( (*emcEnd).fPnt1[i], newfPnt, center, rotAngle );
1202
1203 emcEnd->Zoom(newfPnt,zoomConst); //change emcEnd.fPnt[i] to newfPnt
1204
1205 G4RotationMatrix *rotatePhiIrregBox = new G4RotationMatrix();
1206 rotatePhiIrregBox->rotateX(rotAngle.x());
1207 rotatePhiIrregBox->rotateY(rotAngle.y());
1208 rotatePhiIrregBox->rotateZ(rotAngle.z());
1209 //-*******************************************************************
1210
1211 solidEndCasing = new G4IrregBox(strEndCasing.str(),(*emcEnd).zoomPoint);
1212
1213 ostringstream strVEndCasing;
1214 strVEndCasing << "logicalEndCasing_2_" << i;
1215 logicEndCasing = new G4LogicalVolume(solidEndCasing,fCasingMaterial,strVEndCasing.str());
1216
1217 ostringstream strPEndCasing;
1218 strPEndCasing << "physicalEndCasing_2_" << i;
1219 physiEndCasing = new G4PVPlacement(rotatePhiIrregBox,center,
1220 logicEndCasing,strPEndCasing.str(),logicEndPhi,false,i,CHECKIrreg); //change with rot and pos now!
1221
1222 ostringstream strEndCrystal;
1223 strEndCrystal << "solidEndCrystal_2_" << i;
1224
1225 emcEnd->ModifyForCasing((*emcEnd).zoomPoint,i);
1226 solidEndCrystal = new G4IrregBox(strEndCrystal.str(),(*emcEnd).cryPoint);
1227
1228 ostringstream strVEndCrystal;
1229 strVEndCrystal << "logicalEndCrystal_2_" << i;
1230 logicEndCrystal = new G4LogicalVolume(solidEndCrystal,fCrystalMaterial,strVEndCrystal.str());
1231
1232 ostringstream strPEndCrystal;
1233 strPEndCrystal << "physicalEndCrystal_2_" << i;
1234 physiEndCrystal = new G4PVPlacement(0, G4ThreeVector(),logicEndCrystal,strPEndCrystal.str(),logicEndCasing,false,i,CHECKIrreg);
1235
1236 logicEndCasing->SetVisAttributes(G4VisAttributes::Invisible);
1237 logicEndCrystal->SetVisAttributes(crystalVisAtt);
1238 logicEndCrystal->SetSensitiveDetector(besEMCSD);
1239 }
1240}
#define CHECKIrreg
void TransformToArb8(const G4ThreeVector fPnt[8], G4ThreeVector newfPnt[8], G4ThreeVector &center, G4ThreeVector &rotAngle)
void ModifyForCasing(G4ThreeVector pos[8], G4int CryNb)
void Zoom(const G4ThreeVector pos[8], const G4double factor)

Referenced by Construct().

◆ ConstructSPFrame()

void BesEmcConstruction::ConstructSPFrame ( G4LogicalVolume * logMother,
BesEmcGeometry * emcGeometry )

Definition at line 1268 of file BesEmcConstruction.cc.

1269{
1270 G4double rmax=(*besEMCGeometry).BSCRmax+2.*mm; //radius from 942mm to 940mm
1271 solidSupportBar = new G4Tubs("solidSupportBar0",
1272 rmax+(*besEMCGeometry).SPBarThickness1,
1273 rmax+(*besEMCGeometry).SPBarThickness+(*besEMCGeometry).SPBarThickness1,
1274 (*besEMCGeometry).BSCDz
1275 +(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz,
1276 0.*deg,
1277 360.*deg);
1278
1279 logicSupportBar = new G4LogicalVolume(solidSupportBar,stainlessSteel,"logicalSupportBar0");
1280
1281 physiSupportBar = new G4PVPlacement(0,G4ThreeVector(),logicSupportBar,"physicalSupportBar0",logMother,false,0,CHECKLV2);
1282
1283 solidSupportBar1 = new G4Tubs("solidSupportBar1",
1284 rmax,
1285 rmax+(*besEMCGeometry).SPBarThickness1,
1286 (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3,
1287 (*besEMCGeometry).BSCPhiDphi-(*besEMCGeometry).SPBarDphi/2,
1288 (*besEMCGeometry).SPBarDphi);
1289
1290 logicSupportBar1 = new G4LogicalVolume(solidSupportBar1,stainlessSteel,"logicalSupportBar1");
1291
1292 for(G4int i=0;i<(*besEMCGeometry).BSCNbPhi/2;i++)
1293 {
1294 G4RotationMatrix *rotateSPBar = new G4RotationMatrix();
1295 rotateSPBar->rotateZ((*besEMCGeometry).BSCPhiDphi-i*2*(*besEMCGeometry).BSCPhiDphi);
1296 ostringstream strSupportBar1;
1297 strSupportBar1 << "physicalSupportBar1_" << i;
1298 physiSupportBar1 = new G4PVPlacement(rotateSPBar,G4ThreeVector(),
1299 logicSupportBar1,strSupportBar1.str(),logMother,false,0,CHECKLV2);
1300 }
1301
1302 //end ring
1303 solidEndRing = new G4Tubs("solidEndRing",
1304 (*besEMCGeometry).EndRingRmin,
1305 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr/2,
1306 (*besEMCGeometry).EndRingDz/2,
1307 0.*deg,
1308 360.*deg);
1309
1310 solidGear = new G4Tubs("solidGear",
1311 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr/2,
1312 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr,
1313 (*besEMCGeometry).EndRingDz/2,
1314 0.*deg,
1315 (*besEMCGeometry).BSCPhiDphi);
1316
1317 //taper ring
1318 solidTaperRing1 = new G4Tubs("solidTaperRing1",
1319 (*besEMCGeometry).TaperRingRmin1,
1320 (*besEMCGeometry).TaperRingRmin1+(*besEMCGeometry).TaperRingThickness1,
1321 (*besEMCGeometry).TaperRingInnerLength/2,
1322 0.*deg,
1323 360.*deg);
1324
1325 solidTaperRing2 = new G4Cons("solidTaperRing2",
1326 (*besEMCGeometry).TaperRingRmin1,
1327 (*besEMCGeometry).TaperRingRmin1+(*besEMCGeometry).TaperRingThickness1,
1328 (*besEMCGeometry).TaperRingRmin2,
1329 (*besEMCGeometry).TaperRingRmin2+(*besEMCGeometry).TaperRingDr,
1330 (*besEMCGeometry).TaperRingDz/2,
1331 0.*deg,
1332 360.*deg);
1333
1334 solidTaperRing3 = new G4Cons("solidTaperRing3",
1335 (*besEMCGeometry).BSCRmax2,
1336 (*besEMCGeometry).BSCRmax2+(*besEMCGeometry).TaperRingOuterLength1,
1337 (*besEMCGeometry).TaperRingRmin2+(*besEMCGeometry).TaperRingDr,
1338 (*besEMCGeometry).TaperRingRmin2+(*besEMCGeometry).TaperRingDr+(*besEMCGeometry).TaperRingOuterLength,
1339 (*besEMCGeometry).TaperRingThickness3/2,
1340 0.*deg,
1341 360.*deg);
1342
1343 logicEndRing = new G4LogicalVolume(solidEndRing,stainlessSteel,"logicalEndRing");
1344 logicGear = new G4LogicalVolume(solidGear,stainlessSteel,"logicalGear");
1345 logicTaperRing1 = new G4LogicalVolume(solidTaperRing1,stainlessSteel,"logicalTaperRing1");
1346 logicTaperRing2 = new G4LogicalVolume(solidTaperRing2,stainlessSteel,"logicalTaperRing2");
1347 logicTaperRing3 = new G4LogicalVolume(solidTaperRing3,stainlessSteel,"logicalTaperRing3");
1348
1349 for(G4int i=0;i<2;i++)
1350 {
1351 G4RotationMatrix *rotateSPRing = new G4RotationMatrix();
1352 G4double zEndRing,z1,z2,z3;
1353 if(i==0)
1354 {
1355 zEndRing = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz/2;
1356 z1 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3
1357 -(*besEMCGeometry).TaperRingDz-(*besEMCGeometry).TaperRingInnerLength/2;
1358 z2 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3-(*besEMCGeometry).TaperRingDz/2;
1359 z3 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3/2;
1360 }
1361 else
1362 {
1363 rotateSPRing->rotateY(180.*deg);
1364 zEndRing = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz/2);
1365 z1 = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3
1366 -(*besEMCGeometry).TaperRingDz-(*besEMCGeometry).TaperRingInnerLength/2);
1367 z2 = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3-(*besEMCGeometry).TaperRingDz/2);
1368 z3 = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3/2);
1369 }
1370
1371 ostringstream strEndRing;
1372 strEndRing << "physicalEndRing_" << i;
1373 physiEndRing = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,zEndRing),
1374 logicEndRing,strEndRing.str(),logMother,false,0,CHECKLV2);
1375
1376 for(G4int j=0;j<(*besEMCGeometry).BSCNbPhi/2;j++)
1377 {
1378 G4RotationMatrix *rotateGear = new G4RotationMatrix();
1379 rotateGear->rotateZ((*besEMCGeometry).BSCPhiDphi/2-j*2*(*besEMCGeometry).BSCPhiDphi);
1380
1381 ostringstream strGear;
1382 strGear << "physicalGear_" << i << "_" <<j;
1383 physiGear = new G4PVPlacement(rotateGear,G4ThreeVector(0,0,zEndRing),
1384 logicGear,strGear.str(),logMother,false,0,CHECKLV2);
1385 }
1386
1387 ostringstream strTaperRing1;
1388 strTaperRing1 << "physicalTaperRing1_" << i;
1389 physiTaperRing1 = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z1),
1390 logicTaperRing1,strTaperRing1.str(),logMother,false,0,CHECKLV2);
1391
1392 ostringstream strTaperRing2;
1393 strTaperRing2 << "physicalTaperRing2_" << i;
1394 physiTaperRing2 = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z2),
1395 logicTaperRing2,strTaperRing2.str(),logMother,false,0,CHECKLV2);
1396
1397 ostringstream strTaperRing3;
1398 strTaperRing3 << "physicalTaperRing3_" << i;
1399 physiTaperRing3 = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z3),
1400 logicTaperRing3,strTaperRing3.str(),logMother,false,0,CHECKLV2);
1401 }
1402}

Referenced by Construct().

◆ GetBesEmcConstruction()

BesEmcConstruction * BesEmcConstruction::GetBesEmcConstruction ( )
static

Definition at line 68 of file BesEmcConstruction.cc.

69{ return fBesEmcConstruction;}

Referenced by BesCrystalParameterisation::ComputeIDAndSide(), and BesCrystalParameterisation::ComputeMaterial().

◆ GetBSCCrystal()

const G4VPhysicalVolume * BesEmcConstruction::GetBSCCrystal ( )
inline

Definition at line 113 of file BesEmcConstruction.hh.

113{return physiBSCCrystal;};

◆ GetBSCPhi()

const G4VPhysicalVolume * BesEmcConstruction::GetBSCPhi ( )
inline

Definition at line 111 of file BesEmcConstruction.hh.

111{return physiBSCPhi;};

◆ GetBSCTheta()

const G4VPhysicalVolume * BesEmcConstruction::GetBSCTheta ( )
inline

Definition at line 112 of file BesEmcConstruction.hh.

112{return physiBSCTheta;};

◆ GetCasingMaterial()

G4Material * BesEmcConstruction::GetCasingMaterial ( )
inline

Definition at line 107 of file BesEmcConstruction.hh.

107{return fCasingMaterial;};

Referenced by BesCrystalParameterisation::ComputeMaterial(), and BesEmcDetectorMessenger::GetCurrentValue().

◆ GetCrystalMaterial()

G4Material * BesEmcConstruction::GetCrystalMaterial ( )
inline

Definition at line 106 of file BesEmcConstruction.hh.

106{return fCrystalMaterial;};

Referenced by BesCrystalParameterisation::ComputeMaterial(), and BesEmcDetectorMessenger::GetCurrentValue().

◆ GetCrystalParam()

const G4VPVParameterisation * BesEmcConstruction::GetCrystalParam ( )
inline

Definition at line 114 of file BesEmcConstruction.hh.

114{return crystalParam;};

◆ GetEMC()

const G4VPhysicalVolume * BesEmcConstruction::GetEMC ( )
inline

Definition at line 110 of file BesEmcConstruction.hh.

110{return physiEMC; }

◆ GetLogicalVolume()

void BesEmcConstruction::GetLogicalVolume ( )

Definition at line 1478 of file BesEmcConstruction.cc.

1479{
1480 //-------------------------------------------------------------
1481 //Barrel
1482 logicBSCWorld = FindLogicalVolume("logicalBSCWorld");
1483 logicBSCCrystal = FindLogicalVolume("logicalCrystal");
1484 logicBSCPhi = FindLogicalVolume("logicalBSCPhi");
1485 logicRear = FindLogicalVolume("logicalRearBox");
1486 logicOrgGlass = FindLogicalVolume("logicalOrganicGlass");
1487 logicRearCasing = FindLogicalVolume("logicalRearCasing");
1488 logicAlPlate = FindLogicalVolume("logicalAlPlate");
1489 logicPD = FindLogicalVolume("logicalPD");
1490 logicPreAmpBox = FindLogicalVolume("logicalPreAmpBox");
1491 logicAirInPABox = FindLogicalVolume("logicalAirInPABox");
1492 logicHangingPlate = FindLogicalVolume("logicalHangingPlate");
1493 logicWaterPipe = FindLogicalVolume("logicalWaterPipe");
1494
1495 for(int i = 0; i < 44; i++){
1496 std::ostringstream osnameBSCCasing;
1497 osnameBSCCasing << "logicalBSCCasing"<<i;
1498 logicBSCTheta = FindLogicalVolume( osnameBSCCasing.str() );
1499 if(logicBSCTheta)
1500 {
1501 G4VisAttributes* rightVisAtt= new G4VisAttributes(G4Colour(1.0, 0.0,0.0));
1502 rightVisAtt->SetVisibility(false);
1503 logicBSCTheta->SetVisAttributes(rightVisAtt);
1504 }
1505
1506 std::ostringstream osnameBSCCable1;
1507 osnameBSCCable1 << "logicalBSCCable_1_"<<i;
1508 logicCable = FindLogicalVolume( osnameBSCCable1.str() );
1509 if(logicCable)
1510 logicCable->SetVisAttributes(G4VisAttributes::Invisible);
1511
1512 std::ostringstream osnameBSCCable2;
1513 osnameBSCCable2 << "logicalBSCCable_2_"<<i;
1514 logicCable = FindLogicalVolume( osnameBSCCable2.str() );
1515 if(logicCable)
1516 logicCable->SetVisAttributes(G4VisAttributes::Invisible);
1517
1518 std::ostringstream osnameOCGirder1;
1519 osnameOCGirder1 <<"logicalOpenningCutGirder_1_"<<i;
1520 logicOCGirder = FindLogicalVolume( osnameOCGirder1.str() );
1521 if(logicOCGirder)
1522 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
1523
1524 std::ostringstream osnameOCGirder2;
1525 osnameOCGirder2 <<"logicalOpenningCutGirder_2_"<<i;
1526 logicOCGirder = FindLogicalVolume( osnameOCGirder2.str() );
1527 if(logicOCGirder)
1528 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
1529
1530 std::ostringstream osnameOCGirder3;
1531 osnameOCGirder3 <<"logicalOpenningCutGirder_3_"<<i;
1532 logicOCGirder = FindLogicalVolume( osnameOCGirder3.str() );
1533 if(logicOCGirder)
1534 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
1535
1536 std::ostringstream osnameOCGirder4;
1537 osnameOCGirder4 <<"logicalOpenningCutGirder_4_"<<i;
1538 logicOCGirder = FindLogicalVolume( osnameOCGirder4.str() );
1539 if(logicOCGirder)
1540 logicOCGirder->SetVisAttributes(G4VisAttributes::Invisible);
1541 }
1542
1543 //-------------------------------------------------------------
1544 //Support system
1545 logicSupportBar = FindLogicalVolume("logicalSupportBar0");
1546 logicSupportBar1 = FindLogicalVolume("logicalSupportBar1");
1547 logicEndRing = FindLogicalVolume("logicalEndRing");
1548 logicGear = FindLogicalVolume("logicalGear");
1549 logicTaperRing1 = FindLogicalVolume("logicalTaperRing1");
1550 logicTaperRing2 = FindLogicalVolume("logicalTaperRing2");
1551 logicTaperRing3 = FindLogicalVolume("logicalTaperRing3");
1552
1553 //-------------------------------------------------------------
1554 //Endcap
1555 logicEnd = FindLogicalVolume("logicalEndWorld");
1556
1557 for(G4int sector=0;sector<3;sector++) {
1558 std::ostringstream osnameEndPhi;
1559 osnameEndPhi<<"logicalEndPhi"<<sector;
1560 logicEndPhi = FindLogicalVolume(osnameEndPhi.str());
1561 if(logicEndPhi) {
1562 logicEndPhi->SetVisAttributes(G4VisAttributes::Invisible);
1563 } else {
1564 G4cout<<"Can't find logicEndPhi!"<<G4endl;
1565 }
1566
1567 for(G4int cryNb=0;cryNb<35;cryNb++) {
1568
1569 std::ostringstream osnameEndCrystal;
1570 osnameEndCrystal<<"logicalEndCrystal_"<<sector<<"_"<<cryNb;
1571 logicEndCrystal = FindLogicalVolume( osnameEndCrystal.str() );
1572 if(logicEndCrystal) {
1573 logicEndCrystal->SetSensitiveDetector(besEMCSD);
1574 G4VisAttributes* crystalVisAtt
1575 = new G4VisAttributes(G4Colour(0.5,0,1.0));
1576 crystalVisAtt->SetVisibility(false);
1577 logicEndCrystal->SetVisAttributes(crystalVisAtt);
1578 } else {
1579 G4cout<<"Can't find: "<<osnameEndCrystal.str()<<G4endl;
1580 }
1581
1582 std::ostringstream osnameEndCasing;
1583 osnameEndCasing<<"logicalEndCasing_"<<sector<<"_"<<cryNb;
1584 logicEndCasing = FindLogicalVolume( osnameEndCasing.str() );
1585 if(logicEndCasing) {
1586 logicEndCasing->SetVisAttributes(G4VisAttributes::Invisible);
1587 } else {
1588 G4cout<<"Can't find: "<<osnameEndCasing.str()<<G4endl;
1589 }
1590 }
1591 }
1592}
G4LogicalVolume * FindLogicalVolume(const G4String &vn)

Referenced by Construct().

◆ GetMagField()

G4double BesEmcConstruction::GetMagField ( )
inline

Definition at line 102 of file BesEmcConstruction.hh.

102{return fmagField;};

Referenced by BesEmcDetectorMessenger::BesEmcDetectorMessenger().

◆ GetStartIDTheta()

G4int BesEmcConstruction::GetStartIDTheta ( )
inline

Definition at line 104 of file BesEmcConstruction.hh.

104{return startID;};

◆ GetVerboseLevel()

G4int BesEmcConstruction::GetVerboseLevel ( )
inline

Definition at line 101 of file BesEmcConstruction.hh.

101{return verboseLevel;};

Referenced by BesCrystalParameterisation::ComputeIDAndSide(), and BesEmcDetectorMessenger::GetCurrentValue().

◆ PrintEMCParameters()

void BesEmcConstruction::PrintEMCParameters ( )

Definition at line 1725 of file BesEmcConstruction.cc.

1726{
1727 G4cout << "-------------------------------------------------------"<< G4endl
1728 << "---> There are "
1729 << phiNbCrystals << "(max=" << (*besEMCGeometry).BSCNbPhi
1730 << ") crystals along phi direction and "
1731 << thetaNbCrystals << "(max=" << (*besEMCGeometry).BSCNbTheta
1732 << ") crystals along theta direction."<< G4endl
1733 << "The crystals have sizes of "
1734 << (*besEMCGeometry).BSCCryLength/cm << "cm(L) and "
1735 << (*besEMCGeometry).BSCYFront/cm << "cm(Y) with "
1736 << fCrystalMaterial->GetName() <<"."<< G4endl
1737 << "The casing is layer of "
1738 << (*besEMCGeometry).fTyvekThickness/mm << "mm tyvek,"
1739 << (*besEMCGeometry).fAlThickness/mm << "mm aluminum and"
1740 << (*besEMCGeometry).fMylarThickness/mm << "mm mylar."<< G4endl
1741 << "-------------------------------------------------------"<< G4endl;
1742 G4cout << G4Material::GetMaterial("PolyethyleneTerephthlate") << G4endl
1743 << G4Material::GetMaterial("Casing") << G4endl
1744 << G4Material::GetMaterial("Polyethylene") << G4endl
1745 << "-------------------------------------------------------"<< G4endl;
1746}

Referenced by Construct(), SetCasingMaterial(), and SetCrystalMaterial().

◆ RotAngleFromNewZ()

Hep3Vector BesEmcConstruction::RotAngleFromNewZ ( Hep3Vector newZ)

Definition at line 1920 of file BesEmcConstruction.cc.

1921{
1922 newZ.setMag(1.0);
1923 Hep3Vector x0(1, 0, 0), y0(0, 1, 0), z0(0, 0, 1);
1924 double dx, dy, dz = 0.0;
1925
1926 Hep3Vector a(0.0, newZ.y(), newZ.z());
1927 // three rotated angles, rotate dx angles(rad) by X axis,
1928 // then rotate dy by new Y axis, then dz by new Z axis;
1929 // all rotate in left hand system;
1930
1931 // a, project of final newZ on original YZ plane, 0 <= theta < pi;
1932 if(a.mag() != 0.0) a.setMag(1.0);
1933 else cout << "newZ on X axis, a=(0,0,0)" << endl;
1934 dx = acos(a.dot(z0));
1935 if(a.dot(z0) == -1.0) dx = 0.0;
1936
1937 // b, rotate dx angle of z0 around original X axis(x0),
1938 Hep3Vector b(0, sin(dx), cos(dx));
1939 dy = acos(b.dot(newZ));
1940 if(newZ.x() > 0.0) dy = -dy;
1941
1942 Hep3Vector v(dx, dy, dz);
1943 return v;
1944}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
const double b
Definition slope.cxx:9

Referenced by TransformToArb8().

◆ SetBSCCrystalLength()

void BesEmcConstruction::SetBSCCrystalLength ( G4double val)

Definition at line 1813 of file BesEmcConstruction.cc.

1814{
1815 (*besEMCGeometry).BSCCryLength = val;
1816}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetBSCNbPhi()

void BesEmcConstruction::SetBSCNbPhi ( G4int val)

Definition at line 1793 of file BesEmcConstruction.cc.

1794{
1795 (*besEMCGeometry).BSCNbPhi = val;
1796}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetBSCNbTheta()

void BesEmcConstruction::SetBSCNbTheta ( G4int val)

Definition at line 1800 of file BesEmcConstruction.cc.

1801{
1802 (*besEMCGeometry).BSCNbTheta = val;
1803}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetBSCPosition0()

void BesEmcConstruction::SetBSCPosition0 ( G4double val)

Definition at line 1834 of file BesEmcConstruction.cc.

1835{
1836 (*besEMCGeometry).BSCPosition0 = val;
1837}

◆ SetBSCPosition1()

void BesEmcConstruction::SetBSCPosition1 ( G4double val)

Definition at line 1841 of file BesEmcConstruction.cc.

1842{
1843 (*besEMCGeometry).BSCPosition1 = val;
1844}

◆ SetBSCRmin()

void BesEmcConstruction::SetBSCRmin ( G4double val)

Definition at line 1786 of file BesEmcConstruction.cc.

1787{
1788 (*besEMCGeometry).BSCRmin = val;
1789}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetBSCYFront()

void BesEmcConstruction::SetBSCYFront ( G4double val)

Definition at line 1827 of file BesEmcConstruction.cc.

1828{
1829 (*besEMCGeometry).BSCYFront = val;
1830}

◆ SetBSCYFront0()

void BesEmcConstruction::SetBSCYFront0 ( G4double val)

Definition at line 1820 of file BesEmcConstruction.cc.

1821{
1822 (*besEMCGeometry).BSCYFront0 = val;
1823}

◆ SetCasingMaterial()

void BesEmcConstruction::SetCasingMaterial ( G4String materialChoice)

Definition at line 1763 of file BesEmcConstruction.cc.

1764{
1765 // search the material by its name
1766 G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
1767 if (pttoMaterial)
1768 {fCasingMaterial = pttoMaterial;
1769 logicBSCTheta->SetMaterial(pttoMaterial);
1771 }
1772}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetCasingThickness()

void BesEmcConstruction::SetCasingThickness ( G4ThreeVector val)

Definition at line 1776 of file BesEmcConstruction.cc.

1777{
1778 // change Gap thickness and recompute the calorimeter parameters
1779 (*besEMCGeometry).fTyvekThickness = val('X');
1780 (*besEMCGeometry).fAlThickness = val('Y');
1781 (*besEMCGeometry).fMylarThickness = val('Z');
1782}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetCrystalMaterial()

void BesEmcConstruction::SetCrystalMaterial ( G4String materialChoice)

Definition at line 1750 of file BesEmcConstruction.cc.

1751{
1752 // search the material by its name
1753 G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
1754 if (pttoMaterial)
1755 {fCrystalMaterial = pttoMaterial;
1756 logicBSCCrystal->SetMaterial(pttoMaterial);
1758 }
1759}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetMagField()

void BesEmcConstruction::SetMagField ( G4double fieldValue)

Definition at line 1849 of file BesEmcConstruction.cc.

1850{
1851 //apply a global uniform magnetic field along Z axis
1852 G4FieldManager* fieldMgr
1853 = G4TransportationManager::GetTransportationManager()->GetFieldManager();
1854
1855 if(magField) delete magField; //delete the existing magn field
1856
1857 if(fieldValue!=0.) // create a new one if non nul
1858 { magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
1859 fieldMgr->SetDetectorField(magField);
1860 fieldMgr->CreateChordFinder(magField);
1861 fmagField=fieldValue;
1862 } else {
1863 magField = 0;
1864 fieldMgr->SetDetectorField(magField);
1865 fmagField=0.;
1866 }
1867}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetStartIDTheta()

void BesEmcConstruction::SetStartIDTheta ( G4int val)

Definition at line 1805 of file BesEmcConstruction.cc.

1806{
1807 startID = val;
1808}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetVerboseLevel()

void BesEmcConstruction::SetVerboseLevel ( G4int val)
inline

Definition at line 69 of file BesEmcConstruction.hh.

69{ verboseLevel=val;}

Referenced by BesEmcDetectorMessenger::SetNewValue().

◆ SetVisAndSD()

void BesEmcConstruction::SetVisAndSD ( )

Definition at line 1405 of file BesEmcConstruction.cc.

1406{
1407 //-------------------------------------------------------------
1408 //Barrel
1409 G4VisAttributes* bscVisAtt= new G4VisAttributes(G4Colour(0.5,0.5,0.5));
1410 bscVisAtt->SetVisibility(false);
1411 logicEMC->SetVisAttributes(bscVisAtt);
1412 if(logicBSCWorld)
1413 logicBSCWorld->SetVisAttributes(G4VisAttributes::Invisible);
1414
1415 if (logicBSCCrystal) {
1416 //G4cout<<"find BSCCrystal "<<G4endl;
1417 G4VisAttributes* crystalVisAtt= new G4VisAttributes(G4Colour(0,0,1.0));
1418 crystalVisAtt->SetVisibility(true);
1419 logicBSCCrystal->SetVisAttributes(crystalVisAtt);
1420 logicBSCCrystal->SetSensitiveDetector(besEMCSD);
1421 }
1422
1423 if(logicBSCPhi) {
1424 G4VisAttributes* rightVisAtt= new G4VisAttributes(G4Colour(1.0,0.,1.0));
1425 rightVisAtt->SetVisibility(false);
1426 logicBSCPhi->SetVisAttributes(rightVisAtt);
1427 }
1428
1429 if(logicRear)
1430 logicRear->SetVisAttributes(G4VisAttributes::Invisible);
1431 if(logicOrgGlass)
1432 logicOrgGlass->SetVisAttributes(G4VisAttributes::Invisible);
1433 if(logicRearCasing)
1434 logicRearCasing->SetVisAttributes(G4VisAttributes::Invisible);
1435 if(logicAlPlate)
1436 logicAlPlate->SetVisAttributes(G4VisAttributes::Invisible);
1437 if(logicPD) {
1438 logicPD->SetVisAttributes(G4VisAttributes::Invisible);
1439 logicPD->SetSensitiveDetector(besEMCSD);
1440 }
1441 if(logicPreAmpBox)
1442 logicPreAmpBox->SetVisAttributes(G4VisAttributes::Invisible);
1443 if(logicAirInPABox)
1444 logicAirInPABox->SetVisAttributes(G4VisAttributes::Invisible);
1445 if(logicHangingPlate)
1446 logicHangingPlate->SetVisAttributes(G4VisAttributes::Invisible);
1447 if(logicWaterPipe)
1448 logicWaterPipe->SetVisAttributes(G4VisAttributes::Invisible);
1449
1450 //-------------------------------------------------------------
1451 //Support system
1452 G4VisAttributes* ringVisAtt= new G4VisAttributes(G4Colour(0.5,0.25,0.));
1453 ringVisAtt->SetVisibility(false);
1454 if(logicSupportBar)
1455 logicSupportBar->SetVisAttributes(ringVisAtt);
1456 if(logicSupportBar1)
1457 logicSupportBar1->SetVisAttributes(ringVisAtt);
1458 if(logicEndRing)
1459 logicEndRing->SetVisAttributes(ringVisAtt);
1460 if(logicGear)
1461 logicGear->SetVisAttributes(ringVisAtt);
1462 if(logicTaperRing1)
1463 logicTaperRing1->SetVisAttributes(ringVisAtt);
1464 if(logicTaperRing2)
1465 logicTaperRing2->SetVisAttributes(ringVisAtt);
1466 if(logicTaperRing3)
1467 logicTaperRing3->SetVisAttributes(ringVisAtt);
1468
1469 //-------------------------------------------------------------
1470 //Endcap
1471 G4VisAttributes* endPhiVisAtt= new G4VisAttributes(G4Colour(0,1.0,0));
1472 endPhiVisAtt->SetVisibility(false);
1473 if(logicEnd)
1474 logicEnd->SetVisAttributes(endPhiVisAtt);
1475}

Referenced by Construct().

◆ ThreeVectorTrans()

void BesEmcConstruction::ThreeVectorTrans ( G4ThreeVector fPnt[8],
double x[8],
double y[8],
double z[8] )

Definition at line 1909 of file BesEmcConstruction.cc.

1910{
1911 for (int i = 0; i < 8; i++) {
1912 x[i] = fPnt[i].x();
1913 y[i] = fPnt[i].y();
1914 z[i] = fPnt[i].z();
1915 }
1916}
Double_t x[10]
double y[1000]

◆ TransformToArb8()

void BesEmcConstruction::TransformToArb8 ( const G4ThreeVector fPnt[8],
G4ThreeVector newfPnt[8],
G4ThreeVector & center,
G4ThreeVector & rotAngle )

Definition at line 1879 of file BesEmcConstruction.cc.

1880{
1881 HepPoint3D point[8];
1882 center = G4ThreeVector(0.0, 0.0, 0.0);
1883 for (int i = 0; i < 8; i++) {
1884 point[i] = HepPoint3D( fPnt[i].x(), fPnt[i].y(), fPnt[i].z() );
1885 center += point[i];
1886 }
1887 center /= 8.0;
1888
1889 HepPlane3D bottomPlane( point[4], point[5], point[6] );
1890 HepPoint3D centerProject = bottomPlane.point( center );
1891 Hep3Vector newZ = center - centerProject;
1892
1893 rotAngle = RotAngleFromNewZ( newZ );
1894 G4RotationMatrix *g4Rot = new G4RotationMatrix();
1895 g4Rot->rotateX( rotAngle.x() );
1896 g4Rot->rotateY( rotAngle.y() );
1897
1898 G4AffineTransform *transform = new G4AffineTransform( g4Rot, center );
1899 transform->Invert();
1900 for (int i = 0; i < 8; i++) {
1901 newfPnt[i] = transform->TransformPoint(fPnt[i]);
1902 }
1903 delete g4Rot;
1904 delete transform;
1905}
HepGeom::Point3D< double > HepPoint3D
HepGeom::Plane3D< double > HepPlane3D
Hep3Vector RotAngleFromNewZ(Hep3Vector newZ)

Referenced by ConstructEndGeometry().

◆ UpdateGeometry()

void BesEmcConstruction::UpdateGeometry ( )

Definition at line 1871 of file BesEmcConstruction.cc.

1872{
1873 ;//G4RunManager::GetRunManager()->DefineWorldVolume(BesDetectorConstruction::Construct());
1874}

Referenced by BesEmcDetectorMessenger::SetNewValue().


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