9 #include <framework/logging/Logger.h>
11 #include <arich/dbobjects/ARICHAeroTilesInfo.h>
17 float ARICHAeroTilesInfo::getRefractiveIndex(
int slot,
int layer)
const
20 if (slot > 124 || slot < 1) { B2WARNING(
"ARICHAeroTilesInfo::getTransmissionLength: Slot number " << slot <<
" not valid!");
return 0.;}
21 if (layer > 1 || layer < 0) { B2WARNING(
"ARICHAeroTilesInfo::getTransmissionLength: Layer number " << layer <<
" not valid!");
return 0.;}
23 std::vector<int> slotID{slot, layer};
24 std::vector<float> opticalProperties = m_aeroPos2optical.find(slotID)->second;
26 return opticalProperties[0];
29 float ARICHAeroTilesInfo::getTransmissionLength(
int slot,
int layer)
const
32 if (slot > 124 || slot < 1) { B2WARNING(
"ARICHAeroTilesInfo::getTransmissionLength: Slot number " << slot <<
" not valid!");
return 0.;}
33 if (layer > 1 || layer < 0) { B2WARNING(
"ARICHAeroTilesInfo::getTransmissionLength: Layer number " << layer <<
" not valid!");
return 0.;}
35 std::vector<int> slotID{slot, layer};
36 std::vector<float> opticalProperties = m_aeroPos2optical.find(slotID)->second;
38 return opticalProperties[1];
41 float ARICHAeroTilesInfo::getThickness(
int slot,
int layer)
const
44 if (slot > 124 || slot < 1) { B2WARNING(
"ARICHAeroTilesInfo::getThickness: Slot number " << slot <<
" not valid!");
return 0.;}
45 if (layer > 1 || layer < 0) { B2WARNING(
"ARICHAeroTilesInfo::getThickness: Layer number " << layer <<
" not valid!");
return 0.;}
47 std::vector<int> slotID{slot, layer};
48 std::vector<float> opticalProperties = m_aeroPos2optical.find(slotID)->second;
50 return opticalProperties[2];
53 void ARICHAeroTilesInfo::addMapping(
int slot,
int layer,
float refractiveIndex,
float transmissionLength,
float thickness)
56 if (slot > 124 || slot < 1) { B2WARNING(
"ARICHAeroTilesInfo::getTransmissionLength: Slot number " << slot <<
" not valid!"); }
57 if (layer > 1 || layer < 0) { B2WARNING(
"ARICHAeroTilesInfo::getTransmissionLength: Layer number " << layer <<
" not valid!"); }
59 std::vector<int> slotID{slot, layer};
60 std::vector<float> opticalProperties{refractiveIndex, transmissionLength, thickness};
61 m_aeroPos2optical.insert(std::pair<std::vector<int>, std::vector<float>>(slotID, opticalProperties));
64 void ARICHAeroTilesInfo::print()
const
66 B2INFO(
"AEROGEL SLOT MAPPING with optical properties of tiles");
67 for (
int tile = 1; tile < N_TILES + 1; tile++) {
68 B2INFO(
"Slot number: " << tile <<
"\n"
69 <<
" downstream tile : refIndex = " << getRefractiveIndex(tile, 0) <<
"\n"
70 <<
" transLength = " << getTransmissionLength(tile, 0) <<
"\n"
71 <<
" thickness = " << getThickness(tile, 0) <<
"\n"
72 <<
" upstream tile : refIndex = " << getRefractiveIndex(tile, 1) <<
"\n"
73 <<
" transLength = " << getTransmissionLength(tile, 1) <<
"\n"
74 <<
" thickness = " << getThickness(tile, 1) <<
"\n");
Abstract base class for different kinds of events.