Belle II Software development
PlumeCreator Class Reference

The creator for the PLUME geometry. More...

#include <PlumeCreator.h>

Inheritance diagram for PlumeCreator:
CreatorBase

Public Member Functions

 PlumeCreator ()
 Constructor.
 
virtual ~PlumeCreator ()
 Destructor.
 
virtual void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
 Creation of the detector geometry from Gearbox (XML).
 
 BELLE2_DEFINE_EXCEPTION (DBNotImplemented, "Cannot create geometry from Database.")
 Exception that will be thrown in createFromDB if member is not yet implemented by creator.
 
virtual void createFromDB (const std::string &name, G4LogicalVolume &topVolume, GeometryTypes type)
 Function to create the geometry from the Database.
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov)
 Function to create the geometry database.
 

Protected Member Functions

G4AssemblyVolume * buildSupport1 ()
 Volume of support1.
 
G4AssemblyVolume * buildSupport2 ()
 Volume of support2.
 
G4AssemblyVolume * buildSupport3 ()
 Volume of support3.
 
G4AssemblyVolume * buildSupport4 ()
 Volume of support4.
 

Protected Attributes

SensitiveDetectorm_sensitive
 SensitiveDetector PLUME.
 

Detailed Description

The creator for the PLUME geometry.

Definition at line 28 of file PlumeCreator.h.

Constructor & Destructor Documentation

◆ PlumeCreator()

Constructor.

Definition at line 52 of file PlumeCreator.cc.

52 : m_sensitive(0)
53 {
54 //m_sensitive = new SensitiveDetector();
55 }
SensitiveDetector * m_sensitive
SensitiveDetector PLUME.
Definition: PlumeCreator.h:47

◆ ~PlumeCreator()

~PlumeCreator ( )
virtual

Destructor.

Definition at line 57 of file PlumeCreator.cc.

58 {
59 if (m_sensitive) delete m_sensitive;
60 }

Member Function Documentation

◆ buildSupport1()

G4AssemblyVolume * buildSupport1 ( )
protected

Volume of support1.

Definition at line 364 of file PlumeCreator.cc.

365 {
366
367 std::vector<G4TwoVector> points = {G4TwoVector(-11.6, 0.371), G4TwoVector(-11.504, -2.378), G4TwoVector(-1.51, -2.029), G4TwoVector(-1.51, -4.13), G4TwoVector(-11.561, -4.481), G4TwoVector(-11.686, -6.629), G4TwoVector(2.584, -6.629), G4TwoVector(4.974, -4.239), G4TwoVector(4.974, 1.761), G4TwoVector(2.0, 1.761), G4TwoVector(0.61, 0.371)};
368
369 G4Material* peek = G4Material::GetMaterial("plumePeek");
370 G4ExtrudedSolid* s1_peek0 = new G4ExtrudedSolid("s1_peek0", points, 10.0, G4TwoVector(0, 0), 1, G4TwoVector(0, 0), 1);
371 G4LogicalVolume* l1_peek0 = new G4LogicalVolume(s1_peek0, peek, "PLUME.l1_peek0");
372
373 G4Box* s1_peek1 = new G4Box("s1_peek1", 24. / 2., 6. / 2., 20. / 2.);
374 G4Box* s1_peek2 = new G4Box("s1_peek2", 19.4 / 2., 3. / 2., 20. / 2.);
375 G4LogicalVolume* l1_peek1 = new G4LogicalVolume(s1_peek1, peek, "PLUME.l1_peek1");
376 G4LogicalVolume* l1_peek2 = new G4LogicalVolume(s1_peek2, peek, "PLUME.l1_peek2");
377
378 G4AssemblyVolume* assemblySup = new G4AssemblyVolume();
379
380 G4Transform3D transform = G4Translate3D(0, 0., 0);
381
382 assemblySup->AddPlacedVolume(l1_peek1, transform);
383
384 transform = G4Translate3D(-16.974, 1.239, 0);
385 assemblySup->AddPlacedVolume(l1_peek0, transform);
386
387 transform = G4Translate3D(21.7, 1.5, 0);
388 assemblySup->AddPlacedVolume(l1_peek2, transform);
389
390 G4Trd* s1_al0 = new G4Trd("s1_al0", 12. / 2., 20. / 2., 3. / 2., 3. / 2., 94.5 / 2.);
391 G4Box* s1_al1 = new G4Box("s1_al1", 12. / 2., 20.5 / 2., 3.5 / 2.);
392 G4Box* s1_al2 = new G4Box("s1_al2", 12. / 2., 4.0 / 2., 10.5 / 2.);
393
394 G4LogicalVolume* l1_al0 = new G4LogicalVolume(s1_al0, geometry::Materials::get("Al"), "PLUME.l1_al0");
395 G4LogicalVolume* l1_al1 = new G4LogicalVolume(s1_al1, geometry::Materials::get("Al"), "PLUME.l1_al1");
396 G4LogicalVolume* l1_al2 = new G4LogicalVolume(s1_al2, geometry::Materials::get("Al"), "PLUME.l1_al2");
397
398 transform = G4Translate3D(59.25, -1.5, 0) * G4RotateY3D(-M_PI / 2.);
399 assemblySup->AddPlacedVolume(l1_al0, transform);
400
401 transform = G4Translate3D(108.25, -20.5 / 2., 0) * G4RotateY3D(-M_PI / 2.);
402 assemblySup->AddPlacedVolume(l1_al1, transform);
403
404 transform = G4Translate3D(115.25, -18.5, 0) * G4RotateY3D(-M_PI / 2.);
405 assemblySup->AddPlacedVolume(l1_al2, transform);
406
407 return assemblySup;
408 }
static G4Material * get(const std::string &name)
Find given material.
Definition: Materials.h:63

◆ buildSupport2()

G4AssemblyVolume * buildSupport2 ( )
protected

Volume of support2.

Definition at line 411 of file PlumeCreator.cc.

412 {
413
414 std::vector<G4TwoVector> points = {G4TwoVector(-10.6, 0), G4TwoVector(-10.6, -1.7), G4TwoVector(-0.606, -2.049), G4TwoVector(-0.606, -4.15), G4TwoVector(-10.6, -3.801), G4TwoVector(-10.6, -6.11), G4TwoVector(2.28, -6.11), G4TwoVector(5.39, -3.0), G4TwoVector(23.4, -3), G4TwoVector(23.4, 0.)};
415 G4Material* peek = G4Material::GetMaterial("plumePeek");
416 G4ExtrudedSolid* s2_peek0 = new G4ExtrudedSolid("s2_peek0", points, 16.0, G4TwoVector(0, 0), 1, G4TwoVector(0, 0), 1);
417 G4LogicalVolume* l2_peek0 = new G4LogicalVolume(s2_peek0, peek, "PLUME.l2_peek0");
418
419
420 G4Box* s2_peek1 = new G4Box("s2_peek1", 10. / 2., 6.7 / 2., 12.5 / 2.);
421 G4Box* s2_peek2 = new G4Box("s2_peek2", 39.0 / 2., 4. / 2., 12.5 / 2.);
422 G4LogicalVolume* l2_peek1 = new G4LogicalVolume(s2_peek1, peek, "PLUME.l2_peek1");
423 G4LogicalVolume* l2_peek2 = new G4LogicalVolume(s2_peek2, peek, "PLUME.l2_peek2");
424
425 G4AssemblyVolume* assemblySup = new G4AssemblyVolume();
426
427 G4Transform3D transform = G4Translate3D(0, 0., 0);
428
429 assemblySup->AddPlacedVolume(l2_peek1, transform);
430
431 transform = G4Translate3D(-18.4, 6.35, 0);
432 assemblySup->AddPlacedVolume(l2_peek0, transform);
433
434 transform = G4Translate3D(24.5, -1.35, 0);
435 assemblySup->AddPlacedVolume(l2_peek2, transform);
436
437 G4Box* s2_al0 = new G4Box("s2_al0", 140. / 2., 4. / 2., 12. / 2.);
438 G4LogicalVolume* l2_al0 = new G4LogicalVolume(s2_al0, geometry::Materials::get("Al"), "PLUME.l2_al0");
439
440 transform = G4Translate3D(-26.0, -5.35, 0);
441 assemblySup->AddPlacedVolume(l2_al0, transform);
442
443 return assemblySup;
444 }

◆ buildSupport3()

G4AssemblyVolume * buildSupport3 ( )
protected

Volume of support3.

Definition at line 447 of file PlumeCreator.cc.

448 {
449
450 std::vector<G4TwoVector> points = {G4TwoVector(4.7, -59.87), G4TwoVector(/*4.109*/4.7, -68.0), G4TwoVector(19.577, -62.97), G4TwoVector(18.96, -61.07), G4TwoVector(9.449, -64.162), G4TwoVector(8.8, -62.165), G4TwoVector(18.31, -59.075), G4TwoVector(17.693, -57.172), G4TwoVector(6.655, -59.873)};
451 G4Material* peek = G4Material::GetMaterial("plumePeek");
452 G4ExtrudedSolid* s3_peek0 = new G4ExtrudedSolid("s3_peek0", points, 16.0, G4TwoVector(0, 0), 1, G4TwoVector(0, 0), 1);
453 G4LogicalVolume* l3_peek0 = new G4LogicalVolume(s3_peek0, peek, "PLUME.l3_peek0");
454
455 G4Box* s3_tmp0 = new G4Box("s3_tmp0", 5. / 2., 21.5 / 2., 32. / 2.);
456 G4Box* s3_tmp1 = new G4Box("s3_tmp1", 5.2 / 2., 6.5 / 2., 30. / 2.);
457 G4Transform3D transform = G4Translate3D(0, -1.6, 0);
458 G4SubtractionSolid* s3_peek1 = new G4SubtractionSolid("s3_peek1", s3_tmp0, s3_tmp1, transform);
459
460 G4Trd* s3_peek2 = new G4Trd("s3_peek2", 5. / 2., 5. / 2., 16., 10., 3.0);
461 G4Box* s3_peek3 = new G4Box("s3_peek3", 3. / 2., 15.5 / 2., 20. / 2.);
462 G4LogicalVolume* l3_peek1 = new G4LogicalVolume(s3_peek1, peek, "PLUME.l3_peek1");
463 G4LogicalVolume* l3_peek2 = new G4LogicalVolume(s3_peek2, peek, "PLUME.l3_peek2");
464 G4LogicalVolume* l3_peek3 = new G4LogicalVolume(s3_peek3, peek, "PLUME.l3_peek3");
465
466 G4AssemblyVolume* assemblySup = new G4AssemblyVolume();
467
468 G4ThreeVector Ta(0, 0, 0);
469 G4RotationMatrix ra;
470 G4Transform3D tra(ra, Ta);
471 assemblySup->AddPlacedVolume(l3_peek1, tra);
472 Ta.setY(21.5 / 2. + 3.0);
473 ra.rotateX(-M_PI / 2.);
474 tra = G4Transform3D(ra, Ta);
475 assemblySup->AddPlacedVolume(l3_peek2, tra);
476 Ta.setY(21.5 / 2. + 6.0 + 15.5 / 2.); Ta.setX(-1.0);
477 ra.rotateX(M_PI / 2.);
478 tra = G4Transform3D(ra, Ta);
479 assemblySup->AddPlacedVolume(l3_peek3, tra);
480
481 Ta.setY(57.25); Ta.setX(-2.2);
482 tra = G4Transform3D(ra, Ta);
483 assemblySup->AddPlacedVolume(l3_peek0, tra);
484
485
486 G4Trd* s3_al0 = new G4Trd("s3_al0", 3. / 2., 3. / 2., 10.0, 6.0, 51.1566 / 2.);
487 G4Box* s3_al1 = new G4Box("s3_al1", 12. / 2., 4. / 2., 12. / 2.);
488 G4LogicalVolume* l3_al0 = new G4LogicalVolume(s3_al0, geometry::Materials::get("Al"), "PLUME.l3_al0");
489 G4LogicalVolume* l3_al1 = new G4LogicalVolume(s3_al1, geometry::Materials::get("Al"), "PLUME.l3_al1");
490 ra.rotateX(-M_PI / 2.);
491 Ta.setY(21.5 / 2. + 6.0 + 51.1566 / 2.); Ta.setX(+2.0);
492 tra = G4Transform3D(ra, Ta);
493 assemblySup->AddPlacedVolume(l3_al0, tra);
494 ra.rotateX(M_PI / 2.);
495 Ta.setY(21.5 / 2. + 6.0 + 51.1566 + 2.); Ta.setX(-2.5);
496 tra = G4Transform3D(ra, Ta);
497 assemblySup->AddPlacedVolume(l3_al1, tra);
498 return assemblySup;
499 }

◆ buildSupport4()

G4AssemblyVolume * buildSupport4 ( )
protected

Volume of support4.

Definition at line 501 of file PlumeCreator.cc.

502 {
503
504
505 std::vector<G4TwoVector> points = {G4TwoVector(-36.8, 6.645), G4TwoVector(-26.65, 9.94), G4TwoVector(-16.04, -3.0), G4TwoVector(3.5, -3.0), G4TwoVector(3.5, 0.0), G4TwoVector(-14.62, 0.0), G4TwoVector(-27.742, 16.0), G4TwoVector(-38.68, 12.446), G4TwoVector(-38.062, 10.544), G4TwoVector(-28.551, 13.634), G4TwoVector(-27.9, 11.637), G4TwoVector(-37.41, 8.547)};
506 G4Material* peek = G4Material::GetMaterial("plumePeek");
507 G4ExtrudedSolid* s4_peek0 = new G4ExtrudedSolid("s4_peek0", points, 10.0, G4TwoVector(0, 0), 1, G4TwoVector(0, 0), 1);
508 G4LogicalVolume* l4_peek0 = new G4LogicalVolume(s4_peek0, peek, "PLUME.l4_peek0");
509
510 G4Trd* s4_al0 = new G4Trd("s4_al0", 12. / 2., 20. / 2., 3. / 2., 3. / 2., 36.5 / 2.);
511 G4Box* s4_al1 = new G4Box("s4_al1", 12. / 2., 16. / 2., 3.5 / 2.);
512 G4Box* s4_al2 = new G4Box("s4_al2", 12. / 2., 4. / 2., 14. / 2.);
513
514 G4LogicalVolume* l4_al0 = new G4LogicalVolume(s4_al0, geometry::Materials::get("Al"), "PLUME.l4_al0");
515 G4LogicalVolume* l4_al1 = new G4LogicalVolume(s4_al1, geometry::Materials::get("Al"), "PLUME.l4_al1");
516 G4LogicalVolume* l4_al2 = new G4LogicalVolume(s4_al2, geometry::Materials::get("Al"), "PLUME.l4_al2");
517
518 G4ThreeVector transl(0, 0, 0);
519 G4RotationMatrix ra;
520 G4Transform3D trans(ra, transl);
521 G4AssemblyVolume* assem_al = new G4AssemblyVolume();
522 assem_al->AddPlacedVolume(l4_al0, trans);
523 transl.setY(-16. / 2. + 3. / 2.); transl.setZ(-36.5 / 2. - 3.5 / 2.);
524 trans = G4Transform3D(ra, transl);
525 assem_al->AddPlacedVolume(l4_al1, trans);
526 transl.setZ(-36.5 / 2. - 14. / 2.); transl.setY(-16.5);
527 trans = G4Transform3D(ra, transl);
528 assem_al->AddPlacedVolume(l4_al2, trans);
529 ra.rotateY(M_PI / 2.); ra.rotateZ(M_PI);
530 transl.setZ(36.5 / 2. - 10.5); transl.setY(1.50);
531 trans = G4Transform3D(ra, transl);
532 assem_al->AddPlacedVolume(l4_peek0, trans);
533
534 return assem_al;
535 }

◆ create()

void create ( const GearDir content,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
virtual

Creation of the detector geometry from Gearbox (XML).

Parameters
[in]contentXML data directory.
[in]topVolumeGeant world volume.
[in]typeGeometry type.

Implements CreatorBase.

Definition at line 62 of file PlumeCreator.cc.

63 {
64
66
67 //color attributions
68 G4VisAttributes* FoamVisAtt = new G4VisAttributes(G4Colour::Blue());
69 G4VisAttributes* KaptonVisAtt = new G4VisAttributes(G4Colour::Red());
70 G4VisAttributes* GlueVisAtt = new G4VisAttributes(G4Colour::White());
71 G4VisAttributes* MetalVisAtt = new G4VisAttributes(G4Colour::Gray());
72 G4VisAttributes* SubstrateVisAtt = new G4VisAttributes(G4Colour::Green());
73 G4VisAttributes* MetalizedVisAtt = new G4VisAttributes(G4Colour::Cyan());
74 G4VisAttributes* EpitaxialVisAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 0.0)); //yellow
75
76 //lets get the stepsize parameter with a default value of 5 µm
77 double stepSize = content.getLength("stepSize", 5 * CLHEP::um);
78
79 int LadderID = 0;
80
81 GearDir activeParams(content, "Ladder");
82 G4double SensorLengthX = (activeParams.getInt("nPixelsX") * activeParams.getLength("pitchX")) * CLHEP::cm;
83 G4double SensorLengthY = (activeParams.getInt("nPixelsY") * activeParams.getLength("pitchY")) * CLHEP::cm;
84
85 G4double AirGap = activeParams.getLength("AirGap") * CLHEP::cm;
86
87 G4double SubstrateThickness = activeParams.getLength("SubstrateThickness") * CLHEP::cm;
88 G4double EpitaxialThickness = activeParams.getLength("EpitaxialThickness") * CLHEP::cm;
89 G4double MetalThickness = activeParams.getLength("MetalThickness") * CLHEP::cm;
90 G4double GlueThickness = activeParams.getLength("GlueThickness") * CLHEP::cm;
91 G4double KaptonThickness = activeParams.getLength("KaptonThickness") * CLHEP::cm;
92 G4double AluminiumThickness = activeParams.getLength("AluminiumThickness") * CLHEP::cm;
93 G4double foamlen = activeParams.getLength("Foam/length") * CLHEP::cm;
94 G4double foamwid = activeParams.getLength("Foam/width") * CLHEP::cm;
95 G4double foamthick = activeParams.getLength("Foam/thickness") * CLHEP::cm;
96 G4double foamZ = activeParams.getLength("Foam/zPosition") * CLHEP::cm;
97 G4double foamY = activeParams.getLength("Foam/yShift") * CLHEP::cm;
98 G4double flexlen = activeParams.getLength("Flex/length") * CLHEP::cm;
99 G4double flexwid = activeParams.getLength("Flex/width") * CLHEP::cm;
100 G4double flexZ = activeParams.getLength("Flex/zPosition") * CLHEP::cm;
101 G4double allen1 = activeParams.getLength("AlBat/length1") * CLHEP::cm;
102 G4double allen2 = activeParams.getLength("AlBat/length2") * CLHEP::cm;
103 G4double allen3 = activeParams.getLength("AlBat/length3") * CLHEP::cm;
104 G4double alwid = activeParams.getLength("AlBat/width") * CLHEP::cm;
105 G4double althick1 = activeParams.getLength("AlBat/thickness1") * CLHEP::cm;
106 G4double althick2 = activeParams.getLength("AlBat/thickness2") * CLHEP::cm;
107 G4double althick3 = activeParams.getLength("AlBat/thickness3") * CLHEP::cm;
108
109 // old geometry
110 /*
111 G4double SensorDistance = activeParams.getLength("SensorDistance") * CLHEP::cm;
112 G4double dx_foam = SensorLengthY / 2. + 0.15 * CLHEP::cm ;
113 G4double dy_foam = (SensorLengthX * 6. + 5.*SensorDistance) / 2.;
114 G4double DistanceFromFoamCenter = 0.1 * CLHEP::cm;
115 //Envelop dimension Thickness not divided by 2 to take into account of the 2 sides of foam
116 G4double dz_env = DistanceFromFoamCenter + KaptonThickness + GlueThickness +
117 AluminiumThickness + SubstrateThickness + EpitaxialThickness +
118 MetalThickness + 6. * AirGap;
119 G4Box* s_env = new G4Box("s_env", dx_foam, dy_foam, dz_env);
120 G4LogicalVolume* l_env = new G4LogicalVolume(s_env, geometry::Materials::get("Al"), "l_env");
121 G4Transform3D transformt = G4RotateZ3D(135. / 180 * M_PI - M_PI / 2.0) * G4Translate3D(0, 61,
122 42.2) * G4RotateX3D(- M_PI / 2.0 - 178. / 180 * M_PI);
123 new G4PVPlacement(transformt, l_env, "p_env1", &topVolume, false, 1);
124 transformt = G4RotateZ3D(225. / 180 * M_PI - M_PI / 2.0) * G4Translate3D(0, 84,
125 -21.8) * G4RotateX3D(- M_PI / 2.0 - 20. / 180 * M_PI);
126 new G4PVPlacement(transformt, l_env, "p_env2", &topVolume, false, 1);*/
127 //---------------
128
129 G4double dz_ladder = foamthick / 2. + KaptonThickness + GlueThickness +
130 AluminiumThickness + 3. * AirGap;
131 G4double dz_sensor = (SubstrateThickness + EpitaxialThickness +
132 MetalThickness + 2. * AirGap) / 2.;
133
134 G4double fullLength = allen1 + allen2 + allen3 - (foamZ - foamlen / 2.);
135 double zshift = fullLength / 2. - (allen1 + allen2 + allen3);
136
137 // Create support ladder
138 G4AssemblyVolume* support = new G4AssemblyVolume();
139 G4Transform3D transl;;
140
141 //create foam layer
142 G4Box* s_foam = new G4Box("s_foam", foamlen / 2., foamwid / 2., foamthick / 2.);
143 G4LogicalVolume* l_foam = new G4LogicalVolume(s_foam, geometry::Materials::get("SiC"), "PLUME.l_foam");
144 transl = G4Translate3D(foamZ + zshift, foamY, 0);
145 support->AddPlacedVolume(l_foam, transl);
146
147 //create glue layers
148 G4Box* s_glue = new G4Box("s_glue", flexlen / 2., foamwid / 2., GlueThickness / 2.);
149 G4LogicalVolume* l_glue = new G4LogicalVolume(s_glue, geometry::Materials::get("Glue"), "PLUME.l_glue");
150 G4double r_glue = foamthick / 2. + AirGap + GlueThickness / 2.;
151 transl = G4Translate3D(flexZ + zshift, foamY, -r_glue);
152 support->AddPlacedVolume(l_glue, transl);
153 transl = G4Translate3D(flexZ + zshift, foamY, r_glue);
154 support->AddPlacedVolume(l_glue, transl);
155
156 //create Kapton layers
157 G4Box* s_kapton = new G4Box("s_kapton", flexlen / 2., flexwid / 2., KaptonThickness / 2.);
158 G4LogicalVolume* l_kapton = new G4LogicalVolume(s_kapton, geometry::Materials::get("Kapton"), "PLUME.l_kapton");
159 G4double r_Kapton = r_glue + AirGap + (GlueThickness + KaptonThickness) / 2.;
160 transl = G4Translate3D(flexZ + zshift, 0, -r_Kapton);
161 support->AddPlacedVolume(l_kapton, transl);
162 transl = G4Translate3D(flexZ + zshift, 0, r_Kapton);
163 support->AddPlacedVolume(l_kapton, transl);
164
165 //create metal layers
166 G4Box* s_metal = new G4Box("s_metal", flexlen / 2., flexwid / 2., AluminiumThickness / 2.);
167 G4LogicalVolume* l_metal = new G4LogicalVolume(s_metal, geometry::Materials::get("Al"), "PLUME.l_metal");
168 G4double r_metal = r_Kapton + AirGap + (KaptonThickness + AluminiumThickness) / 2.;
169 transl = G4Translate3D(flexZ + zshift, 0, -r_metal);
170 support->AddPlacedVolume(l_metal, transl);
171 transl = G4Translate3D(flexZ + zshift, 0, r_metal);
172 support->AddPlacedVolume(l_metal, transl);
173
174 //create aluminum bat
175 G4Box* s_bat1p = new G4Box("s_bat1p", allen1 / 2., alwid / 2., althick1 / 2.);
176 double incut = foamZ + foamlen / 2.;
177 G4Box* s_bat1t = new G4Box("s_bat1t", incut, foamwid / 2., althick1 + 0.2 / 2.);
178
179 G4Transform3D tt = G4Translate3D(-allen1 / 2., foamY, 0);
180 G4SubtractionSolid* s_bat1 = new G4SubtractionSolid("s_bat1", s_bat1p, s_bat1t, tt);
181 G4Box* s_bat2 = new G4Box("s_bat2", allen2 / 2., alwid / 2., althick2 / 2.);
182 G4Box* s_bat3 = new G4Box("s_bat3", allen3 / 2., alwid / 2., althick3 / 2.);
183 G4LogicalVolume* l_bat1 = new G4LogicalVolume(s_bat1, geometry::Materials::get("Al"), "PLUME.l_bat1");
184 G4LogicalVolume* l_bat2 = new G4LogicalVolume(s_bat2, geometry::Materials::get("Al"), "PLUME.l_bat2");
185 G4LogicalVolume* l_bat3 = new G4LogicalVolume(s_bat3, geometry::Materials::get("Al"), "PLUME.l_bat3");
186 transl = G4Translate3D(allen1 / 2. + zshift, 0, 0);
187 support->AddPlacedVolume(l_bat1, transl);
188 transl = G4Translate3D(allen1 + allen2 / 2. + zshift, 0, 0);
189 support->AddPlacedVolume(l_bat2, transl);
190 transl = G4Translate3D(allen1 + allen2 + allen3 / 2. + zshift, 0, 0);
191 support->AddPlacedVolume(l_bat3, transl);
192
193 l_foam->SetVisAttributes(FoamVisAtt);
194 l_kapton->SetVisAttributes(KaptonVisAtt);
195 l_glue->SetVisAttributes(GlueVisAtt);
196 l_metal->SetVisAttributes(MetalVisAtt);
197
198
199 G4String symbol, name;
200 G4double a, zz;
201 G4double density;
202 G4int ncomponents;
203 a = 1.01 * CLHEP::g / CLHEP::mole;
204 G4Element* elH = new G4Element(name = "Hydrogen", symbol = "H", zz = 1., a);
205 a = 12.01 * CLHEP::g / CLHEP::mole;
206 G4Element* elC = new G4Element(name = "Carbon", symbol = "C", zz = 6., a);
207 a = 16.00 * CLHEP::g / CLHEP::mole;
208 G4Element* elO = new G4Element(name = "Oxygen", symbol = "O", zz = 8., a);
209 density = 1.31 * CLHEP::g / CLHEP::cm3;
210 G4Material* peekMat = new G4Material(name = "plumePeek", density, ncomponents = 3);
211 peekMat->AddElementByMassFraction(elC, 0.76);
212 peekMat->AddElementByMassFraction(elH, 0.08);
213 peekMat->AddElementByMassFraction(elO, 0.16);
214 density = 1.5 * CLHEP::g / CLHEP::cm3;
215 G4Material* carbMat = new G4Material(name = "plumeCarb", density, ncomponents = 1);
216 carbMat->AddElementByMassFraction(elC, 1.0);
217
218 G4Box* s_sensor = new G4Box("s_sensor", SensorLengthX / 2., SensorLengthY / 2., dz_sensor);
219 G4LogicalVolume* l_sensor = new G4LogicalVolume(s_sensor, geometry::Materials::get("G4_AIR"), "PLUME.l_sensor");
220
221 // Substrate Layer //
222 G4Box* s_substrate = new G4Box("s_substrate", SensorLengthX / 2., SensorLengthY / 2., SubstrateThickness / 2.);
223 G4LogicalVolume* l_substrate = new G4LogicalVolume(s_substrate, geometry::Materials::get("Silicon"), "PLUME.l_substrate");
224 new G4PVPlacement(0, G4ThreeVector(0, 0, -dz_sensor + SubstrateThickness / 2.), l_substrate, "p_substrate", l_sensor, false, 1);
225
226 // Epitaxial Layer //
227 G4Box* s_epitaxial = new G4Box("s_epitaxial", SensorLengthX / 2., SensorLengthY / 2., EpitaxialThickness / 2.);
228 G4LogicalVolume* l_epitaxial = new G4LogicalVolume(s_epitaxial, geometry::Materials::get("Silicon"), "PLUME.l_epitaxial", 0,
230 new G4PVPlacement(0, G4ThreeVector(0, 0, -dz_sensor + AirGap + SubstrateThickness + EpitaxialThickness / 2.), l_epitaxial,
231 "p_epitaxial", l_sensor, false, 1);
232 // Metalized Layer //
233 G4Box* s_metalized = new G4Box("s_metalized", SensorLengthX / 2., SensorLengthY / 2., MetalThickness / 2.);
234 G4LogicalVolume* l_metalized = new G4LogicalVolume(s_metalized, geometry::Materials::get("SiO2Al"), "PLUME.l_metalized");
235 new G4PVPlacement(0, G4ThreeVector(0, 0, -dz_sensor + 2 * AirGap + SubstrateThickness + EpitaxialThickness + MetalThickness / 2.),
236 l_metalized, "p_metalized", l_sensor, false, 1);
237
238 // temporary
239 /*G4LogicalVolume* l_sensorMir = new G4LogicalVolume(s_sensor, geometry::Materials::get("G4_AIR"), "l_sensorMir");
240 new G4PVPlacement(0, G4ThreeVector(0, 0, -dz_sensor + MetalThickness / 2.), l_metalized, "p_metalized", l_sensorMir, false, 1);
241 new G4PVPlacement(0, G4ThreeVector(0, 0, -dz_sensor + MetalThickness + AirGap + EpitaxialThickness / 2.), l_epitaxial,
242 "p_epitaxial", l_sensorMir, false, 1);
243 new G4PVPlacement(0, G4ThreeVector(0, 0, -dz_sensor + MetalThickness + 2 * AirGap + EpitaxialThickness + SubstrateThickness / 2.),
244 l_substrate, "p_substrate", l_sensorMir, false, 1);
245 */
246
247
248 l_epitaxial->SetUserLimits(new G4UserLimits(stepSize));
249 l_substrate->SetVisAttributes(SubstrateVisAtt);
250 l_epitaxial->SetVisAttributes(EpitaxialVisAtt);
251 l_metalized->SetVisAttributes(MetalizedVisAtt);
252
253 // place 12 sensors on support ladder
254 double zSens = dz_ladder + dz_sensor + AirGap;
255 G4RotationMatrix ra;
256 G4ThreeVector Ta(0, 0, 0);
257 G4Transform3D tra(ra, Ta);
258
259 // build cooling tubes
260 GearDir pipeParams(content, "CoolingPipes");
261 double pipeLen = pipeParams.getLength("length") * CLHEP::cm;
262 double pipeInR = pipeParams.getLength("rIn") * CLHEP::cm;
263 double pipeOutR = pipeParams.getLength("rOut") * CLHEP::cm;
264 G4Tubs* pipe_s = new G4Tubs("pipe_s", pipeInR, pipeOutR, pipeLen / 2., 0, 2 * M_PI);
265
266 G4LogicalVolume* pipe_l = new G4LogicalVolume(pipe_s, carbMat, "PLUME.l_pipe");
267 double pipeX = pipeParams.getLength("x") * CLHEP::cm;
268 double pipeY = pipeParams.getLength("y") * CLHEP::cm;
269 double pipeZ = pipeParams.getLength("z") * CLHEP::cm;
270 G4double alphaPipe = pipeParams.getAngle("alpha");
271
272 //GearDir alignPars;
273 G4Box* s_sensors = new G4Box("s_sensors", flexlen / 2., flexwid / 2., dz_sensor + AirGap);
274
275 for (auto ladder : content.getNodes("Placements/Ladder")) {
276
277 std::string id = ladder.getString("@id");
278
279 G4AssemblyVolume* assemblyLadder = new G4AssemblyVolume();
280 assemblyLadder->AddPlacedAssembly(support, tra);
281
282 for (auto pars : content.getNodes("SensorAlignment/ladder")) {
283 if (pars.getString("@id") == id) {
284 GearDir alignPars(pars);
285
286 for (auto sidePars : alignPars.getNodes("side")) {
287 unsigned mirror = 0;
288
289 G4Transform3D transformSens;
290 if (sidePars.getString("@id") == "mirror") mirror = 1;
291
292 G4LogicalVolume* l_sensors = new G4LogicalVolume(s_sensors, geometry::Materials::get("G4_AIR"), "PLUME.l_sensors");
293
294 for (auto sensorPars : sidePars.getNodes("sensor")) {
295 double x = sensorPars.getLength("x") * CLHEP::cm + zshift;
296 double y = sensorPars.getLength("y") * CLHEP::cm;
297 int ids = sensorPars.getInt("id");
298 y = mirror ? -y : y;
299 y -= alwid / 2.;
300 double alpha1 = sensorPars.getAngle("alpha") * CLHEP::rad;
301 if (mirror) transformSens = G4Translate3D(x, y,
302 0) * G4RotateZ3D(alpha1) * G4RotateX3D(M_PI); // think if this is correct, rotation and pos shift for mirror side
303 else transformSens = G4Translate3D(x, y, 0) * G4RotateZ3D(-alpha1);
304
305 new G4PVPlacement(transformSens, l_sensor, "p_sensor", l_sensors, true,
306 (ids + mirror * 6 + LadderID * 12));
307 }
308 transformSens = G4Translate3D(0, 0, mirror ? -zSens : zSens);
309 assemblyLadder->AddPlacedVolume(l_sensors, transformSens);
310 }
311 }
312 }
313
314
315
316 G4double thetaZ = ladder.getAngle("ThetaZ");
317 G4double r = ladder.getLength("r_plume") * CLHEP::cm - zshift * sin(thetaZ);
318 G4double z = ladder.getLength("z_plume") * CLHEP::cm - zshift * cos(thetaZ);
319 G4double phi = ladder.getAngle("Phi");
320 G4double alpha = ladder.getAngle("Alpha");
321
322
323 // place cooling pipes
324 G4Transform3D transformPipe = G4Translate3D(pipeZ + zshift, pipeY, pipeX) * G4RotateZ3D(alphaPipe) * G4RotateY3D(+ M_PI / 2.);
325 assemblyLadder->AddPlacedVolume(pipe_l, transformPipe);
326 transformPipe = G4Translate3D(pipeZ + zshift
327 , pipeY, -pipeX) * G4RotateZ3D(alphaPipe) * G4RotateY3D(+ M_PI / 2.);
328 assemblyLadder->AddPlacedVolume(pipe_l, transformPipe);
329
330
331 G4Transform3D transform1;
332 if (LadderID == 1) {
333 G4AssemblyVolume* sup1 = buildSupport1();
334 G4AssemblyVolume* sup2 = buildSupport2();
335 transform1 = G4Translate3D(-fullLength / 2. - 18.7, 0., 1.2) * G4RotateY3D(thetaZ) * G4RotateX3D(M_PI / 2.) * G4RotateY3D(M_PI);
336 assemblyLadder->AddPlacedAssembly(sup1, transform1);
337 transform1 = G4Translate3D(fullLength / 2. + 19.5, 0, -2.6) * G4RotateY3D(thetaZ) * G4RotateX3D(M_PI / 2.);
338 assemblyLadder->AddPlacedAssembly(sup2, transform1);
339 }
340
341 if (LadderID == 0) {
342 G4AssemblyVolume* sup1 = buildSupport3();
343 G4AssemblyVolume* sup2 = buildSupport4();
344 transform1 = G4Translate3D(fullLength / 2. + 5, 0,
345 7.8) * G4RotateY3D(-thetaZ) * G4RotateZ3D(M_PI / 2.) * G4RotateX3D(M_PI / 2.) * G4RotateY3D(M_PI / 2.);
346 assemblyLadder->AddPlacedAssembly(sup1, transform1);
347 transform1 = G4Translate3D(-fullLength / 2. - 31, 0.,
348 -21.7) * G4RotateY3D(-thetaZ) * G4RotateZ3D(M_PI / 2.) * G4RotateX3D(-M_PI / 2.) * G4RotateY3D(M_PI);
349 assemblyLadder->AddPlacedAssembly(sup2, transform1);
350 }
351
352 G4Transform3D transform = G4RotateZ3D(phi) * G4Translate3D(r, 0,
353 z) * G4RotateY3D(thetaZ) * G4RotateZ3D(alpha + M_PI) * G4RotateY3D(- M_PI / 2.0);
354
355 assemblyLadder->MakeImprint(&topVolume, transform);
356
357 LadderID += 1;
358
359 }
360
361 }
G4AssemblyVolume * buildSupport1()
Volume of support1.
G4AssemblyVolume * buildSupport2()
Volume of support2.
G4AssemblyVolume * buildSupport4()
Volume of support4.
G4AssemblyVolume * buildSupport3()
Volume of support3.
VXD::SensitiveDetector< PXDSimHit, PXDTrueHit > SensitiveDetector
The PXD Sensitive Detector class.

◆ createFromDB()

void createFromDB ( const std::string &  name,
G4LogicalVolume &  topVolume,
GeometryTypes  type 
)
virtualinherited

Function to create the geometry from the Database.

Parameters
namename of the component in the database, could be used to disambiguate multiple components created with the same creator
topVolumeTop volume in which the geometry has to be placed
typeType of geometry to be build

Reimplemented in GeoMagneticField, GeoARICHCreator, BeamabortCreator, GeoCDCCreator, GeoCDCCreatorReducedCDC, GeoECLCreator, MyDBCreator, GeoBeamPipeCreator, GeoCryostatCreator, GeoFarBeamLineCreator, GeoBKLMCreator, GeoEKLMCreator, GeoKLMCreator, GeoPXDCreator, GeoCOILCreator, GeoServiceMaterialCreator, GeoSTRCreator, GeoSVDCreator, GeoTOPCreator, GeoHeavyMetalShieldCreator, and GeoVXDServiceCreator.

Definition at line 17 of file CreatorBase.cc.

18 {
19 //Do nothing but raise exception that we don't do anything
20 throw DBNotImplemented();
21 }

◆ createPayloads()

void createPayloads ( const GearDir content,
const IntervalOfValidity iov 
)
virtualinherited

Function to create the geometry database.

This function should be implemented to convert Gearbox parameters to one ore more database payloads

Parameters
contentGearDir pointing to the parameters which should be used for construction
iovinterval of validity to use when generating payloads

Reimplemented in GeoARICHCreator, BeamabortCreator, GeoCDCCreator, GeoCDCCreatorReducedCDC, GeoECLCreator, GeoMagneticField, MyDBCreator, GeoBeamPipeCreator, GeoCryostatCreator, GeoFarBeamLineCreator, GeoBKLMCreator, GeoEKLMCreator, GeoKLMCreator, GeoPXDCreator, GeoCOILCreator, GeoServiceMaterialCreator, GeoSTRCreator, GeoSVDCreator, GeoTOPCreator, GeoHeavyMetalShieldCreator, and GeoVXDServiceCreator.

Definition at line 24 of file CreatorBase.cc.

24{}

Member Data Documentation

◆ m_sensitive

SensitiveDetector* m_sensitive
protected

SensitiveDetector PLUME.

Definition at line 47 of file PlumeCreator.h.


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