Definition at line 35 of file FakePhotoS_module.cc.
FakePhotoS::FakePhotoS |
( |
fhicl::ParameterSet const & |
p | ) |
|
|
explicit |
Definition at line 72 of file FakePhotoS_module.cc.
74 ,
fFlatEngine(art::ServiceHandle<rndm::NuRandomService>()->createEngine(*
this,
"HepJamesRandom",
"Gen",
p,
"Seed"))
78 auto min_pe =
p.get<
int>(
"MinPE",1);
79 auto max_pe =
p.get<
int>(
"MaxPE",1);
80 assert(min_pe <= max_pe && min_pe>0 && max_pe>0);
84 _ch_v =
p.get<std::vector<unsigned int> >(
"Channels",
_ch_v);
88 produces<std::vector<sim::SimPhotons> >();
92 _fast_frac =
p.get<
double>(
"PromptLightFraction",0.23);
93 _fast_tau =
p.get<
double>(
"FastTimeConstant",0.006);
94 _slow_tau =
p.get<
double>(
"SlowTimeConstant",1.5);
CLHEP::RandFlat * fFlatRandom
double _fast_tau
scintillation emission time constant for fast component
double _slow_tau
scintillation emission time constant for slow component
produces< sumdata::RunData, art::InRun >()
std::vector< unsigned int > _ch_v
bool _simulate_time
whether or not to simulate scintillation fall time
CLHEP::HepRandomEngine & fFlatEngine
CLHEP::RandExponential * fExpoRandom
double _fast_frac
fraction of prompt light
void FakePhotoS::beginRun |
( |
art::Run & |
run | ) |
|
|
override |
Definition at line 100 of file FakePhotoS_module.cc.
103 art::ServiceHandle<geo::Geometry> geo;
105 std::unique_ptr<sumdata::RunData> runData(
new sumdata::RunData(geo->DetectorName()));
107 run.put(std::move(runData));
std::vector< double > FakePhotoS::GenerateTime |
( |
size_t |
numphotons | ) |
|
|
private |
Definition at line 113 of file FakePhotoS_module.cc.
115 std::vector<double> res(numphotons);
116 for(
int i=0; i<((int)numphotons); ++i) {
CLHEP::RandFlat * fFlatRandom
double _fast_tau
scintillation emission time constant for fast component
double _slow_tau
scintillation emission time constant for slow component
CLHEP::RandExponential * fExpoRandom
double _fast_frac
fraction of prompt light
void FakePhotoS::produce |
( |
art::Event & |
e | ) |
|
|
override |
Definition at line 124 of file FakePhotoS_module.cc.
127 auto simph_v = std::unique_ptr<std::vector<sim::SimPhotons> >(
new std::vector<sim::SimPhotons>());
130 auto const geop = lar::providerFrom<geo::Geometry>();
131 _ch_v.reserve(geop->NOpChannels());
132 for(
size_t opch=0; opch<geop->NOpChannels(); ++opch)
133 _ch_v.push_back(opch);
135 simph_v->reserve(
_ch_v.size());
136 for(
auto const& opch :
_ch_v) {
145 std::vector<double> time_array(npe,0.);
147 for(
size_t ctr=0;ctr<npe;++ctr) {
149 phot.
Time =
_tstart + clock * 1.e3 + time_array[ctr];
150 sphot.emplace_back(std::move(phot));
155 simph_v->emplace_back(std::move(sphot));
158 e.put(std::move(simph_v));
CLHEP::RandFlat * fFlatRandom
All information of a photon entering the sensitive optical detector volume.
std::vector< double > GenerateTime(size_t numphotons)
std::vector< unsigned int > _ch_v
Collection of photons which recorded on one channel.
bool _simulate_time
whether or not to simulate scintillation fall time
BEGIN_PROLOG could also be cout
std::vector<unsigned int> FakePhotoS::_ch_v |
|
private |
double FakePhotoS::_duration |
|
private |
double FakePhotoS::_fast_frac |
|
private |
double FakePhotoS::_fast_tau |
|
private |
double FakePhotoS::_frequency |
|
private |
size_t FakePhotoS::_max_pe |
|
private |
size_t FakePhotoS::_min_pe |
|
private |
bool FakePhotoS::_simulate_time |
|
private |
double FakePhotoS::_slow_tau |
|
private |
double FakePhotoS::_tstart |
|
private |
bool FakePhotoS::_verbose |
|
private |
CLHEP::RandExponential* FakePhotoS::fExpoRandom |
|
private |
CLHEP::HepRandomEngine& FakePhotoS::fFlatEngine |
|
private |
CLHEP::RandFlat* FakePhotoS::fFlatRandom |
|
private |
The documentation for this class was generated from the following file: