#include <SimPhotonCounterAlg.h>
Definition at line 25 of file SimPhotonCounterAlg.h.
opdet::SimPhotonCounterAlg::SimPhotonCounterAlg |
( |
fhicl::ParameterSet const & |
p | ) |
|
Title: SimPhotonCounterALG Class Author: Wes Ketchum (wketc.nosp@m.hum@.nosp@m.lanl..nosp@m.gov)
Description: Alg class that counts up sim photons, leading towards comparisons with flashes and flash hypotheses.
Definition at line 15 of file SimPhotonCounterAlg.cxx.
17 FillAllRanges(
p.get< std::vector<fhicl::ParameterSet> >(
"SimPhotonCounterParams") );
void FillAllRanges(std::vector< fhicl::ParameterSet > const &)
Definition at line 68 of file SimPhotonCounterAlg.cxx.
70 if(ph_col.size() !=
fCounters.at(0).GetVectorSize())
71 throw std::runtime_error(
"ERROR in SimPhotonCounterAlg: Photon collection size and OpDet size not equal.");
73 for(
auto const& photons : ph_col)
75 counter.AddSimPhotons(photons.second);
std::vector< SimPhotonCounter > fCounters
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
void opdet::SimPhotonCounterAlg::AddSimPhotonsVector |
( |
std::vector< sim::SimPhotons > const & |
spv | ) |
|
Definition at line 78 of file SimPhotonCounterAlg.cxx.
80 for(
auto const& photons : spv)
std::vector< SimPhotonCounter > fCounters
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
void opdet::SimPhotonCounterAlg::ClearCounters |
( |
| ) |
|
Definition at line 85 of file SimPhotonCounterAlg.cxx.
std::vector< SimPhotonCounter > fCounters
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
void opdet::SimPhotonCounterAlg::FillAllRanges |
( |
std::vector< fhicl::ParameterSet > const & |
pv | ) |
|
|
private |
Definition at line 20 of file SimPhotonCounterAlg.cxx.
28 for(
auto const&
p : pv)
void FillRanges(fhicl::ParameterSet const &)
std::vector< std::vector< float > > fTimeRanges
std::vector< std::vector< float > > fWavelengthRanges
void opdet::SimPhotonCounterAlg::FillRanges |
( |
fhicl::ParameterSet const & |
p | ) |
|
|
private |
Definition at line 32 of file SimPhotonCounterAlg.cxx.
34 std::vector<float> time_range(4);
35 time_range[0] =
p.get<
float>(
"MinPromptTime");
36 time_range[1] =
p.get<
float>(
"MaxPromptTime");
37 time_range[2] =
p.get<
float>(
"MinLateTime");
38 time_range[3] =
p.get<
float>(
"MaxLateTime");
40 if( time_range[0]>time_range[1] || time_range[2]>time_range[3] || time_range[1]>time_range[2] )
41 throw std::runtime_error(
"ERROR in SimPhotonCounterAlg: Bad time range.");
45 std::vector<float> wavelength_range(2);
46 wavelength_range[0] =
p.get<
float>(
"MinWavelength");
47 wavelength_range[1] =
p.get<
float>(
"MaxWavelength");
49 if(wavelength_range[0] >= wavelength_range[1])
50 throw std::runtime_error(
"ERROR in SimPhotonCounterAlg: Bad wavelength range.");
std::vector< std::vector< float > > fTimeRanges
std::vector< std::vector< float > > fWavelengthRanges
Definition at line 56 of file SimPhotonCounterAlg.cxx.
60 art::ServiceHandle<opdet::OpDetResponseInterface const> odresponse;
65 std::vector<float>(odresponse->NOpChannels(),opdigip.QE()));
std::vector< SimPhotonCounter > fCounters
std::vector< std::vector< float > > fTimeRanges
std::vector< std::vector< float > > fWavelengthRanges
std::vector< float > const & opdet::SimPhotonCounterAlg::LatePhotonVector |
( |
size_t |
i | ) |
|
std::vector< float > const & opdet::SimPhotonCounterAlg::PromptPhotonVector |
( |
size_t |
i | ) |
|
std::vector< std::vector<float> > opdet::SimPhotonCounterAlg::fTimeRanges |
|
private |
std::vector< std::vector<float> > opdet::SimPhotonCounterAlg::fWavelengthRanges |
|
private |
The documentation for this class was generated from the following files: