Belle II Software  release-08-01-10
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 
23 class G4LogicalVolume;
24 class G4Material;
25 
26 namespace Belle2 {
32  class GearDir;
33 
34  namespace arich {
35 
36  class SensitiveDetector;
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 
68  virtual void create(const GearDir& content, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
69  {
70  m_config = createConfiguration(content);
71 
72  // override geometry configuration from the DB
74 
75  createGeometry(topVolume, type);
76  }
77 
79  virtual void createPayloads(const GearDir& content, const IntervalOfValidity& iov) override
80  {
82  importObj.construct(createConfiguration(content));
83  importObj.import(iov);
84  }
85 
87  virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
88  {
90  if (!dbObj) {
91  // Check that we found the object and if not report the problem
92  B2FATAL("No configuration for " << name << " found.");
93  }
94  m_config = *dbObj;
95  createGeometry(topVolume, type);
96  }
97 
98  private:
99 
101  G4LogicalVolume* buildHAPD(const ARICHGeoHAPD& hapdPar);
102 
104  G4LogicalVolume* buildMerger(const ARICHGeoMerger& mergerGeo);
105 
107  G4LogicalVolume* buildMergerEnvelope(const ARICHGeoMerger& mergerGeo, int type);
108 
110  G4LogicalVolume* buildCables(const ARICHGeoCablesEnvelope& cablesGeo);
111 
113  G4LogicalVolume* buildMirror(const ARICHGeometryConfig& detectorGeo);
114 
116  G4LogicalVolume* buildDetectorPlane(const ARICHGeometryConfig& detectorGeo);
117 
119  G4LogicalVolume* buildMergerPCBEnvelopePlane(const ARICHGeometryConfig& detectorGeo);
120 
122  G4LogicalVolume* buildCoolingEnvelopePlane(const ARICHGeoCooling& coolingGeo);
123 
125  G4LogicalVolume* buildCoolingTube(const unsigned i_volumeID, const ARICHGeoCooling& coolingGeo);
126 
128  G4LogicalVolume* buildCoolingTorus(const unsigned i_volumeID, const ARICHGeoCooling& coolingGeo);
129 
131  G4LogicalVolume* buildCoolingTestPlate(const ARICHGeoCooling& coolingGeo);
132 
134  G4LogicalVolume* buildFEBCoolingBody(const ARICHGeoFEBCooling& coolingv2Geo);
135 
137  G4LogicalVolume* buildMergerCooling(unsigned iType);
138 
140  G4LogicalVolume* buildAerogelPlane(const ARICHGeometryConfig& detectorGeo);
141 
143  G4LogicalVolume* buildAerogelPlaneAveragedOverLayers(const ARICHGeometryConfig& detectorGeo);
144 
146  G4LogicalVolume* buildAerogelPlaneWithIndividualTilesProp(const ARICHGeometryConfig& detectorGeo);
147 
149  G4LogicalVolume* buildSimpleAerogelPlane(const ARICHGeometryConfig& detectorGeo);
150 
152  G4LogicalVolume* buildDetectorSupportPlate(const ARICHGeometryConfig& detectorGeo);
153 
155  void makeJoint(G4Material* supportMaterial, const std::vector<double>& pars, G4AssemblyVolume* assemblyWedge);
156 
158  double getAvgRINDEX(G4Material* material);
159 
162 
165 
168 
171 
174  };
175 
176  }
178 }
179 
180 #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.