4 #include <calobase/TowerInfo.h>
5 #include <calobase/TowerInfoContainer.h>
6 #include <calobase/TowerInfoContainerv1.h>
7 #include <calobase/TowerInfoContainerv2.h>
8 #include <calobase/TowerInfoContainerv3.h>
20 #include <Event/Event.h>
21 #include <Event/EventTypes.h>
22 #include <Event/packet.h>
115 std::vector<std::vector<float>> waveforms;
120 std::vector<float> waveform;
126 waveforms.push_back(waveform);
131 int n_channels = processed_waveforms.size();
132 for (
int i = 0;
i < n_channels;
i++)
135 towerinfo->
set_time(processed_waveforms.at(
i).at(1));
136 towerinfo->
set_energy(processed_waveforms.at(
i).at(0));
139 towerinfo->
set_chi2(processed_waveforms.at(
i).at(3));
140 int n_samples = waveforms.at(
i).size();
142 for (
int j = 0;
j < n_samples;
j++)
160 std::vector<std::vector<float>> waveforms;
162 Event *_event = findNode::getClass<Event>(topNode,
"PRDF");
163 if (_event ==
nullptr)
165 std::cout <<
PHWHERE <<
" Event not found" << std::endl;
177 int nchannels = packet->
iValue(0,
"CHANNELS");
198 int sector = ((
channel + 1) / 32);
199 if (
channel == (14 + 32 * sector))
204 std::vector<float> waveform;
216 waveforms.push_back(waveform);
225 int sector = ((
channel + 1) / 32);
227 if (
channel == (14 + 32 * sector))
232 std::vector<float> waveform;
237 waveform.push_back(0);
239 waveforms.push_back(waveform);
251 int sector = ((
channel + 1) / 32);
252 if (
channel == (14 + 32 * sector))
257 std::vector<float> waveform;
261 waveform.push_back(0);
263 waveforms.push_back(waveform);
272 int n_channels = processed_waveforms.size();
273 for (
int i = 0;
i < n_channels;
i++)
276 towerinfo->
set_time(processed_waveforms.at(
i).at(1));
277 towerinfo->
set_energy(processed_waveforms.at(
i).at(0));
280 towerinfo->
set_chi2(processed_waveforms.at(
i).at(3));
281 int n_samples = waveforms.at(
i).size();
283 for (
int j = 0;
j < n_samples;
j++)
300 std::cout <<
"PHComposite node created: DST" << std::endl;
310 std::cout <<
PHWHERE <<
"simulation waveform container " << waveformNodeName <<
" not found" << std::endl;
324 DetectorEnum = TowerInfoContainer::DETECTOR::EMCAL;
325 DetectorNodeName =
"CEMC";
330 DetectorNodeName =
"SEPD";
335 DetectorNodeName =
"ZDC";
339 DetectorEnum = TowerInfoContainer::DETECTOR::HCAL;
340 DetectorNodeName =
"HCALIN";
344 DetectorEnum = TowerInfoContainer::DETECTOR::HCAL;
345 DetectorNodeName =
"HCALOUT";
349 std::cout <<
PHWHERE <<
" Invalid detector type " <<
m_dettype << std::endl;
379 DetNode->
addNode(newTowerNode);