36#include "BesCgemConstruction.hh"
37#include "BesCgemSD.hh"
39#include "BesCgemSliceParametrization.hh"
43#include "G4NistManager.hh"
44#include "G4UnitsTable.hh"
48#include "G4UnionSolid.hh"
49#include "G4LogicalVolume.hh"
50#include "G4PVPlacement.hh"
51#include "G4PVReplica.hh"
52#include "G4SDManager.hh"
53#include "G4VisAttributes.hh"
55#include "G4FieldManager.hh"
56#include "G4TransportationManager.hh"
57#include "G4PVParameterised.hh"
59#include "GaudiKernel/ISvcLocator.h"
60#include "GaudiKernel/Bootstrap.h"
73: m_CheckOverlaps(
true), m_CreateHole(
false)
76 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
77 MsgStream log(
msgSvc,
"BesCgemConstruction::BesCgemConstruction(): initialization of the geometry service");
79 ISvcLocator* svcLocator = Gaudi::svcLocator();
81 StatusCode sc=svcLocator->service(
"CgemGeomSvc", ISvc);
84 if (!sc.isSuccess()) log<< MSG::INFO <<
"BesCgemConsruction::BesCgemConstruction(): could not open geometry file" << endreq;
100 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
101 MsgStream log(
msgSvc,
"BesCgemConstruction::Construct()");
104 G4LogicalVolume *logicContainer = NULL; cout <<
"logicBes daughters " << logicBes->GetNoDaughters() << endl;
106 for(
int i=0; i<logicBes->GetNoDaughters(); i++) {
107 G4VPhysicalVolume *daughter = logicBes->GetDaughter(i);
108 if(daughter->GetName()==
"physicalMdc") {
109 logicContainer = daughter->GetLogicalVolume();
112 if(logicContainer == NULL) {
113 log<< MSG::INFO <<
"BesCgemConstruction::Construct, CGEM must stay inside MDC mother volume, you must build MDC!" << endreq;
114 cout<<
"BesCgemConstruction::Construct, MDC not built --> put CGEM in WORLD" << endl;
115 logicContainer= logicBes;
117 else cout<<
"BesCgemConstruction::Construct, MDC built --> put CGEM in MDC container logical volume" << endl;
123 G4SDManager* gv_SDman = G4SDManager::GetSDMpointer();
124 G4String lvs_cgemSDname =
"BesCgemSD";
126 m_CgemSD =
new BesCgemSD(lvs_cgemSDname);
129 gv_SDman->AddNewDetector(m_CgemSD);
135 log<< MSG::INFO <<
"BesCgemConstruction::Construct, Tunning! DO NOT CONSTRUCT CGEM!" << endreq;
142 log<< MSG::INFO <<
"BesCgemConstruciton::Construct, Construct CGEM from GDML!" << endreq;
147 log<< MSG::INFO <<
"BesCgemConstruction::Construct, Construct CGEM from G4code!" << endreq;
149 G4LogicalVolume *logicCgem = ConstructFromCode(logicContainer,m_CgemSD);
156G4LogicalVolume* BesCgemConstruction::ConstructFromCode(G4LogicalVolume* logicMother,
BesCgemSD* m_CgemSD)
159 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
160 MsgStream log(
msgSvc,
"BesCgemConstruction::ConstructFromCode()");
161 log<< MSG::INFO <<
"===========================================" << endreq;
162 log<< MSG::INFO <<
"BesCgemConstruction::ConstructFromCode(), Begin to construct CGEM!" << endreq;
165 G4VisAttributes *lv_black =
new G4VisAttributes(G4Colour::Black());
166 G4VisAttributes *lv_white =
new G4VisAttributes(G4Colour::White());
167 G4VisAttributes *lv_green =
new G4VisAttributes(G4Colour::Green());
168 G4VisAttributes *lv_yellow =
new G4VisAttributes(G4Colour::Yellow());
169 G4VisAttributes *lv_blue =
new G4VisAttributes(G4Colour::Blue());
170 G4VisAttributes *lv_red =
new G4VisAttributes(G4Colour::Red());
171 G4VisAttributes *lv_cyan =
new G4VisAttributes(G4Colour::Cyan());
172 G4VisAttributes *lv_magenta =
new G4VisAttributes(G4Colour::Magenta());
176 G4RotationMatrix *lv_rotation = 0;
177 G4ThreeVector lv_3vector(0., 0., 0.);
178 G4bool lv_boolen =
false;
187 G4double lvd_A_s = 0*deg;
188 G4double lvd_A_d = 360*deg;
193 G4Tubs *lv_Cgem_solid =
194 new G4Tubs(
"Cgem_solid", lvd_R_i, lvd_R_o, 0.5*lvd_L_z, lvd_A_s, lvd_A_d);
195 G4LogicalVolume* lv_Cgem_logic =
196 new G4LogicalVolume(lv_Cgem_solid, m_M_Air,
"Cgem_logic");
197 G4VPhysicalVolume *lv_Cgem_physi =
198 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cgem_logic,
"Cgem_physi",
199 logicMother, lv_boolen, lv_copyNo, m_CheckOverlaps);
202 G4cout <<
"CGEM container" << G4endl;
203 G4cout <<
"CGEM, Rin =" << ((G4Tubs*) (lv_Cgem_physi->GetLogicalVolume()->GetSolid()))->GetInnerRadius() << G4endl;
204 G4cout <<
"CGEM, Rout =" << ((G4Tubs*) (lv_Cgem_physi->GetLogicalVolume()->GetSolid()))->GetOuterRadius() << G4endl;
205 G4cout <<
"CGEM, length =" << ((G4Tubs*) (lv_Cgem_physi->GetLogicalVolume()->GetSolid()))->GetDz() * 2 << G4endl;
207 lv_Cgem_logic->SetVisAttributes(lv_black);
212 stringstream sssolid,sslogic,ssphysi;
213 string ssolid,slogic,sphysi;
215 for (G4int i=0; i < lvi_N_CgemLayer; i++)
217 log<< MSG::INFO <<
"BesCgemConstruciton::ConstructFromCode(), Construct CgemLayer " << i << endreq;
221 sssolid <<
"CgemLayer_solid";
223 ssolid = sssolid.str();
225 sslogic <<
"CgemLayer_logic";
227 slogic = sslogic.str();
229 ssphysi <<
"CgemLayer_physi";
231 sphysi = ssphysi.str();
238 G4Tubs *lv_CgemLayer_solid =
239 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
240 G4LogicalVolume *lv_CgemLayer_logic =
241 new G4LogicalVolume(lv_CgemLayer_solid, m_M_Air, slogic);
242 G4VPhysicalVolume *lv_CgemLayer_physi =
243 new G4PVPlacement(lv_rotation, lv_3vector, lv_CgemLayer_logic, sphysi,
244 lv_Cgem_logic, lv_boolen, i, m_CheckOverlaps);
250 log<< MSG::INFO <<
"BesCgemConstruciton::ConstructFromCode(), Construct CgemLayer " << i <<
" Cathode "<< endreq;
255 sssolid <<
"Cathode_solid";
257 ssolid = sssolid.str();
259 sslogic <<
"Cathode_logic";
261 slogic = sslogic.str();
263 ssphysi <<
"Cathode_physi";
265 sphysi = ssphysi.str();
268 G4Tubs *lv_Cathode_solid =
269 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
270 G4LogicalVolume *lv_Cathode_logic =
271 new G4LogicalVolume(lv_Cathode_solid, m_M_CgemGas, slogic);
272 G4VPhysicalVolume *lv_Cathode_physi =
273 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_logic, sphysi,
274 lv_CgemLayer_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
282 ssolid = sssolid.str();
286 slogic = sslogic.str();
290 sphysi = ssphysi.str();
296 if (lvd_R_i==lvd_R_o)
break;
297 G4Tubs *lv_Cathode_Cu1_solid =
298 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
299 G4LogicalVolume *lv_Cathode_Cu1_logic =
300 new G4LogicalVolume(lv_Cathode_Cu1_solid, m_M_Cu, slogic);
301 G4VPhysicalVolume *lv_Cathode_Cu1_physi =
302 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Cu1_logic,
303 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
308 if (lvd_R_i==lvd_R_o)
break;
309 G4Tubs *lv_Cathode_Kapton1_solid =
310 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
311 G4LogicalVolume *lv_Cathode_Kapton1_logic =
312 new G4LogicalVolume(lv_Cathode_Kapton1_solid, m_M_Kapton, slogic);
313 G4VPhysicalVolume *lv_Cathode_Kapton1_physi =
314 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Kapton1_logic,
315 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
320 if (lvd_R_i==lvd_R_o)
break;
321 G4Tubs *lv_Cathode_Epoxy0_solid =
322 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
323 G4LogicalVolume *lv_Cathode_Epoxy0_logic =
324 new G4LogicalVolume(lv_Cathode_Epoxy0_solid, m_M_Epoxy, slogic);
325 G4VPhysicalVolume *lv_Cathode_Epoxy0_physi =
326 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Epoxy0_logic,
327 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
333 if (lvd_R_i==lvd_R_o)
break;
334 G4Tubs *lv_Cathode_Carbonf_solid =
335 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
336 G4LogicalVolume *lv_Cathode_Carbonf_logic =
337 new G4LogicalVolume(lv_Cathode_Carbonf_solid, m_M_CarbonFiber, slogic);
338 G4VPhysicalVolume *lv_Cathode_Carbonf_physi =
339 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Carbonf_logic,
340 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
345 if (lvd_R_i==lvd_R_o)
break;
346 G4Tubs *lv_Cathode_Epoxy1_solid =
347 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
348 G4LogicalVolume *lv_Cathode_Epoxy1_logic =
349 new G4LogicalVolume(lv_Cathode_Epoxy1_solid, m_M_Epoxy, slogic);
350 G4VPhysicalVolume *lv_Cathode_Epoxy1_physi =
351 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Epoxy1_logic,
352 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
357 if (lvd_R_i==lvd_R_o)
break;
358 G4Tubs *lv_Cathode_Honeycomb_solid =
359 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
360 G4LogicalVolume *lv_Cathode_Honeycomb_logic =
361 new G4LogicalVolume(lv_Cathode_Honeycomb_solid, m_M_Honeycomb, slogic);
362 G4VPhysicalVolume *lv_Cathode_Honeycomb_physi =
363 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Honeycomb_logic,
364 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
369 if (lvd_R_i==lvd_R_o)
break;
370 G4Tubs *lv_Cathode_Rohacell1_solid =
371 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
372 G4LogicalVolume *lv_Cathode_Rohacell1_logic =
373 new G4LogicalVolume(lv_Cathode_Rohacell1_solid, m_M_Rohacell, slogic);
374 G4VPhysicalVolume *lv_Cathode_Rohacell1_physi =
375 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Rohacell1_logic,
376 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
381 if (lvd_R_i==lvd_R_o)
break;
382 G4Tubs *lv_Cathode_Epoxy2_solid =
383 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
384 G4LogicalVolume *lv_Cathode_Epoxy2_logic =
385 new G4LogicalVolume(lv_Cathode_Epoxy2_solid, m_M_Epoxy, slogic);
386 G4VPhysicalVolume *lv_Cathode_Epoxy2_physi =
387 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Epoxy2_logic,
388 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
393 if (lvd_R_i==lvd_R_o)
break;
394 G4Tubs *lv_Cathode_Kapton2_solid =
395 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
396 G4LogicalVolume *lv_Cathode_Kapton2_logic =
397 new G4LogicalVolume(lv_Cathode_Kapton2_solid, m_M_Kapton, slogic);
398 G4VPhysicalVolume *lv_Cathode_Kapton2_physi =
399 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Kapton2_logic,
400 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
405 if (lvd_R_i==lvd_R_o)
break;
406 G4Tubs *lv_Cathode_Epoxy3_solid =
407 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
408 G4LogicalVolume *lv_Cathode_Epoxy3_logic =
409 new G4LogicalVolume(lv_Cathode_Epoxy3_solid, m_M_Epoxy, slogic);
410 G4VPhysicalVolume *lv_Cathode_Epoxy3_physi =
411 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Epoxy3_logic,
412 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
417 if (lvd_R_i==lvd_R_o)
break;
418 G4Tubs *lv_Cathode_Rohacell2_solid =
419 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
420 G4LogicalVolume *lv_Cathode_Rohacell2_logic =
421 new G4LogicalVolume(lv_Cathode_Rohacell2_solid, m_M_Rohacell, slogic);
422 G4VPhysicalVolume *lv_Cathode_Rohacell2_physi =
423 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Rohacell2_logic,
424 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
429 if (lvd_R_i==lvd_R_o)
break;
430 G4Tubs *lv_Cathode_Epoxy4_solid =
431 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
432 G4LogicalVolume *lv_Cathode_Epoxy4_logic =
433 new G4LogicalVolume(lv_Cathode_Epoxy4_solid, m_M_Epoxy, slogic);
434 G4VPhysicalVolume *lv_Cathode_Epoxy4_physi =
435 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Epoxy4_logic,
436 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
441 if (lvd_R_i==lvd_R_o)
break;
442 G4Tubs *lv_Cathode_Kapton3_solid =
443 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
444 G4LogicalVolume *lv_Cathode_Kapton3_logic =
445 new G4LogicalVolume(lv_Cathode_Kapton3_solid, m_M_Kapton, slogic);
446 G4VPhysicalVolume *lv_Cathode_Kapton3_physi =
447 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Kapton3_logic,
448 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
453 if (lvd_R_i==lvd_R_o)
break;
454 G4Tubs *lv_Cathode_Cu2_solid =
455 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
456 G4LogicalVolume *lv_Cathode_Cu2_logic =
457 new G4LogicalVolume(lv_Cathode_Cu2_solid, m_M_Cu, slogic);
458 G4VPhysicalVolume *lv_Cathode_Cu2_physi =
459 new G4PVPlacement(lv_rotation, lv_3vector, lv_Cathode_Cu2_logic,
460 sphysi, lv_Cathode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);}
468 log<< MSG::INFO <<
"BesCgemConstruciton::ConstructFromCode(), Construct CgemLayer " << i <<
" Gap_D "<< endreq;
471 sssolid <<
"Gap_D_solid";
473 ssolid = sssolid.str();
475 sslogic <<
"Gap_D_logic";
477 slogic = sslogic.str();
479 ssphysi <<
"Gap_D_physi";
481 sphysi = ssphysi.str();
484 G4Tubs *lv_Gap_D_solid =
485 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
486 G4LogicalVolume *lv_Gap_D_logic =
487 new G4LogicalVolume(lv_Gap_D_solid, m_M_CgemGas, slogic);
488 G4VPhysicalVolume *lv_Gap_D_physi =
489 new G4PVPlacement(lv_rotation, lv_3vector, lv_Gap_D_logic, sphysi,
490 lv_CgemLayer_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
492 lv_Gap_D_logic->SetSensitiveDetector(m_CgemSD);
497 sssolid <<
"Gap_T1_solid";
499 ssolid = sssolid.str();
501 sslogic <<
"Gap_T1_logic";
503 slogic = sslogic.str();
505 ssphysi <<
"Gap_T1_physi";
507 sphysi = ssphysi.str();
510 G4Tubs *lv_Gap_T1_solid =
511 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
512 G4LogicalVolume *lv_Gap_T1_logic =
513 new G4LogicalVolume(lv_Gap_T1_solid, m_M_CgemGas, slogic);
514 G4VPhysicalVolume *lv_Gap_T1_physi =
515 new G4PVPlacement(lv_rotation, lv_3vector, lv_Gap_T1_logic, sphysi,
516 lv_CgemLayer_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
520 sssolid <<
"Gap_T2_solid";
522 ssolid = sssolid.str();
524 sslogic <<
"Gap_T2_logic";
526 slogic = sslogic.str();
528 ssphysi <<
"Gap_T2_physi";
530 sphysi = ssphysi.str();
533 G4Tubs *lv_Gap_T2_solid =
534 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
535 G4LogicalVolume *lv_Gap_T2_logic =
536 new G4LogicalVolume(lv_Gap_T2_solid, m_M_CgemGas, slogic);
537 G4VPhysicalVolume *lv_Gap_T2_physi =
538 new G4PVPlacement(lv_rotation, lv_3vector, lv_Gap_T2_logic, sphysi,
539 lv_CgemLayer_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
543 sssolid <<
"Gap_I_solid";
545 ssolid = sssolid.str();
547 sslogic <<
"Gap_I_logic";
549 slogic = sslogic.str();
551 ssphysi <<
"Gap_I_physi";
553 sphysi = ssphysi.str();
556 G4Tubs *lv_Gap_I_solid =
557 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
558 G4LogicalVolume *lv_Gap_I_logic =
559 new G4LogicalVolume(lv_Gap_I_solid, m_M_CgemGas, slogic);
560 G4VPhysicalVolume *lv_Gap_I_physi =
561 new G4PVPlacement(lv_rotation, lv_3vector, lv_Gap_I_logic, sphysi,
562 lv_CgemLayer_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
565 for (G4int j=0; j < lvi_N_GemFoil; j++)
567 log<< MSG::INFO <<
"BesCgemConstruciton::ConstructFromCode(), Construct CgemLayer " << i <<
" GemFoil " << j << endreq;
574 sssolid <<
"GemFoil_solid";
578 ssolid = sssolid.str();
580 sslogic <<
"GemFoil_logic";
584 slogic = sslogic.str();
586 ssphysi <<
"GemFoil_physi";
590 sphysi = ssphysi.str();
593 G4Tubs *lv_GemFoil_solid =
594 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
595 G4LogicalVolume *lv_GemFoil_logic =
596 new G4LogicalVolume(lv_GemFoil_solid, m_M_CgemGas, slogic);
597 G4VPhysicalVolume *lv_GemFoil_physi =
598 new G4PVPlacement(lv_rotation, lv_3vector, lv_GemFoil_logic, sphysi,
599 lv_CgemLayer_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
606 sssolid <<
"GemFoil_Cu1_solid";
610 ssolid = sssolid.str();
612 sslogic <<
"GemFoil_Cu1_logic";
617 slogic = sslogic.str();
619 ssphysi <<
"GemFoil_Cu1_physi";
623 sphysi = ssphysi.str();
626 G4Tubs *lv_GemFoil_Cu1_solid =
627 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
628 G4LogicalVolume *lv_GemFoil_Cu1_logic =
629 new G4LogicalVolume(lv_GemFoil_Cu1_solid, m_M_Cu_GEMFoils, slogic);
630 G4VPhysicalVolume *lv_GemFoil_Cu1_physi =
631 new G4PVPlacement(lv_rotation, lv_3vector, lv_GemFoil_Cu1_logic, sphysi,
632 lv_GemFoil_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
636 sssolid <<
"GemFoil_Kapton_solid";
640 ssolid = sssolid.str();
642 sslogic <<
"GemFoil_Kapton_logic";
646 slogic = sslogic.str();
648 ssphysi <<
"GemFoil_Kapton_physi";
652 sphysi = ssphysi.str();
655 G4Tubs *lv_GemFoil_Kapton_solid =
656 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
657 G4LogicalVolume *lv_GemFoil_Kapton_logic =
658 new G4LogicalVolume(lv_GemFoil_Kapton_solid, m_M_Kapton_GEMFoils, slogic);
659 G4VPhysicalVolume *lv_GemFoil_Kapton_physi =
660 new G4PVPlacement(lv_rotation, lv_3vector, lv_GemFoil_Kapton_logic,
661 sphysi, lv_GemFoil_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
665 sssolid <<
"GemFoil_Cu2_solid";
669 ssolid = sssolid.str();
671 sslogic <<
"GemFoil_Cu2_logic";
676 slogic = sslogic.str();
678 ssphysi <<
"GemFoil_Cu2_physi";
682 sphysi = ssphysi.str();
685 G4Tubs *lv_GemFoil_Cu2_solid =
686 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
687 G4LogicalVolume *lv_GemFoil_Cu2_logic =
688 new G4LogicalVolume(lv_GemFoil_Cu2_solid, m_M_Cu_GEMFoils, slogic);
689 G4VPhysicalVolume *lv_GemFoil_Cu2_physi =
690 new G4PVPlacement(lv_rotation, lv_3vector, lv_GemFoil_Cu2_logic, sphysi,
691 lv_GemFoil_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
695 cout<<
"construct holes on GEM foil "<<j<<
" of layer "<<i<<endl;
700 G4double holepitchphi = holepitchz*sqrt(3);
702 G4double holeh2 = holeh1;
704 G4double anglephi = (holepitchphi/(R_o_cu1+holeh1))*
rad;
705 G4int nCgemline = floor(CLHEP::twopi/anglephi);
706 G4int nholeZ = floor((lvd_L_z-2*lvd_R_i_hole)/holepitchz);
707 G4double restangle = CLHEP::twopi-nCgemline*anglephi;
712 G4Cons *holeS1 =
new G4Cons(
"Hole1",0.,lvd_R_o1_hole,0.,lvd_R_i_hole,holeh1/2.,0,360*deg);
713 G4Cons *holeS2 =
new G4Cons(
"Hole2",0.,lvd_R_i_hole,0.,lvd_R_o2_hole,holeh1/2.,0,360*deg);
714 G4LogicalVolume *hole1LV =
new G4LogicalVolume(holeS1,m_M_CgemGas,
"Hole1");
715 G4LogicalVolume *hole2LV =
new G4LogicalVolume(holeS2,m_M_CgemGas,
"Hole2");
747 sssolid <<
"GemFoil_Cu_solid";
751 ssolid = sssolid.str();
753 sslogic <<
"GemFoil_Cu_logic";
758 slogic = sslogic.str();
760 ssphysi <<
"GemFoil_Cu_physi";
764 sphysi = ssphysi.str();
769 G4double lvd_L_hole1_Cu = lvd_R_o1-lvd_R_i1;
770 G4double lvd_L_hole2_Cu = lvd_R_o2-lvd_R_i2;
771 G4Tubs *lv_GemFoil_Cu_solid =
772 new G4Tubs(ssolid, lvd_R_i1, lvd_R_o1, lvd_L_z/2., lvd_A_s, anglephi);
773 G4LogicalVolume *lv_GemFoil_Cu_logic =
774 new G4LogicalVolume(lv_GemFoil_Cu_solid, m_M_Cu, slogic);
775 G4Tubs *holeCu1 =
new G4Tubs(
"hole1",0.,lvd_R_o2_hole, lvd_L_hole1_Cu/2.,lvd_A_s,lvd_A_d);
776 G4Tubs *holeCu2 =
new G4Tubs(
"hole2",0.,lvd_R_o1_hole, lvd_L_hole2_Cu/2.,lvd_A_s,lvd_A_d);
777 G4LogicalVolume *holeCu1LV =
new G4LogicalVolume(holeCu1,m_M_CgemGas,
"hole1");
778 G4LogicalVolume *holeCu2LV =
new G4LogicalVolume(holeCu2,m_M_CgemGas,
"hole2");
781 sssolid <<
"GemFoil_Cu2_solid";
785 ssolid = sssolid.str();
787 sslogic <<
"GemFoil_Cu2_logic";
792 slogic = sslogic.str();
794 ssphysi <<
"GemFoil_Cu2_physi";
798 sphysi = ssphysi.str();
801 G4Tubs *lv_GemFoil_Cu2_solid =
802 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, anglephi);
803 G4LogicalVolume *lv_GemFoil_Cu2_logic =
804 new G4LogicalVolume(lv_GemFoil_Cu2_solid, m_M_Cu, slogic);
818 sssolid <<
"GemFoil_Kaptonline_solid";
822 ssolid = sssolid.str();
824 sslogic <<
"GemFoil_Kaptonline_logic";
828 slogic = sslogic.str();
830 ssphysi <<
"GemFoil_Kaptonline_physi";
834 sphysi = ssphysi.str();
837 G4Tubs *lv_GemFoil_Kapton_solid =
838 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s,anglephi);
839 G4LogicalVolume *lv_GemFoil_Kapton_logic =
840 new G4LogicalVolume(lv_GemFoil_Kapton_solid, m_M_Kapton, slogic);
842 for(G4int iHole = 0;iHole<2;iHole++){
843 if(iHole==1) firstHoleZ = -nholeZ*holepitchz/2+0.5*holepitchz;
844 if(iHole==0) firstHoleZ = -nholeZ*holepitchz/2;
845 G4double holePosPhi = 0.25*anglephi+0.5*iHole*anglephi;
846 G4RotationMatrix* rotHole =
new G4RotationMatrix();
847 rotHole->rotateY(90*deg);
848 rotHole->rotateX(-holePosPhi);
849 for(G4int zhole=0;zhole<(nholeZ-iHole);zhole++){
850 G4double holePosZ = firstHoleZ+zhole*holepitchz;
851 G4double holerho1 = lvd_R_i+0.5*holeh1;
852 G4double holerho2 = lvd_R_o-0.5*holeh1;
853 G4double holerho0 = lvd_R_i1+0.5*lvd_L_hole1_Cu;
854 G4double holerho3 = lvd_R_i2+0.5*lvd_L_hole2_Cu;
855 G4ThreeVector holePos1,holePos2,holePos0,holePos3;
856 holePos1.setRhoPhiZ(holerho1,holePosPhi,holePosZ);
857 holePos2.setRhoPhiZ(holerho2,holePosPhi,holePosZ);
858 holePos0.setRhoPhiZ(holerho0,holePosPhi,holePosZ);
859 holePos3.setRhoPhiZ(holerho3,holePosPhi,holePosZ);
860 G4VPhysicalVolume* hole1PV =
new G4PVPlacement(rotHole,holePos1,hole1LV,
"hole1PV",lv_GemFoil_Kapton_logic,lv_boolen,lv_copyNo,
false);
861 G4VPhysicalVolume* hole2PV =
new G4PVPlacement(rotHole,holePos2,hole2LV,
"hole2PV",lv_GemFoil_Kapton_logic,lv_boolen,lv_copyNo,
false);
862 G4VPhysicalVolume* holeCu1PV =
new G4PVPlacement(rotHole,holePos0,holeCu1LV,
"holeCu1PV",lv_GemFoil_Cu_logic,lv_boolen,lv_copyNo,
false);
863 G4VPhysicalVolume* holeCu2PV =
new G4PVPlacement(rotHole,holePos3,holeCu2LV,
"holeCu2PV",lv_GemFoil_Cu2_logic,lv_boolen,lv_copyNo,
false);
866 for(G4int iCgemline=0;iCgemline<nCgemline;iCgemline++){
867 G4RotationMatrix* rotline =
new G4RotationMatrix();
868 rotline->rotateZ(-iCgemline*anglephi);
869 G4VPhysicalVolume *lv_GemFoil_Cu_physi =
new G4PVPlacement(rotline, lv_3vector, lv_GemFoil_Cu_logic, sphysi,lv_GemFoil_logic, lv_boolen, lv_copyNo,
false);
870 G4VPhysicalVolume *lv_GemFoil_Cu2_physi =
new G4PVPlacement(rotline, lv_3vector, lv_GemFoil_Cu2_logic, sphysi,lv_GemFoil_logic, lv_boolen, lv_copyNo,
false);
872 G4VPhysicalVolume* lv_GemFoil_Kapton_physi =
new G4PVPlacement(rotline, lv_3vector,lv_GemFoil_Kapton_logic,sphysi,lv_GemFoil_logic,lv_boolen,lv_copyNo,
false);
923 lv_GemFoil_logic->SetVisAttributes(lv_magenta);
925 Print(lv_GemFoil_logic);
931 log<< MSG::INFO <<
"BesCgemConstruciton::ConstructFromCode(), Construct CgemLayer " << i <<
" Anode "<< endreq;
934 sssolid <<
"Anode_solid";
936 ssolid = sssolid.str();
938 sslogic <<
"Anode_logic";
940 slogic = sslogic.str();
942 ssphysi <<
"Anode_physi";
944 sphysi = ssphysi.str();
947 G4Tubs *lv_Anode_solid =
948 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
949 G4LogicalVolume *lv_Anode_logic =
950 new G4LogicalVolume(lv_Anode_solid, m_M_CgemGas, slogic);
951 G4VPhysicalVolume *lv_Anode_physi =
952 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_logic, sphysi,
953 lv_CgemLayer_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
961 ssolid = sssolid.str();
966 slogic = sslogic.str();
970 sphysi = ssphysi.str();
975 if (lvd_R_i==lvd_R_o)
break;
977 G4Tubs *lv_Anode_Cu1_solid =
978 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
984 if(lv_use_v_strip_description ==
false)
987 G4LogicalVolume *lv_Anode_Cu1_logic =
988 new G4LogicalVolume(lv_Anode_Cu1_solid, m_M_Cu_AnodeStripV, slogic);
989 G4VPhysicalVolume *lv_Anode_Cu1_physi =
990 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Cu1_logic, sphysi,
991 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
998 cout<<
"construct v-strips on layer "<<i<<endl;
1002 double v_airgap = v_spacing - v_active;
1004 double anode_cu1_mean_radius = 0.5 * (lvd_R_i + lvd_R_o);
1005 double anode_full_v = anode_cu1_mean_radius * CLHEP::twopi;
1006 int nof_anode_v = floor(anode_full_v / v_spacing);
1013 if(tan_stereo < 0) tan_stereo *= -1.;
1016 int nof_replicas = tan_stereo * lvd_L_z / 0.10;
1019 double replica_length = lvd_L_z / nof_replicas;
1022 double phi_v = (CLHEP::twopi/nof_anode_v) * CLHEP::rad;
1023 double tilt =
tan(lv_CgemLayer->
getAngleOfStereo()) * lvd_L_z/(nof_replicas * anode_cu1_mean_radius);
1024 if(tilt > CLHEP::pi) tilt = CLHEP::twopi - tilt;
1029 G4LogicalVolume *lv_Anode_Cu1_logic =
1030 new G4LogicalVolume(lv_Anode_Cu1_solid, m_M_CgemGas,
"Anode_Cu1_logic");
1033 G4VSolid* lv_Anode_V_Strip_solid =
1034 new G4Tubs(
"Anode_V_Strip_solid", lvd_R_i, lvd_R_o, replica_length * 0.5, lvd_A_s, lvd_A_d);
1037 G4LogicalVolume *lv_Anode_V_Strip_logic =
1038 new G4LogicalVolume(lv_Anode_V_Strip_solid, m_M_CgemGas,
"Anode_V_Strip_logic");
1050 double v_active_phi = (v_active / anode_cu1_mean_radius) * CLHEP::radian;
1054 G4Tubs* lv_Anode_V_Active_solid =
1055 new G4Tubs(
"Anode_V_Active_solid", lvd_R_i, lvd_R_o, replica_length * 0.5,
1056 -0.5 * v_active_phi,
1059 G4LogicalVolume *lv_Anode_V_Active_logic =
1060 new G4LogicalVolume(lv_Anode_V_Active_solid, m_M_Cu,
"Anode_V_Active_logic");
1064 G4VisAttributes anode_v_active_attributes;
1067 anode_v_active_attributes.SetVisibility(
false);
1070 lv_Anode_V_Active_logic->SetVisAttributes(anode_v_active_attributes);
1073 G4VPhysicalVolume *lv_Anode_V_Active_physi =
1074 new G4PVReplica(
"Anode_V_Active_physi", lv_Anode_V_Active_logic, lv_Anode_V_Strip_logic, kPhi, nof_anode_v, phi_v);
1082 G4VPhysicalVolume* lv_Anode_V_Strip_physi =
1083 new G4PVParameterised(
"Anode_V_Strip_physi", lv_Anode_V_Strip_logic, lv_Anode_Cu1_logic, kZAxis, nof_replicas, sliceParam);
1085 G4VPhysicalVolume *lv_Anode_Cu1_physi =
1086 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Cu1_logic,
"Anode_Cu1_physi",
1087 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1094 if (lvd_R_i==lvd_R_o)
break;
1095 G4Tubs *lv_Anode_Kapton1_solid =
1096 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1097 G4LogicalVolume *lv_Anode_Kapton1_logic =
1098 new G4LogicalVolume(lv_Anode_Kapton1_solid, m_M_Kapton_StripV, slogic);
1099 G4VPhysicalVolume *lv_Anode_Kapton1_physi =
1100 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Kapton1_logic, sphysi,
1101 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1106 if (lvd_R_i==lvd_R_o)
break;
1108 G4Tubs *lv_Anode_Cu2_solid =
1109 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1111 if(lv_use_x_strip_description ==
false)
1114 G4LogicalVolume *lv_Anode_Cu2_logic =
1115 new G4LogicalVolume(lv_Anode_Cu2_solid, m_M_Cu_AnodeStripX, slogic);
1116 G4VPhysicalVolume *lv_Anode_Cu2_physi =
1117 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Cu2_logic, sphysi,
1118 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1122 cout<<
"construct x-strips on layer "<<i<<endl;
1126 double x_airgap = x_spacing - x_active;
1128 double anode_cu2_mean_radius = 0.5 * (lvd_R_i + lvd_R_o);
1129 double anode_full_x = anode_cu2_mean_radius * CLHEP::twopi;
1130 int nof_anode_x = floor(anode_full_x / x_spacing);
1133 double phi_x = (CLHEP::twopi/nof_anode_x) * CLHEP::rad;
1140 G4LogicalVolume *lv_Anode_Cu2_logic =
1141 new G4LogicalVolume(lv_Anode_Cu2_solid, m_M_CgemGas,
"lv_Anode_Cu2_logic");
1142 G4VPhysicalVolume *lv_Anode_Cu2_physi =
1143 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Cu2_logic,
"Anode_Cu2_physi",
1144 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1147 G4VSolid* lv_Anode_X_Strip_solid =
1148 new G4Tubs(
"lv_Anode_X_Strip_solid", lvd_R_i, lvd_R_o, lvd_L_z/2., -0.5 * phi_x, phi_x);
1151 G4LogicalVolume *lv_Anode_X_Strip_logic =
1152 new G4LogicalVolume(lv_Anode_X_Strip_solid, m_M_CgemGas,
"lv_Anode_Cu2_logic");
1163 double x_delay_phi = ((0.5 * x_airgap) / anode_cu2_mean_radius) * CLHEP::radian;
1164 double x_active_phi = (x_active / anode_cu2_mean_radius) * CLHEP::radian;
1166 G4Tubs* lv_Anode_X_Active_solid =
1167 new G4Tubs(
"Anode_X_Active_solid", lvd_R_i, lvd_R_o, lvd_L_z/2., -0.5 * x_active_phi, x_active_phi);
1168 G4LogicalVolume *lv_Anode_X_Active_logic =
1169 new G4LogicalVolume(lv_Anode_X_Active_solid, m_M_Cu,
"Anode_X_Active_logic");
1180 G4VPhysicalVolume *lv_Anode_X_Active_physi =
1181 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_X_Active_logic,
"Anode_X_Strip_physi",
1182 lv_Anode_X_Strip_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1185 G4VPhysicalVolume *lv_Anode_X_Strip_physi =
1186 new G4PVReplica(
"Anode_X_Strip_physi", lv_Anode_X_Strip_logic,
1187 lv_Anode_Cu2_logic, kPhi, nof_anode_x, phi_x);
1194 if (lvd_R_i==lvd_R_o)
break;
1195 G4Tubs *lv_Anode_Epoxy1_solid =
1196 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1197 G4LogicalVolume *lv_Anode_Epoxy1_logic =
1198 new G4LogicalVolume(lv_Anode_Epoxy1_solid, m_M_Epoxy, slogic);
1199 G4VPhysicalVolume *lv_Anode_Epoxy1_physi =
1200 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Epoxy1_logic, sphysi,
1201 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1206 if (lvd_R_i==lvd_R_o)
break;
1207 G4Tubs *lv_Anode_Kapton2_solid =
1208 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1209 G4LogicalVolume *lv_Anode_Kapton2_logic =
1210 new G4LogicalVolume(lv_Anode_Kapton2_solid, m_M_Kapton, slogic);
1211 G4VPhysicalVolume *lv_Anode_Kapton2_physi =
1212 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Kapton2_logic, sphysi,
1213 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1218 if (lvd_R_i==lvd_R_o)
break;
1219 G4Tubs *lv_Anode_Epoxy2_solid =
1220 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1221 G4LogicalVolume *lv_Anode_Epoxy2_logic =
1222 new G4LogicalVolume(lv_Anode_Epoxy2_solid, m_M_Epoxy, slogic);
1223 G4VPhysicalVolume *lv_Anode_Epoxy2_physi =
1224 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Epoxy2_logic, sphysi,
1225 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1230 if (lvd_R_i==lvd_R_o)
break;
1231 G4Tubs *lv_Anode_Rohacell1_solid =
1232 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1233 G4LogicalVolume *lv_Anode_Rohacell1_logic =
1234 new G4LogicalVolume(lv_Anode_Rohacell1_solid, m_M_Rohacell, slogic);
1235 G4VPhysicalVolume *lv_Anode_Rohacell1_physi =
1236 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Rohacell1_logic, sphysi,
1237 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1242 if (lvd_R_i==lvd_R_o)
break;
1243 G4Tubs *lv_Anode_Carbonf1_solid =
1244 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1245 G4LogicalVolume *lv_Anode_Carbonf1_logic =
1246 new G4LogicalVolume(lv_Anode_Carbonf1_solid, m_M_CarbonFiber, slogic);
1247 G4VPhysicalVolume *lv_Anode_Carbonf1_physi =
1248 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Carbonf1_logic, sphysi,
1249 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1254 if (lvd_R_i==lvd_R_o)
break;
1255 G4Tubs *lv_Anode_Kapton3_solid =
1256 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1257 G4LogicalVolume *lv_Anode_Kapton3_logic =
1258 new G4LogicalVolume(lv_Anode_Kapton3_solid, m_M_Kapton, slogic);
1259 G4VPhysicalVolume *lv_Anode_Kapton3_physi =
1260 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Kapton3_logic, sphysi,
1261 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1266 if (lvd_R_i==lvd_R_o)
break;
1267 G4Tubs *lv_Anode_Epoxy3_solid =
1268 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1269 G4LogicalVolume *lv_Anode_Epoxy3_logic =
1270 new G4LogicalVolume(lv_Anode_Epoxy3_solid, m_M_Epoxy, slogic);
1271 G4VPhysicalVolume *lv_Anode_Epoxy3_physi =
1272 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Epoxy3_logic, sphysi,
1273 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1278 if (lvd_R_i==lvd_R_o)
break;
1279 G4Tubs *lv_Anode_Honeycomb_solid =
1280 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1281 G4LogicalVolume *lv_Anode_Honeycomb_logic =
1282 new G4LogicalVolume(lv_Anode_Honeycomb_solid, m_M_Honeycomb, slogic);
1283 G4VPhysicalVolume *lv_Anode_Honeycomb_physi =
1284 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Honeycomb_logic, sphysi,
1285 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1290 if (lvd_R_i==lvd_R_o)
break;
1291 G4Tubs *lv_Anode_Kapton4_solid =
1292 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1293 G4LogicalVolume *lv_Anode_Kapton4_logic =
1294 new G4LogicalVolume(lv_Anode_Kapton4_solid, m_M_Kapton, slogic);
1295 G4VPhysicalVolume *lv_Anode_Kapton4_physi =
1296 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Kapton4_logic, sphysi,
1297 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1302 if (lvd_R_i==lvd_R_o)
break;
1303 G4Tubs *lv_Anode_Epoxy4_solid =
1304 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1305 G4LogicalVolume *lv_Anode_Epoxy4_logic =
1306 new G4LogicalVolume(lv_Anode_Epoxy4_solid, m_M_Epoxy, slogic);
1307 G4VPhysicalVolume *lv_Anode_Epoxy4_physi =
1308 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Epoxy4_logic, sphysi,
1309 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1314 if (lvd_R_i==lvd_R_o)
break;
1315 G4Tubs *lv_Anode_Rohacell2_solid =
1316 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1317 G4LogicalVolume *lv_Anode_Rohacell2_logic =
1318 new G4LogicalVolume(lv_Anode_Rohacell2_solid, m_M_Rohacell, slogic);
1319 G4VPhysicalVolume *lv_Anode_Rohacell2_physi =
1320 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Rohacell2_logic, sphysi,
1321 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1326 if (lvd_R_i==lvd_R_o)
break;
1327 G4Tubs *lv_Anode_Carbonf2_solid =
1328 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1329 G4LogicalVolume *lv_Anode_Carbonf2_logic =
1330 new G4LogicalVolume(lv_Anode_Carbonf2_solid, m_M_CarbonFiber, slogic);
1331 G4VPhysicalVolume *lv_Anode_Carbonf2_physi =
1332 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Carbonf2_logic, sphysi,
1333 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1338 if (lvd_R_i==lvd_R_o)
break;
1339 G4Tubs *lv_Anode_Epoxy5_solid =
1340 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1341 G4LogicalVolume *lv_Anode_Epoxy5_logic =
1342 new G4LogicalVolume(lv_Anode_Epoxy5_solid, m_M_Epoxy, slogic);
1343 G4VPhysicalVolume *lv_Anode_Epoxy5_physi =
1344 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Epoxy5_logic, sphysi,
1345 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1350 if (lvd_R_i==lvd_R_o)
break;
1351 G4Tubs *lv_Anode_Cu3_solid =
1352 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1353 G4LogicalVolume *lv_Anode_Cu3_logic =
1354 new G4LogicalVolume(lv_Anode_Cu3_solid, m_M_Cu, slogic);
1355 G4VPhysicalVolume *lv_Anode_Cu3_physi =
1356 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Cu3_logic, sphysi,
1357 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1362 if (lvd_R_i==lvd_R_o)
break;
1363 G4Tubs *lv_Anode_Kapton5_solid =
1364 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1365 G4LogicalVolume *lv_Anode_Kapton5_logic =
1366 new G4LogicalVolume(lv_Anode_Kapton5_solid, m_M_Kapton, slogic);
1367 G4VPhysicalVolume *lv_Anode_Kapton5_physi =
1368 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Kapton5_logic, sphysi,
1369 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1374 if (lvd_R_i==lvd_R_o)
break;
1375 G4Tubs *lv_Anode_Kapton6_solid =
1376 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1377 G4LogicalVolume *lv_Anode_Kapton6_logic =
1378 new G4LogicalVolume(lv_Anode_Kapton6_solid, m_M_Kapton, slogic);
1379 G4VPhysicalVolume *lv_Anode_Kapton6_physi =
1380 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Kapton6_logic, sphysi,
1381 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1387 if (lvd_R_i==lvd_R_o)
break;
1388 G4Tubs *lv_Anode_Cu4_solid =
1389 new G4Tubs(ssolid, lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1390 G4LogicalVolume *lv_Anode_Cu4_logic =
1391 new G4LogicalVolume(lv_Anode_Cu4_solid, m_M_Cu, slogic);
1392 G4VPhysicalVolume *lv_Anode_Cu4_physi =
1393 new G4PVPlacement(lv_rotation, lv_3vector, lv_Anode_Cu4_logic, sphysi,
1394 lv_Anode_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1403 lv_CgemLayer_logic -> SetVisAttributes(lv_white);
1404 lv_Cathode_logic -> SetVisAttributes(lv_green);
1405 lv_Anode_logic -> SetVisAttributes(lv_red);
1408 Print(lv_CgemLayer_logic);
1409 Print(lv_Cathode_logic);
1410 Print(lv_Anode_logic);
1416 lvd_R_i = lv_CgemSeparator->
getInnerR()*mm;
1417 lvd_R_o = lv_CgemSeparator->
getOuterR()*mm;
1418 lvd_L_z = lv_CgemSeparator->
getLength()*mm;
1420 G4Tubs *lv_Separator_solid =
1421 new G4Tubs(
"Separator_solid", lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1424 G4Tubs *lv_Separator_solid_Al1 =
1425 new G4Tubs(
"Separator_solid_Al1", lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1428 G4Tubs *lv_Separator_solid_CarFib =
1429 new G4Tubs(
"Separator_solid_CarFib", lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1432 G4Tubs *lv_Separator_solid_Al2 =
1433 new G4Tubs(
"Separator_solid_Al2", lvd_R_i, lvd_R_o, lvd_L_z/2., lvd_A_s, lvd_A_d);
1455 G4LogicalVolume *lv_Separator_logic =
1456 new G4LogicalVolume(lv_Separator_solid, m_M_Air,
"Separator_logic");
1457 G4LogicalVolume *lv_Separator_logic_Al1 =
1458 new G4LogicalVolume(lv_Separator_solid_Al1, m_M_Aluminum,
"Separator_logic_Al1");
1459 G4LogicalVolume *lv_Separator_logic_CarFib =
1460 new G4LogicalVolume(lv_Separator_solid_CarFib, m_M_CarbonFiber,
"Separator_logic_CarFib");
1461 G4LogicalVolume *lv_Separator_logic_Al2 =
1462 new G4LogicalVolume(lv_Separator_solid_Al2, m_M_Aluminum,
"Separator_logic_Al2");
1464 G4VPhysicalVolume *lv_Separator_physi =
1465 new G4PVPlacement(lv_rotation, lv_3vector, lv_Separator_logic,
"Separator_physi",
1466 lv_Cgem_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1467 G4VPhysicalVolume *lv_Separator_physi_Al1 =
1468 new G4PVPlacement(lv_rotation, lv_3vector, lv_Separator_logic_Al1,
"Separator_physi_Al1",
1469 lv_Separator_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1470 G4VPhysicalVolume *lv_Separator_physi_CarFib =
1471 new G4PVPlacement(lv_rotation, lv_3vector, lv_Separator_logic_CarFib,
"Separator_physi_CarFib",
1472 lv_Separator_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1473 G4VPhysicalVolume *lv_Separator_physi_Al2 =
1474 new G4PVPlacement(lv_rotation, lv_3vector, lv_Separator_logic_Al2,
"Separator_physi_Al2",
1475 lv_Separator_logic, lv_boolen, lv_copyNo, m_CheckOverlaps);
1477 return lv_Cgem_logic;
1480void BesCgemConstruction::ConstructPassiveElements(G4LogicalVolume* logicCgem)
1486 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
1487 MsgStream log(
msgSvc,
"BesCgemConstruction::ConstructPassiveElements()");
1488 log<< MSG::INFO <<
"===========================================" << endreq;
1489 log<< MSG::INFO <<
"BesCgemConstruction::ConstructPassiveElements(), Begin to construct CGEM passives!" << endreq;
1492 G4VisAttributes *lv_white =
new G4VisAttributes(G4Colour::White());
1493 G4VisAttributes *lv_yellow =
new G4VisAttributes(G4Colour::Yellow());
1494 G4VisAttributes *lv_cyan =
new G4VisAttributes(G4Colour::Cyan());
1495 G4bool lv_boolen =
false;
1496 G4int lv_copyNo = 0;
1503 double displ_as_L2_1 = 64;
1504 double displ_as_L3_4 = 83;
1505 double displ_ef_1 = 171;
1509 double as_L1_1_rin = 71.;
1510 double as_L1_2_rin = 90.1;
1511 double as_L1_3_rin = 96.;
1512 double as_L1_4_rin = 71.;
1514 double as_L1_1_rout = 90.1;
1515 double as_L1_2_rout = 112.;
1516 double as_L1_3_rout = 112.;
1517 double as_L1_4_rout = 88.;
1519 double as_L1_1_thick = 34;
1520 double as_L1_2_thick = 48;
1521 double as_L1_3_thick = 32.5;
1522 double as_L1_4_thick = 45;
1525 double as_L2_1_rin = 113.5;
1526 double as_L2_2_rin = 132.5;
1527 double as_L2_3_rin = 139.5;
1528 double as_L2_4_rin = 113.5;
1529 double as_L2_5_0_rin = 132.5;
1530 double as_L2_5_1_rin = 132.5;
1532 double as_L2_1_rout = 132.5;
1533 double as_L2_2_rout = 154.5;
1534 double as_L2_3_rout = 154.5;
1535 double as_L2_4_rout = 130.5;
1536 double as_L2_5_0_rout = 152.6;
1537 double as_L2_5_1_rout = 154.5;
1539 double as_L2_1_thick = 34;
1540 double as_L2_2_thick = 43;
1541 double as_L2_3_thick = 34;
1542 double as_L2_4_thick = 33;
1543 double as_L2_5_thick = 5;
1546 double as_L3_1_rin = 156.;
1547 double as_L3_2_rin = 154.5;
1548 double as_L3_3_rin = 175.;
1549 double as_L3_4_0_rin = 156.;
1550 double as_L3_4_1_rin = 156.;
1551 double as_L3_5_0_rin = 175.;
1552 double as_L3_5_1_rin = 175.;
1554 double as_L3_1_rout = 175.;
1555 double as_L3_2_rout = 162.1;
1556 double as_L3_3_rout = 180.7;
1557 double as_L3_4_0_rout = 170.96;
1558 double as_L3_4_1_rout = 175.;
1559 double as_L3_5_0_rout = 176.;
1560 double as_L3_5_1_rout = 180.7;
1562 double as_L3_1_thick = 21;
1563 double as_L3_2_thick = 28;
1564 double as_L3_3_thick = 34.5;
1565 double as_L3_4_thick = 10;
1566 double as_L3_5_thick = 14.5;
1569 double cfo_1_rin = 65.5;
1570 double cfo_1_rout = 71.;
1571 double cfo_2_rin = cfo_1_rin;
1572 double cfo_2_rout = 85.;
1574 double cfo_brick_2_x = 40.5;
1575 double cfo_brick_2_y = 13;
1576 double cfo_brick_2_z = 12;
1578 double cfo_brick_1_rin = cfo_2_rout;
1579 double cfo_brick_1_rout = cfo_2_rout + as_L2_4_rin - cfo_2_rout;
1580 double cfo_brick_1_thick = 10;
1581 double cfo_rad = (cfo_2_rout + 0.5 * (cfo_brick_1_rout - cfo_brick_1_rin)) *CLHEP::mm;
1582 double cfo_phi = cfo_brick_2_y/cfo_rad;
1587 double sep_rin = lv_CgemSeparator->
getInnerR()*mm;
1588 double sep_rout = lv_CgemSeparator->
getOuterR()*mm;
1589 double sep_len = lv_CgemSeparator->
getLength()*mm;
1592 double ef_1_rin = 159.;
1593 double ef_2_rin = 174.5;
1595 double ef_1_rout = 186.5;
1596 double ef_2_rout = ef_1_rout;
1598 double ef_1_thick = 12;
1599 double ef_2_thick = 35;
1602 double ef_1_a_rin = ef_1_rin;
1603 double ef_2_a_rin = ef_2_rin;
1605 double ef_1_a_rout = sep_rin;
1606 double ef_2_a_rout = sep_rin;
1608 double ef_1_a_thick = ef_1_thick;
1609 double ef_2_a_thick = ef_2_thick;
1612 double ef_3_rin = sep_rout;
1613 double ef_4_rin = sep_rin;
1615 double ef_3_rout = ef_1_rout;
1616 double ef_4_rout = sep_rout;
1618 double ef_3_thick = ef_1_thick + ef_2_thick;
1619 double ef_4_thick = ef_3_thick - (0.5 * sep_len - (zref + displ_ef_1) + 0.5 * ef_1_thick);
1622 double pf_1_rin = 60;
1623 double pf_2_rin = 60;
1624 double pf_3_0_rin = 75.174;
1625 double pf_3_1_rin = 75.174;
1626 double pf_side_0_0_rin = 75.174;
1627 double pf_side_0_1_rin = 115.516;
1628 double pf_side_1_0_rin = pf_side_0_1_rin;
1629 double pf_side_1_1_rin = 132;
1631 double pf_arc_rin = 132;
1633 double pf_1_rout = 90.5;
1634 double pf_2_rout = 75.174;
1635 double pf_3_0_rout = 90.5;
1636 double pf_3_1_rout = 91.657;
1637 double pf_side_0_0_rout = 91.657;
1638 double pf_side_0_1_rout = 132;
1639 double pf_side_1_0_rout = pf_side_0_1_rout;
1640 double pf_side_1_1_rout = 155;
1643 double pf_arc_rout = 155;
1645 double pf_1_thick = 5.7;
1646 double pf_2_thick = 10.3;
1647 double pf_3_thick = 10.3;
1648 double pf_side_0_thick = 23.332;
1649 double pf_side_1_thick = 9.332;
1651 double pf_brick_x = 24;
1652 double pf_brick_y = 36;
1653 double pf_brick_z = 10;
1655 double pf_arc_thick = 9;
1658 double sh_0_rin = 90.5;
1659 double sh_1_rin = 131.78;
1661 double sh_0_rout = 91.5;
1662 double sh_1_rout = 132.78;
1664 double sh_thick = 25.8;
1667 double nwr_1_rin = 159.;
1668 double nwr_2_rin = as_L3_5_1_rout;
1670 double nwr_1_rout = 182.6;
1671 double nwr_2_rout = 182.6;
1673 double nwr_1_thick = 2;
1674 double nwr_2_thick = 15;
1677 double nwr_1_a_rin = nwr_1_rin;
1678 double nwr_1_a_rout = as_L3_5_1_rout;
1679 double nwr_1_a_thick = nwr_1_thick;
1682 double nwr_1_b_rin = as_L3_5_1_rout;
1683 double nwr_1_b_rout = nwr_1_rout;
1684 double nwr_1_b_thick = nwr_1_thick;
1687 double w_brick_x = 40.;
1688 double w_brick_y = 18.;
1689 double w_brick_z = 11.;
1693 double z_as_L1_2_eP = zref;
1694 double z_as_L1_1_eP = z_as_L1_2_eP + 0.5 * as_L1_2_thick - 0.5 * as_L1_1_thick;
1695 double z_as_L1_3_eP = z_as_L1_2_eP + 0.5 * as_L1_2_thick + 0.5 * as_L1_3_thick;
1696 double z_as_L1_4_eP = z_as_L1_2_eP + 0.5 * as_L1_2_thick + 0.5 * as_L1_4_thick;
1705 double z_as_L2_1_eP = zref + displ_as_L2_1;
1706 double z_as_L2_2_eP = z_as_L2_1_eP + 0.5 * as_L2_1_thick - 0.5 * as_L2_2_thick;
1707 double z_as_L2_3_eP = z_as_L2_2_eP + 0.5 * as_L2_2_thick + 0.5 * as_L2_3_thick;
1708 double z_as_L2_4_eP = z_as_L2_1_eP + 0.5 * as_L2_1_thick + 0.5 * as_L2_4_thick;
1709 double z_as_L2_5_eP = z_as_L2_2_eP - 0.5 * as_L2_2_thick - 0.5 * as_L2_5_thick;
1718 double z_as_L3_4_eP = zref + displ_as_L3_4;
1719 double z_as_L3_1_eP = z_as_L3_4_eP + 0.5 * as_L3_4_thick + 0.5 * as_L3_1_thick;
1720 double z_as_L3_2_eP = z_as_L3_1_eP + 0.5 * as_L3_1_thick + 0.5 * as_L3_2_thick;
1721 double z_as_L3_5_eP = z_as_L3_4_eP + 0.5 * as_L3_4_thick + 0.5 * as_L3_5_thick;
1722 double z_as_L3_3_eP = z_as_L3_5_eP + 0.5 * as_L3_5_thick + 0.5 * as_L3_3_thick;
1731 double z_cfo_1_eP = 427.;
1732 double z_cfo_2_eP = 473.;
1734 double z_ef_1_eP = zref + displ_ef_1;
1735 double z_ef_1_a_eP = z_ef_1_eP;
1736 double z_ef_2_a_eP = z_ef_1_eP + 0.5 * (ef_1_a_thick + ef_2_a_thick);
1737 double z_ef_3_eP = z_ef_1_a_eP - 0.5* ef_1_a_thick + 0.5 * ef_3_thick;
1738 double z_ef_4_eP = z_ef_3_eP + 0.5 * ef_3_thick - 0.5 * ef_4_thick;
1740 double z_pf_1_eP = 486.85;
1741 double z_pf_2_eP = 494.85;
1742 double z_pf_3_eP = 494.85;
1743 double z_pf_side_0_eP = 511.666;
1744 double z_pf_side_1_eP = z_pf_side_0_eP + 0.5 * (pf_side_0_thick + pf_side_1_thick);
1746 double z_pf_arc_eP = 527.832;
1747 double z_pf_brick_eP = z_ef_1_eP + 0.5 * (ef_1_thick + pf_brick_z);
1749 double z_sh_eP = 502.6;
1751 double z_cbe_brick_eP = 479.5;
1754 double zref_w = zref;
1755 double z_nwr_1_wP = 522.;
1756 double z_nwr_2_wP = zref + displ_ef_1 - 0.5 * ef_1_thick - 0.5*nwr_2_thick;
1758 double z_w_brick_wP = 479.5;
1761 double cable_1_rin = as_L1_1_rin;
1762 double cable_2_0_rin = cfo_1_rin;
1763 double cable_2_1_rin = cable_2_0_rin;
1764 double cable_3_rin = cable_2_0_rin;
1765 double cable_4_0_rin = cable_2_0_rin;
1766 double cable_4_1_rin = cable_2_0_rin;
1767 double cable_5_0_rin = cable_2_0_rin;
1768 double cable_5_1_rin = cable_2_0_rin;
1769 double cable_6_rin = cable_2_0_rin;
1770 double cable_7_rin = pf_1_rin;
1771 double cable_8_rin = cable_7_rin;
1773 double cable_1_rout = as_L1_2_rout;
1774 double cable_2_0_rout = as_L2_5_0_rout;
1775 double cable_2_1_rout = as_L2_5_1_rout;
1776 double cable_3_rout = cable_2_1_rout;
1777 double cable_4_0_rout = as_L3_4_0_rout;
1778 double cable_4_1_rout = as_L3_4_1_rout;
1779 double cable_5_0_rout = as_L3_5_0_rout;
1780 double cable_5_1_rout = as_L3_5_1_rout;
1781 double cable_6_rout = cable_5_1_rout;
1782 double cable_7_rout = cable_5_1_rout;
1783 double cable_8_rout = sep_rin;
1812 double z_limit_1 = zref - 0.5 * as_L1_2_thick;
1813 double z_limit_2 = zref + displ_as_L2_1 + 0.5 * as_L2_1_thick - as_L2_2_thick - as_L2_5_thick;
1814 double z_limit_3 = z_limit_2 + as_L2_5_thick;
1815 double z_limit_4 = zref + displ_as_L3_4 - 0.5 * as_L3_4_thick;
1816 double z_limit_5 = z_limit_4 + as_L3_4_thick;
1817 double z_limit_6 = z_limit_5 + as_L3_5_thick;
1818 double z_limit_7 = 484;
1819 double z_limit_8 = zref + displ_ef_1 - 0.5 * ef_1_thick;
1820 double z_limit_9 = z_limit_8 + ef_1_thick + ef_2_thick;
1822 double z_limit_min = z_limit_1;
1823 double z_limit_max = z_limit_9;
1825 double cable_1_thick = z_limit_2 - z_limit_1;
1826 double cable_2_thick = z_limit_3 - z_limit_2;
1827 double cable_3_thick = z_limit_4 - z_limit_3;
1828 double cable_4_thick = z_limit_5 - z_limit_4;
1829 double cable_5_thick = z_limit_6 - z_limit_5;
1830 double cable_6_thick = z_limit_7 - z_limit_6;
1831 double cable_7_thick = z_limit_8 - z_limit_7;
1832 double cable_8_thick = z_limit_9 - z_limit_8;
1834 double angle2pi = CLHEP::twopi *CLHEP::rad;
1836 G4Tubs* cable_1 =
new G4Tubs(
"cable_1", cable_1_rin *CLHEP::mm, cable_1_rout *CLHEP::mm,
1837 0.5 * cable_1_thick *CLHEP::mm, 0, angle2pi);
1838 G4Cons* cable_2 =
new G4Cons(
"cable_2", cable_2_0_rin *CLHEP::mm, cable_2_0_rout *CLHEP::mm,
1839 cable_2_1_rin *CLHEP::mm, cable_2_1_rout *CLHEP::mm,
1840 0.5 * cable_2_thick *CLHEP::mm, 0, angle2pi);
1841 G4Tubs* cable_3 =
new G4Tubs(
"cable_3", cable_3_rin *CLHEP::mm, cable_3_rout *CLHEP::mm,
1842 0.5 * cable_3_thick *CLHEP::mm, 0, angle2pi);
1843 G4Cons* cable_4 =
new G4Cons(
"cable_4", cable_4_0_rin *CLHEP::mm, cable_4_0_rout *CLHEP::mm,
1844 cable_4_1_rin *CLHEP::mm, cable_4_1_rout *CLHEP::mm,
1845 0.5 * cable_4_thick *CLHEP::mm, 0, angle2pi);
1846 G4Cons* cable_5 =
new G4Cons(
"cable_5", cable_5_0_rin *CLHEP::mm, cable_5_0_rout *CLHEP::mm,
1847 cable_5_1_rin *CLHEP::mm, cable_5_1_rout *CLHEP::mm,
1848 0.5 * cable_5_thick *CLHEP::mm, 0, angle2pi);
1849 G4Tubs* cable_6 =
new G4Tubs(
"cable_6", cable_6_rin *CLHEP::mm, cable_6_rout *CLHEP::mm,
1850 0.5 * cable_6_thick *CLHEP::mm, 0, angle2pi);
1851 G4Tubs* cable_7 =
new G4Tubs(
"cable_7", cable_7_rin *CLHEP::mm, cable_7_rout *CLHEP::mm,
1852 0.5 * cable_7_thick *CLHEP::mm, 0, angle2pi);
1853 G4Tubs* cable_8 =
new G4Tubs(
"cable_8", cable_8_rin *CLHEP::mm, cable_8_rout *CLHEP::mm,
1854 0.5 * cable_8_thick *CLHEP::mm, 0, angle2pi);
1879 double z_shift = -0.5*(cable_1_thick - as_L1_2_thick);
1882 G4Material* cable_copper = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Cu");
1883 G4Material* cable_plastic = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_POLYETHYLENE");
1885 G4Material *cable_material =
new G4Material(
"cable_material", cable_density, 1);
1886 cable_material->AddMaterial(cable_copper, 1);
1897 G4RotationMatrix cable_rot;
1898 G4ThreeVector cable_tr(0, 0, 0.5* (cable_1_thick + cable_2_thick) *CLHEP::mm);
1900 G4Transform3D cable_tr12(cable_rot, cable_tr);
1901 G4UnionSolid *cable_12 =
new G4UnionSolid(
"cable_12", cable_1, cable_2, cable_tr12);
1903 cable_tr.set(0, 0, (0.5* (cable_1_thick + cable_3_thick) + cable_2_thick) * CLHEP::mm);
1904 G4Transform3D cable_tr123(cable_rot, cable_tr);
1905 G4UnionSolid *cable_123 =
new G4UnionSolid(
"cable_123", cable_12, cable_3, cable_tr123);
1907 cable_tr.set(0, 0, (0.5* (cable_1_thick + cable_4_thick) + cable_3_thick + cable_2_thick) * CLHEP::mm);
1908 G4Transform3D cable_tr1234(cable_rot, cable_tr);
1909 G4UnionSolid *cable_1234 =
new G4UnionSolid(
"cable_1234", cable_123, cable_4, cable_tr1234);
1911 cable_tr.set(0, 0, (0.5* (cable_1_thick + cable_5_thick) + cable_4_thick + cable_3_thick + cable_2_thick) * CLHEP::mm);
1912 G4Transform3D cable_tr12345(cable_rot, cable_tr);
1913 G4UnionSolid *cable_12345 =
new G4UnionSolid(
"cable_12345", cable_1234, cable_5, cable_tr12345);
1915 cable_tr.set(0, 0, (0.5* (cable_1_thick + cable_6_thick) + cable_5_thick + cable_4_thick + cable_3_thick + cable_2_thick) * CLHEP::mm);
1916 G4Transform3D cable_tr123456(cable_rot, cable_tr);
1917 G4UnionSolid *cable_123456 =
new G4UnionSolid(
"cable_123456", cable_12345, cable_6, cable_tr123456);
1919 cable_tr.set(0, 0, (0.5* (cable_1_thick + cable_7_thick) + cable_6_thick + cable_5_thick + cable_4_thick + cable_3_thick + cable_2_thick) * CLHEP::mm);
1920 G4Transform3D cable_tr1234567(cable_rot, cable_tr);
1921 G4UnionSolid *cable_1234567 =
new G4UnionSolid(
"cable_1234567", cable_123456, cable_7, cable_tr1234567);
1923 cable_tr.set(0, 0, (0.5* (cable_1_thick + cable_8_thick) +
1924 cable_7_thick + cable_6_thick + cable_5_thick + cable_4_thick + cable_3_thick + cable_2_thick) * CLHEP::mm);
1925 G4Transform3D cable_tr12345678(cable_rot, cable_tr);
1926 G4UnionSolid *cable_12345678 =
new G4UnionSolid(
"cable_12345678", cable_1234567, cable_8, cable_tr12345678);
1931 G4LogicalVolume* cable_e_L =
new G4LogicalVolume(cable_12345678, cable_material,
"cable_e_L", 0, 0, 0);
1933 G4LogicalVolume* cable_w_L =
new G4LogicalVolume(cable_12345678, cable_material,
"cable_w_L", 0, 0, 0);
1935 G4VisAttributes cable_attributes;
1937 cable_attributes.SetColor(G4Color::Magenta());
1938 cable_e_L->SetVisAttributes(cable_attributes);
1939 cable_attributes.SetColor(G4Color::Cyan());
1940 cable_w_L->SetVisAttributes(cable_attributes);
1944 G4Tubs* as_L1_1 =
new G4Tubs(
"as_L1_1", as_L1_1_rin *CLHEP::mm, as_L1_1_rout *CLHEP::mm,
1945 0.5 * as_L1_1_thick *CLHEP::mm, 0, angle2pi);
1946 G4Tubs* as_L1_2 =
new G4Tubs(
"as_L1_2", as_L1_2_rin *CLHEP::mm, as_L1_2_rout *CLHEP::mm,
1947 0.5 * as_L1_2_thick *CLHEP::mm, 0, angle2pi);
1948 G4Tubs* as_L1_3 =
new G4Tubs(
"as_L1_3", as_L1_3_rin *CLHEP::mm, as_L1_3_rout *CLHEP::mm,
1949 0.5 * as_L1_3_thick *CLHEP::mm, 0, angle2pi);
1950 G4Tubs* as_L1_4 =
new G4Tubs(
"as_L1_4", as_L1_4_rin *CLHEP::mm, as_L1_4_rout *CLHEP::mm,
1951 0.5 * as_L1_4_thick *CLHEP::mm, 0, angle2pi);
1954 G4Tubs* as_L2_1 =
new G4Tubs(
"as_L2_1", as_L2_1_rin *CLHEP::mm, as_L2_1_rout *CLHEP::mm,
1955 0.5 * as_L2_1_thick *CLHEP::mm, 0, angle2pi);
1956 G4Tubs* as_L2_2 =
new G4Tubs(
"as_L2_2", as_L2_2_rin *CLHEP::mm, as_L2_2_rout *CLHEP::mm,
1957 0.5 * as_L2_2_thick *CLHEP::mm, 0, angle2pi);
1958 G4Tubs* as_L2_3 =
new G4Tubs(
"as_L2_3", as_L2_3_rin *CLHEP::mm, as_L2_3_rout *CLHEP::mm,
1959 0.5 * as_L2_3_thick *CLHEP::mm, 0, angle2pi);
1960 G4Tubs* as_L2_4 =
new G4Tubs(
"as_L2_4", as_L2_4_rin *CLHEP::mm, as_L2_4_rout *CLHEP::mm,
1961 0.5 * as_L2_4_thick *CLHEP::mm, 0, angle2pi);
1962 G4Cons* as_L2_5 =
new G4Cons(
"as_L2_5", as_L2_5_0_rin *CLHEP::mm, as_L2_5_0_rout *CLHEP::mm,
1963 as_L2_5_1_rin *CLHEP::mm, as_L2_5_1_rout *CLHEP::mm,
1964 0.5 * as_L2_5_thick *CLHEP::mm, 0, angle2pi);
1966 G4Tubs* as_L3_1 =
new G4Tubs(
"as_L3_1", as_L3_1_rin *CLHEP::mm, as_L3_1_rout *CLHEP::mm,
1967 0.5 * as_L3_1_thick *CLHEP::mm, 0, angle2pi);
1968 G4Tubs* as_L3_2 =
new G4Tubs(
"as_L3_2", as_L3_2_rin *CLHEP::mm, as_L3_2_rout *CLHEP::mm,
1969 0.5 * as_L3_2_thick *CLHEP::mm, 0, angle2pi);
1970 G4Tubs* as_L3_3 =
new G4Tubs(
"as_L3_3", as_L3_3_rin *CLHEP::mm, as_L3_3_rout *CLHEP::mm,
1971 0.5 * as_L3_3_thick *CLHEP::mm, 0, angle2pi);
1972 G4Cons* as_L3_4 =
new G4Cons(
"as_L3_4", as_L3_4_0_rin *CLHEP::mm, as_L3_4_0_rout *CLHEP::mm,
1973 as_L3_4_1_rin *CLHEP::mm, as_L3_4_1_rout *CLHEP::mm,
1974 0.5 * as_L3_4_thick *CLHEP::mm, 0, angle2pi);
1975 G4Cons* as_L3_5 =
new G4Cons(
"as_L3_5", as_L3_5_0_rin *CLHEP::mm, as_L3_5_0_rout *CLHEP::mm,
1976 as_L3_5_1_rin *CLHEP::mm, as_L3_5_1_rout *CLHEP::mm,
1977 0.5 * as_L3_5_thick *CLHEP::mm, 0, angle2pi);
1980 G4Tubs* cfo_1 =
new G4Tubs(
"cfo_1", cfo_1_rin *CLHEP::mm, cfo_1_rout *CLHEP::mm, 0.5*70. *CLHEP::mm, 0, angle2pi);
1981 G4Tubs* cfo_2 =
new G4Tubs(
"cfo_2", cfo_2_rin *CLHEP::mm, cfo_2_rout *CLHEP::mm, 0.5*22. *CLHEP::mm, 0, angle2pi);
1984 G4Tubs* cfo_brick_1 =
new G4Tubs(
"cfo_brick_1", cfo_brick_1_rin *CLHEP::mm, cfo_brick_1_rout *CLHEP::mm,
1985 0.5 * cfo_brick_1_thick *CLHEP::mm, -0.5* cfo_phi * CLHEP::rad, cfo_phi * CLHEP::rad);
1986 G4Box *cfo_brick_2 =
new G4Box(
"cfo_brick_2",
1987 0.5* cfo_brick_2_x *CLHEP::mm,
1988 0.5* cfo_brick_2_y *CLHEP::mm,
1989 0.5* cfo_brick_2_z *CLHEP::mm);
1990 G4ThreeVector cfo_brick_pos_1_2((cfo_2_rout + 0.5* cfo_brick_2_x) *CLHEP::mm,
1992 0.5 * (cfo_brick_2_z + cfo_brick_1_thick) *CLHEP::mm);
1993 G4Transform3D cfo_transform(G4RotationMatrix(), cfo_brick_pos_1_2);
1994 G4UnionSolid *cfo_brick =
new G4UnionSolid(
"cfo_brick", cfo_brick_1, cfo_brick_2, cfo_transform);
1997 G4Tubs* ef_1_a =
new G4Tubs(
"ef_1_a", ef_1_a_rin *CLHEP::mm, ef_1_a_rout *CLHEP::mm, 0.5 * ef_1_a_thick *CLHEP::mm, 0, angle2pi);
1998 G4Tubs* ef_2_a =
new G4Tubs(
"ef_2_a", ef_2_a_rin *CLHEP::mm, ef_2_a_rout *CLHEP::mm, 0.5 * ef_2_a_thick *CLHEP::mm, 0, angle2pi);
1999 G4Tubs* ef_3 =
new G4Tubs(
"ef_3", ef_3_rin *CLHEP::mm, ef_3_rout *CLHEP::mm, 0.5 * ef_3_thick *CLHEP::mm, 0, angle2pi);
2000 G4Tubs* ef_4 =
new G4Tubs(
"ef_4", ef_4_rin *CLHEP::mm, ef_4_rout *CLHEP::mm, 0.5 * ef_4_thick *CLHEP::mm, 0, angle2pi);
2003 G4Tubs* pf_1 =
new G4Tubs(
"pf_1", pf_1_rin*CLHEP::mm, pf_1_rout*CLHEP::mm, 0.5 * pf_1_thick *CLHEP::mm, 0, angle2pi);
2004 G4Tubs* pf_2 =
new G4Tubs(
"pf_2", pf_2_rin*CLHEP::mm, pf_2_rout*CLHEP::mm, 0.5 * pf_2_thick *CLHEP::mm, 0, angle2pi);
2005 G4Cons* pf_3 =
new G4Cons(
"pf_3",
2006 pf_3_0_rin *CLHEP::mm, pf_3_0_rout *CLHEP::mm,
2007 pf_3_1_rin *CLHEP::mm, pf_3_1_rout *CLHEP::mm,
2008 0.5 * pf_3_thick *CLHEP::mm, 0, angle2pi);
2010 G4Box *pf_brick =
new G4Box(
"pf_brick", 0.5* pf_brick_x *CLHEP::mm, 0.5* pf_brick_y*CLHEP::mm, 0.5* pf_brick_z*CLHEP::mm);
2012 double pf_arc_dphi = 74.33;
2013 G4Tubs* pf_arc =
new G4Tubs(
"pf_arc", 132. *CLHEP::mm, 155. *CLHEP::mm, 0.5*9. *CLHEP::mm, - 0.5 * pf_arc_dphi *CLHEP::deg, pf_arc_dphi *CLHEP::deg);
2016 double pf_side_0_l = 84 *CLHEP::mm;
2017 double pf_side_0_R = 132. *CLHEP::mm;
2018 double pf_side_0_dphi = pf_side_0_l/pf_side_0_R;
2019 G4Cons* pf_side_0 =
new G4Cons(
"pf_side_0",
2020 pf_side_0_0_rin *CLHEP::mm, pf_side_0_0_rout *CLHEP::mm,
2021 pf_side_0_1_rin *CLHEP::mm, pf_side_0_1_rout *CLHEP::mm,
2022 0.5 * pf_side_0_thick *CLHEP::mm, - 0.5 * pf_side_0_dphi *CLHEP::rad, pf_side_0_dphi *CLHEP::rad);
2023 double pf_side_1_dphi = 90 - pf_arc_dphi;
2024 G4Cons* pf_side_1 =
new G4Cons(
"pf_side_1",
2025 pf_side_1_0_rin *CLHEP::mm, pf_side_1_0_rout *CLHEP::mm,
2026 pf_side_1_1_rin *CLHEP::mm, pf_side_1_1_rout *CLHEP::mm,
2027 0.5 * pf_side_1_thick *CLHEP::mm, -0.5 * pf_side_1_dphi*CLHEP::deg, pf_side_1_dphi*CLHEP::deg);
2031 G4Cons* sh =
new G4Cons(
"sh",
2032 sh_0_rin *CLHEP::mm, sh_0_rout *CLHEP::mm,
2033 sh_1_rin *CLHEP::mm, sh_1_rout *CLHEP::mm,
2034 0.5 * sh_thick *CLHEP::mm, 0, angle2pi);
2037 G4Box *cbe_brick =
new G4Box(
"cbe_brick", 0.5* 38.5*CLHEP::mm, 0.5* 18.*CLHEP::mm, 0.5* 13*CLHEP::mm);
2042 G4LogicalVolume* as_L1_1_L =
new G4LogicalVolume(as_L1_1, m_M_Permaglas,
"as_L1_1_L", 0, 0, 0);
2043 G4LogicalVolume* as_L1_2_L =
new G4LogicalVolume(as_L1_2, m_M_Permaglas,
"as_L1_2_L", 0, 0, 0);
2044 G4LogicalVolume* as_L1_3_L =
new G4LogicalVolume(as_L1_3, m_M_Permaglas,
"as_L1_3_L", 0, 0, 0);
2045 G4LogicalVolume* as_L1_4_L =
new G4LogicalVolume(as_L1_4, m_M_Permaglas,
"as_L1_4_L", 0, 0, 0);
2047 G4LogicalVolume* as_L2_1_L =
new G4LogicalVolume(as_L2_1, m_M_Permaglas,
"as_L2_1_L", 0, 0, 0);
2048 G4LogicalVolume* as_L2_2_L =
new G4LogicalVolume(as_L2_2, m_M_Permaglas,
"as_L2_2_L", 0, 0, 0);
2049 G4LogicalVolume* as_L2_3_L =
new G4LogicalVolume(as_L2_3, m_M_Permaglas,
"as_L2_3_L", 0, 0, 0);
2050 G4LogicalVolume* as_L2_4_L =
new G4LogicalVolume(as_L2_4, m_M_Permaglas,
"as_L2_4_L", 0, 0, 0);
2051 G4LogicalVolume* as_L2_5_L =
new G4LogicalVolume(as_L2_5, m_M_Permaglas,
"as_L2_5_L", 0, 0, 0);
2053 G4LogicalVolume* as_L3_1_L =
new G4LogicalVolume(as_L3_1, m_M_Permaglas,
"as_L3_1_L", 0, 0, 0);
2054 G4LogicalVolume* as_L3_2_L =
new G4LogicalVolume(as_L3_2, m_M_Permaglas,
"as_L3_2_L", 0, 0, 0);
2055 G4LogicalVolume* as_L3_3_L =
new G4LogicalVolume(as_L3_3, m_M_Permaglas,
"as_L3_3_L", 0, 0, 0);
2056 G4LogicalVolume* as_L3_4_L =
new G4LogicalVolume(as_L3_4, m_M_Permaglas,
"as_L3_4_L", 0, 0, 0);
2057 G4LogicalVolume* as_L3_5_L =
new G4LogicalVolume(as_L3_5, m_M_Permaglas,
"as_L3_5_L", 0, 0, 0);
2059 G4LogicalVolume* cfo_1_L =
new G4LogicalVolume(cfo_1, m_M_Permaglas,
"cfo_1_L", 0, 0, 0);
2060 G4LogicalVolume* cfo_2_L =
new G4LogicalVolume(cfo_2, m_M_Permaglas,
"cfo_2_L", 0, 0, 0);
2061 G4LogicalVolume* cfo_brick_L =
new G4LogicalVolume(cfo_brick, m_M_Permaglas,
"cfo_brick_L", 0, 0, 0);
2063 G4LogicalVolume* ef_1_a_L =
new G4LogicalVolume(ef_1_a, m_M_Aluminum,
"ef_1_a_L", 0, 0, 0);
2064 G4LogicalVolume* ef_2_a_L =
new G4LogicalVolume(ef_2_a, m_M_Aluminum,
"ef_2_a_L", 0, 0, 0);
2065 G4LogicalVolume* ef_3_L =
new G4LogicalVolume(ef_3, m_M_Aluminum,
"ef_3_L", 0, 0, 0);
2066 G4LogicalVolume* ef_4_L =
new G4LogicalVolume(ef_4, m_M_Aluminum,
"ef_4_L", 0, 0, 0);
2068 G4LogicalVolume* pf_1_L =
new G4LogicalVolume(pf_1, m_M_Permaglas,
"pf_1_L", 0, 0, 0);
2069 G4LogicalVolume* pf_2_L =
new G4LogicalVolume(pf_2, m_M_Permaglas,
"pf_2_L", 0, 0, 0);
2070 G4LogicalVolume* pf_3_L =
new G4LogicalVolume(pf_3, m_M_Permaglas,
"pf_3_L", 0, 0, 0);
2071 G4LogicalVolume* pf_arc_L =
new G4LogicalVolume(pf_arc, m_M_Aluminum,
"pf_arc_L", 0, 0, 0);
2072 G4LogicalVolume* pf_brick_L =
new G4LogicalVolume(pf_brick, m_M_Aluminum,
"pf_brick_L", 0, 0, 0);
2073 G4LogicalVolume* pf_side_0_L =
new G4LogicalVolume(pf_side_0, m_M_Permaglas,
"pf_side_0_L", 0, 0, 0);
2074 G4LogicalVolume* pf_side_1_L =
new G4LogicalVolume(pf_side_1, m_M_Permaglas,
"pf_side_1_L", 0, 0, 0);
2076 G4LogicalVolume* sh_L =
new G4LogicalVolume(sh, m_M_Aluminum,
"sh_L", 0, 0, 0);
2078 G4LogicalVolume* cbe_brick_L =
new G4LogicalVolume(cbe_brick, m_M_Permaglas,
"cbe_brick_L", 0, 0, 0);
2081 G4VisAttributes Al_attributes;
2082 Al_attributes.SetForceSolid(
true);
2083 Al_attributes.SetColor(G4Color::Grey());
2084 as_L1_1_L->SetVisAttributes(Al_attributes);
2085 as_L1_2_L->SetVisAttributes(Al_attributes);
2086 as_L1_3_L->SetVisAttributes(Al_attributes);
2088 as_L2_2_L->SetVisAttributes(Al_attributes);
2089 as_L2_3_L->SetVisAttributes(Al_attributes);
2090 as_L2_5_L->SetVisAttributes(Al_attributes);
2092 as_L3_3_L->SetVisAttributes(Al_attributes);
2093 as_L3_5_L->SetVisAttributes(Al_attributes);
2095 ef_1_a_L->SetVisAttributes(Al_attributes);
2096 ef_2_a_L->SetVisAttributes(Al_attributes);
2097 ef_3_L->SetVisAttributes(Al_attributes);
2098 ef_4_L->SetVisAttributes(Al_attributes);
2100 pf_arc_L->SetVisAttributes(Al_attributes);
2101 pf_brick_L->SetVisAttributes(Al_attributes);
2103 sh_L->SetVisAttributes(Al_attributes);
2106 G4VisAttributes PER_attributes;
2107 PER_attributes.SetForceSolid(
true);
2108 PER_attributes.SetColor(G4Color::Yellow());
2110 as_L1_4_L->SetVisAttributes(PER_attributes);
2112 as_L2_1_L->SetVisAttributes(PER_attributes);
2113 as_L2_4_L->SetVisAttributes(PER_attributes);
2115 as_L3_1_L->SetVisAttributes(PER_attributes);
2116 as_L3_2_L->SetVisAttributes(PER_attributes);
2117 as_L3_4_L->SetVisAttributes(PER_attributes);
2119 cfo_1_L->SetVisAttributes(PER_attributes);
2120 cfo_2_L->SetVisAttributes(PER_attributes);
2121 cfo_brick_L->SetVisAttributes(PER_attributes);
2122 cbe_brick_L->SetVisAttributes(PER_attributes);
2124 pf_1_L->SetVisAttributes(PER_attributes);
2125 pf_2_L->SetVisAttributes(PER_attributes);
2126 pf_3_L->SetVisAttributes(PER_attributes);
2127 pf_side_0_L->SetVisAttributes(PER_attributes);
2128 pf_side_1_L->SetVisAttributes(PER_attributes);
2187 G4AssemblyVolume *common_supp =
new G4AssemblyVolume();
2189 G4ThreeVector position;
2192 position.set(0, 0, (z_as_L1_1_eP - zref) * CLHEP::mm);
2193 common_supp->AddPlacedVolume(as_L1_1_L, position, 0);
2194 position.set(0, 0, (z_as_L1_2_eP - zref)*CLHEP::mm);
2195 common_supp->AddPlacedVolume(as_L1_2_L, position, 0);
2196 position.set(0, 0, (z_as_L1_3_eP - zref)*CLHEP::mm);
2197 common_supp->AddPlacedVolume(as_L1_3_L, position, 0);
2198 position.set(0, 0, (z_as_L1_4_eP - zref)*CLHEP::mm);
2199 common_supp->AddPlacedVolume(as_L1_4_L, position, 0);
2202 position.set(0, 0, (z_as_L2_1_eP - zref)*CLHEP::mm);
2203 common_supp->AddPlacedVolume(as_L2_1_L, position, 0);
2204 position.set(0, 0, (z_as_L2_2_eP - zref)*CLHEP::mm);
2205 common_supp->AddPlacedVolume(as_L2_2_L, position, 0);
2206 position.set(0, 0, (z_as_L2_3_eP - zref)*CLHEP::mm);
2207 common_supp->AddPlacedVolume(as_L2_3_L, position, 0);
2208 position.set(0, 0, (z_as_L2_4_eP - zref)*CLHEP::mm);
2209 common_supp->AddPlacedVolume(as_L2_4_L, position, 0);
2210 position.set(0, 0, (z_as_L2_5_eP - zref)*CLHEP::mm);
2211 common_supp->AddPlacedVolume(as_L2_5_L, position, 0);
2215 position.set(0, 0, (z_as_L3_1_eP - zref)*CLHEP::mm);
2216 common_supp->AddPlacedVolume(as_L3_1_L, position, 0);
2217 position.set(0, 0, (z_as_L3_2_eP - zref)*CLHEP::mm);
2218 common_supp->AddPlacedVolume(as_L3_2_L, position, 0);
2219 position.set(0, 0, (z_as_L3_3_eP - zref)*CLHEP::mm);
2220 common_supp->AddPlacedVolume(as_L3_3_L, position, 0);
2221 position.set(0, 0, (z_as_L3_4_eP - zref)*CLHEP::mm);
2222 common_supp->AddPlacedVolume(as_L3_4_L, position, 0);
2223 position.set(0, 0, (z_as_L3_5_eP - zref)*CLHEP::mm);
2224 common_supp->AddPlacedVolume(as_L3_5_L, position, 0);
2228 position.set(0, 0, (z_cfo_1_eP - zref)*CLHEP::mm);
2229 common_supp->AddPlacedVolume(cfo_1_L, position, 0);
2230 position.set(0, 0, (z_cfo_2_eP - zref)*CLHEP::mm);
2231 common_supp->AddPlacedVolume(cfo_2_L, position, 0);
2257 position.set(0, 0, z_ef_1_a_eP - zref);
2258 common_supp->AddPlacedVolume(ef_1_a_L, position, 0);
2259 position.set(0, 0, z_ef_2_a_eP - zref);
2260 common_supp->AddPlacedVolume(ef_2_a_L, position, 0);
2263 position.set(0, 0, z_pf_1_eP - zref);
2264 common_supp->AddPlacedVolume(pf_1_L, position, 0);
2265 position.set(0, 0, z_pf_2_eP - zref);
2266 common_supp->AddPlacedVolume(pf_2_L, position, 0);
2267 position.set(0, 0, z_pf_3_eP - zref);
2268 common_supp->AddPlacedVolume(pf_3_L, position, 0);
2270 position.set(0, 0, z_pf_arc_eP - zref);
2271 common_supp->AddPlacedVolume(pf_arc_L, position, 0);
2273 G4RotationMatrix *pf_arc_2_rot =
new G4RotationMatrix();
2274 pf_arc_2_rot->rotateZ(-90. *CLHEP::deg);
2275 position.set(0, 0, z_pf_arc_eP - zref);
2276 common_supp->AddPlacedVolume(pf_arc_L, position, pf_arc_2_rot);
2278 G4RotationMatrix *pf_arc_3_rot =
new G4RotationMatrix();
2279 pf_arc_3_rot->rotateZ(-180. *CLHEP::deg);
2280 position.set(0, 0, z_pf_arc_eP - zref);
2281 common_supp->AddPlacedVolume(pf_arc_L, position, pf_arc_3_rot);
2283 G4RotationMatrix *pf_arc_4_rot =
new G4RotationMatrix();
2284 pf_arc_4_rot->rotateZ(-270. *CLHEP::deg);
2285 position.set(0, 0, z_pf_arc_eP - zref);
2286 common_supp->AddPlacedVolume(pf_arc_L, position, pf_arc_4_rot);
2288 double pf_angle = 45 *CLHEP::deg;
double pf_rad = pf_side_1_0_rout + 0.5*pf_brick_y;
2289 position.set(pf_rad *
cos(pf_angle), pf_rad *
sin(pf_angle), z_pf_brick_eP - zref);
2290 G4RotationMatrix *pf_brick_1_rot =
new G4RotationMatrix();
2291 pf_brick_1_rot->rotateZ(-pf_angle);
2292 common_supp->AddPlacedVolume(pf_brick_L, position, pf_brick_1_rot);
2294 position.set(pf_rad *
cos(3*pf_angle), pf_rad *
sin(3*pf_angle), z_pf_brick_eP - zref);
2295 G4RotationMatrix *pf_brick_2_rot =
new G4RotationMatrix();
2296 pf_brick_2_rot->rotateZ(pf_angle);
2297 common_supp->AddPlacedVolume(pf_brick_L, position, pf_brick_2_rot);
2299 position.set(pf_rad *
cos(5*pf_angle), pf_rad *
sin(5*pf_angle), z_pf_brick_eP - zref);
2300 G4RotationMatrix *pf_brick_3_rot =
new G4RotationMatrix();
2301 pf_brick_3_rot->rotateZ(3*pf_angle);
2302 common_supp->AddPlacedVolume(pf_brick_L, position, pf_brick_3_rot);
2304 position.set(pf_rad *
cos(7*pf_angle), pf_rad *
sin(7*pf_angle), z_pf_brick_eP - zref);
2305 G4RotationMatrix *pf_brick_4_rot =
new G4RotationMatrix();
2306 pf_brick_4_rot->rotateZ(-3*pf_angle);
2307 common_supp->AddPlacedVolume(pf_brick_L, position, pf_brick_4_rot);
2309 double pf_side_0_angle = 45. *CLHEP::deg;
2311 position.set(0, 0, z_pf_side_0_eP - zref);
2312 G4RotationMatrix * pf_side_0_1_rot =
new G4RotationMatrix();
2313 pf_side_0_1_rot->rotateZ(pf_side_0_angle);
2314 common_supp->AddPlacedVolume(pf_side_0_L, position, pf_side_0_1_rot);
2315 position.set(0, 0, z_pf_side_1_eP - zref);
2316 common_supp->AddPlacedVolume(pf_side_1_L, position, pf_side_0_1_rot);
2318 position.set(0, 0, z_pf_side_0_eP - zref);
2319 G4RotationMatrix * pf_side_0_2_rot =
new G4RotationMatrix();
2320 pf_side_0_2_rot->rotateZ(3*pf_side_0_angle);
2321 common_supp->AddPlacedVolume(pf_side_0_L, position, pf_side_0_2_rot);
2322 position.set(0, 0, z_pf_side_1_eP - zref);
2323 common_supp->AddPlacedVolume(pf_side_1_L, position, pf_side_0_2_rot);
2325 position.set(0, 0, z_pf_side_0_eP - zref);
2326 G4RotationMatrix * pf_side_0_3_rot =
new G4RotationMatrix();
2327 pf_side_0_3_rot->rotateZ(5*pf_side_0_angle);
2328 common_supp->AddPlacedVolume(pf_side_0_L, position, pf_side_0_3_rot);
2329 position.set(0, 0, z_pf_side_1_eP - zref);
2330 common_supp->AddPlacedVolume(pf_side_1_L, position, pf_side_0_3_rot);
2332 position.set(0, 0, z_pf_side_0_eP - zref);
2333 G4RotationMatrix * pf_side_0_4_rot =
new G4RotationMatrix();
2334 pf_side_0_4_rot->rotateZ(7*pf_side_0_angle);
2335 common_supp->AddPlacedVolume(pf_side_0_L, position, pf_side_0_4_rot);
2336 position.set(0, 0, z_pf_side_1_eP - zref);
2337 common_supp->AddPlacedVolume(pf_side_1_L, position, pf_side_0_4_rot);
2344 double cfo_angle = 97 *CLHEP::deg;
2345 G4RotationMatrix *cfo_brick_1_rot =
new G4RotationMatrix();
2346 cfo_brick_1_rot->rotateZ(cfo_angle);
2347 position.set(0, 0, z_cfo_2_eP - zref - 0.5 * cfo_brick_2_z + z_shift);
2348 G4VPhysicalVolume* cfo_brick_1_eP =
new G4PVPlacement(cfo_brick_1_rot, position, cfo_brick_L,
2349 "cfo_brick_1_eP", cable_e_L,
false, 0, m_CheckOverlaps);
2351 cfo_angle = 22.5 *CLHEP::deg;
2352 G4RotationMatrix *cfo_brick_2_rot =
new G4RotationMatrix();
2353 cfo_brick_2_rot->rotateZ(cfo_angle);
2354 G4VPhysicalVolume* cfo_brick_2_eP =
new G4PVPlacement(cfo_brick_2_rot, position, cfo_brick_L,
2355 "cfo_brick_2_eP", cable_e_L,
false, 1, m_CheckOverlaps);
2357 cfo_angle = 276.5 *CLHEP::deg;
2358 G4RotationMatrix *cfo_brick_3_rot =
new G4RotationMatrix();
2359 cfo_brick_3_rot->rotateZ(cfo_angle);
2360 G4VPhysicalVolume* cfo_brick_3_eP =
new G4PVPlacement(cfo_brick_3_rot, position, cfo_brick_L,
2361 "cfo_brick_3_eP", cable_e_L,
false, 2, m_CheckOverlaps);
2363 cfo_angle = 202.5 *CLHEP::deg;
2364 G4RotationMatrix *cfo_brick_4_rot =
new G4RotationMatrix();
2365 cfo_brick_4_rot->rotateZ(cfo_angle);
2366 G4VPhysicalVolume* cfo_brick_4_eP =
new G4PVPlacement(cfo_brick_4_rot, position, cfo_brick_L,
2367 "cfo_brick_4_eP", cable_e_L,
false, 3, m_CheckOverlaps);
2370 double cbe_rangle = 64.3 *CLHEP::deg;
double cbe_angle = 51.4 *CLHEP::deg;
double cbe_rad = 132.5 *CLHEP::mm;
2371 G4RotationMatrix * cbe_brick_1_rot =
new G4RotationMatrix(); cbe_brick_1_rot->rotateZ(-cbe_rangle);
2372 G4VPhysicalVolume* cbe_brick_1_eP =
new G4PVPlacement(cbe_brick_1_rot,
2373 G4ThreeVector(cbe_rad *
cos(cbe_rangle),
2374 cbe_rad *
sin(cbe_rangle),
2375 z_cbe_brick_eP - zref + z_shift),
2376 cbe_brick_L,
"cbe_brick_1_eP", cable_e_L,
false, 1, m_CheckOverlaps);
2377 G4VPhysicalVolume* cbe_brick_4_eP =
new G4PVPlacement(cbe_brick_1_rot,
2378 G4ThreeVector(cbe_rad *
cos(CLHEP::pi+cbe_rangle),
2379 cbe_rad *
sin(CLHEP::pi+cbe_rangle),
2380 z_cbe_brick_eP - zref + z_shift),
2381 cbe_brick_L,
"cbe_brick_4_eP", cable_e_L,
false, 4, m_CheckOverlaps);
2383 cbe_rangle += cbe_angle;
2384 G4RotationMatrix * cbe_brick_2_rot =
new G4RotationMatrix(); cbe_brick_2_rot->rotateZ(-cbe_rangle);
2385 G4VPhysicalVolume* cbe_brick_2_eP =
new G4PVPlacement(cbe_brick_2_rot,
2386 G4ThreeVector(cbe_rad *
cos(cbe_rangle),
2387 cbe_rad *
sin(cbe_rangle),
2388 z_cbe_brick_eP - zref + z_shift),
2389 cbe_brick_L,
"cbe_brick_2_eP", cable_e_L,
false, 2, m_CheckOverlaps);
2390 G4VPhysicalVolume* cbe_brick_5_eP =
new G4PVPlacement(cbe_brick_2_rot,
2391 G4ThreeVector(cbe_rad *
cos(CLHEP::pi+cbe_rangle),
2392 cbe_rad *
sin(CLHEP::pi+cbe_rangle),
2393 z_cbe_brick_eP - zref + z_shift),
2394 cbe_brick_L,
"cbe_brick_5_eP", cable_e_L,
false, 5, m_CheckOverlaps);
2396 cbe_rangle += cbe_angle;
2397 G4RotationMatrix * cbe_brick_3_rot =
new G4RotationMatrix(); cbe_brick_3_rot->rotateZ(-cbe_rangle);
2398 G4VPhysicalVolume* cbe_brick_3_eP =
new G4PVPlacement(cbe_brick_3_rot,
2399 G4ThreeVector(cbe_rad *
cos(cbe_rangle),
2400 cbe_rad *
sin(cbe_rangle),
2401 z_cbe_brick_eP - zref + z_shift),
2402 cbe_brick_L,
"cbe_brick_3_eP", cable_e_L,
false, 3, m_CheckOverlaps);
2403 G4VPhysicalVolume* cbe_brick_6_eP =
new G4PVPlacement(cbe_brick_3_rot,
2404 G4ThreeVector(cbe_rad *
cos(CLHEP::pi+cbe_rangle),
2405 cbe_rad *
sin(CLHEP::pi+cbe_rangle),
2406 z_cbe_brick_eP - zref + z_shift),
2407 cbe_brick_L,
"cbe_brick_6_eP", cable_e_L,
false, 6, m_CheckOverlaps);
2409 double ef_east_thick = 4;
2410 G4Tubs* ef_east =
new G4Tubs(
"ef_east", ef_2_a_rin *CLHEP::mm, ef_4_rout *CLHEP::mm, 0.5 * ef_east_thick*CLHEP::mm, 0, angle2pi);
2411 G4LogicalVolume* ef_east_L =
new G4LogicalVolume(ef_east, m_M_Aluminum,
"ef_east_L", 0, 0, 0);
2412 double z_ef_east = z_ef_1_eP + 0.5*ef_1_thick + ef_2_thick+0.5*ef_east_thick;
2413 G4VPhysicalVolume* ef_east_eP =
new G4PVPlacement(0, G4ThreeVector(0., 0., z_ef_east), ef_east_L,
"ef_east_eP", logicCgem,
false, 0, m_CheckOverlaps);
2414 ef_east_L->SetVisAttributes(Al_attributes);
2417 double cfo_w_angle = -55. *CLHEP::deg;
2418 G4RotationMatrix *cfo_w_brick_1_rot =
new G4RotationMatrix();
2419 cfo_w_brick_1_rot->rotateZ(cfo_w_angle);
2420 position.set(0, 0, z_cfo_2_eP - zref - 0.5 * cfo_brick_2_z + z_shift);
2421 G4VPhysicalVolume* cfo_w_brick_1_eP =
new G4PVPlacement(cfo_w_brick_1_rot, position, cfo_brick_L,
2422 "cfo_w_brick_1_eP", cable_w_L,
false, 1, m_CheckOverlaps);
2423 cfo_w_angle = -160 *CLHEP::deg;
2424 G4RotationMatrix *cfo_w_brick_2_rot =
new G4RotationMatrix();
2425 cfo_w_brick_2_rot->rotateZ(cfo_w_angle);
2426 G4VPhysicalVolume* cfo_w_brick_2_eP =
new G4PVPlacement(cfo_w_brick_2_rot, position, cfo_brick_L,
2427 "cfo_w_brick_2_eP", cable_w_L,
false, 2, m_CheckOverlaps);
2428 cfo_w_angle = -235 *CLHEP::deg;
2429 G4RotationMatrix *cfo_w_brick_3_rot =
new G4RotationMatrix();
2430 cfo_w_brick_3_rot->rotateZ(cfo_w_angle);
2431 G4VPhysicalVolume* cfo_w_brick_3_eP =
new G4PVPlacement(cfo_w_brick_3_rot, position, cfo_brick_L,
2432 "cfo_w_brick_3_eP", cable_w_L,
false, 3, m_CheckOverlaps);
2433 cfo_w_angle = -340. *CLHEP::deg;
2434 G4RotationMatrix *cfo_w_brick_4_rot =
new G4RotationMatrix();
2435 cfo_w_brick_4_rot->rotateZ(cfo_w_angle);
2436 G4VPhysicalVolume* cfo_w_brick_4_eP =
new G4PVPlacement(cfo_w_brick_4_rot, position, cfo_brick_L,
2437 "cfo_w_brick_4_eP", cable_w_L,
false, 4, m_CheckOverlaps);
2439 G4Tubs* nwr_1_a =
new G4Tubs(
"nwr_1_a", nwr_1_a_rin *CLHEP::mm, nwr_1_a_rout *CLHEP::mm, 0.5 * nwr_1_a_thick *CLHEP::mm, 0, angle2pi);
2440 G4Tubs* nwr_1_b =
new G4Tubs(
"nwr_1_b", nwr_1_b_rin *CLHEP::mm, nwr_1_b_rout *CLHEP::mm, 0.5 * nwr_1_b_thick *CLHEP::mm, 0, angle2pi);
2441 G4Tubs* nwr_2 =
new G4Tubs(
"nwr_2", nwr_2_rin *CLHEP::mm, nwr_2_rout *CLHEP::mm, 0.5 * nwr_2_thick *CLHEP::mm, 0, angle2pi);
2444 G4Box *w_brick =
new G4Box(
"w_brick", 0.5 * w_brick_x *CLHEP::mm, 0.5 * w_brick_y *CLHEP::mm, 0.5* w_brick_z *CLHEP::mm);
2447 G4LogicalVolume* nwr_1_a_L =
new G4LogicalVolume(nwr_1_a, m_M_Aluminum,
"nwr_1_a_L", 0, 0, 0);
2448 G4LogicalVolume* nwr_1_b_L =
new G4LogicalVolume(nwr_1_b, m_M_Aluminum,
"nwr_1_b_L", 0, 0, 0);
2449 G4LogicalVolume* nwr_2_L =
new G4LogicalVolume(nwr_2, m_M_Aluminum,
"nwr_2_L", 0, 0, 0);
2450 G4LogicalVolume* w_brick_L =
new G4LogicalVolume(w_brick, m_M_Permaglas,
"w_brick_L", 0, 0, 0);
2452 nwr_1_a_L->SetVisAttributes(Al_attributes);
2453 nwr_1_b_L->SetVisAttributes(Al_attributes);
2454 nwr_2_L->SetVisAttributes(Al_attributes);
2455 w_brick_L->SetVisAttributes(PER_attributes);
2458 G4VPhysicalVolume* nwr_1_a_wP =
new G4PVPlacement(0, G4ThreeVector(0, 0, z_nwr_1_wP - zref_w + z_shift), nwr_1_a_L,
"nwr_1_a_wP", cable_w_L,
false, 0, m_CheckOverlaps);
2460 double w_rangle = 38.6 *CLHEP::deg;
double w_angle = 25.7 *CLHEP::deg;
double w_rad = 133.25 *CLHEP::mm;
2461 G4RotationMatrix * w_brick_1_rot =
new G4RotationMatrix(); w_brick_1_rot->rotateZ(-w_rangle);
2462 G4VPhysicalVolume* w_brick_1_wP =
new G4PVPlacement(w_brick_1_rot,
2463 G4ThreeVector(w_rad *
cos(w_rangle),
2464 w_rad *
sin(w_rangle),
2465 z_w_brick_wP - zref_w + z_shift),
2466 w_brick_L,
"w_brick_1_wP", cable_w_L,
false, 1, m_CheckOverlaps);
2467 G4VPhysicalVolume* w_brick_5_wP =
new G4PVPlacement(w_brick_1_rot,
2468 G4ThreeVector(w_rad *
cos(CLHEP::pi+w_rangle),
2469 w_rad *
sin(CLHEP::pi+w_rangle),
2470 z_w_brick_wP - zref_w + z_shift),
2471 w_brick_L,
"w_brick_5_wP", cable_w_L,
false, 5, m_CheckOverlaps);
2473 w_rangle += w_angle;
2474 G4RotationMatrix * w_brick_2_rot =
new G4RotationMatrix(); w_brick_2_rot->rotateZ(-w_rangle);
2475 G4VPhysicalVolume* w_brick_2_wP =
new G4PVPlacement(w_brick_2_rot,
2476 G4ThreeVector(w_rad *
cos(w_rangle),
2477 w_rad *
sin(w_rangle),
2478 z_w_brick_wP - zref_w + z_shift),
2479 w_brick_L,
"w_brick_2_wP", cable_w_L,
false, 2, m_CheckOverlaps);
2480 G4VPhysicalVolume* w_brick_6_wP =
new G4PVPlacement(w_brick_2_rot,
2481 G4ThreeVector(w_rad *
cos(CLHEP::pi+w_rangle),
2482 w_rad *
sin(CLHEP::pi+w_rangle),
2483 z_w_brick_wP - zref_w + z_shift),
2484 w_brick_L,
"w_brick_6_wP", cable_w_L,
false, 6, m_CheckOverlaps);
2486 w_rangle += w_angle;
2487 G4RotationMatrix * w_brick_3_rot =
new G4RotationMatrix(); w_brick_3_rot->rotateZ(-w_rangle);
2488 G4VPhysicalVolume* w_brick_3_wP =
new G4PVPlacement(w_brick_3_rot,
2489 G4ThreeVector(w_rad *
cos(w_rangle),
2490 w_rad *
sin(w_rangle),
2491 z_w_brick_wP - zref_w + z_shift),
2492 w_brick_L,
"w_brick_3_wP", cable_w_L,
false, 3, m_CheckOverlaps);
2493 G4VPhysicalVolume* w_brick_7_wP =
new G4PVPlacement(w_brick_3_rot,
2494 G4ThreeVector(w_rad *
cos(CLHEP::pi+w_rangle),
2495 w_rad *
sin(CLHEP::pi+w_rangle),
2496 z_w_brick_wP - zref_w + z_shift),
2497 w_brick_L,
"w_brick_7_wP", cable_w_L,
false, 7,m_CheckOverlaps);
2499 w_rangle += w_angle;
2500 G4RotationMatrix * w_brick_4_rot =
new G4RotationMatrix(); w_brick_4_rot->rotateZ(-w_rangle);
2501 G4VPhysicalVolume* w_brick_4_wP =
new G4PVPlacement(w_brick_4_rot,
2502 G4ThreeVector(w_rad *
cos(w_rangle),
2503 w_rad *
sin(w_rangle),
2504 z_w_brick_wP - zref_w + z_shift),
2505 w_brick_L,
"w_brick_4_wP", cable_w_L,
false, 4, m_CheckOverlaps);
2506 G4VPhysicalVolume* w_brick_8_wP =
new G4PVPlacement(w_brick_4_rot,
2507 G4ThreeVector(w_rad *
cos(CLHEP::pi+w_rangle),
2508 w_rad *
sin(CLHEP::pi+w_rangle),
2509 z_w_brick_wP - zref_w + z_shift),
2510 w_brick_L,
"w_brick_8_wP", cable_w_L,
false, 8, m_CheckOverlaps);
2516 G4ThreeVector pos(0, 0, z_shift);
2519 common_supp->MakeImprint(cable_e_L, pos, 0, m_CheckOverlaps);
2520 G4VPhysicalVolume* cable_e_P =
new G4PVPlacement(0, G4ThreeVector(0, 0, zref), cable_e_L,
"cable_e_P", logicCgem, lv_boolen, lv_copyNo, m_CheckOverlaps);
2522 pos.set(0, 0, z_ef_3_eP);
2523 G4VPhysicalVolume* ef_3_eP =
new G4PVPlacement(0, pos, ef_3_L,
"ef_3_eP", logicCgem, 0, 0, m_CheckOverlaps);
2524 pos.set(0, 0, z_ef_4_eP);
2525 G4VPhysicalVolume* ef_4_eP =
new G4PVPlacement(0, pos, ef_4_L,
"ef_4_eP", logicCgem, 0, 0, m_CheckOverlaps);
2540 pos.set(0, 0, z_shift);
2541 common_supp->MakeImprint(cable_w_L, pos, 0, m_CheckOverlaps);
2542 G4RotationMatrix *rot_west =
new G4RotationMatrix();
2543 rot_west->rotateX(180 *CLHEP::deg);
2544 G4VPhysicalVolume* cable_w_P =
new G4PVPlacement(rot_west, G4ThreeVector(0, 0, -zref), cable_w_L,
"cable_w_P", logicCgem, lv_boolen, lv_copyNo, m_CheckOverlaps);
2546 pos.set(0, 0, -z_ef_3_eP);
2547 G4VPhysicalVolume* ef_3_wP =
new G4PVPlacement(rot_west, pos, ef_3_L,
"ef_3_wP", logicCgem, 0, 1, m_CheckOverlaps);
2548 pos.set(0, 0, -z_ef_4_eP);
2549 G4VPhysicalVolume* ef_4_wP =
new G4PVPlacement(rot_west, pos, ef_4_L,
"ef_4_wP", logicCgem, 0, 1, m_CheckOverlaps);
2551 pos.set(0, 0, -(z_nwr_1_wP+z_shift));
2552 G4VPhysicalVolume* nwr_1_b_wP =
new G4PVPlacement(0, pos, nwr_1_b_L,
"nwr_1_b_wP", logicCgem,
false, 0, m_CheckOverlaps);
2553 bool ovl = nwr_1_b_wP->CheckOverlaps();
2556 pos.set(0, 0, -(z_nwr_2_wP+z_shift));
2557 G4VPhysicalVolume* nwr_2_wP =
new G4PVPlacement(rot_west, pos, nwr_2_L,
"nwr_2_wP", logicCgem,
false, 0, m_CheckOverlaps);
2558 ovl= nwr_2_wP->CheckOverlaps();
2563void BesCgemConstruction::ConstructMaterial()
2566 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
2567 MsgStream log(
msgSvc,
"BesCgemConstruction::ConstructMaterial()");
2568 log<< MSG::INFO <<
"INFO : BesCgemConstruction::ConstructMaterial(), Construct Material needed by Cgem!" << endreq;
2571 G4NistManager *gv_NistManager = G4NistManager::Instance();
2574 m_M_Air = gv_NistManager -> FindOrBuildMaterial(
"G4_AIR");
2577 m_M_Cu = gv_NistManager -> FindOrBuildMaterial(
"G4_Cu");
2580 m_M_Kapton = gv_NistManager -> FindOrBuildMaterial(
"G4_KAPTON");
2586 G4double lvd_density;
2587 G4double lvd_fractionmass;
2604 lvs_name =
"CgemGas";
2605 lvd_density = 0.0017451520*g/cm3;
2607 G4Material *lv_Ar = gv_NistManager->FindOrBuildMaterial(
"G4_Ar");
2608 G4Material *lv_C4H10 = gv_NistManager->FindOrBuildMaterial(
"G4_BUTANE");
2609 m_M_CgemGas =
new G4Material(lvs_name, lvd_density, lvi_element);
2610 m_M_CgemGas -> AddMaterial(lv_Ar , lvd_fractionmass=0.85712247);
2611 m_M_CgemGas -> AddMaterial(lv_C4H10, lvd_fractionmass=0.14287753);
2615 lvd_density = 3.2e-2*g/cm3;
2617 G4Element *
C = G4Element::GetElement(
"Carbon");
2618 G4Element *
H = G4Element::GetElement(
"Hydrogen");
2619 G4Element *O = G4Element::GetElement(
"Oxygen");
2620 G4Element *N = G4Element::GetElement(
"Nitrogen");
2621 m_M_Honeycomb =
new G4Material(lvs_name, lvd_density, lvi_element);
2622 m_M_Honeycomb -> AddElement(
C, lvi_natoms=14);
2623 m_M_Honeycomb -> AddElement(
H, lvi_natoms=22);
2624 m_M_Honeycomb -> AddElement(O, lvi_natoms=2 );
2625 m_M_Honeycomb -> AddElement(N, lvi_natoms=2 );
2628 lvs_name =
"Rohacell31";
2629 lvd_density = 3.e-2*g/cm3;
2635 m_M_Rohacell =
new G4Material(lvs_name, lvd_density, lvi_element);
2636 m_M_Rohacell -> AddElement(
C, lvi_natoms=9);
2637 m_M_Rohacell -> AddElement(
H, lvi_natoms=13);
2638 m_M_Rohacell -> AddElement(O, lvi_natoms=2 );
2639 m_M_Rohacell -> AddElement(N, lvi_natoms=1 );
2643 lvd_density = 1.25*g/cm3;
2645 m_M_Epoxy =
new G4Material(lvs_name, lvd_density, lvi_element);
2646 m_M_Epoxy -> AddElement(
C, lvi_natoms=18);
2647 m_M_Epoxy -> AddElement(
H, lvi_natoms=31);
2648 m_M_Epoxy -> AddElement(O, lvi_natoms=3 );
2651 lvs_name =
"CarbonFiber";
2652 lvd_density = 1.57*g/cm3;
2654 m_M_CarbonFiber =
new G4Material(lvs_name, lvd_density, lvi_element);
2655 m_M_CarbonFiber -> AddElement(
C, 0.697 );
2656 m_M_CarbonFiber -> AddElement(
H, 0.0061);
2657 m_M_CarbonFiber -> AddElement(O, 0.2969);
2667 G4Material* SiO2 = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_SILICON_DIOXIDE");
2668 G4Material* B2O3 = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_BORON_OXIDE");
2669 G4Material* Al2O3 = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_ALUMINUM_OXIDE");
2670 G4Material* CaO = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_CALCIUM_OXIDE");
2672 lvs_name =
"Fiberglass";
2673 lvd_density = 1.99*g/cm3;;
2675 G4Material *m_M_Fiberglass =
new G4Material(lvs_name, lvd_density, lvi_element);
2676 m_M_Fiberglass->AddMaterial(SiO2, 0.6);
2677 m_M_Fiberglass->AddMaterial(B2O3, 0.05);
2678 m_M_Fiberglass->AddMaterial(Al2O3, 0.13);
2679 m_M_Fiberglass->AddMaterial(CaO, 0.22);
2683 lvs_name =
"Permaglas";
2684 lvd_density = 1.97*g/cm3;
2686 m_M_Permaglas =
new G4Material(lvs_name, lvd_density, lvi_element);
2687 m_M_Permaglas->AddMaterial(m_M_Fiberglass, 0.6);
2688 m_M_Permaglas->AddMaterial(m_M_Epoxy, 0.4);
2691 m_M_Aluminum= G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Al");
2697 log<< MSG::INFO <<
"BesCgemConstruction::ConstructMaterial(), check if effective density for HOLES is used : " << m_cgem_geomsvc->
isEffDensityHoles() << endreq;
2698 log<< MSG::INFO <<
"BesCgemConstruction::ConstructMaterial(), check if effective density for STRIPS is used : " << m_cgem_geomsvc->
isEffDensityStrips() << endreq;
2701 G4Material *myCu = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Cu");
2702 lvs_name =
"G4_Cu_GEMFoils";
2703 lvd_density = 8.960*g/cm3;
2705 lvd_density = 6.44708*g/cm3;
2707 m_M_Cu_GEMFoils =
new G4Material(lvs_name, lvd_density, lvi_element);
2708 m_M_Cu_GEMFoils->AddMaterial(myCu, 1.0);
2710 lvs_name =
"G4_Cu_AnodeStripX";
2711 lvd_density = 8.960*g/cm3;
2713 lvd_density = 7.88*g/cm3;
2715 m_M_Cu_AnodeStripX =
new G4Material(lvs_name, lvd_density, lvi_element);
2716 m_M_Cu_AnodeStripX->AddMaterial(myCu, 1.0);
2718 lvs_name =
"G4_Cu_AnodeStripV";
2719 lvd_density = 8.960*g/cm3;
2721 lvd_density = 1.77*g/cm3;
2723 m_M_Cu_AnodeStripV =
new G4Material(lvs_name, lvd_density, lvi_element);
2724 m_M_Cu_AnodeStripV->AddMaterial(myCu, 1.0);
2726 G4Material *myKapton = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_KAPTON");
2727 lvs_name =
"G4_KAPTON_GEMFoils";
2728 lvd_density = 1.420*g/cm3;
2730 lvd_density = 1.14794*g/cm3;
2732 m_M_Kapton_GEMFoils =
new G4Material(lvs_name, lvd_density, lvi_element);
2733 m_M_Kapton_GEMFoils->AddMaterial(myKapton, 1.0);
2735 lvs_name =
"G4_KAPTON_StripV";
2736 lvd_density = 1.420*g/cm3;
2738 lvd_density = 0.284*g/cm3;
2740 m_M_Kapton_StripV =
new G4Material(lvs_name, lvd_density, lvi_element);
2741 m_M_Kapton_StripV->AddMaterial(myKapton, 1.0);
2757void BesCgemConstruction::Print(G4LogicalVolume* f_LV)
2760 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
2761 MsgStream log(
msgSvc,
"BesCgemConstruction::Print()");
2762 G4Material *lv_M = f_LV->GetMaterial();
2763 G4Tubs *lv_tub =
dynamic_cast<G4Tubs*
>(f_LV->GetSolid());
2764 G4double lvd_M_Z = 0.;
2765 G4double lvd_M_A = 0.;
2766 for (G4int i = 0; i < lv_M->GetElementVector()->size(); i++)
2768 lvd_M_Z += (lv_M->GetElement(i)->GetZ()) * (lv_M->GetFractionVector()[i]);
2769 lvd_M_A += (lv_M->GetElement(i)->GetA()) * (lv_M->GetFractionVector()[i]);
2771 G4double lvd_ionisation = lv_M->GetIonisation()->GetMeanExcitationEnergy();
2772 G4double lvd_density = lv_M->GetDensity() / (g/cm3);
2773 G4double lvd_X0 = lv_M->GetRadlen() / (mm);
2774 G4double lvd_R_i = lv_tub->GetInnerRadius() / (mm);
2775 G4double lvd_R_o = lv_tub->GetOuterRadius() / (mm);
2776 G4double lvd_L = lv_tub->GetZHalfLength() / (mm) * 2.0;
2778 log<< MSG::INFO <<
"BesCgemConstruction::Print(), Construct Detector Volume : " << f_LV->GetName() << endreq;
2779 log<< MSG::INFO << left << setw(10) <<
"Material "
2780 << left << setw(10) <<
"Z "
2781 << left << setw(10) <<
"A "
2782 << left << setw(11) <<
"Ionisation "
2783 << left << setw(12) <<
"Density "
2784 << left << setw(10) <<
"X0 "
2785 << left << setw(10) <<
"Inner R "
2786 << left << setw(10) <<
"Outer R "
2787 << left << setw(10) <<
"Length" << endreq;
2788 log<< MSG::INFO << left << setw(10) << lv_M->GetName()
2789 << left << setw(10) << lvd_M_Z
2790 << left << setw(10) << lvd_M_A / (g/mole)
2791 << left << setw(11) << lvd_ionisation / eV
2792 << left << setw(12) << lvd_density
2793 << left << setw(10) << lvd_X0
2794 << left << setw(10) << lvd_R_i
2795 << left << setw(10) << lvd_R_o
2796 << left << setw(10) << lvd_L
2798 log<< MSG::INFO << left <<
" " << endreq;
double tan(const BesAngle a)
double sin(const BesAngle a)
double cos(const BesAngle a)
***************************************************************************************Pseudo Class RRes *****************************************************************************************Parameters and physical constants **Maarten sept ************************************************************************DOUBLE PRECISION xsmu **************************************************************************PARTICLE DATA all others are from PDG *Only resonances with known widths into electron pairs are sept ************************************************************************C Declarations C
void Construct(G4LogicalVolume *)
void setGeomPtr(CgemGeomSvc *geomSvc)
void SetTiltAngle(double tangle)
void SetAnodeLength(double alength)
void SetSliceLength(double slength)
double getOuterROfCgemFoilCu1() const
double getInnerROfCgemFoilCu2() const
double getOuterR2OfCgemFoilHole() const
double getOuterROfCgemFoilKapton() const
double getInnerROfCgemFoil() const
double getInnerROfCgemFoilHole() const
double getInnerROfCgemFoilCu1() const
double getInnerROfCgemFoilKapton() const
double getOuterROfCgemFoilCu2() const
double getOuterROfCgemFoil() const
double getOuterR1OfCgemFoilHole() const
double getLengthOfCgemFoilHole() const
double getOuterROfAnodeCu1() const
double getInnerROfCathode() const
double getInnerROfAnodeEpoxy4() const
double getInnerROfAnodeEpoxy1() const
CgemGeoFoil * getCgemFoil(int i) const
double getInnerROfCathodeKapton2() const
double getInnerROfCathodeEpoxy0() const
double getWidthOfPitchV() const
double getOuterROfCathodeEpoxy4() const
double getInnerROfGapI() const
double getOuterROfAnodeCarbonf1() const
double getWidthOfStripV() const
double getOuterROfGapD() const
double getInnerROfCathodeKapton3() const
double getInnerROfAnodeHoneycomb() const
double getOuterROfAnodeEpoxy2() const
double getInnerROfGapT1() const
double getInnerROfCathodeCu1() const
double getLengthOfCgemLayer() const
double getOuterROfCathodeEpoxy1() const
double getInnerROfCathodeCu2() const
double getInnerROfCathodeEpoxy2() const
double getInnerROfAnodeKapton6() const
double getOuterROfCathodeKapton1() const
double getOuterROfAnodeHoneycomb() const
double getOuterROfAnodeKapton2() const
double getInnerROfCathodeEpoxy4() const
double getOuterROfAnodeCu4() const
double getOuterROfAnodeKapton1() const
double getOuterROfCathodeCu2() const
double getInnerROfAnodeCu1() const
double getInnerROfAnodeKapton2() const
double getInnerROfCgemLayer() const
double getOuterROfCathodeEpoxy3() const
double getInnerROfAnode() const
double getInnerROfGapT2() const
double getWidthOfStripX() const
double getOuterROfAnodeRohacell1() const
double getOuterROfGapT1() const
double getOuterROfCathodeRohacell2() const
double getOuterROfCathodeCarbonf() const
double getOuterROfGapT2() const
double getInnerROfAnodeCu3() const
double getOuterROfAnodeCu3() const
double getInnerROfCathodeEpoxy3() const
double getOuterROfAnodeKapton3() const
double getOuterROfAnode() const
double getOuterROfCathodeCu1() const
double getOuterROfCathodeKapton3() const
double getInnerROfAnodeRohacell1() const
double getOuterROfCathode() const
double getOuterROfAnodeEpoxy1() const
double getInnerROfAnodeEpoxy2() const
double getOuterROfCathodeRohacell1() const
double getOuterROfAnodeEpoxy4() const
double getInnerROfAnodeCu4() const
double getOuterROfAnodeCarbonf2() const
double getOuterROfGapI() const
double getInnerROfAnodeRohacell2() const
double getOuterROfCgemLayer() const
double getInnerROfCathodeCarbonf() const
double getAngleOfStereo() const
double getInnerROfAnodeCarbonf1() const
double getInnerROfAnodeEpoxy3() const
double getOuterROfAnodeEpoxy5() const
double getInnerROfCathodeKapton1() const
double getWidthOfPitchX() const
double getInnerROfAnodeKapton3() const
double getInnerROfCathodeEpoxy1() const
double getInnerROfAnodeKapton4() const
double getInnerROfAnodeEpoxy5() const
double getOuterROfAnodeCu2() const
double getInnerROfGapD() const
double getInnerROfAnodeCarbonf2() const
double getInnerROfAnodeKapton5() const
double getOuterROfAnodeEpoxy3() const
double getInnerROfAnodeKapton1() const
double getOuterROfCathodeEpoxy2() const
double getInnerROfAnodeCu2() const
double getOuterROfCathodeHoneycomb() const
double getOuterROfCathodeKapton2() const
double getOuterROfAnodeKapton4() const
double getInnerROfCathodeHoneycomb() const
double getInnerROfCathodeRohacell1() const
double getOuterROfAnodeKapton5() const
double getInnerROfCathodeRohacell2() const
double getOuterROfAnodeRohacell2() const
double getOuterROfAnodeKapton6() const
double getOuterROfCathodeEpoxy0() const
double getThickOfOuterAluminum() const
double getThickOfInnerAluminum() const
double getThickOfCarbonFiber() const
int getNumberOfCgemFoil() const
bool isVStripDescriptionOn() const
bool isXStripDescriptionOn() const
string getMaterialOfAnode(int i) const
bool isEffDensityHoles() const
string getMaterialOfCathode(int i) const
CgemGeoLayer * getCgemLayer(int i) const
double getDensityOfCable() const
double getLengthOfCgem() const
int getNumberOfCgemLayer() const
double getOuterROfCgem() const
double getInnerROfCgem() const
CgemGeoSeparator * getCgemSeparator() const
int getNMaterialsAnode() const
bool isEffDensityStrips() const
int getNMaterialsCathode() const