Belle II Software  release-05-01-25
GeoARICHCreator.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * Leonid Burmistrov *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef GEOARICHCREATOR_H
12 #define GEOARICHCREATOR_H
13 
14 #include <geometry/CreatorBase.h>
15 #include <framework/logging/Logger.h>
16 #include <arich/dbobjects/ARICHGeometryConfig.h>
17 #include <framework/database/DBObjPtr.h>
18 #include <framework/database/DBImportObjPtr.h>
19 #include <framework/database/IntervalOfValidity.h>
20 #include <arich/dbobjects/ARICHModulesInfo.h>
21 #include <arich/dbobjects/ARICHGeoMergerCooling.h>
22 
23 #include <G4AssemblyVolume.hh>
24 
25 class G4LogicalVolume;
26 class G4Material;
27 
28 namespace Belle2 {
34  class GearDir;
35 
36  namespace arich {
37 
38  class SensitiveDetector;
39  class SensitiveAero;
40 
43 
44  private:
45 
48  {
49  ARICHGeometryConfig arichGeometryConfig(param);
50  return arichGeometryConfig;
51  }
52 
54  void createGeometry(G4LogicalVolume& topVolume, geometry::GeometryTypes type);
55 
56  public:
57 
60 
62  virtual ~GeoARICHCreator();
63 
70  virtual void create(const GearDir& content, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
71  {
72  m_config = createConfiguration(content);
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  G4AssemblyVolume* makeJoint(G4Material* supportMaterial, const std::vector<double>& pars);
158 
160  double getAvgRINDEX(G4Material* material);
161 
164 
167 
170 
173 
176  };
177 
178  }
180 }
181 
182 #endif /* GEOARICHCREATOR_H */
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::ARICHGeometryConfig
The Class for ARICH Geometry Parameters.
Definition: ARICHGeometryConfig.h:42
Belle2::arich::GeoARICHCreator::m_config
ARICHGeometryConfig m_config
geometry configuration
Definition: GeoARICHCreator.h:163
Belle2::arich::SensitiveDetector
The Class for ARICH Sensitive Detector.
Definition: SensitiveDetector.h:36
Belle2::DBStore::addConstantOverride
void addConstantOverride(const std::string &name, TObject *obj, bool oneRun=false)
Add constant override payload.
Definition: DBStore.cc:204
Belle2::arich::GeoARICHCreator::buildMirror
G4LogicalVolume * buildMirror(const ARICHGeometryConfig &detectorGeo)
build mirrors
Definition: GeoARICHCreator.cc:1611
Belle2::arich::GeoARICHCreator::buildDetectorPlane
G4LogicalVolume * buildDetectorPlane(const ARICHGeometryConfig &detectorGeo)
build detector plane
Definition: GeoARICHCreator.cc:945
Belle2::arich::GeoARICHCreator::buildCables
G4LogicalVolume * buildCables(const ARICHGeoCablesEnvelope &cablesGeo)
build the cables envelop with effective material describing cables
Definition: GeoARICHCreator.cc:1167
Belle2::arich::GeoARICHCreator::createFromDB
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Create the geometry from the Database.
Definition: GeoARICHCreator.h:89
Belle2::arich::GeoARICHCreator::buildFEBCoolingBody
G4LogicalVolume * buildFEBCoolingBody(const ARICHGeoFEBCooling &coolingv2Geo)
build FEB cooling bodies (cooling system update after phase 2)
Definition: GeoARICHCreator.cc:1184
Belle2::arich::GeoARICHCreator::m_modInfo
DBObjPtr< ARICHModulesInfo > m_modInfo
information on installed modules from the DB
Definition: GeoARICHCreator.h:174
Belle2::arich::GeoARICHCreator::buildCoolingTorus
G4LogicalVolume * buildCoolingTorus(const unsigned i_volumeID, const ARICHGeoCooling &coolingGeo)
build cooling tube (G4Torus)
Definition: GeoARICHCreator.cc:1313
Belle2::arich::GeoARICHCreator::createGeometry
void createGeometry(G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create detector geometry.
Definition: GeoARICHCreator.cc:90
Belle2::arich::GeoARICHCreator::buildHAPD
G4LogicalVolume * buildHAPD(const ARICHGeoHAPD &hapdPar)
build the HAPD modules
Definition: GeoARICHCreator.cc:850
Belle2::arich::GeoARICHCreator::buildCoolingTestPlate
G4LogicalVolume * buildCoolingTestPlate(const ARICHGeoCooling &coolingGeo)
build cooling test plates
Definition: GeoARICHCreator.cc:1382
Belle2::DBImportObjPtr::construct
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
Definition: DBImportObjPtr.h:57
Belle2::DBImportBase::import
bool import(const IntervalOfValidity &iov)
Import the object to database.
Definition: DBImportBase.cc:38
Belle2::arich::GeoARICHCreator::buildAerogelPlaneWithIndividualTilesProp
G4LogicalVolume * buildAerogelPlaneWithIndividualTilesProp(const ARICHGeometryConfig &detectorGeo)
with individual properties of aerogel tiles
Definition: GeoARICHCreator.cc:615
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::OptionalDBObjPtr
Optional DBObjPtr: This class behaves the same as the DBObjPtr except that it will not raise errors w...
Definition: DBObjPtr.h:55
Belle2::arich::GeoARICHCreator::m_mergerCooling
OptionalDBObjPtr< ARICHGeoMergerCooling > m_mergerCooling
merger cooling bodies geometry from the DB
Definition: GeoARICHCreator.h:175
Belle2::arich::GeoARICHCreator::buildMergerCooling
G4LogicalVolume * buildMergerCooling(unsigned iType)
build merger cooling bodies (cooling system update after phase 2)
Definition: GeoARICHCreator.cc:1027
Belle2::arich::GeoARICHCreator
The creator for the ARICH geometry of the Belle II detector.
Definition: GeoARICHCreator.h:42
Belle2::arich::GeoARICHCreator::createConfiguration
ARICHGeometryConfig createConfiguration(const GearDir &param)
Reads ARICH geometry parameters from the xml files and createst DB class ARICHGeometryConfig.
Definition: GeoARICHCreator.h:47
Belle2::arich::GeoARICHCreator::createPayloads
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
creates DB payload for ARICHGeometryConfig class
Definition: GeoARICHCreator.h:81
Belle2::arich::GeoARICHCreator::makeJoint
G4AssemblyVolume * makeJoint(G4Material *supportMaterial, const std::vector< double > &pars)
build joints of the ARICH support structure
Definition: GeoARICHCreator.cc:1647
Belle2::arich::GeoARICHCreator::buildMergerPCBEnvelopePlane
G4LogicalVolume * buildMergerPCBEnvelopePlane(const ARICHGeometryConfig &detectorGeo)
build merger PCB assembly envelope plane
Definition: GeoARICHCreator.cc:1092
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::arich::GeoARICHCreator::buildSimpleAerogelPlane
G4LogicalVolume * buildSimpleAerogelPlane(const ARICHGeometryConfig &detectorGeo)
build simple aerogel plane (for cosmic test)
Definition: GeoARICHCreator.cc:441
Belle2::arich::GeoARICHCreator::buildMerger
G4LogicalVolume * buildMerger(const ARICHGeoMerger &mergerGeo)
build the merger PCB logical volume
Definition: GeoARICHCreator.cc:974
Belle2::arich::GeoARICHCreator::m_sensitiveAero
SensitiveAero * m_sensitiveAero
pointer to sensitive aerogel - used instead of tracking
Definition: GeoARICHCreator.h:169
Belle2::ARICHGeoMerger
Geometry parameters of Merger PCB.
Definition: ARICHGeoMerger.h:36
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41
Belle2::DBImportObjPtr
Class for importing a single object to the database.
Definition: DBImportObjPtr.h:33
Belle2::arich::GeoARICHCreator::~GeoARICHCreator
virtual ~GeoARICHCreator()
The destructor of the GeoARICHreator class.
Definition: GeoARICHCreator.cc:81
Belle2::arich::GeoARICHCreator::m_sensitive
SensitiveDetector * m_sensitive
pointer to sensitive detector
Definition: GeoARICHCreator.h:166
Belle2::DBStore::Instance
static DBStore & Instance()
Instance of a singleton DBStore.
Definition: DBStore.cc:36
Belle2::arich::GeoARICHCreator::buildAerogelPlane
G4LogicalVolume * buildAerogelPlane(const ARICHGeometryConfig &detectorGeo)
build aerogel plane
Definition: GeoARICHCreator.cc:494
Belle2::arich::GeoARICHCreator::create
virtual void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creates the ROOT Objects for the ARICH geometry.
Definition: GeoARICHCreator.h:70
Belle2::arich::GeoARICHCreator::GeoARICHCreator
GeoARICHCreator()
Constructor of the GeoARICHCreator class.
Definition: GeoARICHCreator.cc:75
Belle2::arich::GeoARICHCreator::buildAerogelPlaneAveragedOverLayers
G4LogicalVolume * buildAerogelPlaneAveragedOverLayers(const ARICHGeometryConfig &detectorGeo)
build aerogel plane with average properties of aerogel per layer
Definition: GeoARICHCreator.cc:505
Belle2::arich::SensitiveAero
This is optional (temporary) class that provides information on track parameters on aerogel plane,...
Definition: SensitiveAero.h:32
Belle2::arich::GeoARICHCreator::buildCoolingTube
G4LogicalVolume * buildCoolingTube(const unsigned i_volumeID, const ARICHGeoCooling &coolingGeo)
build cooling tube (G4Tubs)
Definition: GeoARICHCreator.cc:1298
Belle2::ARICHGeoCablesEnvelope
Geometry parameters of cable envelope.
Definition: ARICHGeoCablesEnvelope.h:36
Belle2::arich::GeoARICHCreator::m_isBeamBkgStudy
int m_isBeamBkgStudy
flag the beam background study
Definition: GeoARICHCreator.h:172
Belle2::arich::GeoARICHCreator::getAvgRINDEX
double getAvgRINDEX(G4Material *material)
get refractive index of the material
Definition: GeoARICHCreator.cc:1637
Belle2::ARICHGeoCooling
Geometry parameters of Cooling System.
Definition: ARICHGeoCooling.h:36
Belle2::arich::GeoARICHCreator::buildMergerEnvelope
G4LogicalVolume * buildMergerEnvelope(const ARICHGeoMerger &mergerGeo, int type)
build single merger and merger cooling body envelope logical volume
Definition: GeoARICHCreator.cc:1080
Belle2::geometry::CreatorBase
Pure virtual base class for all geometry creators.
Definition: CreatorBase.h:31
Belle2::PXD::SensitiveDetector
VXD::SensitiveDetector< PXDSimHit, PXDTrueHit > SensitiveDetector
The PXD Sensitive Detector class.
Definition: SensitiveDetector.h:36
Belle2::arich::GeoARICHCreator::buildCoolingEnvelopePlane
G4LogicalVolume * buildCoolingEnvelopePlane(const ARICHGeoCooling &coolingGeo)
build cooling system assembly envelope plane
Definition: GeoARICHCreator.cc:1335
Belle2::ARICHGeoHAPD
Geometry parameters of HAPD.
Definition: ARICHGeoHAPD.h:34
Belle2::geometry::GeometryTypes
GeometryTypes
Flag indiciating the type of geometry to be used.
Definition: GeometryManager.h:39
Belle2::arich::GeoARICHCreator::buildDetectorSupportPlate
G4LogicalVolume * buildDetectorSupportPlate(const ARICHGeometryConfig &detectorGeo)
build detector support plate
Definition: GeoARICHCreator.cc:1464
Belle2::ARICHGeoFEBCooling
Geometry parameters of Cooling System - version2 (v2).
Definition: ARICHGeoFEBCooling.h:42