Belle II Software development
ARICHGeometryConfig Class Reference

The Class for ARICH Geometry Parameters. More...

#include <ARICHGeometryConfig.h>

Inheritance diagram for ARICHGeometryConfig:
ARICHGeoBase

Public Member Functions

 ARICHGeometryConfig ()
 Default constructor.
 
 ARICHGeometryConfig (const GearDir &)
 Constructor.
 
void clear (void)
 Clears.
 
void print (const std::string &title="ARICH geometry parameters") const
 Print some debug information.
 
void read (const GearDir &content)
 gets geometry parameters from gearbox.
 
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, ...), 0 else
 
ROOT::Math::XYVector getChannelPosition (unsigned moduleID, unsigned xChn, unsigned yChn) const
 Get position of HAPD (x,y) channel in local ARICH coordinates.
 
const ARICHGeoDetectorPlanegetDetectorPlane () const
 Get geometry configuration of HAPD plane.
 
const ARICHGeoAerogelPlanegetAerogelPlane () const
 Get geometry configuration of aerogel plane.
 
const ARICHGeoMirrorsgetMirrors () const
 Get mirrors geometry configuration.
 
const ARICHGeoMasterVolumegetMasterVolume () const
 Get ARICH master volume geometry configuration.
 
const ARICHGeoSupportgetSupportStructure () const
 Get ARICH support structure geometry configuration.
 
const ARICHGeoHAPDgetHAPDGeometry () const
 Get HAPD geometry parameters.
 
const ARICHGeoMergergetMergerGeometry () const
 Get Merger PCB geometry parameters.
 
const ARICHGeoCablesEnvelopegetCablesEnvelope () const
 Get ARICH cables envelop geometry parameters.
 
const ARICHGeoCoolinggetCoolingGeometry () const
 Get ARICH cooling system geometry parameters.
 
const ARICHGeoFEBCoolinggetFEBCoolingGeometry () const
 Get ARICH FEB cooling system (v2) geometry parameters.
 
const ARICHGeoGlobalDisplacementgetGlobalDisplacement () const
 Get global displacement parameters.
 
const ARICHGeoMirrorDisplacementgetMirrorDisplacement () const
 Get mirror displacement parameters.
 
void setAerogelPlane (const ARICHGeoAerogelPlane &aerogelPlane)
 Set geometry configuration of aerogel plane.
 
void setDetectorPlane (const ARICHGeoDetectorPlane &detectorPlane)
 Set geometry configuration of HAPD plane.
 
void setMirrors (const ARICHGeoMirrors &mirrors)
 Set mirrors geometry configuration.
 
void setMasterVolume (const ARICHGeoMasterVolume &masterVolume)
 Set master volume geometry configuration.
 
void setSupportStructure (const ARICHGeoSupport &supportStructure)
 Set support structure geometry configuration.
 
void setGlobalDisplacement (const ARICHGeoGlobalDisplacement &displ)
 Set global displacement parameters.
 
void setMirrorDisplacement (const ARICHGeoMirrorDisplacement &displ)
 Set mirror displacement parameters.
 
void setUseGlobalDisplacement (bool use)
 Set whether global displacement should be used.
 
void setUseMirrorDisplacement (bool use)
 Set whether mirror displacement should be used.
 
bool useGlobalDisplacement () const
 Get whether global displacement is used.
 
bool useMirrorDisplacement () const
 Get whether mirror displacement is used.
 
void setName (const std::string &name)
 Sets object name.
 
const std::string & getName () const
 Returns object name.
 
virtual bool isConsistent () const
 Check for consistency of data members.
 
virtual void printSurface (const GeoOpticalSurface &surface) const
 Print the content of optical surface.
 
virtual void printPlacement (double x, double y, double z, double rx, double ry, double rz) const
 Print volume positioning parameters.
 

Static Public Member Functions

static void useBasf2Units ()
 Use basf2 units when returning geometry parameters.
 
static void useGeantUnits ()
 Use Geant4 units when returning geometry parameters.
 

Protected Member Functions

 ClassDef (ARICHGeoBase, 2)
 ClassDef.
 

Protected Attributes

std::string m_name
 geometry object name
 

Static Protected Attributes

static double s_unit = Unit::cm
 conversion unit for length
 
static std::string s_unitName
 conversion unit name
 

Private Member Functions

void modulesPosition (const GearDir &content)
 initializes the positions of HAPD modules, with the parameters from xml.
 
 ClassDef (ARICHGeometryConfig, 5)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

ARICHGeoDetectorPlane m_detectorPlane
 detector plane geometry configuration
 
ARICHGeoAerogelPlane m_aerogelPlane
 aerogel plane geometry configuration
 
ARICHGeoMirrors m_mirrors
 mirrors geometry configuration
 
ARICHGeoMasterVolume m_masterVolume
 master volume geometry configuration
 
ARICHGeoSupport m_supportStructure
 support structure geometry configuration
 
ARICHGeoHAPD m_hapd
 HAPD geometry configuration.
 
ARICHGeoMerger m_merger
 Merger PCB geometry configuration.
 
ARICHGeoCablesEnvelope m_cablesenvelope
 ARICH cables envelop geometry configuration.
 
ARICHGeoCooling m_cooling
 ARICH cooling system geometry configuration.
 
ARICHGeoFEBCooling m_coolingv2
 ARICH cooling system (v2) geometry configuration.
 
ARICHGeoGlobalDisplacement m_globalDispl
 global displacement parameters
 
ARICHGeoMirrorDisplacement m_mirrorDispl
 mirror displacement parameters
 
bool m_displaceMirrors = 0
 use mirror displacement parameters
 
bool m_displaceGlobal = 0
 use global displacement parameters
 
int m_bbstudy = 0
 is beam background study
 

Detailed Description

The Class for ARICH Geometry Parameters.

This class provides ARICH geometry parameters for simulation, reconstruction and so on. These parameters are gotten from gearbox.

Definition at line 41 of file ARICHGeometryConfig.h.

Constructor & Destructor Documentation

◆ ARICHGeometryConfig() [1/2]

ARICHGeometryConfig ( )
inline

Default constructor.

Definition at line 46 of file ARICHGeometryConfig.h.

46{};

◆ ARICHGeometryConfig() [2/2]

ARICHGeometryConfig ( const GearDir & content)
explicit

Constructor.

Definition at line 23 of file ARICHGeometryConfig.cc.

24{
25 read(content);
26}
void read(const GearDir &content)
gets geometry parameters from gearbox.

Member Function Documentation

◆ getAerogelPlane()

const ARICHGeoAerogelPlane & getAerogelPlane ( ) const
inline

Get geometry configuration of aerogel plane.

Returns
aerogel plane geometry parameters

Definition at line 97 of file ARICHGeometryConfig.h.

97{return m_aerogelPlane;}

◆ getCablesEnvelope()

const ARICHGeoCablesEnvelope & getCablesEnvelope ( ) const
inline

Get ARICH cables envelop geometry parameters.

Returns
ARICH cables envelop geometry parameters

Definition at line 133 of file ARICHGeometryConfig.h.

133{ return m_cablesenvelope; }

◆ getChannelPosition()

ROOT::Math::XYVector getChannelPosition ( unsigned moduleID,
unsigned xChn,
unsigned yChn ) const

Get position of HAPD (x,y) channel in local ARICH coordinates.

Parameters
moduleIDmodule ID
xChnHAPD x channel
yChnHAPD y channel
Returns
channel position

Definition at line 376 of file ARICHGeometryConfig.cc.

377{
378 const double radius = m_detectorPlane.getSlotR(moduleID);
379 const double phi = m_detectorPlane.getSlotPhi(moduleID);
380 const double cosPhi = std::cos(phi);
381 const double sinPhi = std::sin(phi);
382 ROOT::Math::XYVector origin(radius * cosPhi, radius * sinPhi);
383 double x, y;
384 m_hapd.getXYChannelPos(chX, chY, x, y);
385 // create a vector from x, y that is rotated by phi
386 ROOT::Math::XYVector locPos(x * cosPhi - y * sinPhi,
387 x * sinPhi + y * cosPhi);
388 return origin + locPos;
389}
ARICHGeoDetectorPlane m_detectorPlane
detector plane geometry configuration
ARICHGeoHAPD m_hapd
HAPD geometry configuration.

◆ getCoolingGeometry()

const ARICHGeoCooling & getCoolingGeometry ( ) const
inline

Get ARICH cooling system geometry parameters.

Returns
ARICH cooling system geometry parameters

Definition at line 139 of file ARICHGeometryConfig.h.

139{ return m_cooling; }

◆ getDetectorPlane()

const ARICHGeoDetectorPlane & getDetectorPlane ( ) const
inline

Get geometry configuration of HAPD plane.

Returns
detector plane geometry parameters

Definition at line 91 of file ARICHGeometryConfig.h.

91{return m_detectorPlane;}

◆ getFEBCoolingGeometry()

const ARICHGeoFEBCooling & getFEBCoolingGeometry ( ) const
inline

Get ARICH FEB cooling system (v2) geometry parameters.

Returns
ARICH FEB cooling system (v2) geometry parameters

Definition at line 145 of file ARICHGeometryConfig.h.

145{ return m_coolingv2; }

◆ getGlobalDisplacement()

const ARICHGeoGlobalDisplacement & getGlobalDisplacement ( ) const
inline

Get global displacement parameters.

Returns
global displacement parameters

Definition at line 151 of file ARICHGeometryConfig.h.

151{ return m_globalDispl; }

◆ getHAPDGeometry()

const ARICHGeoHAPD & getHAPDGeometry ( ) const
inline

Get HAPD geometry parameters.

Returns
HAPD geometry parameters

Definition at line 121 of file ARICHGeometryConfig.h.

121{ return m_hapd; }

◆ getMasterVolume()

const ARICHGeoMasterVolume & getMasterVolume ( ) const
inline

Get ARICH master volume geometry configuration.

Returns
master volume geometry parameters

Definition at line 109 of file ARICHGeometryConfig.h.

109{return m_masterVolume;}

◆ getMergerGeometry()

const ARICHGeoMerger & getMergerGeometry ( ) const
inline

Get Merger PCB geometry parameters.

Returns
Merger PCB geometry parameters

Definition at line 127 of file ARICHGeometryConfig.h.

127{ return m_merger; }

◆ getMirrorDisplacement()

const ARICHGeoMirrorDisplacement & getMirrorDisplacement ( ) const
inline

Get mirror displacement parameters.

Returns
mirror displacement parameters

Definition at line 157 of file ARICHGeometryConfig.h.

157{ return m_mirrorDispl; }

◆ getMirrors()

const ARICHGeoMirrors & getMirrors ( ) const
inline

Get mirrors geometry configuration.

Returns
mirrors geometry parameters

Definition at line 103 of file ARICHGeometryConfig.h.

103{return m_mirrors;}

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns object name.

Returns
object name

Definition at line 49 of file ARICHGeoBase.h.

49{return m_name;}

◆ getSupportStructure()

const ARICHGeoSupport & getSupportStructure ( ) const
inline

Get ARICH support structure geometry configuration.

Returns
support structure geometry parameters

Definition at line 115 of file ARICHGeometryConfig.h.

115{return m_supportStructure;}

◆ isConsistent()

virtual bool isConsistent ( ) const
inlinevirtualinherited

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented in ARICHGeoAerogelPlane, ARICHGeoDetectorPlane, ARICHGeoHAPD, ARICHGeoMasterVolume, ARICHGeoMirrors, ARICHGeoSupport, and ARICHPositionElement.

Definition at line 55 of file ARICHGeoBase.h.

55{return false;}

◆ modulesPosition()

void modulesPosition ( const GearDir & content)
private

initializes the positions of HAPD modules, with the parameters from xml.

Definition at line 331 of file ARICHGeometryConfig.cc.

332{
333
334 GearDir detParams(content, "Detector/Plane");
335
336 std::vector<std::pair<double, double>> ringPar;
337
338 for (auto ring : detParams.getNodes("Rings/Ring")) {
339 double r = ring.getLength("r");
340 int nMod = ring.getInt("nModules");
341 ringPar.push_back({r, 2.*M_PI / nMod});
342 }
343
344 m_detectorPlane.setRingPar(ringPar);
345
346 GearDir supportParams(content, "Detector/supportPlate");
347 double modHeight = content.getLength("Detector/Module/height");
348 m_detectorPlane.addSupportPlate(supportParams.getLength("innerRadius"), supportParams.getLength("outerRadius"),
349 supportParams.getLength("thickness"), supportParams.getString("material"));
350 m_detectorPlane.setModuleHoleSize(supportParams.getLength("moduleHoleSize"));
351 m_detectorPlane.setSupportZPosition(supportParams.getLength("zPosition") + (supportParams.getLength("thickness") +
352 supportParams.getLength("backWallHeight")) / 2. - m_masterVolume.getLength() / 2.);
353 m_detectorPlane.setSupportBackWallHeight(supportParams.getLength("backWallHeight"));
354 m_detectorPlane.setSupportBackWallThickness(supportParams.getLength("backWallThickness"));
355
356 m_detectorPlane.setPlacement(0.0, 0.0, detParams.getLength("zPosition") + modHeight / 2. - m_masterVolume.getLength() / 2., 0.0,
357 0.0, 0.0);
358
359}
ARICHGeoMasterVolume m_masterVolume
master volume geometry configuration

◆ print()

void print ( const std::string & title = "ARICH geometry parameters") const
virtual

Print some debug information.

Reimplemented from ARICHGeoBase.

Definition at line 316 of file ARICHGeometryConfig.cc.

317{
318 ARICHGeoBase::print(title);
319 m_detectorPlane.print();
320 m_hapd.print();
321 m_merger.print();
322 m_cablesenvelope.print();
323 m_cooling.print();
324 m_masterVolume.print();
325 m_aerogelPlane.print();
326 m_aerogelPlane.printTileParameters();
327 m_mirrors.print();
328 m_supportStructure.print();
329}
virtual void print(const std::string &title) const
Print the content of the class.
ARICHGeoSupport m_supportStructure
support structure geometry configuration
ARICHGeoMirrors m_mirrors
mirrors geometry configuration
ARICHGeoCablesEnvelope m_cablesenvelope
ARICH cables envelop geometry configuration.
ARICHGeoAerogelPlane m_aerogelPlane
aerogel plane geometry configuration
ARICHGeoCooling m_cooling
ARICH cooling system geometry configuration.
ARICHGeoMerger m_merger
Merger PCB geometry configuration.

◆ printPlacement()

void printPlacement ( double x,
double y,
double z,
double rx,
double ry,
double rz ) const
virtualinherited

Print volume positioning parameters.

Parameters
xx position
yy position
zz position
rxrotation around x-axis
ryrotation around y-axis
rzrotation around z-axis

Definition at line 25 of file ARICHGeoBase.cc.

26{
27// cout << "Volume positioning information (inside local ARICH frame)" << endl;
28 cout << " Center position; x: " << x << " " << s_unitName << ", y: " << y << " " << s_unitName << ", z: " << z << " " << s_unitName
29 << endl;
30 cout << " Rotations; x-axis: " << rx << " y-axis: " << ry << " z-axis: " << rz << " (in rad)" << endl;
31}
static std::string s_unitName
conversion unit name

◆ printSurface()

void printSurface ( const GeoOpticalSurface & surface) const
virtualinherited

Print the content of optical surface.

Parameters
surfaceoptical surface parameters

Definition at line 32 of file ARICHGeoBase.cc.

33{
34 cout << " Optical surface: ";
35 if (surface.getName().empty() and !surface.hasProperties()) {
36 cout << "not defined" << endl;
37 return;
38 }
39 cout << surface.getName();
40 cout << ", model: " << surface.getModel();
41 cout << ", finish: " << surface.getFinish();
42 cout << ", type: " << surface.getType();
43 cout << ", value: " << surface.getValue();
44 cout << endl;
45 if (surface.hasProperties()) {
46 for (const auto& property : surface.getProperties()) {
47 cout << " - property: ";
48 cout << property.getName() << " [";
49 for (const auto& value : property.getValues()) cout << value << ", ";
50 cout << "], @[";
51 for (const auto& value : property.getEnergies()) cout << value / Unit::eV << ", ";
52 cout << "] eV" << endl;
53 }
54 } else {
55 cout << " - properties: None" << endl;
56 }
57
58}
const std::string & getName() const
get name of the optical surface
int getFinish() const
get finish of the surface
const std::vector< GeoMaterialProperty > & getProperties() const
get all properties
double getValue() const
get value for the surface condition
int getType() const
get type of the surface
bool hasProperties() const
check if the material has at least one property
int getModel() const
get model for the surface
static const double eV
[electronvolt]
Definition Unit.h:112

◆ read()

void read ( const GearDir & content)

gets geometry parameters from gearbox.

Definition at line 28 of file ARICHGeometryConfig.cc.

29{
30 //------------------------------
31 // Get ARICH geometry parameters from the gearbox
32 //------------------------------
33 m_bbstudy = content.getInt("BeamBackgroundStudy");
34
35 GearDir envParams(content, "Envelope");
36 m_masterVolume.setVolume(envParams.getLength("innerRadius"), envParams.getLength("outerRadius"), envParams.getLength("length"),
37 std::string("ARICH_Air"));
38 m_masterVolume.setPlacement(envParams.getLength("xPosition"), envParams.getLength("yPosition"),
39 envParams.getLength("zPosition") + envParams.getLength("length") / 2., envParams.getAngle("xRotation"),
40 envParams.getAngle("yRotation"), envParams.getAngle("zRotation"));
41
42 GearDir displParams(content, "GlobalDisplacement");
43 m_displaceGlobal = !displParams.getBool("Disable");
44 m_globalDispl.setX(displParams.getLength("x"));
45 m_globalDispl.setY(displParams.getLength("y"));
46 m_globalDispl.setZ(displParams.getLength("z"));
47 m_globalDispl.setAlpha(displParams.getAngle("alpha"));
48 m_globalDispl.setBeta(displParams.getAngle("beta"));
49 m_globalDispl.setGamma(displParams.getAngle("gamma"));
50
51 auto& materials = geometry::Materials::getInstance();
52
53 GearDir detParams(content, "Detector/Module");
54
55 m_hapd.setWallThickness(detParams.getLength("HAPD/windowThickness"));
56 m_hapd.setPadSize(detParams.getLength("HAPD/padSize"));
57 m_hapd.setChipGap(detParams.getLength("HAPD/chipGap"));
58 m_hapd.setNPads(int(sqrt(detParams.getInt("HAPD/padNum"))), int(sqrt(detParams.getInt("HAPD/padNum"))));
59 m_hapd.setWinThickness(detParams.getLength("HAPD/windowThickness"));
60 m_hapd.setWinRefIndex(detParams.getDouble("HAPD/windowRefIndex"));
61 m_hapd.setModuleSizeZ(detParams.getLength("height"));
62 m_hapd.setWallMaterial(detParams.getString("HAPD/wallMaterial"));
63 m_hapd.setWinMaterial(detParams.getString("HAPD/windowMaterial"));
64
65 m_hapd.setFEBVolume(detParams.getLength("FEB/size"), detParams.getLength("FEB/size"), detParams.getLength("FEB/thickness"),
66 detParams.getString("FEB/material"));
67 m_hapd.setHAPDVolume(detParams.getLength("HAPD/size"), detParams.getLength("HAPD/size"), detParams.getLength("HAPD/height"),
68 detParams.getString("HAPD/fillMaterial"));
69
70 GearDir apdSurfParams(detParams, "HAPD/Surface");
71 m_hapd.setAPDVolume(detParams.getLength("HAPD/apdSize"), detParams.getLength("HAPD/apdSize"),
72 detParams.getLength("HAPD/apdThickness"), detParams.getString("HAPD/apdMaterial"),
73 materials.createOpticalSurfaceConfig(apdSurfParams));
74
75 GearDir mergerParams(content, "MergerPCB");
76 // read merger PCB parameters
77 m_merger.setMergerPCBMaterialName(mergerParams.getString("merger/material"));
78 m_merger.setMergerPCBLenght(mergerParams.getDouble("merger/sizeL"));
79 m_merger.setMergerPCBWidth(mergerParams.getDouble("merger/sizeW"));
80 m_merger.setMergerPCBThickness(mergerParams.getDouble("merger/thickness"));
81 m_merger.setMergerPCBscrewholeR(mergerParams.getDouble("merger/mergerPCBscrewholeR"));
82 m_merger.setMergerPCBscrewholePosdY(mergerParams.getDouble("merger/mergerPCBscrewholePosdY"));
83 m_merger.setMergerPCBscrewholePosdX1(mergerParams.getDouble("merger/mergerPCBscrewholePosdX1"));
84 m_merger.setMergerPCBscrewholePosdX2(mergerParams.getDouble("merger/mergerPCBscrewholePosdX2"));
85 m_merger.setSingleMergerEnvelopeSizeL(mergerParams.getDouble("merger/envelopeSizeL"));
86 m_merger.setSingleMergerEnvelopeSizeW(mergerParams.getDouble("merger/envelopeSizeW"));
87 m_merger.setSingleMergerEnvelopeThickness(mergerParams.getDouble("merger/envelopeThickness"));
88 m_merger.setSingleMergerenvelopeDeltaZ(mergerParams.getArray("merger/envelopeDeltaZ"));
89 m_merger.setMergerSlotID(mergerParams.getArray("merger/mergerSlotID"));
90 m_merger.setMergerPosR(mergerParams.getArray("merger/mergerPosR"));
91 m_merger.setMergerAngle(mergerParams.getArray("merger/mergerAngle"));
92 m_merger.setMergerOrientation(mergerParams.getArray("merger/mergerOrientation"));
93 m_merger.setEnvelopeCenterPosition(mergerParams.getDouble("mergerEnvelope/x0"),
94 mergerParams.getDouble("mergerEnvelope/y0"),
95 mergerParams.getDouble("mergerEnvelope/z0"));
96 m_merger.setSingleMergeEnvelopePosition(mergerParams.getDouble("merger/envelopePosX0"),
97 mergerParams.getDouble("merger/envelopePosY0"),
98 mergerParams.getDouble("merger/envelopePosZ0"));
99 m_merger.setEnvelopeOuterRadius(mergerParams.getDouble("mergerEnvelope/outerRadius"));
100 m_merger.setEnvelopeInnerRadius(mergerParams.getDouble("mergerEnvelope/innerRadius"));
101 m_merger.setEnvelopeThickness(mergerParams.getDouble("mergerEnvelope/thickness"));
102 m_merger.checkMergerPositionsDataConsistency();
103 //m_merger.print();
104
105 GearDir cablesEnvelopParams(content, "cablesEnvelope");
106 // read cables envelop parameters
107 m_cablesenvelope.setCablesEffectiveMaterialName(cablesEnvelopParams.getString("material"));
108 m_cablesenvelope.setEnvelopeOuterRadius(cablesEnvelopParams.getDouble("outerRadius"));
109 m_cablesenvelope.setEnvelopeInnerRadius(cablesEnvelopParams.getDouble("innerRadius"));
110 m_cablesenvelope.setEnvelopeThickness(cablesEnvelopParams.getDouble("thickness"));
111 m_cablesenvelope.setEnvelopeCenterPosition(cablesEnvelopParams.getDouble("x0"), cablesEnvelopParams.getDouble("y0"),
112 cablesEnvelopParams.getDouble("z0"));
113 m_cablesenvelope.checkCablesEnvelopDataConsistency();
114 //m_cablesenvelope.print();
115
116 GearDir coolingParams(content, "coolingPipe");
117 // read ARICH cooling system parameters
118 m_cooling.setEnvelopeOuterRadius(coolingParams.getDouble("coolingEnvelope/outerRadius"));
119 m_cooling.setEnvelopeInnerRadius(coolingParams.getDouble("coolingEnvelope/innerRadius"));
120 m_cooling.setEnvelopeThickness(coolingParams.getDouble("coolingEnvelope/thickness"));
121 m_cooling.setEnvelopeCenterPosition(coolingParams.getDouble("coolingEnvelope/x0"), coolingParams.getDouble("coolingEnvelope/y0"),
122 coolingParams.getDouble("coolingEnvelope/z0"));
123 m_cooling.setCoolingPipeMaterialName(coolingParams.getString("cooling/material"));
124 m_cooling.setRmin(coolingParams.getDouble("cooling/Rmin"));
125 m_cooling.setRmax(coolingParams.getDouble("cooling/Rmax"));
126 m_cooling.setCoolingGeometryID(coolingParams.getArray("cooling/coolingGeometryID"));
127 m_cooling.setCoolingL(coolingParams.getArray("cooling/coolingL"));
128 m_cooling.setCoolingPosPhi(coolingParams.getArray("cooling/coolingPosPhi"));
129 m_cooling.setCoolingPosR(coolingParams.getArray("cooling/coolingPosR"));
130 m_cooling.setCoolinRotationAngle(coolingParams.getArray("cooling/coolinRotationAngle"));
131 m_cooling.setCoolingTestPlateMaterialName(coolingParams.getString("coolingTestPlate/material"));
132 m_cooling.setColdTubeMaterialName(coolingParams.getString("coolingTestPlate/materialColdTube"));
133 m_cooling.setCoolingTestPlateslengths(coolingParams.getDouble("coolingTestPlate/lengthX"),
134 coolingParams.getDouble("coolingTestPlate/lengthY"), coolingParams.getDouble("coolingTestPlate/lengthZ"));
135 m_cooling.setColdTubeR(coolingParams.getDouble("coolingTestPlate/coldTubeR"));
136 m_cooling.setColdTubeSubtractedR(coolingParams.getDouble("coolingTestPlate/coldTubeSubtractedR"));
137 m_cooling.setColdTubeWallThickness(coolingParams.getDouble("coolingTestPlate/coldTubeWallThickness"));
138 m_cooling.setDepthColdTubeInPlate(coolingParams.getDouble("coolingTestPlate/depthColdTubeInPlate"));
139 m_cooling.setColdTubeSpacing(coolingParams.getDouble("coolingTestPlate/coldTubeSpacing"));
140 m_cooling.setColdTubeNumber(coolingParams.getInt("coolingTestPlate/coldTubeNumber"));
141 m_cooling.setCoolingTestPlatePosR(coolingParams.getArray("coolingTestPlate/coolingTestPlatePosR"));
142 m_cooling.setCoolingTestPlatePosPhi(coolingParams.getArray("coolingTestPlate/coolingTestPlatePosPhi"));
143 m_cooling.setCoolingTestPlatePosZ0(coolingParams.getArray("coolingTestPlate/coolingTestPlatePosZ0"));
144 m_cooling.checkCoolingSystemDataConsistency();
145 //m_cooling.print();
146
147 GearDir coolingFEBParams(content, "febcoolingv2");
148 // read ARICH cooling system (v2) parameters
149 // FEB cooling bodies
150 m_coolingv2.setSmallSquareSize(coolingFEBParams.getDouble("smallSquareSize"));
151 m_coolingv2.setSmallSquareThickness(coolingFEBParams.getDouble("smallSquareThickness"));
152 m_coolingv2.setBigSquareSize(coolingFEBParams.getDouble("bigSquareSize"));
153 m_coolingv2.setBigSquareThickness(coolingFEBParams.getDouble("bigSquareThickness"));
154 m_coolingv2.setRectangleL(coolingFEBParams.getDouble("rectangleL"));
155 m_coolingv2.setRectangleW(coolingFEBParams.getDouble("rectangleW"));
156 m_coolingv2.setRectangleThickness(coolingFEBParams.getDouble("rectangleThickness"));
157 m_coolingv2.setRectangleDistanceFromCenter(coolingFEBParams.getDouble("rectangleDistanceFromCenter"));
158 m_coolingv2.setFebcoolingv2GeometryID(coolingFEBParams.getArray("febcoolingv2GeometryID"));
159
160 // read detector plane parameters
161 modulesPosition(content);
162
163 GearDir mirrParams(content, "Mirrors");
164 if (mirrParams) {
165 m_mirrors.setNMirrors(mirrParams.getInt("nMirrors"));
166 m_mirrors.setStartAngle(mirrParams.getAngle("startAngle"));
167 GearDir surfParams(mirrParams, "Surface");
168 m_mirrors.setMirrorPlate(mirrParams.getLength("thickness"), mirrParams.getLength("width"), mirrParams.getLength("length"),
169 mirrParams.getString("material"), materials.createOpticalSurfaceConfig(surfParams));
170 m_mirrors.setZPosition(mirrParams.getLength("zPosition") + mirrParams.getLength("width") / 2. - m_masterVolume.getLength() / 2.);
171 m_mirrors.setRadius(mirrParams.getLength("radius"));
172 m_mirrors.initializeDefault();
173 }
174
175 GearDir mirrDisplParams(content, "MirrorDisplacement");
176 if (mirrDisplParams) {
177 m_displaceMirrors = !mirrDisplParams.getBool("Disable");
178 for (auto plate : mirrDisplParams.getNodes("Plate")) {
179 int id = plate.getInt("@id");
180 double r = plate.getLength("r");
181 double phi = plate.getAngle("phi");
182 double z = plate.getLength("z");
183 double alpha = plate.getLength("alpha");
184 double beta = plate.getLength("beta");
185 double gamma = plate.getLength("gamma");
186 double origPhi = m_mirrors.getPoint(id).Phi();
187 ARICHPositionElement displEl(r * cos(origPhi + phi), r * sin(origPhi + phi), z, alpha, beta, gamma);
188 m_mirrorDispl.setDisplacementElement(id, displEl);
189 // displEl.print();
190 }
191 }
192 // read and prepare aerogel plane parameters
193 GearDir aerogel(content, "Aerogel");
194
195 std::vector<double> dPhi;
196 std::vector<int> nAeroSlotsIndividualRing;
197 for (auto ring : aerogel.getNodes("slotInRing/Ring")) {
198 dPhi.push_back(2.* M_PI / ring.getInt());
199 nAeroSlotsIndividualRing.push_back(ring.getInt());
200 }
201 std::vector<double> slotR;
202 for (auto ring : aerogel.getNodes("slotR/Ring")) {
203 slotR.push_back(ring.getLength());
204 }
205
206 m_aerogelPlane.setWallRadius(slotR);
207 m_aerogelPlane.setWallDPhi(dPhi);
208 m_aerogelPlane.setNAeroSlotsIndividualRing(nAeroSlotsIndividualRing);
209 m_aerogelPlane.setTileGap(aerogel.getLength("tileGap"));
210 //cout<<"aerogel.getLength(\"tileGap\") = "<<aerogel.getLength("tileGap")<<endl;
211
212 m_aerogelPlane.setWallThickness(aerogel.getLength("wallThickness"));
213 m_aerogelPlane.setWallHeight(aerogel.getLength("wallHeight"));
214 m_aerogelPlane.addSupportPlate(aerogel.getLength("plateInnerR"), aerogel.getLength("plateOuterR"),
215 aerogel.getLength("plateThickness"), aerogel.getString("material"));
216 int ilayer = 1;
217 for (auto layer : aerogel.getNodes("Layers/Layer")) {
218 double thick = layer.getLength("thickness") / Unit::cm;
219 std::string material = layer.getString("material");
220 double refIndex = layer.getDouble("refIndex");
221 double trLen = layer.getLength("trLength");
222 m_aerogelPlane.setAerogelLayer(ilayer, thick, refIndex, trLen, material);
223 ilayer++;
224 //std::cout<<" double thick = layer.getLength(thickness) / Unit::cm = "<<thick<<std::endl;
225 }
226 m_aerogelPlane.setFullAerogelMaterialDescriptionKey(aerogel.getInt("fullAerogelMaterialDescriptionKey"));
227 m_aerogelPlane.setImgTubeThickness(aerogel.getDouble("imgTubeThickness"));
228 m_aerogelPlane.setCompensationARICHairVolumeThick_min(aerogel.getDouble("compensationARICHairVolumeThick_min"));
229
230 // Aerogel tiles
231 GearDir aerotilesDir(content, "AerogelTiles");
232 for (int il = 0; il < ilayer - 1; il++) {
233 int iring = 0;
234 for (auto ns_ring : nAeroSlotsIndividualRing) {
235 iring++;
236 for (int islot = 1; islot < ns_ring + 1; islot++) {
237 for (auto tileNode : aerotilesDir.getNodes("Tiles/Tile")) {
238 int ring = tileNode.getInt("ring");
239 int column = tileNode.getInt("column");
240 int layerN = tileNode.getInt("layer");
241 if (iring == ring && column == islot && il == layerN) {
242 double n = tileNode.getDouble("n");
243 double transmL = tileNode.getDouble("transmL");
244 double thick = tileNode.getDouble("thick");
245 std::string materialName = tileNode.getString("material");
246 m_aerogelPlane.addTileParameters(ring, column, layerN, n, transmL, thick, materialName);
247 }
248 }
249 }
250 }
251 }
252
253 if (m_aerogelPlane.getFullAerogelMaterialDescriptionKey() == 0) {
254 m_aerogelPlane.setPlacement(0.0, 0.0,
255 aerogel.getLength("zPosition") +
256 (aerogel.getLength("wallHeight") + aerogel.getLength("plateThickness") + aerogel.getLength("imgTubeThickness")) / 2.0 -
257 m_masterVolume.getLength() / 2.0,
258 0, 0, 0);
259 } else if (m_aerogelPlane.getFullAerogelMaterialDescriptionKey() == 1) {
260 double wallHeightNew = m_aerogelPlane.getMaximumTotalTileThickness() + m_aerogelPlane.getCompensationARICHairVolumeThick_min();
261 wallHeightNew = wallHeightNew / 10.0; //conversion from mm to cm - this need to be implemented properly
262 //cout<<"m_aerogelPlane.getMaximumTotalTileThickness() = "<<m_aerogelPlane.getMaximumTotalTileThickness()<<endl
263 // <<"m_aerogelPlane.getCompensationARICHairVolumeThick_min() = "<<m_aerogelPlane.getCompensationARICHairVolumeThick_min()<<endl
264 // <<"wallHeightNew = "<<wallHeightNew<<endl;
265 m_aerogelPlane.setPlacement(0.0, 0.0,
266 aerogel.getLength("zPosition") +
267 (wallHeightNew + aerogel.getLength("plateThickness") + aerogel.getLength("imgTubeThickness")) / 2.0 - m_masterVolume.getLength() /
268 2.0,
269 0, 0, 0);
270 } else {
271 B2ERROR("ARICHGeometryConfig::read --> getFullAerogelMaterialDescriptionKey() is wrong");
272 }
273
274 //m_aerogelPlane.print();
275 //m_aerogelPlane.printTileParameters();
276 //m_aerogelPlane.testGetTileParametersFunction();
277 m_aerogelPlane.isConsistent();
278
279 // support structures
280 GearDir supportDir(content, "SupportStructure");
281 for (auto tube : supportDir.getNodes("Tubes/Tube")) {
282 std::string material = tube.getString("material");
283 double innerR = tube.getLength("innerR");
284 double outerR = tube.getLength("outerR");
285 double length = tube.getLength("length");
286 double zPosition = tube.getLength("zPosition") - m_masterVolume.getLength() / 2.;
287 std::string name = tube.getString("name");
288 m_supportStructure.addTube(innerR, outerR, length, zPosition, material, name);
289 }
290 //m_supportStructure.print();
291
292 m_supportStructure.setMaterial(supportDir.getString("material"));
293
294 for (auto wedge : supportDir.getNodes("Wedges/Wedge")) {
295 std::vector<double> pars;
296 int id = wedge.getInt("@id");
297 if (id > 3 || id < 1) continue;
298 for (auto par : wedge.getNodes("par")) {
299 pars.push_back(par.getLength());
300 }
301 m_supportStructure.setWedge(id, pars);
302 }
303
304 for (auto wedge : supportDir.getNodes("Wedges/Placements/Placement")) {
305 int type = wedge.getInt("type");
306 double r = wedge.getLength("r");
307 double phi = wedge.getAngle("phi");
308 double z = wedge.getLength("z") - m_masterVolume.getLength() / 2.;
309 m_supportStructure.addWedge(type, r, phi, z, supportDir.getString("material"));
310 }
311
312 //print();
313
314}
bool m_displaceGlobal
use global displacement parameters
ARICHGeoGlobalDisplacement m_globalDispl
global displacement parameters
bool m_displaceMirrors
use mirror displacement parameters
ARICHGeoFEBCooling m_coolingv2
ARICH cooling system (v2) geometry configuration.
int m_bbstudy
is beam background study
ARICHGeoMirrorDisplacement m_mirrorDispl
mirror displacement parameters
void modulesPosition(const GearDir &content)
initializes the positions of HAPD modules, with the parameters from xml.
static const double cm
Standard units with the value = 1.
Definition Unit.h:47
static Materials & getInstance()
Get a reference to the singleton instance.
Definition Materials.cc:85
double sqrt(double a)
sqrt for double
Definition beamHelpers.h:28

◆ setAerogelPlane()

void setAerogelPlane ( const ARICHGeoAerogelPlane & aerogelPlane)
inline

Set geometry configuration of aerogel plane.

Parameters
aerogelPlaneaerogel plane geometry parameters

Definition at line 164 of file ARICHGeometryConfig.h.

165 {
166 m_aerogelPlane = aerogelPlane;
167 }

◆ setDetectorPlane()

void setDetectorPlane ( const ARICHGeoDetectorPlane & detectorPlane)
inline

Set geometry configuration of HAPD plane.

Parameters
detectorPlanedetector plane geometry parameters

Definition at line 173 of file ARICHGeometryConfig.h.

174 {
175 m_detectorPlane = detectorPlane;
176 }

◆ setGlobalDisplacement()

void setGlobalDisplacement ( const ARICHGeoGlobalDisplacement & displ)
inline

Set global displacement parameters.

Parameters
displglobal displacement parameters

Definition at line 209 of file ARICHGeometryConfig.h.

210 {
211 m_globalDispl = displ;
212 }

◆ setMasterVolume()

void setMasterVolume ( const ARICHGeoMasterVolume & masterVolume)
inline

Set master volume geometry configuration.

Parameters
masterVolumemaster volume geometry parameters

Definition at line 191 of file ARICHGeometryConfig.h.

192 {
193 m_masterVolume = masterVolume;
194 }

◆ setMirrorDisplacement()

void setMirrorDisplacement ( const ARICHGeoMirrorDisplacement & displ)
inline

Set mirror displacement parameters.

Parameters
displmirror displacement parameters

Definition at line 218 of file ARICHGeometryConfig.h.

219 {
220 m_mirrorDispl = displ;
221 }

◆ setMirrors()

void setMirrors ( const ARICHGeoMirrors & mirrors)
inline

Set mirrors geometry configuration.

Parameters
mirrorsmirrors geometry parameters

Definition at line 182 of file ARICHGeometryConfig.h.

183 {
184 m_mirrors = mirrors;
185 }

◆ setName()

void setName ( const std::string & name)
inlineinherited

Sets object name.

Parameters
nameobject name

Definition at line 43 of file ARICHGeoBase.h.

43{m_name = name;}

◆ setSupportStructure()

void setSupportStructure ( const ARICHGeoSupport & supportStructure)
inline

Set support structure geometry configuration.

Parameters
supportStructuresupport structure geometry parameters

Definition at line 200 of file ARICHGeometryConfig.h.

201 {
202 m_supportStructure = supportStructure;
203 }

◆ setUseGlobalDisplacement()

void setUseGlobalDisplacement ( bool use)
inline

Set whether global displacement should be used.

Parameters
useswitch on/off global displacement

Definition at line 227 of file ARICHGeometryConfig.h.

228 {
229 m_displaceGlobal = use;
230 }

◆ setUseMirrorDisplacement()

void setUseMirrorDisplacement ( bool use)
inline

Set whether mirror displacement should be used.

Parameters
useswitch on/off mirror displacement

Definition at line 236 of file ARICHGeometryConfig.h.

237 {
238 m_displaceMirrors = use;
239 }

◆ useBasf2Units()

static void useBasf2Units ( )
inlinestatic

Use basf2 units when returning geometry parameters.

Definition at line 63 of file ARICHGeometryConfig.h.

63{s_unit = Unit::cm; s_unitName = "cm";}

◆ useGeantUnits()

static void useGeantUnits ( )
inlinestatic

Use Geant4 units when returning geometry parameters.

Definition at line 69 of file ARICHGeometryConfig.h.

69{s_unit = Unit::mm; s_unitName = "mm";}

◆ useGlobalDisplacement()

bool useGlobalDisplacement ( ) const
inline

Get whether global displacement is used.

Definition at line 244 of file ARICHGeometryConfig.h.

245 {
246 return m_displaceGlobal;
247 }

◆ useMirrorDisplacement()

bool useMirrorDisplacement ( ) const
inline

Get whether mirror displacement is used.

Definition at line 252 of file ARICHGeometryConfig.h.

253 {
254 return m_displaceMirrors;
255 }

Member Data Documentation

◆ m_aerogelPlane

ARICHGeoAerogelPlane m_aerogelPlane
private

aerogel plane geometry configuration

Definition at line 261 of file ARICHGeometryConfig.h.

◆ m_bbstudy

int m_bbstudy = 0
private

is beam background study

Definition at line 275 of file ARICHGeometryConfig.h.

◆ m_cablesenvelope

ARICHGeoCablesEnvelope m_cablesenvelope
private

ARICH cables envelop geometry configuration.

Definition at line 267 of file ARICHGeometryConfig.h.

◆ m_cooling

ARICHGeoCooling m_cooling
private

ARICH cooling system geometry configuration.

Definition at line 268 of file ARICHGeometryConfig.h.

◆ m_coolingv2

ARICHGeoFEBCooling m_coolingv2
private

ARICH cooling system (v2) geometry configuration.

Definition at line 269 of file ARICHGeometryConfig.h.

◆ m_detectorPlane

ARICHGeoDetectorPlane m_detectorPlane
private

detector plane geometry configuration

Definition at line 260 of file ARICHGeometryConfig.h.

◆ m_displaceGlobal

bool m_displaceGlobal = 0
private

use global displacement parameters

Definition at line 273 of file ARICHGeometryConfig.h.

◆ m_displaceMirrors

bool m_displaceMirrors = 0
private

use mirror displacement parameters

Definition at line 272 of file ARICHGeometryConfig.h.

◆ m_globalDispl

ARICHGeoGlobalDisplacement m_globalDispl
private

global displacement parameters

Definition at line 270 of file ARICHGeometryConfig.h.

◆ m_hapd

ARICHGeoHAPD m_hapd
private

HAPD geometry configuration.

Definition at line 265 of file ARICHGeometryConfig.h.

◆ m_masterVolume

ARICHGeoMasterVolume m_masterVolume
private

master volume geometry configuration

Definition at line 263 of file ARICHGeometryConfig.h.

◆ m_merger

ARICHGeoMerger m_merger
private

Merger PCB geometry configuration.

Definition at line 266 of file ARICHGeometryConfig.h.

◆ m_mirrorDispl

ARICHGeoMirrorDisplacement m_mirrorDispl
private

mirror displacement parameters

Definition at line 271 of file ARICHGeometryConfig.h.

◆ m_mirrors

ARICHGeoMirrors m_mirrors
private

mirrors geometry configuration

Definition at line 262 of file ARICHGeometryConfig.h.

◆ m_name

std::string m_name
protectedinherited

geometry object name

Definition at line 82 of file ARICHGeoBase.h.

◆ m_supportStructure

ARICHGeoSupport m_supportStructure
private

support structure geometry configuration

Definition at line 264 of file ARICHGeometryConfig.h.

◆ s_unit

double s_unit = Unit::cm
staticprotectedinherited

conversion unit for length

Definition at line 83 of file ARICHGeoBase.h.

◆ s_unitName

std::string s_unitName
staticprotectedinherited

conversion unit name

Definition at line 84 of file ARICHGeoBase.h.


The documentation for this class was generated from the following files: