Files
uLib/src/HEP/Geant/GeantEvent.cpp
AndreaRigoni d8ef413216 vtkGeantEvent
2026-03-16 17:51:53 +00:00

26 lines
798 B
C++

#include "HEP/Geant/GeantEvent.h"
#include <cstddef>
#include <iostream>
using namespace uLib;
void GeantEvent::Print(const size_t size) const {
std::cout << "Event " << m_EventID << ":" << std::endl;
std::cout << " Momentum: " << m_Momentum << std::endl;
std::cout << " GenVector: " << m_GenVector << std::endl;
std::cout << " Path: " << std::endl;
size_t limit = m_Path.size();
if(size > 0 && size < m_Path.size()) {
limit = size;
}
for (size_t i = 0; i < limit; ++i) {
std::cout << " " << i << ": " << m_Path[i].m_Length << " " << m_Path[i].m_Momentum << " " << m_Path[i].m_Direction << " " << m_Path[i].m_SolidName << std::endl;
}
if (limit < m_Path.size()) {
std::cout << " ... (" << m_Path.size() - limit << " more deltas)" << std::endl;
}
}