LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
detsim::SimWire Class Reference
Inheritance diagram for detsim::SimWire:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 SimWire (fhicl::ParameterSet const &pset)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
void fillProductDescriptions ()
 
void registerProducts (ProductDescriptions &productsToRegister)
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
std::unique_ptr< Worker > makeWorker (WorkerParams const &wp)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Protected Member Functions

ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Private Member Functions

void produce (art::Event &evt) override
 
void beginJob () override
 
void ConvoluteResponseFunctions ()
 convolute electronics and field response More...
 
void SetFieldResponse ()
 response of wires to field More...
 
void SetElectResponse ()
 response of electronics More...
 
void GenNoise (std::vector< float > &array, CLHEP::HepRandomEngine &engine)
 

Private Attributes

std::string fDriftEModuleLabel
 module making the ionization electrons More...
 
raw::Compress_t fCompression
 compression type to use More...
 
int fNTicks
 number of ticks of the clock More...
 
double fSampleRate
 sampling rate in ns More...
 
unsigned int fNSamplesReadout
 number of ADC readout samples in 1 readout frame More...
 
double fCol3DCorrection
 
double fInd3DCorrection
 
unsigned int fNElectResp
 number of entries from response to use More...
 
double fInputFieldRespSamplingPeriod
 Sampling period in the input field response. More...
 
double fShapeTimeConst
 time constants for exponential shaping More...
 
double fADCPerPCAtLowestASICGain
 ADCs/pC at lowest gain setting of 4.7 mV/fC. More...
 
double fASICGainInMVPerFC
 actual gain setting used in mV/fC More...
 
int fNoiseNchToSim
 number of noise channels to generate More...
 
std::string fNoiseModelChoice
 choice for noise model More...
 
std::string fNoiseFluctChoice
 choice for noise freq component mag fluctuations More...
 
std::vector< int > fFieldRespTOffset
 field response time offset in ticks More...
 
std::vector< int > fCalibRespTOffset
 calib response time offset in ticks More...
 
std::vector< float > fColFieldParams
 collection plane field function parameterization More...
 
std::vector< float > fIndFieldParams
 induction plane field function parameterization More...
 
std::vector< double > fColFieldResponse
 response function for the field @ collection plane More...
 
std::vector< double > fIndFieldResponse
 response function for the field @ induction plane More...
 
std::vector< TComplex > fColShape
 response function for the field @ collection plane More...
 
std::vector< TComplex > fIndShape
 response function for the field @ induction plane More...
 
std::vector< double > fElectResponse
 response function for the electronics More...
 
std::vector< std::vector< float > > fNoise
 noise on each channel for each time More...
 
std::vector< double > fNoiseModelPar
 noise model params More...
 
std::vector< double > fNoiseFluctPar
 Poisson noise fluctuations params. More...
 
TH1D * fIndFieldResp
 response function for the field @ induction plane More...
 
TH1D * fColFieldResp
 response function for the field @ collection plane More...
 
TH1D * fElectResp
 response function for the electronics More...
 
TH1D * fColTimeShape
 convoluted shape for field x electronics @ col plane More...
 
TH1D * fIndTimeShape
 convoluted shape for field x electronics @ ind plane More...
 
TH1D * fNoiseDist
 distribution of noise counts More...
 
TF1 * fNoiseFluct
 Poisson dist for fluctuations in magnitude of noise freq components. More...
 
CLHEP::HepRandomEngine & fEngine
 Random-number engine owned by art. More...
 

Detailed Description

Definition at line 69 of file SimWire_module.cc.

Member Typedef Documentation

Definition at line 17 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::detail::Producer::Table = Modifier::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 26 of file Producer.h.

Constructor & Destructor Documentation

detsim::SimWire::SimWire ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 132 of file SimWire_module.cc.

References art::detail::EngineCreator::createEngine(), fADCPerPCAtLowestASICGain, fASICGainInMVPerFC, fCalibRespTOffset, fCol3DCorrection, fColFieldParams, fCompression, fDriftEModuleLabel, fEngine, fFieldRespTOffset, fInd3DCorrection, fIndFieldParams, fInputFieldRespSamplingPeriod, fNoiseFluctChoice, fNoiseFluctPar, fNoiseModelChoice, fNoiseModelPar, fNoiseNchToSim, fNSamplesReadout, fSampleRate, fShapeTimeConst, raw::kHuffman, raw::kNone, MF_LOG_WARNING, and detinfo::sampling_rate().

133  : EDProducer{pset}
134  , fDriftEModuleLabel{pset.get<std::string>("DriftEModuleLabel")}
135  , fCompression{pset.get<std::string>("CompressionType") == "Huffman" ? raw::kHuffman :
136  raw::kNone}
137  , fCol3DCorrection{pset.get<double>("Col3DCorrection")}
138  , fInd3DCorrection{pset.get<double>("Ind3DCorrection")}
139  , fInputFieldRespSamplingPeriod{pset.get<double>("InputFieldRespSamplingPeriod")}
140  , fShapeTimeConst{pset.get<double>("ShapeTimeConst")}
141  , fADCPerPCAtLowestASICGain{pset.get<double>("ADCPerPCAtLowestASICGain")}
142  , fASICGainInMVPerFC{pset.get<double>("ASICGainInMVPerFC")}
143  , fNoiseNchToSim{pset.get<int>("NoiseNchToSim")}
144  , fNoiseModelChoice{pset.get<std::string>("NoiseModelChoice")}
145  , fNoiseFluctChoice{pset.get<std::string>("NoiseFluctChoice")}
146  , fFieldRespTOffset{pset.get<std::vector<int>>("FieldRespTOffset")}
147  , fCalibRespTOffset{pset.get<std::vector<int>>("CalibRespTOffset")}
148  , fColFieldParams{pset.get<std::vector<float>>("ColFieldParams")}
149  , fIndFieldParams{pset.get<std::vector<float>>("IndFieldParams")}
150  , fNoiseModelPar{pset.get<std::vector<double>>("NoiseModelPar")}
151  , fNoiseFluctPar{pset.get<std::vector<double>>("NoiseFluctPar")}
152  // create a default random engine; obtain the random seed from NuRandomService,
153  // unless overridden in configuration with key "Seed"
154  , fEngine(art::ServiceHandle<rndm::NuRandomService>()->registerAndSeedEngine(createEngine(0),
155  pset,
156  "Seed"))
157  {
158  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
159  auto const detProp =
161  fSampleRate = sampling_rate(clockData);
162  fNSamplesReadout = detProp.NumberTimeSamples();
163 
164  MF_LOG_WARNING("SimWire") << "SimWire is an example module that works for the "
165  << "MicroBooNE detector. Each experiment should implement "
166  << "its own version of this module to simulate electronics "
167  << "response.";
168 
169  produces<std::vector<raw::RawDigit>>();
170  }
base_engine_t & createEngine(seed_t seed)
Huffman Encoding.
Definition: RawTypes.h:10
unsigned int fNSamplesReadout
number of ADC readout samples in 1 readout frame
std::string fNoiseModelChoice
choice for noise model
std::vector< float > fIndFieldParams
induction plane field function parameterization
std::string fDriftEModuleLabel
module making the ionization electrons
int fNoiseNchToSim
number of noise channels to generate
double fADCPerPCAtLowestASICGain
ADCs/pC at lowest gain setting of 4.7 mV/fC.
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.cc:6
std::string fNoiseFluctChoice
choice for noise freq component mag fluctuations
raw::Compress_t fCompression
compression type to use
double fShapeTimeConst
time constants for exponential shaping
double fInputFieldRespSamplingPeriod
Sampling period in the input field response.
no compression
Definition: RawTypes.h:9
std::vector< float > fColFieldParams
collection plane field function parameterization
std::vector< int > fCalibRespTOffset
calib response time offset in ticks
std::vector< double > fNoiseFluctPar
Poisson noise fluctuations params.
double fSampleRate
sampling rate in ns
std::vector< int > fFieldRespTOffset
field response time offset in ticks
double fASICGainInMVPerFC
actual gain setting used in mV/fC
#define MF_LOG_WARNING(category)
CLHEP::HepRandomEngine & fEngine
Random-number engine owned by art.
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
std::vector< double > fNoiseModelPar
noise model params

Member Function Documentation

void detsim::SimWire::beginJob ( )
overrideprivatevirtual

Reimplemented from art::EDProducer.

Definition at line 173 of file SimWire_module.cc.

References ConvoluteResponseFunctions(), fEngine, util::LArFFT::FFTSize(), fNoise, fNoiseDist, fNoiseFluct, fNoiseFluctChoice, fNoiseFluctPar, fNoiseNchToSim, fNTicks, GenNoise(), SetElectResponse(), and SetFieldResponse().

174  {
175  // ... get access to the TFile service
177 
178  fNoiseDist = tfs->make<TH1D>("Noise", ";Noise (ADC);", 1000, -10., 10.);
179 
181  fNTicks = fFFT->FFTSize();
182 
183  // ... Poisson dist function for fluctuating magnitude of noise frequency component
184  if (fNoiseFluctChoice == "SimplePoisson") {
185  // .. simple modified Poisson with (x-1)! in denominator
186  fNoiseFluct = new TF1("_poisson", "[0]**(x) * exp(-[0]) / ROOT::Math::tgamma(x)", 0, 5.);
187  fNoiseFluct->SetParameters(fNoiseFluctPar[0]); // Poisson mean
188  }
189  else if (fNoiseFluctChoice == "WeightedPoisson") {
190  // .. weighted Poisson in ArgoNeuT DDN model
191  fNoiseFluct = new TF1(
192  "_poisson", "[0]*pow([1]/[2], x/[2])*exp(-[1]/[2])/ROOT::Math::tgamma(x/[2]+1.)", 0, 5.);
193  fNoiseFluct->SetParameters(fNoiseFluctPar[0], fNoiseFluctPar[1], fNoiseFluctPar[2]);
194  }
195  else {
196  throw cet::exception("SimWire::beginJob")
197  << fNoiseFluctChoice << " is an unknown noise fluctuation choice" << std::endl;
198  }
199 
200  // ... generate the noise in advance depending on value of fNoiseNchToSim:
201  // positive - generate N=fNoiseNchToSim channels & randomly pick from pool when adding to signal
202  // zero - no noise
203  // negative - generate unique noise for each channel for each event
204  if (fNoiseNchToSim > 0) {
205  if (fNoiseNchToSim > 10000) {
206  throw cet::exception("SimWire::beginJob")
207  << fNoiseNchToSim << " noise channels requested exceeds 10000" << std::endl;
208  }
209  fNoise.resize(fNoiseNchToSim);
210  for (unsigned int p = 0; p < fNoise.size(); ++p) {
211  GenNoise(fNoise[p], fEngine);
212  for (int i = 0; i < fNTicks; ++i) {
213  fNoiseDist->Fill(fNoise[p][i]);
214  }
215  }
216  }
217 
218  // ... set field response and electronics response, then convolute them
222  }
TF1 * fNoiseFluct
Poisson dist for fluctuations in magnitude of noise freq components.
int fNoiseNchToSim
number of noise channels to generate
void SetElectResponse()
response of electronics
TH1D * fNoiseDist
distribution of noise counts
std::string fNoiseFluctChoice
choice for noise freq component mag fluctuations
std::vector< std::vector< float > > fNoise
noise on each channel for each time
int FFTSize() const
Definition: LArFFT.h:66
void GenNoise(std::vector< float > &array, CLHEP::HepRandomEngine &engine)
std::vector< double > fNoiseFluctPar
Poisson noise fluctuations params.
void ConvoluteResponseFunctions()
convolute electronics and field response
void SetFieldResponse()
response of wires to field
int fNTicks
number of ticks of the clock
CLHEP::HepRandomEngine & fEngine
Random-number engine owned by art.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 61 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().

62  {
63  return collector_.consumes<T, BT>(tag);
64  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ProductToken< T > consumes(InputTag const &)
ConsumesCollector & art::ModuleBase::consumesCollector ( )
protectedinherited

Definition at line 57 of file ModuleBase.cc.

References art::ModuleBase::collector_.

58  {
59  return collector_;
60  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 75 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().

76  {
77  collector_.consumesMany<T, BT>();
78  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 68 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().

69  {
70  return collector_.consumesView<T, BT>(tag);
71  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > consumesView(InputTag const &)
void detsim::SimWire::ConvoluteResponseFunctions ( )
private

convolute electronics and field response

Definition at line 335 of file SimWire_module.cc.

References col, util::LArFFT::DoFFT(), util::LArFFT::DoInvFFT(), fColFieldResponse, fColShape, fColTimeShape, fElectResponse, fIndFieldResponse, fIndShape, fIndTimeShape, fNTicks, util::LArFFT::PeakCorrelation(), and util::LArFFT::ShiftData().

Referenced by beginJob().

336  {
337  double tick, ticks, peak;
338 
339  std::vector<double> col(fNTicks, 0.);
340  std::vector<double> ind(fNTicks, 0.);
341  std::vector<TComplex> kern(fNTicks / 2 + 1);
342  std::vector<double> delta(fNTicks, 0.);
343 
345 
346  // ... do collection plane
347  fColShape.resize(fNTicks / 2 + 1);
349 
350  fFFT->DoFFT(fColFieldResponse, kern);
351  for (unsigned int i = 0; i < kern.size(); ++i)
352  fColShape[i] *= kern[i];
353 
354  fFFT->DoInvFFT(fColShape, col);
355 
356  delta[0] = 1.0;
357  peak = fFFT->PeakCorrelation(delta, col);
358  tick = 0.;
359  ticks = tick - peak;
360  fFFT->ShiftData(fColShape, ticks);
361  fFFT->DoInvFFT(fColShape, col);
362 
363  // ... do induction plane
364  fIndShape.resize(fNTicks / 2 + 1);
366 
367  kern.clear();
368  kern.resize(fNTicks / 2 + 1);
369  fFFT->DoFFT(fIndFieldResponse, kern);
370  for (unsigned int i = 0; i < kern.size(); ++i)
371  fIndShape[i] *= kern[i];
372 
373  fFFT->DoInvFFT(fIndShape, ind);
374 
375  delta.resize(0);
376  delta.resize(fNTicks, 0);
377  delta[0] = 1.0;
378  peak = fFFT->PeakCorrelation(delta, ind);
379  tick = 0.;
380  ticks = tick - peak;
381  fFFT->ShiftData(fIndShape, ticks);
382  fFFT->DoInvFFT(fIndShape, ind);
383 
384  // ... write the time-domain shapes out to a file
386  fColTimeShape = tfs->make<TH1D>(
387  "ConvolutedCollection", ";ticks; Electronics#timesCollection", fNTicks, 0, fNTicks);
388  fIndTimeShape = tfs->make<TH1D>(
389  "ConvolutedInduction", ";ticks; Electronics#timesInduction", fNTicks, 0, fNTicks);
390 
391  // ... check that you did the right thing
392  for (unsigned int i = 0; i < ind.size(); ++i) {
393  fColTimeShape->Fill(i, col[i]);
394  fIndTimeShape->Fill(i, ind[i]);
395  }
396 
397  fColTimeShape->Write();
398  fIndTimeShape->Write();
399  }
std::vector< TComplex > fColShape
response function for the field @ collection plane
std::vector< double > fElectResponse
response function for the electronics
TH1D * fColTimeShape
convoluted shape for field x electronics @ col plane
void ShiftData(std::vector< TComplex > &input, double shift)
Definition: LArFFT.cc:116
void DoFFT(std::vector< T > &input, std::vector< TComplex > &output)
Definition: LArFFT.h:95
T PeakCorrelation(std::vector< T > &shape1, std::vector< T > &shape2)
Definition: LArFFT.h:270
tick ticks
Alias for common language habits.
Definition: electronics.h:76
void DoInvFFT(std::vector< TComplex > &input, std::vector< T > &output)
Definition: LArFFT.h:117
std::vector< double > fIndFieldResponse
response function for the field @ induction plane
std::vector< double > fColFieldResponse
response function for the field @ collection plane
std::vector< TComplex > fIndShape
response function for the field @ induction plane
Int_t col[ntarg]
Definition: Style.C:29
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
int fNTicks
number of ticks of the clock
TH1D * fIndTimeShape
convoluted shape for field x electronics @ ind plane
void art::detail::Producer::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 22 of file Producer.cc.

References art::detail::Producer::beginJobWithFrame(), and art::detail::Producer::setupQueues().

23  {
24  setupQueues(resources);
25  ProcessingFrame const frame{ScheduleID{}};
26  beginJobWithFrame(frame);
27  }
virtual void setupQueues(SharedResources const &)=0
virtual void beginJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 65 of file Producer.cc.

References art::detail::Producer::beginRunWithFrame(), art::RangeSet::forRun(), art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().

66  {
67  auto r = rp.makeRun(mc, RangeSet::forRun(rp.runID()));
68  ProcessingFrame const frame{mc.scheduleID()};
69  beginRunWithFrame(r, frame);
70  r.commitProducts();
71  return true;
72  }
TRandom r
Definition: spectrum.C:23
virtual void beginRunWithFrame(Run &, ProcessingFrame const &)=0
static RangeSet forRun(RunID)
Definition: RangeSet.cc:51
bool art::detail::Producer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 85 of file Producer.cc.

References art::detail::Producer::beginSubRunWithFrame(), art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().

86  {
87  auto sr = srp.makeSubRun(mc, RangeSet::forSubRun(srp.subRunID()));
88  ProcessingFrame const frame{mc.scheduleID()};
89  beginSubRunWithFrame(sr, frame);
90  sr.commitProducts();
91  return true;
92  }
virtual void beginSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
static RangeSet forSubRun(SubRunID)
Definition: RangeSet.cc:57
void art::detail::Producer::doEndJob ( )
inherited

Definition at line 30 of file Producer.cc.

References art::detail::Producer::endJobWithFrame().

31  {
32  ProcessingFrame const frame{ScheduleID{}};
33  endJobWithFrame(frame);
34  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 75 of file Producer.cc.

References art::detail::Producer::endRunWithFrame(), art::RunPrincipal::makeRun(), r, art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

76  {
77  auto r = rp.makeRun(mc, rp.seenRanges());
78  ProcessingFrame const frame{mc.scheduleID()};
79  endRunWithFrame(r, frame);
80  r.commitProducts();
81  return true;
82  }
TRandom r
Definition: spectrum.C:23
virtual void endRunWithFrame(Run &, ProcessingFrame const &)=0
bool art::detail::Producer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 95 of file Producer.cc.

References art::detail::Producer::endSubRunWithFrame(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

96  {
97  auto sr = srp.makeSubRun(mc, srp.seenRanges());
98  ProcessingFrame const frame{mc.scheduleID()};
99  endSubRunWithFrame(sr, frame);
100  sr.commitProducts();
101  return true;
102  }
virtual void endSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
bool art::detail::Producer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited

Definition at line 105 of file Producer.cc.

References art::detail::Producer::checkPutProducts_, e, art::EventPrincipal::makeEvent(), art::detail::Producer::produceWithFrame(), and art::ModuleContext::scheduleID().

110  {
111  auto e = ep.makeEvent(mc);
112  ++counts_run;
113  ProcessingFrame const frame{mc.scheduleID()};
114  produceWithFrame(e, frame);
115  e.commitProducts(checkPutProducts_, &expectedProducts<InEvent>());
116  ++counts_passed;
117  return true;
118  }
bool const checkPutProducts_
Definition: Producer.h:70
Float_t e
Definition: plot.C:35
virtual void produceWithFrame(Event &, ProcessingFrame const &)=0
void art::detail::Producer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 44 of file Producer.cc.

References art::detail::Producer::respondToCloseInputFileWithFrame().

45  {
46  ProcessingFrame const frame{ScheduleID{}};
48  }
virtual void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 58 of file Producer.cc.

References art::detail::Producer::respondToCloseOutputFilesWithFrame().

59  {
60  ProcessingFrame const frame{ScheduleID{}};
62  }
virtual void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 37 of file Producer.cc.

References art::detail::Producer::respondToOpenInputFileWithFrame().

38  {
39  ProcessingFrame const frame{ScheduleID{}};
41  }
virtual void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 51 of file Producer.cc.

References art::detail::Producer::respondToOpenOutputFilesWithFrame().

52  {
53  ProcessingFrame const frame{ScheduleID{}};
55  }
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::Modifier::fillProductDescriptions ( )
inherited

Definition at line 10 of file Modifier.cc.

References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().

11  {
13  }
void fillDescriptions(ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
void detsim::SimWire::GenNoise ( std::vector< float > &  array,
CLHEP::HepRandomEngine &  engine 
)
private

Definition at line 402 of file SimWire_module.cc.

References util::LArFFT::DoInvFFT(), fNoiseFluct, fNoiseModelChoice, fNoiseModelPar, fNTicks, fSampleRate, and x.

Referenced by beginJob(), and produce().

403  {
404  CLHEP::RandFlat flat(engine);
405 
406  noise.clear();
407  noise.resize(fNTicks, 0.);
408  std::vector<TComplex> noiseFrequency(fNTicks / 2 + 1, 0.); // noise in frequency space
409 
410  double pval = 0.;
411  double phase = 0.;
412  double rnd[2] = {0.};
413 
414  // .. width of frequencyBin in kHz
415  double binWidth = 1.0 / (fNTicks * fSampleRate * 1.0e-6);
416 
417  for (int i = 0; i < fNTicks / 2 + 1; ++i) {
418 
419  double x = (i + 0.5) * binWidth;
420 
421  if (fNoiseModelChoice == "Legacy") {
422  // ... Legacy exponential model kept here for reference:
423  // par[0]=NoiseFact, par[1]=NoiseWidth, par[2]=LowCutoff, par[3-7]=0
424  // example parameter values for fcl: NoiseModelPar:[ 1.32e-1,120,7.5,0,0,0,0,0 ]
425  pval = fNoiseModelPar[0] * exp(-(double)i * binWidth / fNoiseModelPar[1]);
426  double lofilter = 1.0 / (1.0 + exp(-(i - fNoiseModelPar[2] / binWidth) / 0.5));
427  flat.fireArray(1, rnd, 0, 1);
428  pval *= lofilter * (0.9 + 0.2 * rnd[0]);
429  }
430  else if (fNoiseModelChoice == "ModUBooNE") {
431  // ... Modified uBooNE model with additive exp to account for low freq region:
432  // example parameter values for fcl: NoiseModelPar:[
433  // 4450.,-530.,280.,110.,
434  // -0.85,18.,0.064,74. ]
435  pval = fNoiseModelPar[0] * exp(-0.5 * pow((x - fNoiseModelPar[1]) / fNoiseModelPar[2], 2)) *
436  exp(-0.5 * pow(x / fNoiseModelPar[3], fNoiseModelPar[4])) +
437  fNoiseModelPar[5] + exp(-fNoiseModelPar[6] * (x - fNoiseModelPar[7]));
438  double randomizer = fNoiseFluct->GetRandom();
439  pval = pval * randomizer / fNTicks;
440  }
441  else if (fNoiseModelChoice == "ArgoNeuT") {
442  // ... ArgoNeuT data driven model:
443  // In fcl set parameters to: NoiseModelPar:[
444  // 5000,-5.52058e2,2.81587e2,-5.66561e1,
445  // 4.10817e1,1.76284e1,1e-1,5.97838e1 ]
446  pval = fNoiseModelPar[0] * exp(-0.5 * pow((x - fNoiseModelPar[1]) / fNoiseModelPar[2], 2)) *
447  ((fNoiseModelPar[3] / (x + fNoiseModelPar[4])) + 1) +
448  fNoiseModelPar[5] + exp(-fNoiseModelPar[6] * (x - fNoiseModelPar[7]));
449  double randomizer = fNoiseFluct->GetRandom();
450  pval = pval * randomizer / fNTicks;
451  }
452  else {
453  throw cet::exception("SimWire::GenNoise")
454  << fNoiseModelChoice << " is an unknown choice for the noise model" << std::endl;
455  }
456 
457  flat.fireArray(1, rnd, 0, 1);
458  phase = rnd[0] * 2. * TMath::Pi();
459 
460  TComplex tc(pval * cos(phase), pval * sin(phase));
461  noiseFrequency[i] += tc;
462  }
463 
464  // .. inverse FFT MCSignal
466  fFFT->DoInvFFT(noiseFrequency, noise);
467 
468  noiseFrequency.clear();
469 
470  // .. multiply each noise value by fNTicks as the InvFFT
471  // divides each bin by fNTicks assuming that a forward FFT
472  // has already been done.
473  for (unsigned int i = 0; i < noise.size(); ++i)
474  noise[i] *= 1. * fNTicks;
475  }
Float_t x
Definition: compare.C:6
std::string fNoiseModelChoice
choice for noise model
TF1 * fNoiseFluct
Poisson dist for fluctuations in magnitude of noise freq components.
void DoInvFFT(std::vector< TComplex > &input, std::vector< T > &output)
Definition: LArFFT.h:117
unsigned int noise()
Definition: chem4.cc:261
double fSampleRate
sampling rate in ns
int fNTicks
number of ticks of the clock
std::vector< double > fNoiseModelPar
noise model params
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::array< std::vector< ProductInfo >, NumBranchTypes > const & art::ModuleBase::getConsumables ( ) const
inherited

Definition at line 43 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().

44  {
45  return collector_.getConsumables();
46  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
std::unique_ptr< Worker > art::ModuleBase::makeWorker ( WorkerParams const &  wp)
inherited

Definition at line 37 of file ModuleBase.cc.

References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.

38  {
39  return doMakeWorker(wp);
40  }
virtual std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp)=0
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 82 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().

83  {
84  return collector_.mayConsume<T, BT>(tag);
85  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 96 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().

97  {
98  collector_.mayConsumeMany<T, BT>();
99  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 89 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().

90  {
91  return collector_.mayConsumeView<T, BT>(tag);
92  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > mayConsumeView(InputTag const &)
ModuleDescription const & art::ModuleBase::moduleDescription ( ) const
inherited

Definition at line 13 of file ModuleBase.cc.

References art::errors::LogicError.

Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().

14  {
15  if (md_.has_value()) {
16  return *md_;
17  }
18 
20  "There was an error while calling moduleDescription().\n"}
21  << "The moduleDescription() base-class member function cannot be called\n"
22  "during module construction. To determine which module is "
23  "responsible\n"
24  "for calling it, find the '<module type>:<module "
25  "label>@Construction'\n"
26  "tag in the message prefix above. Please contact artists@fnal.gov\n"
27  "for guidance.\n";
28  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void detsim::SimWire::produce ( art::Event evt)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 225 of file SimWire_module.cc.

References sim::SimChannel::Charge(), raw::Compress(), fCalibRespTOffset, fColShape, fCompression, fDriftEModuleLabel, fEngine, fFieldRespTOffset, fIndShape, fNoise, fNoiseNchToSim, fNSamplesReadout, fNTicks, GenNoise(), Get, art::ProductRetriever::getView(), geo::kInduction, art::Event::put(), and sc.

226  {
227  auto const& wireReadoutGeom = art::ServiceHandle<geo::WireReadout const>()->Get();
228  auto const nchannels = wireReadoutGeom.Nchannels();
229 
230  // ... generate unique noise for each channel in each event
231  if (fNoiseNchToSim < 0) {
232  fNoise.clear();
233  fNoise.resize(nchannels);
234  for (unsigned int p = 0; p < nchannels; ++p) {
235  GenNoise(fNoise[p], fEngine);
236  }
237  }
238 
239  // ... make a vector of const sim::SimChannel* that has same number
240  // of entries as the number of channels in the detector
241  // and set the entries for the channels that have signal on them
242  // using the chanHandle
243  std::vector<const sim::SimChannel*> chanHandle;
244  evt.getView(fDriftEModuleLabel, chanHandle);
245 
246  std::vector<const sim::SimChannel*> channels(nchannels);
247  for (size_t c = 0; c < chanHandle.size(); ++c) {
248  channels[chanHandle[c]->Channel()] = chanHandle[c];
249  }
250 
251  // ... make an unique_ptr of sim::SimDigits that allows ownership of the produced
252  // digits to be transferred to the art::Event after the put statement below
253  auto digcol = std::make_unique<std::vector<raw::RawDigit>>();
254 
256 
257  // ... Add all channels
258  CLHEP::RandFlat flat(fEngine);
259 
261  for (unsigned int chan = 0; chan < nchannels; chan++) {
262 
263  std::vector<short> adcvec(fNTicks, 0);
264  std::vector<double> fChargeWork(fNTicks, 0.);
265 
266  if (channels[chan]) {
267 
268  // .. get the sim::SimChannel for this channel
269  const sim::SimChannel* sc = channels[chan];
270 
271  // .. loop over the tdcs and grab the number of electrons for each
272  for (int t = 0; t < fNTicks; ++t)
273  fChargeWork[t] = sc->Charge(t);
274 
275  int time_offset = 0;
276 
277  // .. Convolve charge with appropriate response function
278  if (wireReadoutGeom.SignalType(chan) == geo::kInduction) {
279  fFFT->Convolute(fChargeWork, fIndShape);
280  time_offset = fFieldRespTOffset[1] + fCalibRespTOffset[1];
281  }
282  else {
283  fFFT->Convolute(fChargeWork, fColShape);
284  time_offset = fFieldRespTOffset[0] + fCalibRespTOffset[0];
285  }
286 
287  // .. Apply field response offset
288  std::vector<int> temp;
289  if (time_offset <= 0) {
290  temp.assign(fChargeWork.begin(), fChargeWork.begin() - time_offset);
291  fChargeWork.erase(fChargeWork.begin(), fChargeWork.begin() - time_offset);
292  fChargeWork.insert(fChargeWork.end(), temp.begin(), temp.end());
293  }
294  else {
295  temp.assign(fChargeWork.end() - time_offset, fChargeWork.end());
296  fChargeWork.erase(fChargeWork.end() - time_offset, fChargeWork.end());
297  fChargeWork.insert(fChargeWork.begin(), temp.begin(), temp.end());
298  }
299  }
300 
301  // ... Add noise to signal depending on value of fNoiseNchToSim
302  if (fNoiseNchToSim != 0) {
303  int noisechan = chan;
304  if (fNoiseNchToSim > 0) {
305  noisechan = TMath::Nint(flat.fire() * (1. * (fNoise.size() - 1) + 0.1));
306  }
307  for (int i = 0; i < fNTicks; ++i) {
308  adcvec[i] = (short)TMath::Nint(fNoise[noisechan][i] + fChargeWork[i]);
309  }
310  }
311  else {
312  for (int i = 0; i < fNTicks; ++i) {
313  adcvec[i] = (short)TMath::Nint(fChargeWork[i]);
314  }
315  }
316 
317  adcvec.resize(fNSamplesReadout);
318 
319  // ... compress the adc vector using the desired compression scheme,
320  // if raw::kNone is selected nothing happens to adcvec
321  // This shrinks adcvec, if fCompression is not kNone.
322  raw::Compress(adcvec, fCompression);
323 
324  // ... add this digit to the collection
325  digcol->emplace_back(chan, fNTicks, move(adcvec), fCompression);
326 
327  } //end loop over channels
328 
329  evt.put(std::move(digcol));
330 
331  return;
332  }
intermediate_table::iterator iterator
unsigned int fNSamplesReadout
number of ADC readout samples in 1 readout frame
std::vector< TComplex > fColShape
response function for the field @ collection plane
Energy deposited on a readout channel by simulated tracks.
Definition: SimChannel.h:136
std::string fDriftEModuleLabel
module making the ionization electrons
int fNoiseNchToSim
number of noise channels to generate
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
Definition: AddMC.C:8
raw::Compress_t fCompression
compression type to use
std::vector< std::vector< float > > fNoise
noise on each channel for each time
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: Event.h:77
std::vector< int > fCalibRespTOffset
calib response time offset in ticks
void GenNoise(std::vector< float > &array, CLHEP::HepRandomEngine &engine)
Signal from induction planes.
Definition: geo_types.h:147
double Charge(TDC_t tdc) const
Returns the total number of ionization electrons on this channel in the specified TDC...
Definition: SimChannel.cxx:110
std::vector< TComplex > fIndShape
response function for the field @ induction plane
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
int fNTicks
number of ticks of the clock
std::vector< int > fFieldRespTOffset
field response time offset in ticks
Float_t sc
Definition: plot.C:23
void Compress(std::vector< short > &adc, raw::Compress_t compress)
Compresses a raw data buffer.
Definition: raw.cxx:19
CLHEP::HepRandomEngine & fEngine
Random-number engine owned by art.
void art::Modifier::registerProducts ( ProductDescriptions productsToRegister)
inherited

Definition at line 16 of file Modifier.cc.

References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().

17  {
18  ProductRegistryHelper::registerProducts(productsToRegister,
20  }
void registerProducts(ProductDescriptions &productsToRegister, ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
void detsim::SimWire::SetElectResponse ( )
private

response of electronics

Definition at line 532 of file SimWire_module.cc.

References DEFINE_ART_MODULE, e, fADCPerPCAtLowestASICGain, fASICGainInMVPerFC, fElectResp, fElectResponse, fInputFieldRespSamplingPeriod, fNElectResp, fNTicks, and fShapeTimeConst.

Referenced by beginJob().

533  {
534  fElectResponse.resize(fNTicks, 0.);
535  std::vector<double> time(fNTicks, 0.);
536 
537  // ... Gain and shaping time variables from fcl file:
538  double Ao = 1.0;
539  double To = fShapeTimeConst; //peaking time
540 
541  // ... this is actually sampling time, in ns
542  mf::LogInfo("SimWire::SetElectResponse")
543  << "Check sampling intervals: " << fInputFieldRespSamplingPeriod << " ns"
544  << "Check number of samples: " << fNTicks;
545 
546  // ... The following sets the microboone electronics response function in
547  // time-space. Function comes from BNL SPICE simulation of DUNE35t
548  // electronics. SPICE gives the electronics transfer function in
549  // frequency-space. The inverse laplace transform of that function
550  // (in time-space) was calculated in Mathematica and is what is being
551  // used below. Parameters Ao and To are cumulative gain/timing parameters
552  // from the full (ASIC->Intermediate amp->Receiver->ADC) electronics chain.
553  // They have been adjusted to make the SPICE simulation to match the
554  // actual electronics response. Default params are Ao=1.4, To=0.5us.
555  double max = 0;
556 
557  for (size_t i = 0; i < fElectResponse.size(); ++i) {
558 
559  // ... convert time to microseconds, to match fElectResponse[i] definition
560  time[i] = (1. * i) * fInputFieldRespSamplingPeriod * 1e-3;
561  fElectResponse[i] =
562  4.31054 * exp(-2.94809 * time[i] / To) * Ao -
563  2.6202 * exp(-2.82833 * time[i] / To) * cos(1.19361 * time[i] / To) * Ao -
564  2.6202 * exp(-2.82833 * time[i] / To) * cos(1.19361 * time[i] / To) *
565  cos(2.38722 * time[i] / To) * Ao +
566  0.464924 * exp(-2.40318 * time[i] / To) * cos(2.5928 * time[i] / To) * Ao +
567  0.464924 * exp(-2.40318 * time[i] / To) * cos(2.5928 * time[i] / To) *
568  cos(5.18561 * time[i] / To) * Ao +
569  0.762456 * exp(-2.82833 * time[i] / To) * sin(1.19361 * time[i] / To) * Ao -
570  0.762456 * exp(-2.82833 * time[i] / To) * cos(2.38722 * time[i] / To) *
571  sin(1.19361 * time[i] / To) * Ao +
572  0.762456 * exp(-2.82833 * time[i] / To) * cos(1.19361 * time[i] / To) *
573  sin(2.38722 * time[i] / To) * Ao -
574  2.6202 * exp(-2.82833 * time[i] / To) * sin(1.19361 * time[i] / To) *
575  sin(2.38722 * time[i] / To) * Ao -
576  0.327684 * exp(-2.40318 * time[i] / To) * sin(2.5928 * time[i] / To) * Ao +
577  +0.327684 * exp(-2.40318 * time[i] / To) * cos(5.18561 * time[i] / To) *
578  sin(2.5928 * time[i] / To) * Ao -
579  0.327684 * exp(-2.40318 * time[i] / To) * cos(2.5928 * time[i] / To) *
580  sin(5.18561 * time[i] / To) * Ao +
581  0.464924 * exp(-2.40318 * time[i] / To) * sin(2.5928 * time[i] / To) *
582  sin(5.18561 * time[i] / To) * Ao;
583 
584  if (fElectResponse[i] > max) max = fElectResponse[i];
585 
586  } // end loop over time buckets
587 
588  // ... "normalize" fElectResponse[i], before the convolution
589 
590  for (auto& element : fElectResponse) {
591  element /= max;
592  element *= fADCPerPCAtLowestASICGain * 1.60217657e-7;
593  element *= fASICGainInMVPerFC / 4.7; // relative to lowest gain setting of 4.7 mV/fC
594  }
595 
596  fNElectResp = fElectResponse.size();
597 
598  // ... write the response out to a file
599 
601  fElectResp = tfs->make<TH1D>(
602  "ElectronicsResponse", ";t (ns);Electronics Response", fNElectResp, 0, fNElectResp);
603  for (unsigned int i = 0; i < fNElectResp; ++i) {
604  fElectResp->Fill(i, fElectResponse[i]);
605  }
606 
607  fElectResp->Write();
608  }
std::vector< double > fElectResponse
response function for the electronics
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
double fADCPerPCAtLowestASICGain
ADCs/pC at lowest gain setting of 4.7 mV/fC.
unsigned int fNElectResp
number of entries from response to use
double fShapeTimeConst
time constants for exponential shaping
double fInputFieldRespSamplingPeriod
Sampling period in the input field response.
int fNTicks
number of ticks of the clock
double fASICGainInMVPerFC
actual gain setting used in mV/fC
TH1D * fElectResp
response function for the electronics
Float_t e
Definition: plot.C:35
void detsim::SimWire::SetFieldResponse ( )
private

response of wires to field

Definition at line 478 of file SimWire_module.cc.

References fColFieldParams, fColFieldResp, fColFieldResponse, fIndFieldParams, fIndFieldResp, fIndFieldResponse, and fNTicks.

Referenced by beginJob().

479  {
480 
481  // ... Files to write the response functions to
483  fIndFieldResp =
484  tfs->make<TH1D>("InductionFieldResponse", ";t (ns);Induction Response", fNTicks, 0, fNTicks);
485  fColFieldResp = tfs->make<TH1D>(
486  "CollectionFieldResponse", ";t (ns);Collection Response", fNTicks, 0, fNTicks);
487 
488  fColFieldResponse.resize(fNTicks, 0.);
489  fIndFieldResponse.resize(fNTicks, 0.);
490 
491  // ... First set response for collection plane
492  int nbinc = fColFieldParams[0];
493 
494  double integral = 0.;
495  for (int i = 1; i < nbinc; ++i) {
496  fColFieldResponse[i] = i * i;
497  integral += fColFieldResponse[i];
498  }
499 
500  for (int i = 0; i < nbinc; ++i) {
501  fColFieldResponse[i] *= fColFieldParams[1] / integral;
502  fColFieldResp->Fill(i, fColFieldResponse[i]);
503  }
504 
505  // ... Now set response for induction plane
506  int nbini = fIndFieldParams[0];
507  unsigned short lastbini = 2 * nbini;
508 
509  integral = 0;
510  for (unsigned short i = 0; i < lastbini; ++i) {
511  double ang = i * TMath::Pi() / nbini;
512  fIndFieldResponse[i] = sin(ang);
513  if (fIndFieldResponse[i] > 0) { integral += fIndFieldResponse[i]; }
514  else {
515  fIndFieldResponse[i] *=
516  fIndFieldParams[2]; // scale the negative lobe by 10% (from ArgoNeuT)
517  }
518  }
519  ++lastbini;
520 
521  for (unsigned short i = 0; i < lastbini; ++i) {
522  fIndFieldResponse[i] *= fIndFieldParams[1] / integral;
523  fIndFieldResp->Fill(i, fIndFieldResponse[i]);
524  }
525 
526  // ... Save the field responses
527  fColFieldResp->Write();
528  fIndFieldResp->Write();
529  }
std::vector< float > fIndFieldParams
induction plane field function parameterization
std::vector< float > fColFieldParams
collection plane field function parameterization
std::vector< double > fIndFieldResponse
response function for the field @ induction plane
std::vector< double > fColFieldResponse
response function for the field @ collection plane
TH1D * fIndFieldResp
response function for the field @ induction plane
int fNTicks
number of ticks of the clock
TH1D * fColFieldResp
response function for the field @ collection plane
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  md)
inherited

Definition at line 31 of file ModuleBase.cc.

References art::ModuleBase::md_.

32  {
33  md_ = md;
34  }
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited

Definition at line 49 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().

50  {
51  // Now that we know we have seen all the consumes declarations,
52  // sort the results for fast lookup later.
53  collector_.sortConsumables(current_process_name);
54  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
void sortConsumables(std::string const &current_process_name)

Member Data Documentation

double detsim::SimWire::fADCPerPCAtLowestASICGain
private

ADCs/pC at lowest gain setting of 4.7 mV/fC.

Definition at line 97 of file SimWire_module.cc.

Referenced by SetElectResponse(), and SimWire().

double detsim::SimWire::fASICGainInMVPerFC
private

actual gain setting used in mV/fC

Definition at line 98 of file SimWire_module.cc.

Referenced by SetElectResponse(), and SimWire().

std::vector<int> detsim::SimWire::fCalibRespTOffset
private

calib response time offset in ticks

Definition at line 104 of file SimWire_module.cc.

Referenced by produce(), and SimWire().

double detsim::SimWire::fCol3DCorrection
private

correction factor to account for 3D path of electrons thru wires

Definition at line 90 of file SimWire_module.cc.

Referenced by SimWire().

std::vector<float> detsim::SimWire::fColFieldParams
private

collection plane field function parameterization

Definition at line 105 of file SimWire_module.cc.

Referenced by SetFieldResponse(), and SimWire().

TH1D* detsim::SimWire::fColFieldResp
private

response function for the field @ collection plane

Definition at line 117 of file SimWire_module.cc.

Referenced by SetFieldResponse().

std::vector<double> detsim::SimWire::fColFieldResponse
private

response function for the field @ collection plane

Definition at line 107 of file SimWire_module.cc.

Referenced by ConvoluteResponseFunctions(), and SetFieldResponse().

std::vector<TComplex> detsim::SimWire::fColShape
private

response function for the field @ collection plane

Definition at line 109 of file SimWire_module.cc.

Referenced by ConvoluteResponseFunctions(), and produce().

TH1D* detsim::SimWire::fColTimeShape
private

convoluted shape for field x electronics @ col plane

Definition at line 119 of file SimWire_module.cc.

Referenced by ConvoluteResponseFunctions().

raw::Compress_t detsim::SimWire::fCompression
private

compression type to use

Definition at line 85 of file SimWire_module.cc.

Referenced by produce(), and SimWire().

std::string detsim::SimWire::fDriftEModuleLabel
private

module making the ionization electrons

Definition at line 84 of file SimWire_module.cc.

Referenced by produce(), and SimWire().

TH1D* detsim::SimWire::fElectResp
private

response function for the electronics

Definition at line 118 of file SimWire_module.cc.

Referenced by SetElectResponse().

std::vector<double> detsim::SimWire::fElectResponse
private

response function for the electronics

Definition at line 111 of file SimWire_module.cc.

Referenced by ConvoluteResponseFunctions(), and SetElectResponse().

CLHEP::HepRandomEngine& detsim::SimWire::fEngine
private

Random-number engine owned by art.

Definition at line 124 of file SimWire_module.cc.

Referenced by beginJob(), produce(), and SimWire().

std::vector<int> detsim::SimWire::fFieldRespTOffset
private

field response time offset in ticks

Definition at line 103 of file SimWire_module.cc.

Referenced by produce(), and SimWire().

double detsim::SimWire::fInd3DCorrection
private

correction factor to account for 3D path of electrons thru wires

Definition at line 92 of file SimWire_module.cc.

Referenced by SimWire().

std::vector<float> detsim::SimWire::fIndFieldParams
private

induction plane field function parameterization

Definition at line 106 of file SimWire_module.cc.

Referenced by SetFieldResponse(), and SimWire().

TH1D* detsim::SimWire::fIndFieldResp
private

response function for the field @ induction plane

Definition at line 116 of file SimWire_module.cc.

Referenced by SetFieldResponse().

std::vector<double> detsim::SimWire::fIndFieldResponse
private

response function for the field @ induction plane

Definition at line 108 of file SimWire_module.cc.

Referenced by ConvoluteResponseFunctions(), and SetFieldResponse().

std::vector<TComplex> detsim::SimWire::fIndShape
private

response function for the field @ induction plane

Definition at line 110 of file SimWire_module.cc.

Referenced by ConvoluteResponseFunctions(), and produce().

TH1D* detsim::SimWire::fIndTimeShape
private

convoluted shape for field x electronics @ ind plane

Definition at line 120 of file SimWire_module.cc.

Referenced by ConvoluteResponseFunctions().

double detsim::SimWire::fInputFieldRespSamplingPeriod
private

Sampling period in the input field response.

Definition at line 95 of file SimWire_module.cc.

Referenced by SetElectResponse(), and SimWire().

unsigned int detsim::SimWire::fNElectResp
private

number of entries from response to use

Definition at line 94 of file SimWire_module.cc.

Referenced by SetElectResponse().

std::vector<std::vector<float> > detsim::SimWire::fNoise
private

noise on each channel for each time

Definition at line 112 of file SimWire_module.cc.

Referenced by beginJob(), and produce().

TH1D* detsim::SimWire::fNoiseDist
private

distribution of noise counts

Definition at line 121 of file SimWire_module.cc.

Referenced by beginJob().

TF1* detsim::SimWire::fNoiseFluct
private

Poisson dist for fluctuations in magnitude of noise freq components.

Definition at line 122 of file SimWire_module.cc.

Referenced by beginJob(), and GenNoise().

std::string detsim::SimWire::fNoiseFluctChoice
private

choice for noise freq component mag fluctuations

Definition at line 101 of file SimWire_module.cc.

Referenced by beginJob(), and SimWire().

std::vector<double> detsim::SimWire::fNoiseFluctPar
private

Poisson noise fluctuations params.

Definition at line 114 of file SimWire_module.cc.

Referenced by beginJob(), and SimWire().

std::string detsim::SimWire::fNoiseModelChoice
private

choice for noise model

Definition at line 100 of file SimWire_module.cc.

Referenced by GenNoise(), and SimWire().

std::vector<double> detsim::SimWire::fNoiseModelPar
private

noise model params

Definition at line 113 of file SimWire_module.cc.

Referenced by GenNoise(), and SimWire().

int detsim::SimWire::fNoiseNchToSim
private

number of noise channels to generate

Definition at line 99 of file SimWire_module.cc.

Referenced by beginJob(), produce(), and SimWire().

unsigned int detsim::SimWire::fNSamplesReadout
private

number of ADC readout samples in 1 readout frame

Definition at line 89 of file SimWire_module.cc.

Referenced by produce(), and SimWire().

int detsim::SimWire::fNTicks
private

number of ticks of the clock

Definition at line 87 of file SimWire_module.cc.

Referenced by beginJob(), ConvoluteResponseFunctions(), GenNoise(), produce(), SetElectResponse(), and SetFieldResponse().

double detsim::SimWire::fSampleRate
private

sampling rate in ns

Definition at line 88 of file SimWire_module.cc.

Referenced by GenNoise(), and SimWire().

double detsim::SimWire::fShapeTimeConst
private

time constants for exponential shaping

Definition at line 96 of file SimWire_module.cc.

Referenced by SetElectResponse(), and SimWire().


The documentation for this class was generated from the following file: