#include <TPCReadoutSimStandardAlg.h>
Definition at line 19 of file TPCReadoutSimStandardAlg.h.
 
      
        
          | gar::rosim::TPCReadoutSimStandardAlg::TPCReadoutSimStandardAlg  | 
          ( | 
          CLHEP::HepRandomEngine &  | 
          engine,  | 
        
        
           | 
           | 
          fhicl::ParameterSet const &  | 
          pset  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 18 of file TPCReadoutSimStandardAlg.cxx.
   24       fDetProp = gar::providerFrom<detinfo::DetectorPropertiesService>();
    30            CLHEP::RandGauss GaussRand(
fEngine);
    35                long inoise = lrint(noisevecdbl[i]);
    36                if (inoise > 32767) inoise = 32767;   
    37                if (inoise < -32767) inoise = -32767;   
 const detinfo::DetectorProperties * fDetProp
detector properties 
 
float fNoiseAmplitude
noise amplitdue 
 
std::vector< short > fNoiseVec
 
int fNoiseVecSize
how much noise to pre-generate 
 
TPCReadoutSimAlg(CLHEP::HepRandomEngine &engine, fhicl::ParameterSet const &pset)
 
int fNoiseSpectrum
0: Gaussian white noise; more to come 
 
CLHEP::HepRandomEngine & fEngine
random number engine 
 
void reconfigure(fhicl::ParameterSet const &pset)
 
 
 
 
  
  
      
        
          | gar::rosim::TPCReadoutSimStandardAlg::~TPCReadoutSimStandardAlg  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | void gar::rosim::TPCReadoutSimStandardAlg::AddNoiseToADCs  | 
          ( | 
          std::vector< short > &  | 
          adcs | ) | 
           | 
         
       
   | 
  
privatevirtual   | 
  
 
Implements gar::rosim::TPCReadoutSimAlg.
Definition at line 160 of file TPCReadoutSimStandardAlg.cxx.
  163       CLHEP::RandFlat FlatRand(
fEngine);
   164       double xnvi = ((double) 
fNoiseVec.size() - 1) * FlatRand.fire();
   165       if (xnvi < 0) xnvi = 0;  
   166       size_t i = (size_t ) xnvi;
   172       for (
size_t j=0; j<adcs.size(); ++j)
 std::vector< short > fNoiseVec
 
CLHEP::HepRandomEngine & fEngine
random number engine 
 
int fADCSaturation
limit of the ADC 
 
 
 
 
Implements gar::rosim::TPCReadoutSimAlg.
Definition at line 116 of file TPCReadoutSimStandardAlg.cxx.
  121       auto geo = gar::providerFrom<geo::GeometryGAr>();
   125       for(
auto const& dig : digits) channels.insert(dig.Channel());
   129       for(
unsigned int c = 0; 
c < 
geo->NChannels(); ++
c){
   132         if(channels.count(
c) > 0) 
continue;
   148         if (retblocks) digits.emplace_back(
c, numTicks, adcs, cflag, 0);
 
void AddNoiseToADCs(std::vector< short > &adcs)
 
const detinfo::DetectorProperties * fDetProp
detector properties 
 
enum gar::raw::_compress Compress_t
 
unsigned int fZSTicksBefore
for ZS Compression, # samples before 
 
unsigned int fZSTicksAfter
for ZS Compression, # samples after 
 
Zero Suppression algorithm. 
 
int fZSThreshold
for ZS Compression, threshold (upwards) 
 
bool fAddNoise
flag to add noise or not 
 
int fCompressType
Switch to compress raw digits. 
 
LArSoft geometry interface. 
 
void Compress(gar::raw::ADCvector_t &adc, gar::raw::Compress_t compress)
In-place compression of raw data buffer. 
 
virtual unsigned int NumberTimeSamples() const  =0
 
 
 
 
  
  
      
        
          | raw::RawDigit gar::rosim::TPCReadoutSimStandardAlg::CreateRawDigit  | 
          ( | 
          unsigned int  | 
          channel,  | 
         
        
           | 
           | 
          std::vector< float > const &  | 
          electrons,  | 
         
        
           | 
           | 
          bool &  | 
          todrop  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
Implements gar::rosim::TPCReadoutSimAlg.
Definition at line 54 of file TPCReadoutSimStandardAlg.cxx.
   60       std::vector< short> adcs(numTicks, 0);
    65       if(adcs.size() != electrons.size()){
    67         << 
"The vectors for adc and electrons have different sizes, no idea "    68         << 
"how to handle that, bail";
    71       for(
size_t e = 0; 
e < electrons.size(); ++
e){
    95       todrop = (retblocks == 0);
 Collection of charge vs time digitized from a single readout channel. 
 
void AddNoiseToADCs(std::vector< short > &adcs)
 
const detinfo::DetectorProperties * fDetProp
detector properties 
 
enum gar::raw::_compress Compress_t
 
unsigned int fZSTicksBefore
for ZS Compression, # samples before 
 
unsigned int fZSTicksAfter
for ZS Compression, # samples after 
 
Zero Suppression algorithm. 
 
int fZSThreshold
for ZS Compression, threshold (upwards) 
 
bool fAddNoise
flag to add noise or not 
 
int fCompressType
Switch to compress raw digits. 
 
short ElectronsToADCs(float electrons)
 
void Compress(gar::raw::ADCvector_t &adc, gar::raw::Compress_t compress)
In-place compression of raw data buffer. 
 
virtual unsigned int NumberTimeSamples() const  =0
 
cet::coded_exception< error, detail::translate > exception
 
 
 
 
  
  
      
        
          | short gar::rosim::TPCReadoutSimStandardAlg::ElectronsToADCs  | 
          ( | 
          float  | 
          electrons | ) | 
           | 
         
       
   | 
  
privatevirtual   | 
  
 
 
Implements gar::rosim::TPCReadoutSimAlg.
Definition at line 100 of file TPCReadoutSimStandardAlg.cxx.
  102       fAddNoise = pset.get<
bool>(
"AddNoise", 
false);
 float fNoiseAmplitude
noise amplitdue 
 
unsigned int fZSTicksBefore
for ZS Compression, # samples before 
 
unsigned int fZSTicksAfter
for ZS Compression, # samples after 
 
int fZSThreshold
for ZS Compression, threshold (upwards) 
 
int fNoiseVecSize
how much noise to pre-generate 
 
bool fAddNoise
flag to add noise or not 
 
int fCompressType
Switch to compress raw digits. 
 
int fNoiseSpectrum
0: Gaussian white noise; more to come 
 
int fADCSaturation
limit of the ADC 
 
int fPedestal
Raw Digit Pedestal. 
 
 
 
 
  
  
      
        
          | std::vector<short> gar::rosim::TPCReadoutSimStandardAlg::fNoiseVec | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following files: