11#include <G4ThreeVector.hh>
34 template <
typename... Args>
36 template <
typename... Args>
40 G4String m_outputFileName;
47template <
typename... Args>
52 std::fstream dataFile;
53 dataFile.open(m_outputFileName.c_str(), std::ios::out | std::ios::app);
56 ((dataFile << p_args <<
"\t"), ...);
58 G4double weightedTotal = 0;
59 for (
const auto &hit : hits)
61 dataFile << hit <<
"\t";
66 G4double totalHits = 0;
67 for (
const auto &hit : hits)
73 dataFile << effectiveArea.
EA <<
"\t" << effectiveArea.
EAError <<
"\t";
81template <
typename... Args>
84 std::fstream dataFile;
85 dataFile.open(m_outputFileName.c_str(), std::ios::out | std::ios::app);
87 ((dataFile << p_args <<
"\t"), ...);
88 dataFile <<
"hits[1perPMT]"
94 <<
"EA_Total_error(cm^2)"
Defines structures and classes related to optical module photon hit management.
Simulation of PMT response.
Responsible for calculating the effective area of optical hits and saving the results.
Definition OMSimEffectiveAreaAnalyisis.hh:29
effectiveAreaResult calculateEffectiveArea(double weightedTotal, double countTotal)
Calculates the effective area based on the number of hits and beam properties.
Definition OMSimEffectiveAreaAnalyisis.cc:14
void writeHeader(Args... p_args)
Writes the header line to the output file.
Definition OMSimEffectiveAreaAnalyisis.hh:82
void writeScan(Args... p_args)
Writes a scan result to the output file.
Definition OMSimEffectiveAreaAnalyisis.hh:48
std::vector< double > countMergedHits(int pModuleIndex=0, bool pDEweight=false)
Counts hits for a specified module.
Definition OMSimHitManager.cc:209
static OMSimHitManager & getInstance()
Definition OMSimHitManager.cc:44
Struct to hold results of effective area calculations.
Definition OMSimEffectiveAreaAnalyisis.hh:18
double EA
Effective area.
Definition OMSimEffectiveAreaAnalyisis.hh:19
double EAError
Uncertainty of effective area.
Definition OMSimEffectiveAreaAnalyisis.hh:20