121 int numberOfStrawsInLayersA[] = {15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18,
122 18, 18, 18, 18, 19, 19, 19, 18};
124 int numberOfStrawsInLayersB[] = {19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21,
125 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 23};
127 int numberOfStrawsInLayersC[] = {23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26,
128 26, 26, 26, 26, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 28};
130 std::vector<int> ncol0 (std::begin(numberOfStrawsInLayersA),
131 std::end(numberOfStrawsInLayersA));
132 std::vector<int> ncol1 (std::begin(numberOfStrawsInLayersB),
133 std::end(numberOfStrawsInLayersB));
134 std::vector<int> ncol2 (std::begin(numberOfStrawsInLayersC),
135 std::end(numberOfStrawsInLayersC));
137 m_ncol.push_back(std::move(ncol0));
138 m_ncol.push_back(std::move(ncol1));
139 m_ncol.push_back(std::move(ncol2));
155 int phiModuleId, moduleId, strawLayerId, strawInLayerId,
156 strawNumberInModule,BufferLocation;
163 std::vector<Identifier> tempbuff;
164 std::vector<IdentifierHash> tempbuff2;
165 for (
int i = 0; i < 8*13*16; i++){
167 tempbuff.push_back(
id);
168 tempbuff2.emplace_back(0);
170 m_cabling->zero_identifierForAllStraws(rod, tempbuff);
171 m_cabling->zero_identifierHashForAllStraws(rod, tempbuff2);
173 std::ostringstream ssFile;
175 std::string dataFile =
"TRT_TB04_IdMapping_ROD" + ssFile.str() +
".dat";
179 std::ifstream inputFile (
file.c_str());
181 ATH_MSG_FATAL(
"TRT_FillCablingData_TB04: Could not open file " << dataFile );
194 while(!inputFile.eof()){
200 inputFile >> phiModuleId >> moduleId >> strawNumberInModule
204 const bool validPhi =
inRange(phiModuleId, invalidInput, maxPossiblePhiModule);
205 const bool validModule =
inRange(moduleId, invalidInput, maxPossibleModule);
208 const bool validBuffer =
inRange(BufferLocation, invalidInput, maxPossibleBufferLocation);
209 if (not (validPhi and validModule and validStrawNumber and validBuffer)) {
210 ATH_MSG_WARNING(
"One of the following is out of range: " << phiModuleId <<
", " << moduleId
211 <<
", " << strawNumberInModule <<
", " << BufferLocation);
217 if (phiModuleId == 0)
241 strawNumberInModule--;
242 if (strawNumberInModule < 0) {
243 ATH_MSG_WARNING(
"Straw number in module became negative: " << strawNumberInModule);
249 strawInLayerId=strawNumberInModule;
251 while(strawInLayerId>=0){
253 strawInLayerId -=
m_ncol[moduleId][strawLayerId];
258 strawInLayerId +=
m_ncol[moduleId][strawLayerId];
261 inputFile.ignore(256,
'\n');
265 strawID =
m_TRTHelper->straw_id(barrelId, phiModuleId, moduleId,
266 strawLayerId, strawInLayerId);
267 m_cabling->set_identifierForAllStraws(0x310000 + rodSourceId, BufferLocation, strawID);
272 m_cabling->set_identifierHashForAllStraws(0x310000 + rodSourceId,
273 BufferLocation, hashId);
275 ATH_MSG_DEBUG(
"defineTables: unable to get hash for IdLayer " << IdLayer );
311std::vector<IdentifierHash> & ids)
314 int barrelId, phiModule=-1;
319 eformat::helper::SourceIdentifier id (rob_id);
320 module = (int) id.module_id();
330 else if (module == 3)
338 for (
int phiModule=0; phiModule<2; phiModule++ )
347 ids.push_back(idHash);
367 ids.push_back(idHash);
379 ids.push_back(idHash);
391 ids.push_back(idHash);