Belle II Software  release-08-01-10
GeoTOPCreator.h
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 #include <top/dbobjects/TOPGeometry.h>
12 #include <top/geometry/TOPGeometryPar.h>
13 #include <geometry/CreatorBase.h>
14 #include <framework/gearbox/GearDir.h>
15 #include <framework/database/IntervalOfValidity.h>
16 
17 class G4LogicalVolume;
18 class G4AssemblyVolume;
19 class G4Box;
20 class G4UnionSolid;
21 
22 namespace Belle2 {
28  class BkgSensitiveDetector;
29 
30  namespace TOP {
31 
32  class SensitivePMT;
33  class SensitiveBar;
34 
35  typedef std::vector<std::pair<double, double> > Polygon;
36 
41 
42  public:
43 
47  GeoTOPCreator();
48 
52  virtual ~GeoTOPCreator();
53 
60  virtual void create(const GearDir& content, G4LogicalVolume& topVolume,
61  geometry::GeometryTypes type) override;
62 
69  virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume,
70  geometry::GeometryTypes type) override;
71 
77  virtual void createPayloads(const GearDir& content,
78  const IntervalOfValidity& iov) override;
79 
80 
81  private:
82 
86  enum EPanelType {c_Inner, c_Outer};
87 
91  enum ESideRailType {c_Left, c_Right};
92 
96  void createGeometry(const TOPGeometry& parameters,
97  G4LogicalVolume& topVolume,
99 
106  G4LogicalVolume* createModule(const TOPGeometry& geo, int moduleID);
107 
114  G4LogicalVolume* createModuleEnvelope(const TOPGeoQBB& geo, int moduleID);
115 
121  G4AssemblyVolume* assembleQBB(const TOPGeoQBB& geo);
122 
129  G4LogicalVolume* createHoneycombPanel(const TOPGeoQBB& geo, EPanelType type);
130 
137  G4LogicalVolume* createSideRail(const TOPGeoQBB& geo, ESideRailType type);
138 
145  G4AssemblyVolume* assembleFrontEnd(const TOPGeoFrontEnd& geo, int N);
146 
153  G4LogicalVolume* createBoardStack(const TOPGeoFrontEnd& geo, int N);
154 
160  G4AssemblyVolume* assembleOptics(const TOPGeoModule& geo);
161 
168  G4LogicalVolume* createBarSegment(const TOPGeoBarSegment& geo, int moduleID);
169 
176  G4LogicalVolume* createPrism(const TOPGeoPrism& geo, int moduleID);
177 
184  G4LogicalVolume* createMirrorSegment(const TOPGeoMirrorSegment& geo, int moduleID);
185 
192  G4LogicalVolume* createPMTArray(const TOPGeoPMTArray& geo, int moduleID);
193 
199  G4LogicalVolume* createPMT(const TOPGeoPMT& geo);
200 
210  G4LogicalVolume* createBox(const std::string& name,
211  double A, double B, double C,
212  const std::string& materialName);
213 
226  G4LogicalVolume* createBoxSphereIntersection(const std::string& name,
227  G4Box* box,
228  double Rmin, double Rmax,
229  double xc, double yc, double zc,
230  const std::string& materialName);
231 
240  G4LogicalVolume* createExtrudedSolid(const std::string& name,
241  const Polygon& shape,
242  double length,
243  const std::string& materialName);
244 
251  std::string addNumber(const std::string& str, unsigned number);
252 
253 
261  G4UnionSolid* m_moduleEnvelope = 0;
262  G4AssemblyVolume* m_qbb = 0;
263  G4AssemblyVolume* m_frontEnd = 0;
269  };
270 
271  } // namespace TOP
273 } // namespace Belle2
274 
The Class for BeamBackground Sensitive Detector.
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.
Geometry parameters of a quartz bar segment.
Geometry parameters of board stack (front-end electronic module)
Geometry parameters of a mirror segment.
Geometry parameters of a module (optical components + positioning)
Definition: TOPGeoModule.h:31
Geometry parameters of MCP-PMT array.
Geometry parameters of MCP-PMT.
Definition: TOPGeoPMT.h:24
Geometry parameters of prism.
Definition: TOPGeoPrism.h:27
Geometry parameters of Quartz Bar Box (mother class)
Definition: TOPGeoQBB.h:30
Geometry parameters of TOP.
Definition: TOPGeometry.h:34
Geometry creator for TOP counter.
Definition: GeoTOPCreator.h:40
int m_numPeelOffRegions
number of peel-off regions
virtual ~GeoTOPCreator()
Destructor.
int m_numBrokenGlues
number of broken glues
void createGeometry(const TOPGeometry &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
G4UnionSolid * m_moduleEnvelope
module envelope solid
G4AssemblyVolume * assembleFrontEnd(const TOPGeoFrontEnd &geo, int N)
Assembles front-end electronics.
int m_numDecoupledPMTs
number of optically decoupled PMT's
G4LogicalVolume * createPMTArray(const TOPGeoPMTArray &geo, int moduleID)
Creates PMT array.
G4AssemblyVolume * assembleQBB(const TOPGeoQBB &geo)
Assembles QBB.
G4AssemblyVolume * m_frontEnd
front-end electronics assembly volume
G4LogicalVolume * createMirrorSegment(const TOPGeoMirrorSegment &geo, int moduleID)
Creates quartz segment with spherical mirror.
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creation of the detector geometry from database.
G4LogicalVolume * createSideRail(const TOPGeoQBB &geo, ESideRailType type)
Creates side rail.
G4AssemblyVolume * m_qbb
QBB assembly volume.
G4LogicalVolume * createHoneycombPanel(const TOPGeoQBB &geo, EPanelType type)
Creates honeycomb panel.
std::string addNumber(const std::string &str, unsigned number)
Adds number to string.
SensitiveBar * m_sensitiveBar
Sensitive vol.
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Creation of payloads.
G4LogicalVolume * createBoardStack(const TOPGeoFrontEnd &geo, int N)
Creates board stack.
BkgSensitiveDetector * m_sensitivePCB2
PCB sensitive for BG studies.
TOPGeometryPar * m_topgp
singleton class
G4LogicalVolume * createExtrudedSolid(const std::string &name, const Polygon &shape, double length, const std::string &materialName)
Creates material extruded solid.
G4LogicalVolume * createPMT(const TOPGeoPMT &geo)
Creates single PMT.
G4LogicalVolume * createModule(const TOPGeometry &geo, int moduleID)
Creates single module.
G4LogicalVolume * createBarSegment(const TOPGeoBarSegment &geo, int moduleID)
Creates quartz bar segment.
G4LogicalVolume * createPrism(const TOPGeoPrism &geo, int moduleID)
Creates quartz prism.
BkgSensitiveDetector * m_sensitivePCB1
PCB sensitive for BG studies.
ESideRailType
Side rail types.
Definition: GeoTOPCreator.h:91
G4AssemblyVolume * assembleOptics(const TOPGeoModule &geo)
Assembles optical components (PMT array, prism and bar segments) along z.
G4LogicalVolume * createBox(const std::string &name, double A, double B, double C, const std::string &materialName)
Creates material box.
int m_isBeamBkgStudy
flag for beam backgound simulation
SensitivePMT * m_sensitivePMT
Sensitive vol.
G4LogicalVolume * createBoxSphereIntersection(const std::string &name, G4Box *box, double Rmin, double Rmax, double xc, double yc, double zc, const std::string &materialName)
Creates material volume that is intersection of box and half-sphere shell (z > 0)
virtual void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creation of the detector geometry from Gearbox (XML).
G4LogicalVolume * createModuleEnvelope(const TOPGeoQBB &geo, int moduleID)
Creates module envelope.
EPanelType
Honeycomb panel types.
Definition: GeoTOPCreator.h:86
Class providing information on MCParticles hitting the bars.
Definition: SensitiveBar.h:31
Class providing SimHits.
Definition: SensitivePMT.h:30
Singleton class for TOP Geometry Parameters.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
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.