gets geometry parameters from gearbox.
29{
30
31
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"));
39 envParams.getLength("zPosition") + envParams.getLength("length") / 2., envParams.getAngle("xRotation"),
40 envParams.getAngle("yRotation"), envParams.getAngle("zRotation"));
41
42 GearDir displParams(content,
"GlobalDisplacement");
50
52
53 GearDir detParams(content,
"Detector/Module");
54
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
94 mergerParams.getDouble("mergerEnvelope/y0"),
95 mergerParams.getDouble("mergerEnvelope/z0"));
97 mergerParams.getDouble("merger/envelopePosY0"),
98 mergerParams.getDouble("merger/envelopePosZ0"));
103
104
105 GearDir cablesEnvelopParams(content,
"cablesEnvelope");
106
112 cablesEnvelopParams.getDouble("z0"));
114
115
116 GearDir coolingParams(content,
"coolingPipe");
117
122 coolingParams.getDouble("coolingEnvelope/z0"));
134 coolingParams.getDouble("coolingTestPlate/lengthY"), coolingParams.getDouble("coolingTestPlate/lengthZ"));
145
146
147 GearDir coolingFEBParams(content,
"febcoolingv2");
148
149
159
160
162
163 GearDir mirrParams(content,
"Mirrors");
164 if (mirrParams) {
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));
173 }
174
175 GearDir mirrDisplParams(content,
"MirrorDisplacement");
176 if (mirrDisplParams) {
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");
187 ARICHPositionElement displEl(r * cos(origPhi + phi), r * sin(origPhi + phi), z, alpha, beta, gamma);
189
190 }
191 }
192
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
210
211
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");
223 ilayer++;
224
225 }
229
230
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");
247 }
248 }
249 }
250 }
251 }
252
255 aerogel.getLength("zPosition") +
256 (aerogel.getLength("wallHeight") + aerogel.getLength("plateThickness") + aerogel.getLength("imgTubeThickness")) / 2.0 -
258 0, 0, 0);
261 wallHeightNew = wallHeightNew / 10.0;
262
263
264
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
275
276
278
279
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");
287 std::string name = tube.getString("name");
289 }
290
291
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 }
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");
310 }
311
312
313
314}
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 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+outer aluminum ring).
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 thickness just after aerogel layers used as volume to which tracks are extrapolate...
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.
void setEnvelopeCenterPosition(double x0, double y0, double z0)
Set position of cables envelop.
void setEnvelopeOuterRadius(double envelopeOuterRadius)
Set outer radius of cables envelop.
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 dimensions 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 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 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.
void setAPDVolume(double sizeX, double sizeY, double sizeZ, const std::string &material, const GeoOpticalSurface &surf)
Sets APD volume (single volume for all 4 chips)
void setFEBVolume(double sizeX, double sizeY, double sizeZ, const std::string &material)
Sets FEB volume.
void setWinThickness(double thickness)
Set window thickness.
void setModuleSizeZ(double modZ)
Set module size in Z (height of HAPD + FEB)
void setWinRefIndex(double refInd)
Set refractive index of HAPD window.
void setWallThickness(double thickness)
Set wall thickness.
void setWallMaterial(const std::string &material)
Sets casing material.
void setWinMaterial(const std::string &material)
Set window material.
void setHAPDVolume(double sizeX, double sizeY, double sizeZ, const std::string &material)
Sets HAPD volume.
void setPadSize(double padSize)
Set pad size.
void setNPads(int nx, int ny)
Set number of pads in x and y direction.
void setVolume(double innerR, double outerR, double length, const std::string &material)
Sets parameters of ARICH master volume.
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.
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 length.
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 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...
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)
bool m_displaceGlobal
use global displacement parameters
bool m_displaceMirrors
use mirror displacement parameters
int m_bbstudy
is beam background study
void modulesPosition(const GearDir &content)
initializes the positions of HAPD modules, with the parameters from xml.
Position element for ARICH.
static const double cm
Standard units with the value = 1.
static Materials & getInstance()
Get a reference to the singleton instance.
double sqrt(double a)
sqrt for double