Belle II Software  release-08-01-10
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 "TVector2.h"
13 #include <arich/dbobjects/ARICHGeoHAPD.h>
14 #include <arich/dbobjects/ARICHGeoMerger.h>
15 #include <arich/dbobjects/ARICHGeoCablesEnvelope.h>
16 #include <arich/dbobjects/ARICHGeoCooling.h>
17 #include <arich/dbobjects/ARICHGeoFEBCooling.h>
18 #include <arich/dbobjects/ARICHGeoDetectorPlane.h>
19 #include <arich/dbobjects/ARICHGeoAerogelPlane.h>
20 #include <arich/dbobjects/ARICHGeoMirrors.h>
21 #include <arich/dbobjects/ARICHGeoMasterVolume.h>
22 #include <arich/dbobjects/ARICHGeoSupport.h>
23 #include <arich/dbobjects/ARICHGeoGlobalDisplacement.h>
24 #include <arich/dbobjects/ARICHGeoMirrorDisplacement.h>
25 
26 #define MAX_N_ALAYERS 5
27 #define MAXPTS_QE 100
28 
29 namespace Belle2 {
36 
41 
42  public:
43 
46 
48  explicit ARICHGeometryConfig(const GearDir&);
49 
51  void clear(void);
52 
54  void print(const std::string& title = "ARICH geometry parameters") const;
55 
57  void read(const GearDir& content);
58 
62  static void useBasf2Units() {s_unit = Unit::cm; s_unitName = "cm";}
63 
64 
68  static void useGeantUnits() {s_unit = Unit::mm; s_unitName = "mm";}
69 
70 
72  double getDetectorZPosition() const;
73 
75  int doBeamBackgroundStudy() const;
76 
84  TVector2 getChannelPosition(unsigned moduleID, unsigned xChn, unsigned yChn) const;
85 
91 
97 
102  const ARICHGeoMirrors& getMirrors() const {return m_mirrors;}
103 
109 
115 
120  const ARICHGeoHAPD& getHAPDGeometry() const { return m_hapd; }
121 
126  const ARICHGeoMerger& getMergerGeometry() const { return m_merger; }
127 
133 
138  const ARICHGeoCooling& getCoolingGeometry() const { return m_cooling; }
139 
145 
151 
157 
158 
163  void setAerogelPlane(const ARICHGeoAerogelPlane& aerogelPlane)
164  {
165  m_aerogelPlane = aerogelPlane;
166  }
167 
172  void setDetectorPlane(const ARICHGeoDetectorPlane& detectorPlane)
173  {
174  m_detectorPlane = detectorPlane;
175  }
176 
181  void setMirrors(const ARICHGeoMirrors& mirrors)
182  {
183  m_mirrors = mirrors;
184  }
185 
190  void setMasterVolume(const ARICHGeoMasterVolume& masterVolume)
191  {
192  m_masterVolume = masterVolume;
193  }
194 
199  void setSupportStructure(const ARICHGeoSupport& supportStructure)
200  {
201  m_supportStructure = supportStructure;
202  }
203 
209  {
210  m_globalDispl = displ;
211  }
212 
218  {
219  m_mirrorDispl = displ;
220  }
221 
222  void setUseGlobalDisplacement(bool use)
223  {
224  m_displaceGlobal = use;
225  }
226 
227  void setUseMirrorDisplacement(bool use)
228  {
229  m_displaceMirrors = use;
230  }
231 
232  bool useGlobalDisplacement() const
233  {
234  return m_displaceGlobal;
235  }
236 
237  bool useMirrorDisplacement() const
238  {
239  return m_displaceMirrors;
240  }
241 
242 
243  private:
244 
257  bool m_displaceMirrors = 0;
258  bool m_displaceGlobal = 0;
260  int m_bbstudy = 0;
263  void modulesPosition(const GearDir& content);
264 
267  };
268 
270  {
271  return m_detectorPlane.getPosition().Z() - m_hapd.getModuleSizeZ() / 2.;
272  }
273 
275  {
276  return m_bbstudy;
277  }
278 
280 } // 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.
TVector3 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 ARICHGeoMirrorDisplacement & getMirrorDisplacement() const
Get mirror displacement parameters.
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 ARICHGeoCooling & getCoolingGeometry() const
Get ARICH cooling system geometry parameters.
const ARICHGeoMirrors & getMirrors() const
Get mirrors geometry configuration.
ARICHGeoMasterVolume m_masterVolume
master volume geometry configuration
const ARICHGeoCablesEnvelope & getCablesEnvelope() const
Get ARICH cables envelop geometry parameters.
ARICHGeoGlobalDisplacement m_globalDispl
global displacement parameters
static void useGeantUnits()
Use Geant4 units when returning geometry 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 ARICHGeoHAPD & getHAPDGeometry() const
Get HAPD geometry parameters.
const ARICHGeoGlobalDisplacement & getGlobalDisplacement() const
Get global displacement parameters.
const ARICHGeoFEBCooling & getFEBCoolingGeometry() const
Get ARICH FEB cooling system (v2) geometry parameters.
ARICHGeoFEBCooling m_coolingv2
ARICH cooling system (v2) geometry configuration.
ARICHGeoCablesEnvelope m_cablesenvelope
ARICH cables envelop geometry configuration.
const ARICHGeoMerger & getMergerGeometry() const
Get Merger PCB geometry parameters.
void setMasterVolume(const ARICHGeoMasterVolume &masterVolume)
Set master volume geometry configuration.
ARICHGeoAerogelPlane m_aerogelPlane
aerogel plane geometry configuration
void read(const GearDir &content)
gets geometry parameters from gearbox.
const ARICHGeoAerogelPlane & getAerogelPlane() const
Get geometry configuration of aerogel plane.
ARICHGeoDetectorPlane m_detectorPlane
detector plane geometry configuration
const ARICHGeoSupport & getSupportStructure() const
Get ARICH support structure geometry configuration.
ARICHGeometryConfig()
Default constructor.
ARICHGeoCooling m_cooling
ARICH cooling system geometry configuration.
static void useBasf2Units()
Use basf2 units when returning geometry parameters.
const ARICHGeoDetectorPlane & getDetectorPlane() const
Get geometry configuration of HAPD plane.
ARICHGeoMerger m_merger
Merger PCB geometry configuration.
void setDetectorPlane(const ARICHGeoDetectorPlane &detectorPlane)
Set geometry configuration of HAPD plane.
ARICHGeoHAPD m_hapd
HAPD geometry configuration.
void setGlobalDisplacement(const ARICHGeoGlobalDisplacement &displ)
Set global displacement parameters.
int m_bbstudy
is beam background study
TVector2 getChannelPosition(unsigned moduleID, unsigned xChn, unsigned yChn) const
Get position of HAPD (x,y) channel in local ARICH coordinates.
void print(const std::string &title="ARICH geometry parameters") const
Print some debug information.
void clear(void)
Clears.
ARICHGeoMirrorDisplacement m_mirrorDispl
mirror displacement parameters
const ARICHGeoMasterVolume & getMasterVolume() const
Get ARICH master volume geometry configuration.
void setMirrors(const ARICHGeoMirrors &mirrors)
Set mirrors geometry configuration.
void modulesPosition(const GearDir &content)
initializes the positions of HAPD modules, with the parameters from xml.
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.