File indexing completed on 2025-08-06 08:17:55
0001 #include "DumpEpdGeom.h"
0002
0003 #include <phool/PHIODataNode.h>
0004
0005 #include <calobase/TowerInfoDefs.h>
0006 #include <epd/EpdGeom.h>
0007
0008 #include <ostream>
0009 #include <string>
0010 #include <utility>
0011
0012 using MyNode_t = PHIODataNode<EpdGeom>;
0013
0014 DumpEpdGeom::DumpEpdGeom(const std::string &NodeName)
0015 : DumpObject(NodeName)
0016 {
0017 return;
0018 }
0019
0020 int DumpEpdGeom::process_Node(PHNode *myNode)
0021 {
0022 EpdGeom *epdgeom = nullptr;
0023 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0024 if (thisNode)
0025 {
0026 epdgeom = thisNode->getData();
0027 }
0028 if (epdgeom)
0029 {
0030 for (int iarm = 0; iarm < 2; iarm++)
0031 {
0032 for (int irad = 0; irad < 16; irad++)
0033 {
0034 for (int iphi = 0; iphi < 24; iphi++)
0035 {
0036 if (irad == 0 && iphi > 11)
0037 {
0038 continue;
0039 }
0040 unsigned int key = TowerInfoDefs::encode_epd(iarm, irad, iphi);
0041 *fout << "tile key: 0x" << std::hex << key << std::dec << std::endl;
0042 *fout << "get_r: " << epdgeom->get_r(key) << std::endl;
0043 *fout << "get_phi: " << epdgeom->get_phi(key) << std::endl;
0044 *fout << "get_z: " << epdgeom->get_z(key) << std::endl;
0045 }
0046 }
0047 }
0048 }
0049 return 0;
0050 }