Belle II Software development
GeoARICHCreator.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#ifndef GEOARICHCREATOR_H
10#define GEOARICHCREATOR_H
11
12#include <geometry/CreatorBase.h>
13#include <framework/logging/Logger.h>
14#include <arich/dbobjects/ARICHGeometryConfig.h>
15#include <framework/database/DBObjPtr.h>
16#include <framework/database/DBImportObjPtr.h>
17#include <framework/database/IntervalOfValidity.h>
18#include <arich/dbobjects/ARICHModulesInfo.h>
19#include <arich/dbobjects/ARICHGeoMergerCooling.h>
20
21#include <G4AssemblyVolume.hh>
22
23class G4LogicalVolume;
24class G4Material;
25
26namespace Belle2 {
32 class GearDir;
33
34 namespace arich {
35
37 class SensitiveAero;
38
41
42 private:
43
46 {
47 ARICHGeometryConfig arichGeometryConfig(param);
48 return arichGeometryConfig;
49 }
50
52 void createGeometry(G4LogicalVolume& topVolume, geometry::GeometryTypes type);
53
54 public:
55
58
60 virtual ~GeoARICHCreator();
61
70 virtual void create(const GearDir& content, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
71 {
73
74 // override geometry configuration from the DB
76
77 createGeometry(topVolume, type);
78 }
79
81 virtual void createPayloads(const GearDir& content, const IntervalOfValidity& iov) override
82 {
84 importObj.construct(createConfiguration(content));
85 importObj.import(iov);
86 }
87
89 virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
90 {
92 if (!dbObj) {
93 // Check that we found the object and if not report the problem
94 B2FATAL("No configuration for " << name << " found.");
95 }
96 m_config = *dbObj;
97 createGeometry(topVolume, type);
98 }
99
100 private:
101
103 G4LogicalVolume* buildHAPD(const ARICHGeoHAPD& hapdPar);
104
106 G4LogicalVolume* buildMerger(const ARICHGeoMerger& mergerGeo);
107
109 G4LogicalVolume* buildMergerEnvelope(const ARICHGeoMerger& mergerGeo, int type);
110
112 G4LogicalVolume* buildCables(const ARICHGeoCablesEnvelope& cablesGeo);
113
115 G4LogicalVolume* buildMirror(const ARICHGeometryConfig& detectorGeo);
116
118 G4LogicalVolume* buildDetectorPlane(const ARICHGeometryConfig& detectorGeo);
119
121 G4LogicalVolume* buildMergerPCBEnvelopePlane(const ARICHGeometryConfig& detectorGeo);
122
124 G4LogicalVolume* buildCoolingEnvelopePlane(const ARICHGeoCooling& coolingGeo);
125
127 G4LogicalVolume* buildCoolingTube(const unsigned i_volumeID, const ARICHGeoCooling& coolingGeo);
128
130 G4LogicalVolume* buildCoolingTorus(const unsigned i_volumeID, const ARICHGeoCooling& coolingGeo);
131
133 G4LogicalVolume* buildCoolingTestPlate(const ARICHGeoCooling& coolingGeo);
134
136 G4LogicalVolume* buildFEBCoolingBody(const ARICHGeoFEBCooling& coolingv2Geo);
137
139 G4LogicalVolume* buildMergerCooling(unsigned iType);
140
142 G4LogicalVolume* buildAerogelPlane(const ARICHGeometryConfig& detectorGeo);
143
145 G4LogicalVolume* buildAerogelPlaneAveragedOverLayers(const ARICHGeometryConfig& detectorGeo);
146
148 G4LogicalVolume* buildAerogelPlaneWithIndividualTilesProp(const ARICHGeometryConfig& detectorGeo);
149
151 G4LogicalVolume* buildSimpleAerogelPlane(const ARICHGeometryConfig& detectorGeo);
152
154 G4LogicalVolume* buildDetectorSupportPlate(const ARICHGeometryConfig& detectorGeo);
155
157 void makeJoint(G4Material* supportMaterial, const std::vector<double>& pars, G4AssemblyVolume* assemblyWedge);
158
160 double getAvgRINDEX(G4Material* material);
161
164
167
170
173
176 };
177
178 }
180}
181
182#endif /* GEOARICHCREATOR_H */
Geometry parameters of cable envelope.
Geometry parameters of cooling system.
Geometry parameters of Cooling System - version2 (v2).
Geometry parameters of HAPD.
Definition: ARICHGeoHAPD.h:24
Geometry parameters of Merger PCB.
The Class for ARICH Geometry Parameters.
bool import(const IntervalOfValidity &iov)
Import the object to database.
Definition: DBImportBase.cc:36
Class for importing a single object to the database.
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
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.
Optional DBObjPtr: This class behaves the same as the DBObjPtr except that it will not raise errors w...
Definition: DBObjPtr.h:48
The creator for the ARICH geometry of the Belle II detector.
G4LogicalVolume * buildSimpleAerogelPlane(const ARICHGeometryConfig &detectorGeo)
build simple aerogel plane (for cosmic test)
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
creates DB payload for ARICHGeometryConfig class
G4LogicalVolume * buildHAPD(const ARICHGeoHAPD &hapdPar)
build the HAPD modules
void makeJoint(G4Material *supportMaterial, const std::vector< double > &pars, G4AssemblyVolume *assemblyWedge)
build joints of the ARICH support structure
virtual ~GeoARICHCreator()
The destructor of the GeoARICHreator class.
ARICHGeometryConfig createConfiguration(const GearDir &param)
Reads ARICH geometry parameters from the xml files and createst DB class ARICHGeometryConfig.
OptionalDBObjPtr< ARICHGeoMergerCooling > m_mergerCooling
merger cooling bodies geometry from the DB
G4LogicalVolume * buildMergerPCBEnvelopePlane(const ARICHGeometryConfig &detectorGeo)
build merger PCB assembly envelope plane
G4LogicalVolume * buildFEBCoolingBody(const ARICHGeoFEBCooling &coolingv2Geo)
build FEB cooling bodies (cooling system update after phase 2)
G4LogicalVolume * buildCoolingTorus(const unsigned i_volumeID, const ARICHGeoCooling &coolingGeo)
build cooling tube (G4Torus)
G4LogicalVolume * buildAerogelPlaneAveragedOverLayers(const ARICHGeometryConfig &detectorGeo)
build aerogel plane with average properties of aerogel per layer
G4LogicalVolume * buildCables(const ARICHGeoCablesEnvelope &cablesGeo)
build the cables envelop with effective material describing cables
G4LogicalVolume * buildMergerCooling(unsigned iType)
build merger cooling bodies (cooling system update after phase 2)
double getAvgRINDEX(G4Material *material)
get refractive index of the material
G4LogicalVolume * buildCoolingTube(const unsigned i_volumeID, const ARICHGeoCooling &coolingGeo)
build cooling tube (G4Tubs)
void createGeometry(G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create detector geometry.
G4LogicalVolume * buildDetectorSupportPlate(const ARICHGeometryConfig &detectorGeo)
build detector support plate
DBObjPtr< ARICHModulesInfo > m_modInfo
information on installed modules from the DB
G4LogicalVolume * buildAerogelPlane(const ARICHGeometryConfig &detectorGeo)
build aerogel plane
GeoARICHCreator()
Constructor of the GeoARICHCreator class.
SensitiveAero * m_sensitiveAero
pointer to sensitive aerogel - used instead of tracking
virtual void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creates the ROOT Objects for the ARICH geometry.
G4LogicalVolume * buildDetectorPlane(const ARICHGeometryConfig &detectorGeo)
build detector plane
ARICHGeometryConfig m_config
geometry configuration
G4LogicalVolume * buildCoolingEnvelopePlane(const ARICHGeoCooling &coolingGeo)
build cooling system assembly envelope plane
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Create the geometry from the Database.
int m_isBeamBkgStudy
flag the beam background study
G4LogicalVolume * buildMergerEnvelope(const ARICHGeoMerger &mergerGeo, int type)
build single merger and merger cooling body envelope logical volume
G4LogicalVolume * buildMerger(const ARICHGeoMerger &mergerGeo)
build the merger PCB logical volume
SensitiveDetector * m_sensitive
pointer to sensitive detector
G4LogicalVolume * buildAerogelPlaneWithIndividualTilesProp(const ARICHGeometryConfig &detectorGeo)
with individual properties of aerogel tiles
G4LogicalVolume * buildMirror(const ARICHGeometryConfig &detectorGeo)
build mirrors
G4LogicalVolume * buildCoolingTestPlate(const ARICHGeoCooling &coolingGeo)
build cooling test plates
This is optional (temporary) class that provides information on track parameters on aerogel plane,...
Definition: SensitiveAero.h:22
The Class for ARICH Sensitive Detector.
Pure virtual base class for all geometry creators.
Definition: CreatorBase.h:28
static DBStore & Instance()
Instance of a singleton DBStore.
Definition: DBStore.cc:28
void addConstantOverride(const std::string &name, TObject *obj, bool oneRun=false)
Add constant override payload.
Definition: DBStore.cc:204
VXD::SensitiveDetector< PXDSimHit, PXDTrueHit > SensitiveDetector
The PXD Sensitive Detector class.
GeometryTypes
Flag indiciating the type of geometry to be used.
Abstract base class for different kinds of events.