34 const std::vector<float>& eV)
46 if (min_w >= max_w)
throw std::runtime_error(
"ERROR in SimPhotonCounter: bad wavelength range");
54 if (ph.
Energy < std::numeric_limits<float>::epsilon())
55 throw std::runtime_error(
"ERROR in SimPhotonCounter: photon energy is zero.");
57 return 0.00124 / ph.
Energy;
62 if (t_p2 < t_p1 || t_l2 < t_l1 || t_p2 > t_l1)
63 throw std::runtime_error(
"ERROR in SimPhotonCounter: bad time ranges");
74 throw std::runtime_error(
"ERROR in SimPhotonCounter: Opdet requested out of range!");
86 for (
size_t i_ph = 0; i_ph < photons.size(); i_ph++)
105 totalPhotonVector.begin(),
107 return totalPhotonVector;
112 std::cout <<
"Vector size: " <<
GetVectorSize() << std::endl;
116 <<
"i : QE / Prompt / Late / Total" << std::endl;
float MinPromptTime() const
int OpChannel() const
Returns the optical channel number this object is associated to.
void SetTimeRanges(float t_p1, float t_p2, float t_l1, float t_l2)
float MinLateTime() const
All information of a photon entering the sensitive optical detector volume.
std::vector< float > _photonVector_prompt
const std::vector< float > & PromptPhotonVector() const
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
std::vector< float > TotalPhotonVector() const
Simulation objects for optical detectors.
float MaxPromptTime() const
float Wavelength(const sim::OnePhoton &ph)
float MaxLateTime() const
Collection of photons which recorded on one channel.
const std::vector< float > & LatePhotonVector() const
std::vector< float > _qeVector
std::vector< float > _photonVector_late
void AddOnePhoton(size_t i_opdet, const sim::OnePhoton &photon)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
void SetWavelengthRanges(float min_w, float max_w)
float Energy
Scintillation photon energy [GeV].
void AddSimPhotons(const sim::SimPhotons &photons)
size_t GetVectorSize() const