9#include <arich/dbobjects/ARICHGeoAerogelPlane.h>
29 cout <<
"getWallHeight() - getLayerThickness(1) - getLayerThickness(2) = "
31 B2ERROR(
"Data of the ARICHGeoAerogelPlane is inconsisten : --> abs (getWallHeight() - getLayerThickness(1) - getLayerThickness(2)) > 1.0e-10");
36 int nAeroSlotsPerRing[nn];
38 for (
int i = 0; i < nn; i++)
39 nAeroSlotsPerRing[i] = 0;
40 for (
unsigned i = 0; i <
m_tiles.size(); i++)
42 nAeroSlotsPerRing[
m_tiles.at(i).ring - 1] += 1;
47 B2ASSERT(
"Data of the ARICHGeoAerogelPlane is inconsisten : --> getNAeroSlotsIndividualRing().at(i) != nAeroSlotsPerRing[i]",
61 cout <<
"Nume of aerogel rings and number of aerogel slots in individual ring " << endl;
63 cout << setw(5) <<
"Ring"
64 << setw(15) <<
"Aerogel slots" << endl;
66 cout << setw(5) << i + 1
70 cout <<
"Imaginary tube thikness just after aerogel layers : " <<
getImgTubeThickness() << endl;
73 cout <<
"Aerogel layers " << endl;
76 for (
int iLayer = 1; iLayer < nLayer + 1; iLayer++) {
77 cout <<
" layer " << iLayer << endl;
83 cout <<
" Please note full aerogel material description key is set to 1 " << endl;
84 cout <<
" The name of each particular tile have this form : Aero1_serA090_rin4_col26 " << endl;
85 cout <<
" serialID = A090; ring = 4; column = 26; layer = up; " << endl;
86 cout <<
" The name of each particular tile have this form : Aero2_serB162_rin4_col14 " << endl;
87 cout <<
" serialID = B162; ring = 4 column = 15; layer = down; " << endl;
91 cout <<
" Aluminum walls between tiles parameters" << endl;
94 for (
int iRing = 1; iRing < nRing + 1; iRing++) {
96 if (iRing < nRing) cout <<
" ring: " << iRing <<
" has inner radius of " <<
getRingRadius(iRing) <<
" " <<
s_unitName <<
" and "
97 <<
static_cast<int>(2 * M_PI /
getRingDPhi(iRing) + 0.5) <<
" aerogel tile slots." << endl;
99 " (this is the outer ring)" << endl;
108 cout <<
"Positioning parameters (in local ARICH frame)" << endl;
112 cout << endl <<
"Simple aerogel configuration is set!" << endl;
113 cout <<
" Parameters:" << endl;
123 double r =
sqrt(x * x + y * y);
126 for (
unsigned iRing = 0; iRing <
getNRings(); iRing++) {
128 if (iRing == 0)
continue;
129 nTile +=
static_cast<int>(2 * M_PI /
m_dPhi[iRing - 1] + 0.5);
131 if (iRing == 0)
return 0;
133 double phi = atan2(y, x);
134 if (phi < 0) phi += 2 * M_PI;
135 int nphi =
static_cast<int>(phi /
m_dPhi[iRing - 1]);
137 if (phi < nphi *
m_dPhi[iRing - 1] + gapPhi || phi > (nphi + 1)*
m_dPhi[iRing - 1] - gapPhi)
return 0;
147 std::string& material)
const
152 material = (
char*)
"NULL";
153 for (
unsigned i = 0; i <
m_tiles.size(); i++) {
154 if (
m_tiles.at(i).ring == ring) {
155 if (
m_tiles.at(i).column == column) {
156 if (
m_tiles.at(i).layer == layerN) {
158 transmL =
m_tiles.at(i).transmL;
160 material =
m_tiles.at(i).material;
166 B2WARNING(
"ARICHGeoAerogelPlane::getTileParameters --> tile position does not exist " << endl
167 <<
"ring = " << ring << endl
168 <<
"column = " << column << endl
169 <<
"layerN = " << layerN << endl);
170 B2ASSERT(
"ARICHGeoAerogelPlane::getTileParameters --> tile position does not exist",
false);
176 for (
unsigned i = 0; i <
m_tiles.size(); i++)
177 if (
m_tiles.at(i).ring == ring)
178 if (
m_tiles.at(i).column == column)
179 if (
m_tiles.at(i).layer == layerN)
181 B2WARNING(
"ARICHGeoAerogelPlane::getTileThickness --> tile position does not exist " << endl
182 <<
"ring = " << ring << endl
183 <<
"column = " << column << endl
184 <<
"layerN = " << layerN << endl);
185 B2ASSERT(
"ARICHGeoAerogelPlane::getTileParameters --> tile position does not exist",
false);
191 for (
unsigned i = 0; i <
m_tiles.size(); i++)
192 if (
m_tiles.at(i).ring == ring)
193 if (
m_tiles.at(i).column == column)
194 if (
m_tiles.at(i).layer == layerN)
196 B2WARNING(
"ARICHGeoAerogelPlane::getTileThickness --> tile position does not exist " << endl
197 <<
"ring = " << ring << endl
198 <<
"column = " << column << endl
199 <<
"layerN = " << layerN << endl);
200 B2ASSERT(
"ARICHGeoAerogelPlane::getTileParameters --> tile position does not exist",
false);
210 std::string materialName;
218 return thickUp + thickDown;
223 double maxThick = 0.0;
230 if (maxThick < athick)
240 cout << setw(5) <<
"i"
241 << setw(10) <<
"ring"
242 << setw(10) <<
"column"
243 << setw(10) <<
"layer"
245 << setw(12) <<
"transmL"
246 << setw(12) <<
"thick"
247 << setw(30) <<
"material" << endl;
248 for (
unsigned i = 0; i <
m_tiles.size(); i++) {
250 << setw(10) <<
m_tiles.at(i).ring
251 << setw(10) <<
m_tiles.at(i).column
252 << setw(10) <<
m_tiles.at(i).layer
254 << setw(12) <<
m_tiles.at(i).transmL
255 << setw(12) <<
m_tiles.at(i).thick
256 << setw(30) <<
m_tiles.at(i).material << endl;
262 cout <<
"ARICHGeoAerogelPlane::printSingleTileParameters" << endl;
263 B2ASSERT(
"Aerogel tile property entry does not exist i >= m_tiles.size() ", i <
m_tiles.size());
264 cout << setw(5) <<
"i"
265 << setw(10) <<
"ring"
266 << setw(10) <<
"column"
267 << setw(10) <<
"layer"
269 << setw(12) <<
"transmL"
270 << setw(12) <<
"thick"
271 << setw(30) <<
"material" << endl;
273 << setw(10) <<
m_tiles.at(i).ring
274 << setw(10) <<
m_tiles.at(i).column
275 << setw(10) <<
m_tiles.at(i).layer
277 << setw(12) <<
m_tiles.at(i).transmL
278 << setw(12) <<
m_tiles.at(i).thick
279 << setw(30) <<
m_tiles.at(i).material << endl;
290 std::string materialName;
std::vector< double > m_r
"r" aluminum wall radiuses
double m_tileGap
gap between aerogel tiles and aluminum walls
bool isConsistent() const override
Consistency check of geometry parameters.
bool isSimple() const
Use simple aerogel configuration.
double getLayerThickness(unsigned iLayer) const
Get thickness of tiles in i-th aerogel layer.
double m_innerR
inner radius of support plate
double getSupportThickness() const
Get support-plate thickness.
unsigned getNRings() const
Get number of aluminum wall rings (should be number of tile rings + 1).
double getSupportOuterR() const
Get support-plate outer radius.
std::vector< tilestr > m_tiles
parameters of the individual aerogel tiles
double getCompensationARICHairVolumeThick_min() const
Get minimum thickness of the compensation volume with ARICH air.
void printSingleTileParameters(unsigned i) const
Print the content of the single tilestr structure.
std::vector< double > m_dPhi
"phi" aluminum wall distances in tile ring
double getImgTubeThickness() const
Get imaginary tube thikness just after aerogel layers used as volume to which tracks are extrapolated...
double getWallHeight() const
Get height of aluminum walls between aerogel tiles.
std::vector< double > m_simpleParams
vector of simple parameters
double m_ry
rotation around y-axis
void print(const std::string &title="Aerogel plane parameters:") const override
Print the content of the class.
double getLayerTrLength(unsigned iLayer) const
Get transmission length of tiles in i-th aerogel layer.
double getTotalTileThickness(int ring, int column) const
Get total thickness of the aerogel tiles tile_up + tile_down for a given slot.
double getRingDPhi(unsigned iRing) const
Get phi (angle) distance between "phi" aluminum wall between aerogel tiles in i-th tile ring.
void printTileParameters(const std::string &title="Aerogel tiles parameters:") const
Print the content of the m_tiles vector of tilestr structure.
double m_thickness
thickness of support plate
double getTileThickness(int ring, int column, int layerN) const
Get thickness of individual tile.
double m_wallHeight
height (z) of aluminum walls between aerogel tiles
const std::string & getLayerMaterial(unsigned iLayer) const
Get material name of tiles in i-th aerogel layer.
const std::string & getSupportMaterial() const
Get material of support plate.
std::vector< layer > m_layers
parameters averaged properties of the aerogel tiles/layers (up and down)
double getLayerRefIndex(unsigned iLayer) const
Get refractive index of tiles in i-th aerogel layer.
void testGetTileParametersFunction() const
This function tests the getTileParameters function.
double getWallThickness() const
Get thickness of aluminum walls between aerogel tiles.
double getRingRadius(unsigned iRing) const
Get radius of i-th aluminum ring between aerogel tiles (inner radius of ring).
double m_outerR
outer radius of support plate
double m_wallThickness
thickness of aluminum walls between aerogel tiles
unsigned getNLayers() const
Get number of aerogel layers.
double getSupportInnerR() const
Get support-plate inner radius.
double m_rz
rotation around z-axis
int getFullAerogelMaterialDescriptionKey() const
Get full aerogel material description key.
unsigned getAerogelTileID(double x, double y) const
Get ID of aerogel tile containing point (x,y) (actually this is tile slot ID, as it is the same for a...
const std::vector< int > & getNAeroSlotsIndividualRing() const
Get vector of numbers of aerogel slots in individual ring.
std::string getTileMaterialName(int ring, int column, int layerN) const
Get material name of individual tile.
double getMaximumTotalTileThickness() const
Get maximum total thickness of the aerogel tiles tile_up + tile_down for all the slots.
double m_rx
rotation around x-axis
double getTileGap() const
Get gap between aerogel tile and aluminum wall.
unsigned getTileParameters(int ring, int column, int layerN, double &n, double &transmL, double &thick, std::string &material) const
Get parameters of individual tile.
virtual void printPlacement(double x, double y, double z, double rx, double ry, double rz) const
Print volume positioning parameters.
virtual void print(const std::string &title) const
Print the content of the class.
static std::string s_unitName
conversion unit name
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.