3 #include <calobase/RawTowerContainer.h>
4 #include <calobase/RawTowerv1.h>
6 #include <calobase/RawTower.h>
7 #include <calobase/RawTowerDefs.h>
8 #include <calobase/RawTowerGeom.h>
9 #include <calobase/RawTowerGeomContainer.h>
10 #include <calobase/RawTowerGeomContainerv1.h>
11 #include <calobase/RawTowerGeomv3.h>
27 #include <TRotation.h>
53 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
61 catch (std::exception &
e)
63 std::cout << e.what() << std::endl;
71 catch (std::exception &e)
73 std::cout << e.what() << std::endl;
84 PHG4HitContainer *g4hit = findNode::getClass<PHG4HitContainer>(topNode, NodeNameHits);
87 std::cout <<
"Could not locate g4 hit node " << NodeNameHits << std::endl;
95 for (hiter = hit_begin_end.first; hiter != hit_begin_end.second; hiter++)
97 PHG4Hit *g4hit_i = hiter->second;
112 tower->set_energy(0);
131 std::cout <<
"storing towers: " <<
m_Towers->
size() << std::endl;
132 std::cout <<
"Energy lost by dropping towers with less than " <<
m_Emin
137 for (iter = begin_end.first; iter != begin_end.second; ++iter)
139 iter->second->identify();
163 std::cout <<
PHWHERE <<
"Run Node missing, doing nothing." << std::endl;
164 throw std::runtime_error(
"Failed to find Run node in RawTowerBuilderByHitIndex::CreateNodes");
170 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
171 throw std::runtime_error(
"Failed to find DST node in RawTowerBuilderByHitIndex::CreateNodes");
213 std::ifstream istream_mapping;
216 if (!istream_mapping.is_open())
219 if (!istream_mapping)
221 std::cout <<
"CaloTowerGeomManager::ReadGeometryFromTable - ERROR Failed to open mapping file " <<
m_MappingTowerFile << std::endl;
228 while (getline(istream_mapping, line_mapping))
231 if (line_mapping.find(
'#') != std::string::npos)
235 std::cout <<
"RawTowerBuilderByHitIndex: SKIPPING line in mapping file: " << line_mapping << std::endl;
240 std::istringstream iss(line_mapping);
243 if (line_mapping.find(
"Tower ") != std::string::npos)
245 unsigned idx_j, idx_k, idx_l;
246 double pos_x, pos_y, pos_z;
247 double size_x, size_y,
size_z;
248 double rot_x, rot_y, rot_z;
253 if (!(iss >> dummys >> type >> idx_j >> idx_k >> idx_l >> pos_x >> pos_y >> pos_z >> size_x >> size_y >> size_z >> rot_x >> rot_y >> rot_z))
255 std::cout <<
"ERROR in RawTowerBuilderByHitIndex: Failed to read line in mapping file " <<
m_MappingTowerFile << std::endl;
283 if (!(iss >> parname >> parval))
285 std::cout <<
"ERROR in RawTowerBuilderByHitIndex: Failed to read line in mapping file " <<
m_MappingTowerFile << std::endl;
294 std::map<std::string, double>::iterator parit;
325 it != all_towers.second; ++
it)
327 double x_temp =
it->second->get_center_x();
328 double y_temp =
it->second->get_center_y();
329 double z_temp =
it->second->get_center_z();
337 TVector3 v_temp_r(x_temp, y_temp, z_temp);
338 v_temp_r.Transform(rot);
346 it->second->set_center_x(x_temp_rt);
347 it->second->set_center_y(y_temp_rt);
348 it->second->set_center_z(z_temp_rt);
352 std::cout <<
"* Local tower x y z : " << x_temp <<
" " << y_temp <<
" " << z_temp << std::endl;
353 std::cout <<
"* Globl tower x y z : " << x_temp_rt <<
" " << y_temp_rt <<
" " << z_temp_rt << std::endl;