16 FillAllRanges( p.
get< std::vector<fhicl::ParameterSet> >(
"SimPhotonCounterParams") );
27 for(
auto const&
p : pv)
33 std::vector<float> time_range(4);
34 time_range[0] = p.
get<
float>(
"MinPromptTime");
35 time_range[1] = p.
get<
float>(
"MaxPromptTime");
36 time_range[2] = p.
get<
float>(
"MinLateTime");
37 time_range[3] = p.
get<
float>(
"MaxLateTime");
39 if( time_range[0]>time_range[1] || time_range[2]>time_range[3] || time_range[1]>time_range[2] )
40 throw std::runtime_error(
"ERROR in SimPhotonCounterAlg: Bad time range.");
44 std::vector<float> wavelength_range(2);
45 wavelength_range[0] = p.
get<
float>(
"MinWavelength");
46 wavelength_range[1] = p.
get<
float>(
"MaxWavelength");
48 if(wavelength_range[0] >= wavelength_range[1])
49 throw std::runtime_error(
"ERROR in SimPhotonCounterAlg: Bad wavelength range.");
69 if(ph_col.size() !=
fCounters.at(0).GetVectorSize())
70 throw std::runtime_error(
"ERROR in SimPhotonCounterAlg: Photon collection size and OpDet size not equal.");
72 for(
auto const& photons : ph_col)
74 counter.AddSimPhotons(photons.second);
79 for(
auto const& photons : spv)
92 return fCounters.at(i).PromptPhotonVector();
97 return fCounters.at(i).LatePhotonVector();
void InitializeCounters(geo::GeometryCore const &, opdet::OpDigiProperties const &)
std::vector< float > const & LatePhotonVector(size_t)
void FillRanges(fhicl::ParameterSet const &)
SimPhotonCounter const & GetSimPhotonCounter(size_t)
void FillAllRanges(std::vector< fhicl::ParameterSet > const &)
void AddSimPhotonsVector(std::vector< sim::SimPhotons > const &)
std::vector< SimPhotonCounter > fCounters
double QE() const noexcept
Returns quantum efficiency.
std::vector< std::vector< float > > fTimeRanges
virtual int NOpChannels() const
T get(std::string const &key) const
SimPhotonCounterAlg(fhicl::ParameterSet const &)
Description of geometry of one entire detector.
std::vector< float > const & PromptPhotonVector(size_t)
std::vector< std::vector< float > > fWavelengthRanges
void AddSimPhotonCollection(sim::SimPhotonsCollection const &)
LArSoft geometry interface.
Collection of sim::SimPhotons, indexed by channel number.