Belle II Software  release-05-02-19
GeoTOPCreator.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Petric, Marko Staric *
7  * Major revision: 2016 *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #pragma once
13 
14 #include <top/dbobjects/TOPGeometry.h>
15 #include <top/geometry/TOPGeometryPar.h>
16 #include <geometry/CreatorBase.h>
17 #include <framework/gearbox/GearDir.h>
18 #include <framework/database/IntervalOfValidity.h>
19 
20 class G4LogicalVolume;
21 class G4AssemblyVolume;
22 class G4Box;
23 class G4UnionSolid;
24 
25 namespace Belle2 {
31  class BkgSensitiveDetector;
32 
33  namespace TOP {
34 
35  class SensitivePMT;
36  class SensitiveBar;
37 
38  typedef std::vector<std::pair<double, double> > Polygon;
39 
44 
45  public:
46 
50  GeoTOPCreator();
51 
55  virtual ~GeoTOPCreator();
56 
63  virtual void create(const GearDir& content, G4LogicalVolume& topVolume,
64  geometry::GeometryTypes type) override;
65 
72  virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume,
73  geometry::GeometryTypes type) override;
74 
80  virtual void createPayloads(const GearDir& content,
81  const IntervalOfValidity& iov) override;
82 
83 
84  private:
85 
89  enum EPanelType {c_Inner, c_Outer};
90 
94  enum ESideRailType {c_Left, c_Right};
95 
99  void createGeometry(const TOPGeometry& parameters,
100  G4LogicalVolume& topVolume,
102 
109  G4LogicalVolume* createModule(const TOPGeometry& geo, int moduleID);
110 
117  G4LogicalVolume* createModuleEnvelope(const TOPGeoQBB& geo, int moduleID);
118 
124  G4AssemblyVolume* assembleQBB(const TOPGeoQBB& geo);
125 
132  G4LogicalVolume* createHoneycombPanel(const TOPGeoQBB& geo, EPanelType type);
133 
141  G4LogicalVolume* createSideRail(const TOPGeoQBB& geo, ESideRailType type);
142 
149  G4AssemblyVolume* assembleFrontEnd(const TOPGeoFrontEnd& geo, int N);
150 
157  G4LogicalVolume* createBoardStack(const TOPGeoFrontEnd& geo, int N);
158 
164  G4AssemblyVolume* assembleOptics(const TOPGeoModule& geo);
165 
172  G4LogicalVolume* createBarSegment(const TOPGeoBarSegment& geo, int moduleID);
173 
180  G4LogicalVolume* createPrism(const TOPGeoPrism& geo, int moduleID);
181 
188  G4LogicalVolume* createMirrorSegment(const TOPGeoMirrorSegment& geo, int moduleID);
189 
196  G4LogicalVolume* createPMTArray(const TOPGeoPMTArray& geo, int moduleID);
197 
203  G4LogicalVolume* createPMT(const TOPGeoPMT& geo);
204 
214  G4LogicalVolume* createBox(const std::string& name,
215  double A, double B, double C,
216  const std::string& materialName);
217 
230  G4LogicalVolume* createBoxSphereIntersection(const std::string& name,
231  G4Box* box,
232  double Rmin, double Rmax,
233  double xc, double yc, double zc,
234  const std::string& materialName);
235 
244  G4LogicalVolume* createExtrudedSolid(const std::string& name,
245  const Polygon& shape,
246  double length,
247  const std::string& materialName);
248 
255  std::string addNumber(const std::string& str, unsigned number);
256 
257 
265  G4UnionSolid* m_moduleEnvelope = 0;
266  G4AssemblyVolume* m_qbb = 0;
267  G4AssemblyVolume* m_frontEnd = 0;
273  };
274 
275  } // namespace TOP
277 } // namespace Belle2
278 
Belle2::TOP::GeoTOPCreator::addNumber
std::string addNumber(const std::string &str, unsigned number)
Adds number to string.
Definition: GeoTOPCreator.cc:1042
Belle2::TOP::GeoTOPCreator::createBoxSphereIntersection
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)
Definition: GeoTOPCreator.cc:996
Belle2::IntervalOfValidity
A class that describes the interval of experiments/runs for which an object in the database is valid.
Definition: IntervalOfValidity.h:35
Belle2::TOP::GeoTOPCreator::m_sensitiveBar
SensitiveBar * m_sensitiveBar
Sensitive vol.
Definition: GeoTOPCreator.h:259
Belle2::TOPGeoPMT
Geometry parameters of MCP-PMT.
Definition: TOPGeoPMT.h:34
Belle2::TOP::GeoTOPCreator::m_isBeamBkgStudy
int m_isBeamBkgStudy
flag for beam backgound simulation
Definition: GeoTOPCreator.h:263
Belle2::TOPGeoPrism
Geometry parameters of prism.
Definition: TOPGeoPrism.h:36
Belle2::TOPGeometry
Geometry parameters of TOP.
Definition: TOPGeometry.h:44
Belle2::TOP::SensitiveBar
Class providing information on MCParticles hitting the bars.
Definition: SensitiveBar.h:41
Belle2::TOPGeoBarSegment
Geometry parameters of a quartz bar segment.
Definition: TOPGeoBarSegment.h:37
Belle2::TOP::GeoTOPCreator::createBarSegment
G4LogicalVolume * createBarSegment(const TOPGeoBarSegment &geo, int moduleID)
Creates quartz bar segment.
Definition: GeoTOPCreator.cc:660
Belle2::TOP::GeoTOPCreator::m_qbb
G4AssemblyVolume * m_qbb
QBB assembly volume.
Definition: GeoTOPCreator.h:266
Belle2::TOP::GeoTOPCreator::createGeometry
void createGeometry(const TOPGeometry &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
Definition: GeoTOPCreator.cc:140
Belle2::TOPGeoQBB
Geometry parameters of Quartz Bar Box (mother class)
Definition: TOPGeoQBB.h:40
Belle2::TOP::GeoTOPCreator::createModuleEnvelope
G4LogicalVolume * createModuleEnvelope(const TOPGeoQBB &geo, int moduleID)
Creates module envelope.
Definition: GeoTOPCreator.cc:244
Belle2::TOP::GeoTOPCreator::~GeoTOPCreator
virtual ~GeoTOPCreator()
Destructor.
Definition: GeoTOPCreator.cc:73
Belle2::TOP::GeoTOPCreator::assembleOptics
G4AssemblyVolume * assembleOptics(const TOPGeoModule &geo)
Assembles optical components (PMT array, prism and bar segments) along z.
Definition: GeoTOPCreator.cc:595
Belle2::BkgSensitiveDetector
The Class for BeamBackground Sensitive Detector.
Definition: BkgSensitiveDetector.h:34
Belle2::TOPGeoFrontEnd
Geometry parameters of board stack (front-end electronic module)
Definition: TOPGeoFrontEnd.h:33
Belle2::TOP::GeoTOPCreator::m_numDecoupledPMTs
int m_numDecoupledPMTs
number of optically decoupled PMT's
Definition: GeoTOPCreator.h:269
Belle2::TOP::GeoTOPCreator::m_numBrokenGlues
int m_numBrokenGlues
number of broken glues
Definition: GeoTOPCreator.h:270
Belle2::TOP::GeoTOPCreator::assembleFrontEnd
G4AssemblyVolume * assembleFrontEnd(const TOPGeoFrontEnd &geo, int N)
Assembles front-end electronics.
Definition: GeoTOPCreator.cc:280
Belle2::TOP::GeoTOPCreator::m_frontEnd
G4AssemblyVolume * m_frontEnd
front-end electronics assembly volume
Definition: GeoTOPCreator.h:267
Belle2::TOP::GeoTOPCreator::createPMT
G4LogicalVolume * createPMT(const TOPGeoPMT &geo)
Creates single PMT.
Definition: GeoTOPCreator.cc:907
Belle2::TOP::GeoTOPCreator::createPMTArray
G4LogicalVolume * createPMTArray(const TOPGeoPMTArray &geo, int moduleID)
Creates PMT array.
Definition: GeoTOPCreator.cc:851
Belle2::TOP::GeoTOPCreator::createHoneycombPanel
G4LogicalVolume * createHoneycombPanel(const TOPGeoQBB &geo, EPanelType type)
Creates honeycomb panel.
Definition: GeoTOPCreator.cc:495
Belle2::TOP::GeoTOPCreator::createSideRail
G4LogicalVolume * createSideRail(const TOPGeoQBB &geo, ESideRailType type)
Creates side rail.
Definition: GeoTOPCreator.cc:558
Belle2::TOP::GeoTOPCreator::m_sensitivePCB2
BkgSensitiveDetector * m_sensitivePCB2
PCB sensitive for BG studies.
Definition: GeoTOPCreator.h:261
Belle2::TOP::TOPGeometryPar::Instance
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
Definition: TOPGeometryPar.cc:45
Belle2::TOP::SensitivePMT
Class providing SimHits.
Definition: SensitivePMT.h:40
Belle2::TOP::GeoTOPCreator::createBox
G4LogicalVolume * createBox(const std::string &name, double A, double B, double C, const std::string &materialName)
Creates material box.
Definition: GeoTOPCreator.cc:984
Belle2::TOPGeoModule
Geometry parameters of a module (optical components + positioning)
Definition: TOPGeoModule.h:40
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPGeoPMTArray
Geometry parameters of MCP-PMT array.
Definition: TOPGeoPMTArray.h:34
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41
Belle2::TOP::GeoTOPCreator::m_numPeelOffRegions
int m_numPeelOffRegions
number of peel-off regions
Definition: GeoTOPCreator.h:271
Belle2::TOP::GeoTOPCreator
Geometry creator for TOP counter.
Definition: GeoTOPCreator.h:43
Belle2::TOP::GeoTOPCreator::ESideRailType
ESideRailType
Side rail types.
Definition: GeoTOPCreator.h:94
Belle2::TOP::GeoTOPCreator::m_sensitivePMT
SensitivePMT * m_sensitivePMT
Sensitive vol.
Definition: GeoTOPCreator.h:258
Belle2::TOPGeoMirrorSegment
Geometry parameters of a mirror segment.
Definition: TOPGeoMirrorSegment.h:32
Belle2::TOP::GeoTOPCreator::GeoTOPCreator
GeoTOPCreator()
Constructor.
Definition: GeoTOPCreator.cc:69
Belle2::TOP::GeoTOPCreator::m_moduleEnvelope
G4UnionSolid * m_moduleEnvelope
module envelope solid
Definition: GeoTOPCreator.h:265
Belle2::geometry::CreatorBase
Pure virtual base class for all geometry creators.
Definition: CreatorBase.h:31
Belle2::TOP::GeoTOPCreator::createBoardStack
G4LogicalVolume * createBoardStack(const TOPGeoFrontEnd &geo, int N)
Creates board stack.
Definition: GeoTOPCreator.cc:333
Belle2::TOP::GeoTOPCreator::create
virtual void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creation of the detector geometry from Gearbox (XML).
Definition: GeoTOPCreator.cc:83
Belle2::TOP::GeoTOPCreator::assembleQBB
G4AssemblyVolume * assembleQBB(const TOPGeoQBB &geo)
Assembles QBB.
Definition: GeoTOPCreator.cc:375
Belle2::TOP::GeoTOPCreator::m_sensitivePCB1
BkgSensitiveDetector * m_sensitivePCB1
PCB sensitive for BG studies.
Definition: GeoTOPCreator.h:260
Belle2::TOP::GeoTOPCreator::createMirrorSegment
G4LogicalVolume * createMirrorSegment(const TOPGeoMirrorSegment &geo, int moduleID)
Creates quartz segment with spherical mirror.
Definition: GeoTOPCreator.cc:702
Belle2::TOP::GeoTOPCreator::createModule
G4LogicalVolume * createModule(const TOPGeometry &geo, int moduleID)
Creates single module.
Definition: GeoTOPCreator.cc:204
Belle2::TOP::GeoTOPCreator::createPayloads
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Creation of payloads.
Definition: GeoTOPCreator.cc:101
Belle2::TOP::TOPGeometryPar
Singleton class for TOP Geometry Parameters.
Definition: TOPGeometryPar.h:47
Belle2::TOP::GeoTOPCreator::m_topgp
TOPGeometryPar * m_topgp
singleton class
Definition: GeoTOPCreator.h:262
Belle2::TOP::GeoTOPCreator::createPrism
G4LogicalVolume * createPrism(const TOPGeoPrism &geo, int moduleID)
Creates quartz prism.
Definition: GeoTOPCreator.cc:767
Belle2::geometry::GeometryTypes
GeometryTypes
Flag indiciating the type of geometry to be used.
Definition: GeometryManager.h:39
Belle2::TOP::GeoTOPCreator::createExtrudedSolid
G4LogicalVolume * createExtrudedSolid(const std::string &name, const Polygon &shape, double length, const std::string &materialName)
Creates material extruded solid.
Definition: GeoTOPCreator.cc:1025
Belle2::TOP::GeoTOPCreator::createFromDB
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creation of the detector geometry from database.
Definition: GeoTOPCreator.cc:123
Belle2::TOP::GeoTOPCreator::EPanelType
EPanelType
Honeycomb panel types.
Definition: GeoTOPCreator.h:89