Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DumpPHG4CylinderGeomContainer.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DumpPHG4CylinderGeomContainer.cc
2 
3 #include <phool/PHIODataNode.h>
4 
7 #include <g4detectors/PHG4CylinderGeom_Spacalv1.h> // for PHG4CylinderGeom_...
9 
10 #include <map>
11 #include <ostream>
12 #include <string>
13 #include <utility>
14 
16 
18  : DumpObject(NodeName)
19 {
20  return;
21 }
22 
24 {
25  PHG4CylinderGeomContainer *phg4geomcontainer = nullptr;
26  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
27  if (thisNode)
28  {
29  phg4geomcontainer = thisNode->getData();
30  }
31  if (phg4geomcontainer)
32  {
34  PHG4CylinderGeomContainer::ConstRange geom_begin_end = phg4geomcontainer->get_begin_end();
35  *fout << "num layers: " << phg4geomcontainer->get_NLayers() << std::endl;
36  for (hiter = geom_begin_end.first; hiter != geom_begin_end.second; hiter++)
37  {
38  *fout << "layer: " << hiter->second->get_layer() << std::endl;
39  *fout << "radius: " << hiter->second->get_radius() << std::endl;
40  *fout << "thickness: " << hiter->second->get_thickness() << std::endl;
41  *fout << "zmin: " << hiter->second->get_zmin() << std::endl;
42  *fout << "zmax: " << hiter->second->get_zmax() << std::endl;
43  *fout << "nscint: " << hiter->second->get_nscint() << std::endl;
44  *fout << "tiltangle: " << hiter->second->get_tiltangle() << std::endl;
45  *fout << "strip_y_spacing: " << hiter->second->get_strip_y_spacing() << std::endl;
46  *fout << "strip_z_spacing: " << hiter->second->get_strip_z_spacing() << std::endl;
47  *fout << "strip_tilt: " << hiter->second->get_strip_tilt() << std::endl;
48  *fout << "N_strip_columns: " << hiter->second->get_N_strip_columns() << std::endl;
49  *fout << "N_strips_per_column: " << hiter->second->get_N_strips_per_column() << std::endl;
50  *fout << "N_sensors_in_layer: " << hiter->second->get_N_sensors_in_layer() << std::endl;
51  *fout << "pixel_z: " << hiter->second->get_pixel_z() << std::endl;
52  *fout << "pixel_x: " << hiter->second->get_pixel_x() << std::endl;
53  *fout << "pixel_thickness: " << hiter->second->get_pixel_thickness() << std::endl;
54  PHG4CylinderGeom_Spacalv1 *layergeomv1 = dynamic_cast<PHG4CylinderGeom_Spacalv1 *>(hiter->second);
55  if (layergeomv1)
56  {
57  const PHG4CylinderGeom_Spacalv3::sector_map_t &sector_map = layergeomv1->get_sector_map();
58  *fout << "xpos: " << layergeomv1->get_xpos() << std::endl;
59  *fout << "ypos: " << layergeomv1->get_ypos() << std::endl;
60  *fout << "zpos: " << layergeomv1->get_zpos() << std::endl;
61  *fout << "fiber_clading_thickness: " << layergeomv1->get_fiber_clading_thickness() << std::endl;
62  *fout << "fiber_core_diameter: " << layergeomv1->get_fiber_core_diameter() << std::endl;
63  *fout << "fiber_distance: " << layergeomv1->get_fiber_distance() << std::endl;
64  *fout << "absorber_mat: " << layergeomv1->get_absorber_mat() << std::endl;
65  *fout << "fiber_clading_mat: " << layergeomv1->get_fiber_clading_mat() << std::endl;
66  *fout << "fiber_core_mat: " << layergeomv1->get_fiber_core_mat() << std::endl;
67  *fout << "virualize_fiber: " << layergeomv1->is_virualize_fiber() << std::endl;
68  for (auto sectormapiter : sector_map)
69  {
70  *fout << "sector " << sectormapiter.first << ", rotation: " << sectormapiter.second << std::endl;
71  }
72  }
73  PHG4CylinderGeom_Spacalv3 *layergeomv3 = dynamic_cast<PHG4CylinderGeom_Spacalv3 *>(hiter->second);
74  if (layergeomv3)
75  {
76  *fout << "sidewall_outer_torr: " << layergeomv3->get_sidewall_outer_torr() << std::endl;
77  *fout << "sidewall_thickness: " << layergeomv3->get_sidewall_thickness() << std::endl;
78  *fout << "sidewall_mat: " << layergeomv3->get_sidewall_mat() << std::endl;
79  *fout << "max_phi_bin_in_sec: " << layergeomv3->get_max_phi_bin_in_sec() << std::endl;
80  *fout << "divider_mat: " << layergeomv3->get_divider_mat() << std::endl;
81  *fout << "divider_width: " << layergeomv3->get_divider_width() << std::endl;
82 
83  const PHG4CylinderGeom_Spacalv3::tower_map_t &tower_map = layergeomv3->get_sector_tower_map();
84  for (const auto &towermapiter : tower_map)
85  {
86  *fout << "tower " << towermapiter.first << ", id: " << towermapiter.second.id << std::endl;
87  *fout << "tower " << towermapiter.first << ", pDz: " << towermapiter.second.pDz << std::endl;
88  *fout << "tower " << towermapiter.first << ", pDy1: " << towermapiter.second.pDy1 << std::endl;
89  *fout << "tower " << towermapiter.first << ", pDx1: " << towermapiter.second.pDx1 << std::endl;
90  *fout << "tower " << towermapiter.first << ", pDx2: " << towermapiter.second.pDx2 << std::endl;
91  *fout << "tower " << towermapiter.first << ", pDy2: " << towermapiter.second.pDy2 << std::endl;
92  *fout << "tower " << towermapiter.first << ", pDx3: " << towermapiter.second.pDx3 << std::endl;
93  *fout << "tower " << towermapiter.first << ", pDx4: " << towermapiter.second.pDx4 << std::endl;
94  *fout << "tower " << towermapiter.first << ", pTheta: " << towermapiter.second.pTheta << std::endl;
95  *fout << "tower " << towermapiter.first << ", pPhi: " << towermapiter.second.pPhi << std::endl;
96  *fout << "tower " << towermapiter.first << ", pAlp1: " << towermapiter.second.pAlp1 << std::endl;
97  *fout << "tower " << towermapiter.first << ", pAlp2: " << towermapiter.second.pAlp2 << std::endl;
98  *fout << "tower " << towermapiter.first << ", pRotationAngleX: " << towermapiter.second.pRotationAngleX << std::endl;
99  *fout << "tower " << towermapiter.first << ", centralX: " << towermapiter.second.centralX << std::endl;
100  *fout << "tower " << towermapiter.first << ", centralY: " << towermapiter.second.centralY << std::endl;
101  *fout << "tower " << towermapiter.first << ", centralZ: " << towermapiter.second.centralZ << std::endl;
102  *fout << "tower " << towermapiter.first << ", ModuleSkinThickness: " << towermapiter.second.ModuleSkinThickness << std::endl;
103  *fout << "tower " << towermapiter.first << ", NFiberX: " << towermapiter.second.NFiberX << std::endl;
104  *fout << "tower " << towermapiter.first << ", NFiberY: " << towermapiter.second.NFiberY << std::endl;
105  *fout << "tower " << towermapiter.first << ", NSubtowerX: " << towermapiter.second.NSubtowerX << std::endl;
106  *fout << "tower " << towermapiter.first << ", NSubtowerY: " << towermapiter.second.NSubtowerY << std::endl;
107  *fout << "tower " << towermapiter.first << ", LightguideHeight: " << towermapiter.second.LightguideHeight << std::endl;
108  *fout << "tower " << towermapiter.first << ", LightguideTaperRatio: " << towermapiter.second.LightguideTaperRatio << std::endl;
109  *fout << "tower " << towermapiter.first << ", LightguideMaterial: " << towermapiter.second.LightguideMaterial << std::endl;
110  }
111  }
112  }
113  }
114  return 0;
115 }