3 #include <calobase/TowerInfo.h>
4 #include <calobase/TowerInfoContainer.h>
5 #include <calobase/TowerInfoContainerv1.h>
6 #include <calobase/TowerInfoDefs.h>
15 #include <phparameter/PHParameterInterface.h>
56 std::cout <<
PHWHERE <<
"RUN Node not found - that is fatal" << std::endl;
69 EpdGeom *epdGeom = findNode::getClass<EpdGeom>(topNode,
"TOWERGEOM_EPD");
78 unsigned int epdchannels = 744;
79 for (
unsigned int ch = 0; ch < epdchannels; ch++)
102 std::cout <<
"Could not locate g4 hit node " <<
m_Hitnodename << std::endl;
107 if (!m_TowerInfoContainer)
114 if (!m_TowerInfoContainer_calib)
122 for (hiter = hit_begin_end.first; hiter != hit_begin_end.second; ++hiter)
124 if (hiter->second->get_t(0) >
tmax)
128 if (hiter->second->get_t(1) <
tmin)
132 if (hiter->second->get_t(1) - hiter->second->get_t(0) >
m_DeltaT)
142 m_EpdTile_e[this_arm][this_sector][this_tile] += hiter->second->get_light_yield();
147 for (
unsigned int k = 0;
k < 2;
k++)
149 for (
int i = 0;
i < 12;
i++)
151 for (
int j = 0;
j < 31;
j++)
162 unsigned int ch = m_TowerInfoContainer->
decode_key(key);
189 static const int rmap[31] = {0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15};
196 static const int phimap[31] = {0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
198 return phimap[phiindex];
203 static const float tilephi[24] = {0.13089969, 0.39269908, 0.65449847, 0.91629786, 1.17809725, 1.43989663, 1.70169602, 1.96349541, 2.2252948, 2.48709418, 2.74889357, 3.01069296, 3.27249235, 3.53429174, 3.79609112, 4.05789051, 4.3196899, 4.58148929, 4.84328867, 5.10508806, 5.36688745, 5.62868684, 5.89048623, 6.15228561};
204 return tilephi[thisphi];
209 static const float tilephi0[12] = {0.26179939, 0.78539816, 1.30899694, 1.83259571, 2.35619449, 2.87979327, 3.40339204, 3.92699082, 4.45058959, 4.97418837, 5.49778714, 6.02138592};
210 return tilephi0[thisphi0];
215 static const float tileR[16] = {6.8, 11.2, 15.6, 20.565, 26.095, 31.625, 37.155, 42.685, 48.215, 53.745, 59.275, 64.805, 70.335, 75.865, 81.395, 86.925};
221 static const float tileZ[2] = {-316.0, 316.0};
231 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
246 if (m_TowerInfoContainer ==
nullptr)
250 DetNode->addNode(TowerInfoNode);
255 if (m_TowerInfoContainer_calib ==
nullptr)
259 DetNode->addNode(TowerInfoNodecalib);