98 auto const& simPhotonsCollection =
101 std::vector<double> sumEnergyArray(
fN, 0.0);
103 const std::vector<sim::SimPhotons>& simPhotonsCollectionReflected =
106 std::vector<sim::SimPhotons>();
108 size_t n_sim_photons = simPhotonsCollection.size() + simPhotonsCollectionReflected.size();
110 for (
size_t i_pc = 0; i_pc < n_sim_photons; i_pc++) {
112 (i_pc < simPhotonsCollection.size()) ?
113 simPhotonsCollection[i_pc] :
114 simPhotonsCollectionReflected[i_pc - simPhotonsCollection.size()];
117 std::cout <<
"\tFilterSimPhotonTime: Processing simphotons channel " << simphotons.
OpChannel()
120 for (
auto const&
photon : simphotons)
121 for (
size_t i_tw = 0; i_tw <
fN; i_tw++) {
123 if (
photon.Time >= tw.first &&
photon.Time <= tw.second &&
127 std::string photon_string =
128 (i_pc < simPhotonsCollection.size()) ?
"Photon" :
"Reflected Photon";
129 std::cout <<
"\t\t" << photon_string <<
" with time " <<
photon.Time <<
" detected. "
130 <<
"Energy is " <<
photon.Energy <<
"." << std::endl;
133 sumEnergyArray[i_tw] +=
photon.Energy;
136 std::cout <<
"\t\tTotal energy in this window (" << i_tw <<
") is now "
137 << sumEnergyArray[i_tw] << std::endl;
147 for (
size_t i_tw = 0; i_tw <
fN; ++i_tw) {
150 <<
"]: " << sumEnergyArray[i_tw] << std::endl;
float const fMinTotalEnergy
process_name can override from command line with o or output photon
int OpChannel() const
Returns the optical channel number this object is associated to.
std::vector< std::pair< float, float > > const fTimeWindows
std::string const fReflectedLabel
std::string const fSimPhotonsCollectionLabel
float const fMinPhotonEnergy
Collection of photons which recorded on one channel.
bool const fUseReflectedPhotons
BEGIN_PROLOG could also be cout