Belle II Software development
GeoEKLMCreator.h
Go to the documentation of this file.
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* KLM headers. */
12#include <klm/eklm/geometry/GeometryData.h>
13#include <klm/eklm/geometry/TransformData.h>
14#include <klm/simulation/SensitiveDetector.h>
15
16/* Basf2 headers. */
17#include <framework/gearbox/GearDir.h>
18#include <geometry/CreatorBase.h>
19
20/* C++ headers. */
21#include <string>
22
23/* Geant4 headers. */
24#include <G4Box.hh>
25#include <G4LogicalVolume.hh>
26#include <G4Material.hh>
27#include <G4SubtractionSolid.hh>
28#include <G4Transform3D.hh>
29#include <G4Tubs.hh>
30
36namespace Belle2 {
42 namespace EKLM {
43
48 G4VSolid* itube;
49 G4VSolid* otube;
50 };
51
56 G4LogicalVolume* corn1;
57 G4LogicalVolume* corn2;
58 G4LogicalVolume* corn3;
59 G4LogicalVolume* corn4;
60 G4LogicalVolume* supp;
61 };
62
67 G4LogicalVolume* detailA;
68 G4LogicalVolume* detailB;
69 G4LogicalVolume* detailC;
70 G4LogicalVolume* detailD;
71 };
72
113 struct Solids {
114 G4VSolid* section;
115 G4VSolid* layer;
116 G4VSolid* sector;
117 G4VSolid* secsupp;
118 G4VSolid** plane;
119 G4VSolid** stripSegment;
121 G4VSolid** psheet;
122 G4VSolid** strip;
123 G4VSolid** groove;
126 };
127
163 G4LogicalVolume* cover;
164 G4LogicalVolume** segment;
165 G4LogicalVolume** stripSegment;
166 G4LogicalVolume** strip;
167 G4LogicalVolume** groove;
168 G4LogicalVolume** scint;
169 G4LogicalVolume** psheet;
170 G4LogicalVolume*** segmentsup;
173 };
174
178 struct Materials {
179 G4Material* air;
180 G4Material* polyethylene;
181 G4Material* polystyrene;
182 G4Material* polystyrol;
183 G4Material* iron;
184 G4Material* duralumin;
185 G4Material* silicon;
186 G4Material* gel;
187 };
188
194 int layer;
195 int sector;
196 int plane;
198 int strip;
199 };
200
206
207 public:
208
213
218
225 void create(const GearDir& content, G4LogicalVolume& topVolume,
226 geometry::GeometryTypes type) override;
227
234 void createFromDB(const std::string& name, G4LogicalVolume& topVolume,
235 geometry::GeometryTypes type) override;
236
242 void createPayloads(const GearDir& content,
243 const IntervalOfValidity& iov) override;
244
245 private:
246
250 void createMaterials();
251
256
260 void createSectionSolid();
261
267 G4LogicalVolume* createLayerLogicalVolume(const char* name) const;
268
272 void createLayerSolid();
273
279 G4LogicalVolume* createSectorLogicalVolume(const char* name) const;
280
284 void createSectorSolid();
285
290
295
300
307 G4Box* createSectorSupportBoxX(G4Transform3D& t);
308
315 G4Box* createSectorSupportBoxY(G4Transform3D& t);
316
323 G4Box* createSectorSupportBoxTop(G4Transform3D& t);
324
329
334
339
344
349
354
367 G4SubtractionSolid* cutSolidCorner(
368 const char* name, G4VSolid* solid, G4Box* subtractionBox,
369 const HepGeom::Transform3D& transf, bool largerAngles,
370 double x1, double y1, double x2, double y2);
371
383 G4SubtractionSolid* cutSolidCorner(
384 const char* name, G4VSolid* solid, G4Box* subtractionBox,
385 const HepGeom::Transform3D& transf, bool largerAngles,
386 double x, double y, double ang);
387
392 void createPlaneSolid(int n);
393
399 void createSegmentSupportLogicalVolume(int iPlane, int iSegmentSupport);
400
408 G4VSolid* unifySolids(G4VSolid** solids, HepGeom::Transform3D* transf,
409 int nSolids, const std::string& name);
410
415 void createPlasticSheetLogicalVolume(int iSegment);
416
421 void createStripSegmentLogicalVolume(int iSegment);
422
427 void createSegmentLogicalVolume(int iSegment);
428
433 void createStripLogicalVolume(int iStrip);
434
439 void createStripGrooveLogicalVolume(int iStrip);
440
445 void createScintillatorLogicalVolume(int iStrip);
446
451
456
461
466
470 void createSolids();
471
478 bool detectorLayer(int section, int layer) const;
479
485 G4LogicalVolume* createSection(G4LogicalVolume* topVolume) const;
486
492 G4LogicalVolume* createLayer(G4LogicalVolume* section) const;
493
499 G4LogicalVolume* createSector(G4LogicalVolume* layer) const;
500
506 void createSectorCover(int iCover, G4LogicalVolume* sector) const;
507
512 void createSectorSupport(G4LogicalVolume* sector) const;
513
518 void createSectorSupportCorner1(G4LogicalVolume* sector) const;
519
524 void createSectorSupportCorner2(G4LogicalVolume* sector) const;
525
530 void createSectorSupportCorner3(G4LogicalVolume* sector) const;
531
536 void createSectorSupportCorner4(G4LogicalVolume* sector) const;
537
543 G4LogicalVolume* createPlane(G4LogicalVolume* sector) const;
544
550 void createSegmentSupport(int iSegmentSupport,
551 G4LogicalVolume* plane) const;
552
558 void createPlasticSheet(int iSheetPlane, int iSheet) const;
559
564 void createStripSegment(int iSegment) const;
565
570 void createSegment(G4LogicalVolume* plane) const;
571
576 void createStrip(G4LogicalVolume* segment) const;
577
582 void createStripGroove(int iStrip) const;
583
588 void createScintillator(int iStrip) const;
589
594 void createShield(G4LogicalVolume* sector) const;
595
599 void newVolumes();
600
604 void newSensitive();
605
609 void deleteVolumes();
610
614 void deleteSensitive();
615
621
626 void create(G4LogicalVolume& topVolume);
627
630
633
636
639
642
645
648
651
652 };
653
654 }
655
657}
EKLM element numbers.
Class GeoEKLMCreator.
G4Box * createSectorSupportBoxY(G4Transform3D &t)
Create Y side of sector support structure.
struct Solids m_Solids
Solids.
void readXMLDataStrips()
Read strip parameters from XML database.
void createShieldDetailDLogicalVolume()
Create shield detail D logical volume.
void createShieldDetailALogicalVolume()
Create shield detail A logical volume.
double getSectorSupportCornerAngle()
Get cutted corner angle.
void createShieldDetailCLogicalVolume()
Create shield detail C logical volume.
void createSegment(G4LogicalVolume *plane) const
Create segment (strips + plastic sheets).
void createMaterials()
Creation of materials.
G4Tubs * createSectorSupportOuterTube()
Create outer tube of sector support structure.
struct LogicalVolumes m_LogVol
Logical volumes.
TransformData * m_TransformData
Transformation data.
struct VolumeNumbers m_CurVol
Current volumes.
void createSectorSupportCorner4(G4LogicalVolume *sector) const
Create sector support corner 4.
struct Materials m_Materials
Materials.
void createShieldDetailBLogicalVolume()
Create shield detail B logical volume.
void createScintillator(int iStrip) const
Create scintillator.
G4LogicalVolume * createSection(G4LogicalVolume *topVolume) const
Create section.
void createSectorSupportCorner1LogicalVolume()
Create sector support corner 1 logical volume.
void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creation of the detector geometry from database.
KLM::SensitiveDetector * m_Sensitive
Sensitive detector.
G4LogicalVolume * createSector(G4LogicalVolume *layer) const
Create sector.
void createPlaneSolid(int n)
Create plane solid.
G4SubtractionSolid * cutSolidCorner(const char *name, G4VSolid *solid, G4Box *subtractionBox, const HepGeom::Transform3D &transf, bool largerAngles, double x1, double y1, double x2, double y2)
Cut corner of a solid.
void createSectorSupportCorner2LogicalVolume()
Create sector support corner 2 logical volume.
void newVolumes()
Create new volumes.
void createSubtractionBoxSolid()
Create subtraction box solid.
G4Box * createSectorSupportBoxTop(G4Transform3D &t)
Create box in the cutted corner of sector support structure.
void newSensitive()
Create new sensitive detectors.
void createSectorSupportCorner1(G4LogicalVolume *sector) const
Create sector support corner 1.
void createSectorSupportCorner3(G4LogicalVolume *sector) const
Create sector support corner 3.
void deleteSensitive()
Delete sensitive detectors.
G4LogicalVolume * createLayerLogicalVolume(const char *name) const
Create layer logical volume.
void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Creation of payloads.
void createSectorCover(int iCover, G4LogicalVolume *sector) const
Create sector cover.
void createStripSegment(int iSegment) const
Create strip segment.
G4LogicalVolume * createPlane(G4LogicalVolume *sector) const
Create plane.
void createScintillatorLogicalVolume(int iStrip)
Create scintillator logical volume.
void createSegmentSupportLogicalVolume(int iPlane, int iSegmentSupport)
Create segment support logical volume.
void createShield(G4LogicalVolume *sector) const
Create shield.
void createPlasticSheet(int iSheetPlane, int iSheet) const
Create plastic sheet.
const EKLMElementNumbers * m_ElementNumbers
Element numbers.
void createSectorSupportCorner4LogicalVolume()
Create sector support corner 4 logical volume.
void createSegmentLogicalVolume(int iSegment)
Create segment logical volume (strips + plastic sheets).
void createSolids()
Create solids (or logical volumes which must be created only once).
void createPlasticSheetLogicalVolume(int iSegment)
Create plastic sheet logical volume.
void createSectorSupportLogicalVolume()
Create sector support logical volume.
void createLayerSolid()
Create layer solid.
G4Box * createSectorSupportBoxX(G4Transform3D &t)
Create X side of sector support structure.
void createSectorCoverLogicalVolume()
Create sector cover solid.
void createSectorSupportCorner2(G4LogicalVolume *sector) const
Create sector support corner 2.
void createStripGrooveLogicalVolume(int iStrip)
Create strip groove logical volume.
bool detectorLayer(int section, int layer) const
Check if a given layer is a detector layer.
void createStripGroove(int iStrip) const
Create strip groove.
void createSectorSupportCorner3LogicalVolume()
Create sector support corner 3 logical volume.
G4LogicalVolume * createLayer(G4LogicalVolume *section) const
Create layer.
G4VSolid * unifySolids(G4VSolid **solids, HepGeom::Transform3D *transf, int nSolids, const std::string &name)
Unify a group of solids.
void createSectionSolid()
Create section solid.
G4LogicalVolume * createSectorLogicalVolume(const char *name) const
Create sector logical volume.
void createStrip(G4LogicalVolume *segment) const
Create strip.
void createSectorSolid()
Create sector solid.
void createStripLogicalVolume(int iStrip)
Create strip logical volume.
void deleteVolumes()
Delete volumes.
void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creation of the detector geometry from Gearbox (XML).
void createSectorSupport(G4LogicalVolume *sector) const
Create sector support structure (main part without corners).
const GeometryData * m_GeoDat
Geometry data.
void createStripSegmentLogicalVolume(int iSegment)
Create strip segment logical volume.
void createSegmentSupport(int iSegmentSupport, G4LogicalVolume *plane) const
Create segment support.
G4Tubs * createSectorSupportInnerTube()
Create inner tube of sector support structure.
EKLM geometry data.
Definition: GeometryData.h:38
Transformation data.
Definition: TransformData.h:35
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
A class that describes the interval of experiments/runs for which an object in the database is valid.
KLM sensitive-detector class.
Pure virtual base class for all geometry creators.
Definition: CreatorBase.h:28
GeometryTypes
Flag indiciating the type of geometry to be used.
Abstract base class for different kinds of events.
Logical volumes of EKLM.
G4LogicalVolume ** strip
Strips.
G4LogicalVolume ** scint
Scintillator.
G4LogicalVolume ** groove
Strip grooves.
G4LogicalVolume ** stripSegment
Strip segments.
struct ShieldLogicalVolumes shield
Shield.
G4LogicalVolume *** segmentsup
Segment support.
G4LogicalVolume ** psheet
Plastic sheet.
G4LogicalVolume ** segment
Segments.
G4LogicalVolume * cover
Sector cover.
struct SectorSupportLogicalVolumes sectorsup
Sector support.
Materials for EKLM.
G4Material * iron
Iron.
G4Material * silicon
Silicon.
G4Material * duralumin
Duralumin.
G4Material * air
Air.
G4Material * polystyrene
Polystyrene.
G4Material * polyethylene
Polyethylene.
G4Material * gel
Gel.
G4Material * polystyrol
Polystyrol.
Sector support logical volumes.
G4LogicalVolume * detailC
Detail C.
G4LogicalVolume * detailD
Detail D.
G4LogicalVolume * detailA
Detail A.
G4LogicalVolume * detailB
Detail B.
All solids of EKLM.
G4VSolid * section
Section.
G4VSolid ** plane
Plane.
G4VSolid ** strip
Strips.
G4VSolid * secsupp
Sector support.
G4VSolid * sector
Sector.
G4VSolid * layer
Layer.
G4VSolid ** groove
Strip grooves.
G4VSolid ** stripSegment
Strip segment.
G4VSolid ** plasticSheetElement
Plastic sheet element.
G4VSolid ** psheet
Plastic sheets (combined).
G4Box * subtractionBox
Box used for subtractions.
struct SectorSupportSolids sectorsup
Sector support.