TPCReadoutSimStandardAlg.h
Go to the documentation of this file.
1 //
2 // TPCReadoutSimStandardAlg.h
3 //
4 // Created by Brian Rebel on 2/14/17.
5 //
6 
7 #ifndef GAR_READOUTSIM_TPCReadoutSimStandardAlg_h
8 #define GAR_READOUTSIM_TPCReadoutSimStandardAlg_h
9 
11 
12 namespace fhicl{
13  class ParameterSet;
14 }
15 
16 namespace gar{
17  namespace rosim{
18 
20 
21  public:
22 
23  TPCReadoutSimStandardAlg(CLHEP::HepRandomEngine & engine,
24  fhicl::ParameterSet const& pset);
25  virtual ~TPCReadoutSimStandardAlg();
26 
27  raw::RawDigit CreateRawDigit(unsigned int channel,
28  std::vector<float> const& electrons,
29  bool &todrop);
30  void CreateNoiseDigits(std::vector<raw::RawDigit> & digits);
31 
32  void reconfigure(fhicl::ParameterSet const& pset);
33 
34  private:
35 
36  // AddNoiseToSignalDigits is for channels where signal is recorded.
37  // Assume that the noise level is dependent on the amount of signal recorded
38  void AddNoiseToADCs(std::vector<short> & adcs);
39  short ElectronsToADCs(float electrons);
40 
41  // pre-generated noise -- in ADC counts
42  std::vector<short> fNoiseVec;
43 
44  };
45 
46  }
47 }
48 
49 #endif /* GAR_READOUTSIM_TPCReadoutSimStandardAlg_h */
uint8_t channel
Definition: CRTFragment.hh:201
virtual void reconfigure(fhicl::ParameterSet const &pset)
General GArSoft Utilities.
Collection of charge vs time digitized from a single readout channel.
Definition: RawDigit.h:67