38 Int_t sms = geo->GetNumberOfSuperModules();
40 for (
unsigned short icell = 0; icell < 17664; icell++) {
55 const char* aliceO2env = std::getenv(
"O2_ROOT");
56 std::string inputDir =
" ";
58 inputDir = aliceO2env;
60 inputDir +=
"/share/Detectors/EMC/files/";
62 std::string fileNameGainCalib = inputDir +
"GainCalibrationFactors_LHC18q.txt";
63 std::ifstream fileGainCalib(fileNameGainCalib, std::ifstream::in);
64 if (!fileGainCalib.is_open()) {
65 std::cout <<
"The file GainCalibrationFactors_LHC18q was not opened\n";
68 float GainCalibFactors[17664];
70 unsigned short icell = 0;
74 while (std::getline(fileGainCalib, line)) {
75 std::stringstream streamLine(line);
76 unsigned short iSM, iCol, iRow;
78 streamLine >> iSM >> iCol >> iRow >> Gain;
79 GainCalibFactors[icell] = Gain;
84 for (
unsigned short icell = 0; icell < 17664; icell++) {
91 std::string fileNameGainCalib_LHC15 = inputDir +
"GainCalibrationFactors_LHC15.txt";
92 std::ifstream fileGainCalib_LHC15(fileNameGainCalib_LHC15, std::ifstream::in);
93 if (!fileGainCalib_LHC15.is_open()) {
94 std::cout <<
"The file GainCalibrationFactors_LHC15 was not opened\n";
99 while (std::getline(fileGainCalib_LHC15, line)) {
100 std::stringstream streamLine(line);
101 Int_t iSM, iCol, iRow;
103 streamLine >> iSM >> iCol >> iRow >> GainCalib;
115 fileGainCalib.close();
116 fileGainCalib_LHC15.close();
static Geometry * GetInstanceFromRunNumber(Int_t runNumber, const std::string_view="", const std::string_view mcname="TGeant3", const std::string_view mctitle="")
Instanciate geometry depending on the run number. Mostly used in analysis and MC anchors.