Belle II Software development
ARICHGeometryConfig.cc
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#include <framework/gearbox/GearDir.h>
10#include <framework/logging/Logger.h>
11#include <framework/gearbox/Unit.h>
12
13#include <arich/dbobjects/ARICHGeometryConfig.h>
14#include <arich/dbobjects/tessellatedSolidStr.h>
15
16#include <geometry/Materials.h>
17#include <arich/dbobjects/ARICHGeoHAPD.h>
18
19#include <cmath>
20#include <fstream>
21
22using namespace std;
23using namespace Belle2;
24
26{
27 read(content);
28}
29
31{
32 //------------------------------
33 // Get ARICH geometry parameters from the gearbox
34 //------------------------------
35 m_bbstudy = content.getInt("BeamBackgroundStudy");
36
37 GearDir envParams(content, "Envelope");
38 m_masterVolume.setVolume(envParams.getLength("innerRadius"), envParams.getLength("outerRadius"), envParams.getLength("length"),
39 std::string("ARICH_Air"));
40 m_masterVolume.setPlacement(envParams.getLength("xPosition"), envParams.getLength("yPosition"),
41 envParams.getLength("zPosition") + envParams.getLength("length") / 2., envParams.getAngle("xRotation"),
42 envParams.getAngle("yRotation"), envParams.getAngle("zRotation"));
43
44 GearDir displParams(content, "GlobalDisplacement");
45 m_displaceGlobal = !displParams.getBool("Disable");
46 m_globalDispl.setX(displParams.getLength("x"));
47 m_globalDispl.setY(displParams.getLength("y"));
48 m_globalDispl.setZ(displParams.getLength("z"));
49 m_globalDispl.setAlpha(displParams.getAngle("alpha"));
50 m_globalDispl.setBeta(displParams.getAngle("beta"));
51 m_globalDispl.setGamma(displParams.getAngle("gamma"));
52
53 auto& materials = geometry::Materials::getInstance();
54
55 GearDir detParams(content, "Detector/Module");
56
57 m_hapd.setWallThickness(detParams.getLength("HAPD/windowThickness"));
58 m_hapd.setPadSize(detParams.getLength("HAPD/padSize"));
59 m_hapd.setChipGap(detParams.getLength("HAPD/chipGap"));
60 m_hapd.setNPads(int(sqrt(detParams.getInt("HAPD/padNum"))), int(sqrt(detParams.getInt("HAPD/padNum"))));
61 m_hapd.setWinThickness(detParams.getLength("HAPD/windowThickness"));
62 m_hapd.setWinRefIndex(detParams.getDouble("HAPD/windowRefIndex"));
63 m_hapd.setModuleSizeZ(detParams.getLength("height"));
64 m_hapd.setWallMaterial(detParams.getString("HAPD/wallMaterial"));
65 m_hapd.setWinMaterial(detParams.getString("HAPD/windowMaterial"));
66
67 m_hapd.setFEBVolume(detParams.getLength("FEB/size"), detParams.getLength("FEB/size"), detParams.getLength("FEB/thickness"),
68 detParams.getString("FEB/material"));
69 m_hapd.setHAPDVolume(detParams.getLength("HAPD/size"), detParams.getLength("HAPD/size"), detParams.getLength("HAPD/height"),
70 detParams.getString("HAPD/fillMaterial"));
71
72 GearDir apdSurfParams(detParams, "HAPD/Surface");
73 m_hapd.setAPDVolume(detParams.getLength("HAPD/apdSize"), detParams.getLength("HAPD/apdSize"),
74 detParams.getLength("HAPD/apdThickness"), detParams.getString("HAPD/apdMaterial"),
75 materials.createOpticalSurfaceConfig(apdSurfParams));
76
77 GearDir mergerParams(content, "MergerPCB");
78 // read merger PCB parameters
79 m_merger.setMergerPCBMaterialName(mergerParams.getString("merger/material"));
80 m_merger.setMergerPCBLenght(mergerParams.getDouble("merger/sizeL"));
81 m_merger.setMergerPCBWidth(mergerParams.getDouble("merger/sizeW"));
82 m_merger.setMergerPCBThickness(mergerParams.getDouble("merger/thickness"));
83 m_merger.setMergerPCBscrewholeR(mergerParams.getDouble("merger/mergerPCBscrewholeR"));
84 m_merger.setMergerPCBscrewholePosdY(mergerParams.getDouble("merger/mergerPCBscrewholePosdY"));
85 m_merger.setMergerPCBscrewholePosdX1(mergerParams.getDouble("merger/mergerPCBscrewholePosdX1"));
86 m_merger.setMergerPCBscrewholePosdX2(mergerParams.getDouble("merger/mergerPCBscrewholePosdX2"));
87 m_merger.setSingleMergerEnvelopeSizeL(mergerParams.getDouble("merger/envelopeSizeL"));
88 m_merger.setSingleMergerEnvelopeSizeW(mergerParams.getDouble("merger/envelopeSizeW"));
89 m_merger.setSingleMergerEnvelopeThickness(mergerParams.getDouble("merger/envelopeThickness"));
90 m_merger.setSingleMergerenvelopeDeltaZ(mergerParams.getArray("merger/envelopeDeltaZ"));
91 m_merger.setMergerSlotID(mergerParams.getArray("merger/mergerSlotID"));
92 m_merger.setMergerPosR(mergerParams.getArray("merger/mergerPosR"));
93 m_merger.setMergerAngle(mergerParams.getArray("merger/mergerAngle"));
94 m_merger.setMergerOrientation(mergerParams.getArray("merger/mergerOrientation"));
95 m_merger.setEnvelopeCenterPosition(mergerParams.getDouble("mergerEnvelope/x0"),
96 mergerParams.getDouble("mergerEnvelope/y0"),
97 mergerParams.getDouble("mergerEnvelope/z0"));
98 m_merger.setSingleMergeEnvelopePosition(mergerParams.getDouble("merger/envelopePosX0"),
99 mergerParams.getDouble("merger/envelopePosY0"),
100 mergerParams.getDouble("merger/envelopePosZ0"));
101 m_merger.setEnvelopeOuterRadius(mergerParams.getDouble("mergerEnvelope/outerRadius"));
102 m_merger.setEnvelopeInnerRadius(mergerParams.getDouble("mergerEnvelope/innerRadius"));
103 m_merger.setEnvelopeThickness(mergerParams.getDouble("mergerEnvelope/thickness"));
105 //m_merger.print();
106
107 GearDir cablesEnvelopParams(content, "cablesEnvelope");
108 // read cables envelop parameters
109 m_cablesenvelope.setCablesEffectiveMaterialName(cablesEnvelopParams.getString("material"));
110 m_cablesenvelope.setEnvelopeOuterRadius(cablesEnvelopParams.getDouble("outerRadius"));
111 m_cablesenvelope.setEnvelopeInnerRadius(cablesEnvelopParams.getDouble("innerRadius"));
112 m_cablesenvelope.setEnvelopeThickness(cablesEnvelopParams.getDouble("thickness"));
113 m_cablesenvelope.setEnvelopeCenterPosition(cablesEnvelopParams.getDouble("x0"), cablesEnvelopParams.getDouble("y0"),
114 cablesEnvelopParams.getDouble("z0"));
116 //m_cablesenvelope.print();
117
118 GearDir coolingParams(content, "coolingPipe");
119 // read ARICH cooling system parameters
120 m_cooling.setEnvelopeOuterRadius(coolingParams.getDouble("coolingEnvelope/outerRadius"));
121 m_cooling.setEnvelopeInnerRadius(coolingParams.getDouble("coolingEnvelope/innerRadius"));
122 m_cooling.setEnvelopeThickness(coolingParams.getDouble("coolingEnvelope/thickness"));
123 m_cooling.setEnvelopeCenterPosition(coolingParams.getDouble("coolingEnvelope/x0"), coolingParams.getDouble("coolingEnvelope/y0"),
124 coolingParams.getDouble("coolingEnvelope/z0"));
125 m_cooling.setCoolingPipeMaterialName(coolingParams.getString("cooling/material"));
126 m_cooling.setRmin(coolingParams.getDouble("cooling/Rmin"));
127 m_cooling.setRmax(coolingParams.getDouble("cooling/Rmax"));
128 m_cooling.setCoolingGeometryID(coolingParams.getArray("cooling/coolingGeometryID"));
129 m_cooling.setCoolingL(coolingParams.getArray("cooling/coolingL"));
130 m_cooling.setCoolingPosPhi(coolingParams.getArray("cooling/coolingPosPhi"));
131 m_cooling.setCoolingPosR(coolingParams.getArray("cooling/coolingPosR"));
132 m_cooling.setCoolinRotationAngle(coolingParams.getArray("cooling/coolinRotationAngle"));
133 m_cooling.setCoolingTestPlateMaterialName(coolingParams.getString("coolingTestPlate/material"));
134 m_cooling.setColdTubeMaterialName(coolingParams.getString("coolingTestPlate/materialColdTube"));
135 m_cooling.setCoolingTestPlateslengths(coolingParams.getDouble("coolingTestPlate/lengthX"),
136 coolingParams.getDouble("coolingTestPlate/lengthY"), coolingParams.getDouble("coolingTestPlate/lengthZ"));
137 m_cooling.setColdTubeR(coolingParams.getDouble("coolingTestPlate/coldTubeR"));
138 m_cooling.setColdTubeSubtractedR(coolingParams.getDouble("coolingTestPlate/coldTubeSubtractedR"));
139 m_cooling.setColdTubeWallThickness(coolingParams.getDouble("coolingTestPlate/coldTubeWallThickness"));
140 m_cooling.setDepthColdTubeInPlate(coolingParams.getDouble("coolingTestPlate/depthColdTubeInPlate"));
141 m_cooling.setColdTubeSpacing(coolingParams.getDouble("coolingTestPlate/coldTubeSpacing"));
142 m_cooling.setColdTubeNumber(coolingParams.getInt("coolingTestPlate/coldTubeNumber"));
143 m_cooling.setCoolingTestPlatePosR(coolingParams.getArray("coolingTestPlate/coolingTestPlatePosR"));
144 m_cooling.setCoolingTestPlatePosPhi(coolingParams.getArray("coolingTestPlate/coolingTestPlatePosPhi"));
145 m_cooling.setCoolingTestPlatePosZ0(coolingParams.getArray("coolingTestPlate/coolingTestPlatePosZ0"));
147 //m_cooling.print();
148
149 GearDir coolingFEBParams(content, "febcoolingv2");
150 // read ARICH cooling system (v2) parameters
151 // FEB cooling bodies
152 m_coolingv2.setSmallSquareSize(coolingFEBParams.getDouble("smallSquareSize"));
153 m_coolingv2.setSmallSquareThickness(coolingFEBParams.getDouble("smallSquareThickness"));
154 m_coolingv2.setBigSquareSize(coolingFEBParams.getDouble("bigSquareSize"));
155 m_coolingv2.setBigSquareThickness(coolingFEBParams.getDouble("bigSquareThickness"));
156 m_coolingv2.setRectangleL(coolingFEBParams.getDouble("rectangleL"));
157 m_coolingv2.setRectangleW(coolingFEBParams.getDouble("rectangleW"));
158 m_coolingv2.setRectangleThickness(coolingFEBParams.getDouble("rectangleThickness"));
159 m_coolingv2.setRectangleDistanceFromCenter(coolingFEBParams.getDouble("rectangleDistanceFromCenter"));
160 m_coolingv2.setFebcoolingv2GeometryID(coolingFEBParams.getArray("febcoolingv2GeometryID"));
161
162 // read detector plane parameters
163 modulesPosition(content);
164
165 GearDir mirrParams(content, "Mirrors");
166 if (mirrParams) {
167 m_mirrors.setNMirrors(mirrParams.getInt("nMirrors"));
168 m_mirrors.setStartAngle(mirrParams.getAngle("startAngle"));
169 GearDir surfParams(mirrParams, "Surface");
170 m_mirrors.setMirrorPlate(mirrParams.getLength("thickness"), mirrParams.getLength("width"), mirrParams.getLength("length"),
171 mirrParams.getString("material"), materials.createOpticalSurfaceConfig(surfParams));
172 m_mirrors.setZPosition(mirrParams.getLength("zPosition") + mirrParams.getLength("width") / 2. - m_masterVolume.getLength() / 2.);
173 m_mirrors.setRadius(mirrParams.getLength("radius"));
175 }
176
177 GearDir mirrDisplParams(content, "MirrorDisplacement");
178 if (mirrDisplParams) {
179 m_displaceMirrors = !mirrDisplParams.getBool("Disable");
180 for (auto plate : mirrDisplParams.getNodes("Plate")) {
181 int id = plate.getInt("@id");
182 double r = plate.getLength("r");
183 double phi = plate.getAngle("phi");
184 double z = plate.getLength("z");
185 double alpha = plate.getLength("alpha");
186 double beta = plate.getLength("beta");
187 double gamma = plate.getLength("gamma");
188 double origPhi = m_mirrors.getPoint(id).Phi();
189 ARICHPositionElement displEl(r * cos(origPhi + phi), r * sin(origPhi + phi), z, alpha, beta, gamma);
191 // displEl.print();
192 }
193 }
194 // read and prepare aerogel plane parameters
195 GearDir aerogel(content, "Aerogel");
196
197 std::vector<double> dPhi;
198 std::vector<int> nAeroSlotsIndividualRing;
199 for (auto ring : aerogel.getNodes("slotInRing/Ring")) {
200 dPhi.push_back(2.* M_PI / ring.getInt());
201 nAeroSlotsIndividualRing.push_back(ring.getInt());
202 }
203 std::vector<double> slotR;
204 for (auto ring : aerogel.getNodes("slotR/Ring")) {
205 slotR.push_back(ring.getLength());
206 }
207
210 m_aerogelPlane.setNAeroSlotsIndividualRing(nAeroSlotsIndividualRing);
211 m_aerogelPlane.setTileGap(aerogel.getLength("tileGap"));
212 //cout<<"aerogel.getLength(\"tileGap\") = "<<aerogel.getLength("tileGap")<<endl;
213
214 m_aerogelPlane.setWallThickness(aerogel.getLength("wallThickness"));
215 m_aerogelPlane.setWallHeight(aerogel.getLength("wallHeight"));
216 m_aerogelPlane.addSupportPlate(aerogel.getLength("plateInnerR"), aerogel.getLength("plateOuterR"),
217 aerogel.getLength("plateThickness"), aerogel.getString("material"));
218 int ilayer = 1;
219 for (auto layer : aerogel.getNodes("Layers/Layer")) {
220 double thick = layer.getLength("thickness") / Unit::cm;
221 std::string material = layer.getString("material");
222 double refIndex = layer.getDouble("refIndex");
223 double trLen = layer.getLength("trLength");
224 m_aerogelPlane.setAerogelLayer(ilayer, thick, refIndex, trLen, material);
225 ilayer++;
226 //std::cout<<" double thick = layer.getLength(thickness) / Unit::cm = "<<thick<<std::endl;
227 }
228 m_aerogelPlane.setFullAerogelMaterialDescriptionKey(aerogel.getInt("fullAerogelMaterialDescriptionKey"));
229 m_aerogelPlane.setImgTubeThickness(aerogel.getDouble("imgTubeThickness"));
230 m_aerogelPlane.setCompensationARICHairVolumeThick_min(aerogel.getDouble("compensationARICHairVolumeThick_min"));
231
232 // Aerogel tiles
233 GearDir aerotilesDir(content, "AerogelTiles");
234 for (int il = 0; il < ilayer - 1; il++) {
235 int iring = 0;
236 for (auto ns_ring : nAeroSlotsIndividualRing) {
237 iring++;
238 for (int islot = 1; islot < ns_ring + 1; islot++) {
239 for (auto tileNode : aerotilesDir.getNodes("Tiles/Tile")) {
240 int ring = tileNode.getInt("ring");
241 int column = tileNode.getInt("column");
242 int layerN = tileNode.getInt("layer");
243 if (iring == ring && column == islot && il == layerN) {
244 double n = tileNode.getDouble("n");
245 double transmL = tileNode.getDouble("transmL");
246 double thick = tileNode.getDouble("thick");
247 std::string materialName = tileNode.getString("material");
248 m_aerogelPlane.addTileParameters(ring, column, layerN, n, transmL, thick, materialName);
249 }
250 }
251 }
252 }
253 }
254
257 aerogel.getLength("zPosition") +
258 (aerogel.getLength("wallHeight") + aerogel.getLength("plateThickness") + aerogel.getLength("imgTubeThickness")) / 2.0 -
260 0, 0, 0);
263 wallHeightNew = wallHeightNew / 10.0; //convertion from mm to cm - this need to be implemented properly
264 //cout<<"m_aerogelPlane.getMaximumTotalTileThickness() = "<<m_aerogelPlane.getMaximumTotalTileThickness()<<endl
265 // <<"m_aerogelPlane.getCompensationARICHairVolumeThick_min() = "<<m_aerogelPlane.getCompensationARICHairVolumeThick_min()<<endl
266 // <<"wallHeightNew = "<<wallHeightNew<<endl;
268 aerogel.getLength("zPosition") +
269 (wallHeightNew + aerogel.getLength("plateThickness") + aerogel.getLength("imgTubeThickness")) / 2.0 - m_masterVolume.getLength() /
270 2.0,
271 0, 0, 0);
272 } else {
273 B2ERROR("ARICHGeometryConfig::read --> getFullAerogelMaterialDescriptionKey() is wrong");
274 }
275
276 //m_aerogelPlane.print();
277 //m_aerogelPlane.printTileParameters();
278 //m_aerogelPlane.testGetTileParametersFunction();
280
281 // support structures
282 GearDir supportDir(content, "SupportStructure");
283 for (auto tube : supportDir.getNodes("Tubes/Tube")) {
284 std::string material = tube.getString("material");
285 double innerR = tube.getLength("innerR");
286 double outerR = tube.getLength("outerR");
287 double length = tube.getLength("length");
288 double zPosition = tube.getLength("zPosition") - m_masterVolume.getLength() / 2.;
289 std::string name = tube.getString("name");
290 m_supportStructure.addTube(innerR, outerR, length, zPosition, material, name);
291 }
292 //m_supportStructure.print();
293
294 m_supportStructure.setMaterial(supportDir.getString("material"));
295
296 for (auto wedge : supportDir.getNodes("Wedges/Wedge")) {
297 std::vector<double> pars;
298 int id = wedge.getInt("@id");
299 if (id > 3 || id < 1) continue;
300 for (auto par : wedge.getNodes("par")) {
301 pars.push_back(par.getLength());
302 }
304 }
305
306 for (auto wedge : supportDir.getNodes("Wedges/Placements/Placement")) {
307 int type = wedge.getInt("type");
308 double r = wedge.getLength("r");
309 double phi = wedge.getAngle("phi");
310 double z = wedge.getLength("z") - m_masterVolume.getLength() / 2.;
311 m_supportStructure.addWedge(type, r, phi, z, supportDir.getString("material"));
312 }
313
314 //print();
315
316}
317
318void ARICHGeometryConfig::print(const std::string& title) const
319{
320 ARICHGeoBase::print(title);
322 m_hapd.print();
323 m_merger.print();
331}
332
334{
335
336 GearDir detParams(content, "Detector/Plane");
337
338 std::vector<std::pair<double, double>> ringPar;
339
340 for (auto ring : detParams.getNodes("Rings/Ring")) {
341 double r = ring.getLength("r");
342 int nMod = ring.getInt("nModules");
343 ringPar.push_back({r, 2.*M_PI / nMod});
344 }
345
347
348 GearDir supportParams(content, "Detector/supportPlate");
349 double modHeight = content.getLength("Detector/Module/height");
350 m_detectorPlane.addSupportPlate(supportParams.getLength("innerRadius"), supportParams.getLength("outerRadius"),
351 supportParams.getLength("thickness"), supportParams.getString("material"));
352 m_detectorPlane.setModuleHoleSize(supportParams.getLength("moduleHoleSize"));
353 m_detectorPlane.setSupportZPosition(supportParams.getLength("zPosition") + (supportParams.getLength("thickness") +
354 supportParams.getLength("backWallHeight")) / 2. - m_masterVolume.getLength() / 2.);
355 m_detectorPlane.setSupportBackWallHeight(supportParams.getLength("backWallHeight"));
356 m_detectorPlane.setSupportBackWallThickness(supportParams.getLength("backWallThickness"));
357
358 m_detectorPlane.setPlacement(0.0, 0.0, detParams.getLength("zPosition") + modHeight / 2. - m_masterVolume.getLength() / 2., 0.0,
359 0.0, 0.0);
360
361}
362
363/*void ARICHGeometryConfig::readMirrorAlignment(const GearDir& content)
364 {
365 GearDir modParams(content, "Mirrors/Alignment");
366
367 BOOST_FOREACH(const GearDir & plate, modParams.getNodes("Plate")) {
368 int id = atoi(plate.getString("@id").c_str());
369 double dr = plate.getLength("dr");
370 double dphi = plate.getAngle("dphi");
371 double dtheta = plate.getAngle("dtheta");
372 m_mirrorpoint[id - 1].SetMag(m_mirrorpoint[id - 1].Mag() + dr);
373 m_mirrornorm[id - 1].SetTheta(m_mirrornorm[id - 1].Theta() + dtheta);
374 m_mirrornorm[id - 1].SetPhi(m_mirrornorm[id - 1].Phi() + dphi);
375 }
376 }*/
377
378ROOT::Math::XYVector ARICHGeometryConfig::getChannelPosition(unsigned moduleID, unsigned chX, unsigned chY) const
379{
380 const double radius = m_detectorPlane.getSlotR(moduleID);
381 const double phi = m_detectorPlane.getSlotPhi(moduleID);
382 const double cosPhi = std::cos(phi);
383 const double sinPhi = std::sin(phi);
384 ROOT::Math::XYVector origin(radius * cosPhi, radius * sinPhi);
385 double x, y;
386 m_hapd.getXYChannelPos(chX, chY, x, y);
387 // create a vector from x, y that is rotated by phi
388 ROOT::Math::XYVector locPos(x * cosPhi - y * sinPhi,
389 x * sinPhi + y * cosPhi);
390 return origin + locPos;
391}
void setTileGap(double gap)
Set gap between aerogel tile and aluminum wall.
bool isConsistent() const override
Consistency check of geometry parameters.
void setNAeroSlotsIndividualRing(const std::vector< int > &nAeroSlotsIndividualRing)
Set vector of numbers of aerogel slots in individual ring.
double getCompensationARICHairVolumeThick_min() const
Get minimum thickness of the compensation volume with ARICH air.
void setWallHeight(double height)
Set height of aluminum walls between aerogel tiles.
void print(const std::string &title="Aerogel plane parameters:") const override
Print the content of the class.
void addSupportPlate(double inR, double outR, double thick, const std::string &material)
Set parameters of aerogel support plate.
void setWallThickness(double thick)
Set thickness of aluminum walls between aerogel tiles.
void setWallRadius(std::vector< double > &rs)
Set radiuses at which "r" aluminum walls between tiles are placed (+inner+outter aluminum ring).
void printTileParameters(const std::string &title="Aerogel tiles parameters:") const
Print the content of the m_tiles vector of tilestr structure.
void setAerogelLayer(unsigned ilayer, double thick, double rIndex, double trLen, const std::string &material)
Set parameters of i-th aerogel layer.
void addTileParameters(int ring, int column, int layerN, double n, double transmL, double thick, const std::string &material)
Add parameters of individual tile.
void setCompensationARICHairVolumeThick_min(double compensationARICHairVolumeThick_min)
Set minimum thickness of the compensation volume with ARICH air.
void setImgTubeThickness(double imgTubeThickness)
Set imaginary tube thikness just after aerogel layers used as volume to which tracks are extrapolated...
void setFullAerogelMaterialDescriptionKey(int fullAerogelMaterialDescriptionKey)
Set full aerogel material description key.
void setPlacement(double x, double y, double z, double rx, double ry, double rz)
Set aerogel plane positioning within ARICH local volume.
void setWallDPhi(std::vector< double > &dphi)
Set phi (angle) distance between "phi" aluminum walls between aerogel tiles for all aerogel tile ring...
int getFullAerogelMaterialDescriptionKey() const
Get full aerogel material description key.
double getMaximumTotalTileThickness() const
Get maximum total thickness of the aerogel tiles tile_up + tile_down for all the slots.
virtual void print(const std::string &title) const
Print the content of the class.
Definition: ARICHGeoBase.cc:20
void setEnvelopeCenterPosition(double x0, double y0, double z0)
Set position of cables envelop.
void setEnvelopeOuterRadius(double envelopeOuterRadius)
Set outer radius of cables envelop.
void print(const std::string &title="Merger PCB geometry parameters") const
Print the content of the class.
void checkCablesEnvelopDataConsistency() const
Check data consistency of cables envelop In case of failure print the basf2 ERROR message using B2ASS...
void setCablesEffectiveMaterialName(const std::string &materialName)
Set Effective material name describing cables.
void setEnvelopeThickness(double envelopeThickness)
Set thickness of cables envelop.
void setEnvelopeInnerRadius(double envelopeInnerRadius)
Set inner radius of cables envelop.
void setEnvelopeCenterPosition(double x0, double y0, double z0)
Set position of cooling system assembly envelope.
void setCoolingTestPlatePosZ0(const std::vector< double > &coolingTestPlatePosZ0)
Set vector of Z placement of the cooling test plates center within ARICH mother volume in mm.
void setDepthColdTubeInPlate(double depthColdTubeInPlate)
Set depth of the cold tube in the cooling test plate.
void setCoolingTestPlateslengths(double lx, double ly, double lz)
Set dimentions of cooling test plates in x, y, z directions.
void setCoolingTestPlatePosPhi(const std::vector< double > &coolingTestPlatePosPhi)
Set vector of azimuthal angle of the cooling test plates center in polar coordinate system in deg.
void print(const std::string &title="Cooling system geometry parameters") const
Print the content of the class.
void setColdTubeNumber(int coldTubeNumber)
Set number of cold tubes in one plate.
void setCoolingPosR(const std::vector< double > &coolingPosR)
Set vector of radial distance (r, pho) of the cooling system object center in polar coordinate system...
void checkCoolingSystemDataConsistency() const
Check data consistency of the cooling system positions.
void setColdTubeMaterialName(const std::string &materialName)
Set material name of cold tube.
void setCoolingGeometryID(const std::vector< double > &coolingGeometryID)
Set vector of cooling system object geometry ID 1 - G4Tubs 2 - G4Torus.
void setEnvelopeOuterRadius(double envelopeOuterRadius)
Set outer radius of cooling system assembly envelope.
void setCoolingL(const std::vector< double > &coolingL)
Set vector of lengs of the cooling system object with given geometry ID.
void setCoolingTestPlatePosR(const std::vector< double > &coolingTestPlatePosR)
Set vector of rho of the cooling test plates center in polar coordinate system in mm.
void setCoolinRotationAngle(const std::vector< double > &coolinRotationAngle)
Set vector of azimuthal angle of rotation around Z - axis of the cooling system object in polar coord...
void setColdTubeSubtractedR(double coldTubeSubtractedR)
Set outer radius of subtracted tubes for cold tube.
void setCoolingPipeMaterialName(const std::string &materialName)
Set material name of cooling pipe.
void setEnvelopeThickness(double envelopeThickness)
Set thickness of cooling system assembly envelope.
void setCoolingTestPlateMaterialName(const std::string &materialName)
Set material name of cooling test plates.
void setRmax(double rmax)
Set size of cooling system pipe : outer radius in mm.
void setRmin(double rmin)
Set size of cooling system pipe : inner radius in mm.
void setColdTubeSpacing(double coldTubeSpacing)
Set distance from center of the cold tube to edge of cooling plate.
void setColdTubeWallThickness(double coldTubeWallThickness)
Set cold tube wall thickness.
void setCoolingPosPhi(const std::vector< double > &coolingPosPhi)
Set vector of azimuthal angle of the cooling system object center in polar coordinate system in deg.
void setEnvelopeInnerRadius(double envelopeInnerRadius)
Set inner radius of cooling system envelope.
void setColdTubeR(double coldTubeR)
Set radius of cold tubes in the cooling test plane.
void setModuleHoleSize(double hsize)
Set size of module hole in support plate.
double getSlotR(unsigned modID) const
Get radial position of module with given module ID number.
void setRingPar(const std::vector< std::pair< double, double > > &ringPar)
Set parameters of module slot rings (r of center of slots in ring, phi (angle) distance between modul...
void setSupportBackWallHeight(double h)
Set height of the aluminum walls between modules on the electronics side of aluminum support plate.
void addSupportPlate(double inR, double outR, double thick, const std::string &material)
Set parameters of the support plate.
void print(const std::string &title="Detector plane parameters") const override
Print the content of the class.
double getSlotPhi(unsigned modID) const
Get phi (angle) position of module with given module ID number.
void setSupportZPosition(double zPosition)
Set Z position of the aluminum support plate (start Z).
void setSupportBackWallThickness(double d)
Set thickness of the aluminum walls between modules on the electronics side of the aluminum support p...
void setPlacement(double x, double y, double z, double rx, double ry, double rz)
Set detector plane positioning within ARICH local volume.
void setFebcoolingv2GeometryID(const std::vector< double > &febcoolingv2GeometryID)
Set vector of feb cooling configuration/geometry ID.
void setRectangleW(double value)
Set width of the rectangle in mm.
void setRectangleL(double value)
Set length of the rectangle in mm.
void setSmallSquareSize(double value)
Set size of the small square in mm.
void setRectangleDistanceFromCenter(double value)
Set distance from center of the rectangle in mm.
void setSmallSquareThickness(double value)
Set thickness of the small square in mm.
void setRectangleThickness(double value)
Set thickness of the rectangle in mm.
void setBigSquareSize(double value)
Set size of the big square in mm.
void setBigSquareThickness(double value)
Set thickness of the big square in mm.
void setBeta(double beta)
Sets rotation around y.
void setZ(double z)
Sets translation in z.
void setAlpha(double alpha)
Sets rotation around x.
void setY(double y)
Sets translation in y.
void setGamma(double gamma)
Sets rotation around z.
void setX(double x)
Sets translation in x.
void setChipGap(double chipGap)
Set gap between APD chips.
Definition: ARICHGeoHAPD.h:56
void setAPDVolume(double sizeX, double sizeY, double sizeZ, const std::string &material, const GeoOpticalSurface &surf)
Sets APD volume (single volume for all 4 chips)
Definition: ARICHGeoHAPD.h:131
void print(const std::string &title="HAPD module geometry parameters") const override
Print the content of the class.
Definition: ARICHGeoHAPD.cc:85
void setFEBVolume(double sizeX, double sizeY, double sizeZ, const std::string &material)
Sets FEB volume.
Definition: ARICHGeoHAPD.h:114
void setWinThickness(double thickness)
Set window thickness.
Definition: ARICHGeoHAPD.h:44
void setModuleSizeZ(double modZ)
Set module size in Z (height of HAPD + FEB)
Definition: ARICHGeoHAPD.h:75
void setWinRefIndex(double refInd)
Set refractive index of HAPD window.
Definition: ARICHGeoHAPD.h:69
void setWallThickness(double thickness)
Set wall thickness.
Definition: ARICHGeoHAPD.h:38
void setWallMaterial(const std::string &material)
Sets casing material.
Definition: ARICHGeoHAPD.h:81
void setWinMaterial(const std::string &material)
Set window material.
Definition: ARICHGeoHAPD.h:87
void setHAPDVolume(double sizeX, double sizeY, double sizeZ, const std::string &material)
Sets HAPD volume.
Definition: ARICHGeoHAPD.h:148
void setPadSize(double padSize)
Set pad size.
Definition: ARICHGeoHAPD.h:50
void setNPads(int nx, int ny)
Set number of pads in x and y direction.
Definition: ARICHGeoHAPD.h:63
void getXYChannelPos(int chX, int chY, double &x, double &y) const
Returns local x,y position from channel X,Y numbers.
Definition: ARICHGeoHAPD.cc:15
void setVolume(double innerR, double outerR, double length, const std::string &material)
Sets parameters of ARICH master volume.
void print(const std::string &title="ARICH Master Volume geometry parameters") const override
Print the content of the class.
void setPlacement(double x, double y, double z, double rx, double ry, double rz)
Sets positioning of ARICH master volume in global Belle II coordinate system.
double getLength() const
Get ARICH master volume length.
void setMergerPCBWidth(double sizeW)
Set merger PCB width.
void setMergerAngle(const std::vector< double > &mergerAngle)
Set vector of merger boarts azimuthal angles in polar coordinate system in deg.
void setEnvelopeCenterPosition(double x0, double y0, double z0)
Set position of merger PCB assembly envelope.
void setSingleMergerenvelopeDeltaZ(const std::vector< double > &singlemergerenvelopeDeltaZ)
Set vector of Z position of the single merger and merger cooling body envelope inside global merger e...
void setMergerPCBscrewholePosdX2(double screwholePosdX2)
Set merger PCB screw hole position from the top edge.
void checkMergerPositionsDataConsistency() const
Check data consistency of the merger positions In case of failure print the basf2 ERROR message using...
void setSingleMergerEnvelopeThickness(double thickness)
Set single merger PCB and merger cooling envelop thickness.
void setMergerPCBLenght(double sizeL)
Set merger PCB lenght.
void setMergerPCBMaterialName(const std::string &materialName)
Set merger PCB material name.
void setMergerPosR(const std::vector< double > &mergerPosR)
Set vector of merger boards distances from the center in mm.
void setSingleMergerEnvelopeSizeL(double sizeL)
Set single merger PCB and merger cooling envelop length.
void setMergerPCBscrewholeR(double screwholeR)
Set merger PCB screw hole radius.
void setEnvelopeOuterRadius(double envelopeOuterRadius)
Set outer radius of merger PCB assembly envelope.
void print(const std::string &title="Merger PCB geometry parameters") const
Print the content of the class.
void setMergerSlotID(const std::vector< double > &mergerSlotID)
Set vector of merger boards slot numbers.
void setMergerPCBThickness(double thickness)
Set merger PCB thickness.
void setMergerOrientation(const std::vector< double > &mergerOrientation)
Set vector of merger boarts orientations.
void setSingleMergeEnvelopePosition(double x0, double y0, double z0)
Set position of merger PCB inside the single merger envelope.
void setEnvelopeThickness(double envelopeThickness)
Set thickness of merger PCB assembly envelope.
void setSingleMergerEnvelopeSizeW(double sizeW)
Set single merger PCB and merger cooling envelop width.
void setMergerPCBscrewholePosdY(double screwholePosdY)
Set merger PCB screw hole position from the left and right sides.
void setEnvelopeInnerRadius(double envelopeInnerRadius)
Set inner radius of merger PCB assembly envelope.
void setMergerPCBscrewholePosdX1(double screwholePosdX1)
Set merger PCB screw hole position from the bottom edge.
void setDisplacementElement(int id, const ARICHPositionElement &pars)
Sets displacement parameters (element) for mirror plate.
void initializeDefault()
Initializes default mirror position parameters (assuming plate position on the regular m_nMirrors-sid...
void print(const std::string &title="Mirror configuration parameters") const override
Print the content of the class.
const ROOT::Math::XYZVector & getPoint(const unsigned mirID) const
Get vector to the center point of the mirror plate reflective surface.
void setRadius(double r)
Set nominal radius at which mirror plates are placed (center of plate)
void setNMirrors(unsigned nmir)
Set number of mirror plates (slots)
void setStartAngle(double stang)
Set phi angle of position of the first mirror plate.
void setMirrorPlate(double thick, double width, double length, const std::string &material, const GeoOpticalSurface &surf)
Set parameters of mirror plate.
void setZPosition(double zPos)
Set nominal Z position of mirror plates (center point in ARICH local frame)
void addTube(double inR, double outR, double length, double zPosition, const std::string &material, const std::string &name)
Add volume of cylindrical shape (tube)
void setWedge(unsigned i, const std::vector< double > &par)
Set parameters of support wedge volumes.
void setMaterial(const std::string &material)
Set default material of support structures.
void addWedge(int type, double r, double phi, double z, const std::string &material)
Add wedge (all added wedges are placed)
void print(const std::string &title="Parameters of ARICH support structure and neutron shield") const override
Print the content of the class.
ARICHGeoSupport m_supportStructure
support structure geometry configuration
bool m_displaceGlobal
use global displacement parameters
ARICHGeoMasterVolume m_masterVolume
master volume geometry configuration
ARICHGeoGlobalDisplacement m_globalDispl
global displacement parameters
ARICHGeoMirrors m_mirrors
mirrors geometry configuration
bool m_displaceMirrors
use mirror displacement parameters
ARICHGeoFEBCooling m_coolingv2
ARICH cooling system (v2) geometry configuration.
ARICHGeoCablesEnvelope m_cablesenvelope
ARICH cables envelop geometry configuration.
ARICHGeoAerogelPlane m_aerogelPlane
aerogel plane geometry configuration
void read(const GearDir &content)
gets geometry parameters from gearbox.
ROOT::Math::XYVector getChannelPosition(unsigned moduleID, unsigned xChn, unsigned yChn) const
Get position of HAPD (x,y) channel in local ARICH coordinates.
ARICHGeoDetectorPlane m_detectorPlane
detector plane geometry configuration
ARICHGeometryConfig()
Default constructor.
ARICHGeoCooling m_cooling
ARICH cooling system geometry configuration.
ARICHGeoMerger m_merger
Merger PCB geometry configuration.
ARICHGeoHAPD m_hapd
HAPD geometry configuration.
int m_bbstudy
is beam background study
void print(const std::string &title="ARICH geometry parameters") const
Print some debug information.
ARICHGeoMirrorDisplacement m_mirrorDispl
mirror displacement parameters
void modulesPosition(const GearDir &content)
initializes the positions of HAPD modules, with the parameters from xml.
Position element for ARICH.
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
Definition: GearDir.h:69
static const double cm
Standard units with the value = 1.
Definition: Unit.h:47
double getAngle(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard angle unit.
Definition: Interface.h:299
std::vector< double > getArray(const std::string &path) const noexcept(false)
Get the parameter path as a list of double values converted to the standard unit.
Definition: Interface.cc:123
double getDouble(const std::string &path="") const noexcept(false)
Get the parameter path as a double.
Definition: Interface.cc:41
double getLength(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
Definition: Interface.h:259
std::vector< GearDir > getNodes(const std::string &path="") const
Get vector of GearDirs which point to all the nodes the given path evaluates to.
Definition: Interface.cc:21
bool getBool(const std::string &path="") const noexcept(false)
Get the parameter path as a bool.
Definition: Interface.cc:80
int getInt(const std::string &path="") const noexcept(false)
Get the parameter path as a int.
Definition: Interface.cc:60
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
Abstract base class for different kinds of events.
STL namespace.