Belle II Software development
ARICHGeometryConfig.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 <framework/gearbox/GearDir.h>
12#include <arich/dbobjects/ARICHGeoHAPD.h>
13#include <arich/dbobjects/ARICHGeoMerger.h>
14#include <arich/dbobjects/ARICHGeoCablesEnvelope.h>
15#include <arich/dbobjects/ARICHGeoCooling.h>
16#include <arich/dbobjects/ARICHGeoFEBCooling.h>
17#include <arich/dbobjects/ARICHGeoDetectorPlane.h>
18#include <arich/dbobjects/ARICHGeoAerogelPlane.h>
19#include <arich/dbobjects/ARICHGeoMirrors.h>
20#include <arich/dbobjects/ARICHGeoMasterVolume.h>
21#include <arich/dbobjects/ARICHGeoSupport.h>
22#include <arich/dbobjects/ARICHGeoGlobalDisplacement.h>
23#include <arich/dbobjects/ARICHGeoMirrorDisplacement.h>
24
25#include <Math/Vector2D.h>
26
27#define MAX_N_ALAYERS 5
28#define MAXPTS_QE 100
29
30namespace Belle2 {
37
42
43 public:
44
47
49 explicit ARICHGeometryConfig(const GearDir&);
50
52 void clear(void);
53
55 void print(const std::string& title = "ARICH geometry parameters") const;
56
58 void read(const GearDir& content);
59
63 static void useBasf2Units() {s_unit = Unit::cm; s_unitName = "cm";}
64
65
69 static void useGeantUnits() {s_unit = Unit::mm; s_unitName = "mm";}
70
71
73 double getDetectorZPosition() const;
74
76 int doBeamBackgroundStudy() const;
77
85 ROOT::Math::XYVector getChannelPosition(unsigned moduleID, unsigned xChn, unsigned yChn) const;
86
92
98
103 const ARICHGeoMirrors& getMirrors() const {return m_mirrors;}
104
110
116
121 const ARICHGeoHAPD& getHAPDGeometry() const { return m_hapd; }
122
127 const ARICHGeoMerger& getMergerGeometry() const { return m_merger; }
128
134
140
146
152
158
159
164 void setAerogelPlane(const ARICHGeoAerogelPlane& aerogelPlane)
165 {
166 m_aerogelPlane = aerogelPlane;
167 }
168
173 void setDetectorPlane(const ARICHGeoDetectorPlane& detectorPlane)
174 {
175 m_detectorPlane = detectorPlane;
176 }
177
182 void setMirrors(const ARICHGeoMirrors& mirrors)
183 {
184 m_mirrors = mirrors;
185 }
186
191 void setMasterVolume(const ARICHGeoMasterVolume& masterVolume)
192 {
193 m_masterVolume = masterVolume;
194 }
195
200 void setSupportStructure(const ARICHGeoSupport& supportStructure)
201 {
202 m_supportStructure = supportStructure;
203 }
204
210 {
211 m_globalDispl = displ;
212 }
213
219 {
220 m_mirrorDispl = displ;
221 }
222
228 {
229 m_displaceGlobal = use;
230 }
231
237 {
238 m_displaceMirrors = use;
239 }
240
245 {
246 return m_displaceGlobal;
247 }
248
253 {
254 return m_displaceMirrors;
255 }
256
257
258 private:
259
275 int m_bbstudy = 0;
278 void modulesPosition(const GearDir& content);
279
282 };
283
285 {
286 return m_detectorPlane.getPosition().Z() - m_hapd.getModuleSizeZ() / 2.;
287 }
288
290 {
291 return m_bbstudy;
292 }
293
295} // end of namespace Belle2
Geometry parameters of HAPD.
Base class for geometry parameters.
Definition: ARICHGeoBase.h:24
static double s_unit
conversion unit for length
Definition: ARICHGeoBase.h:83
static std::string s_unitName
conversion unit name
Definition: ARICHGeoBase.h:84
Geometry parameters of cable envelope.
Geometry parameters of cooling system.
Geometry parameters of ARICH photon detector plane.
ROOT::Math::XYZVector getPosition() const
Get center point.
Geometry parameters of Cooling System - version2 (v2).
Global displacement parameters for ARICH.
Geometry parameters of HAPD.
Definition: ARICHGeoHAPD.h:24
double getModuleSizeZ() const
Returns module size in z (HAPD + FEB height)
Definition: ARICHGeoHAPD.h:228
Geometry parameters of ARICH Master volume (envelope)
Geometry parameters of Merger PCB.
Mirror displacement parameters for ARICH.
Geometry parameters of HAPD.
Geometry parameters of ARICH support structures and neutron shield.
The Class for ARICH Geometry Parameters.
const ARICHGeoAerogelPlane & getAerogelPlane() const
Get geometry configuration of aerogel plane.
ARICHGeoSupport m_supportStructure
support structure geometry configuration
void setMirrorDisplacement(const ARICHGeoMirrorDisplacement &displ)
Set mirror displacement parameters.
ClassDef(ARICHGeometryConfig, 5)
ClassDef, must be the last term before the closing {}.
bool m_displaceGlobal
use global displacement parameters
const ARICHGeoMerger & getMergerGeometry() const
Get Merger PCB geometry parameters.
ARICHGeoMasterVolume m_masterVolume
master volume geometry configuration
void setUseGlobalDisplacement(bool use)
Set whether global displacement should be used.
ARICHGeoGlobalDisplacement m_globalDispl
global displacement parameters
void setUseMirrorDisplacement(bool use)
Set whether mirror displacement should be used.
static void useGeantUnits()
Use Geant4 units when returning geometry parameters.
const ARICHGeoGlobalDisplacement & getGlobalDisplacement() const
Get global displacement parameters.
ARICHGeoMirrors m_mirrors
mirrors geometry configuration
void setAerogelPlane(const ARICHGeoAerogelPlane &aerogelPlane)
Set geometry configuration of aerogel plane.
bool m_displaceMirrors
use mirror displacement parameters
const ARICHGeoFEBCooling & getFEBCoolingGeometry() const
Get ARICH FEB cooling system (v2) geometry parameters.
ARICHGeoFEBCooling m_coolingv2
ARICH cooling system (v2) geometry configuration.
bool useMirrorDisplacement() const
Get whether mirror displacement is used.
ARICHGeoCablesEnvelope m_cablesenvelope
ARICH cables envelop geometry configuration.
void setMasterVolume(const ARICHGeoMasterVolume &masterVolume)
Set master volume geometry configuration.
ARICHGeoAerogelPlane m_aerogelPlane
aerogel plane geometry configuration
const ARICHGeoMasterVolume & getMasterVolume() const
Get ARICH master volume geometry configuration.
void read(const GearDir &content)
gets geometry parameters from gearbox.
const ARICHGeoCooling & getCoolingGeometry() const
Get ARICH cooling system geometry parameters.
ROOT::Math::XYVector getChannelPosition(unsigned moduleID, unsigned xChn, unsigned yChn) const
Get position of HAPD (x,y) channel in local ARICH coordinates.
const ARICHGeoMirrors & getMirrors() const
Get mirrors geometry configuration.
const ARICHGeoCablesEnvelope & getCablesEnvelope() const
Get ARICH cables envelop geometry parameters.
ARICHGeoDetectorPlane m_detectorPlane
detector plane geometry configuration
ARICHGeometryConfig()
Default constructor.
ARICHGeoCooling m_cooling
ARICH cooling system geometry configuration.
static void useBasf2Units()
Use basf2 units when returning geometry parameters.
ARICHGeoMerger m_merger
Merger PCB geometry configuration.
void setDetectorPlane(const ARICHGeoDetectorPlane &detectorPlane)
Set geometry configuration of HAPD plane.
const ARICHGeoHAPD & getHAPDGeometry() const
Get HAPD geometry parameters.
ARICHGeoHAPD m_hapd
HAPD geometry configuration.
void setGlobalDisplacement(const ARICHGeoGlobalDisplacement &displ)
Set global displacement parameters.
int m_bbstudy
is beam background study
void print(const std::string &title="ARICH geometry parameters") const
Print some debug information.
void clear(void)
Clears.
ARICHGeoMirrorDisplacement m_mirrorDispl
mirror displacement parameters
bool useGlobalDisplacement() const
Get whether global displacement is used.
const ARICHGeoDetectorPlane & getDetectorPlane() const
Get geometry configuration of HAPD plane.
void setMirrors(const ARICHGeoMirrors &mirrors)
Set mirrors geometry configuration.
const ARICHGeoMirrorDisplacement & getMirrorDisplacement() const
Get mirror displacement parameters.
void modulesPosition(const GearDir &content)
initializes the positions of HAPD modules, with the parameters from xml.
const ARICHGeoSupport & getSupportStructure() const
Get ARICH support structure geometry configuration.
void setSupportStructure(const ARICHGeoSupport &supportStructure)
Set support structure geometry configuration.
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
static const double mm
[millimeters]
Definition: Unit.h:70
static const double cm
Standard units with the value = 1.
Definition: Unit.h:47
double getDetectorZPosition() const
get z position of detector plane (starting z of HAPDs)
int doBeamBackgroundStudy() const
returns 1 if beam background study (to add additional sensitive modules, detect neutrons,...
Abstract base class for different kinds of events.