Public Member Functions | Private Attributes | List of all members
GenericSimChannelExtractService Class Reference

#include <GenericSimChannelExtractService.h>

Inheritance diagram for GenericSimChannelExtractService:
SimChannelExtractService

Public Member Functions

 GenericSimChannelExtractService (fhicl::ParameterSet const &pset, art::ActivityRegistry &)
 
int extract (detinfo::DetectorClocksData const &clockData, const sim::SimChannel *psc, AdcSignalVector &sig) const
 
std::ostream & print (std::ostream &out=std::cout, std::string prefix="") const
 
- Public Member Functions inherited from SimChannelExtractService
virtual ~SimChannelExtractService ()=default
 

Private Attributes

art::ServiceHandle< util::LArFFTm_pfft
 
art::ServiceHandle< util::SignalShapingServiceDUNEm_psss
 
unsigned int m_ntick
 

Detailed Description

Definition at line 28 of file GenericSimChannelExtractService.h.

Constructor & Destructor Documentation

GenericSimChannelExtractService::GenericSimChannelExtractService ( fhicl::ParameterSet const &  pset,
art::ActivityRegistry  
)

Definition at line 14 of file GenericSimChannelExtractService_service.cc.

15 : m_ntick(m_pfft->FFTSize()) {
16  if ( m_ntick%2 != 0 )
17  throw cet::exception("GenericSimChannelExtractService")
18  << "FFT size is not a power of 2.";
19 }
art::ServiceHandle< util::LArFFT > m_pfft
int FFTSize() const
Definition: LArFFT.h:69
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Function Documentation

int GenericSimChannelExtractService::extract ( detinfo::DetectorClocksData const &  clockData,
const sim::SimChannel psc,
AdcSignalVector sig 
) const
virtual

Implements SimChannelExtractService.

Definition at line 24 of file GenericSimChannelExtractService_service.cc.

25  {
26  sigs.clear();
27  sigs.resize(m_ntick, 0.0);
28  if ( psc == nullptr ) return 0;
29  for ( size_t itck=0; itck<sigs.size(); ++itck ) {
30  sigs[itck] = psc->Charge(itck);
31  }
32  unsigned int chan = psc->Channel();
33  m_psss->Convolute(clockData, chan, sigs);
34  return 0;
35 }
double Charge(TDC_t tdc) const
Returns the total number of ionization electrons on this channel in the specified TDC...
Definition: SimChannel.cxx:134
raw::ChannelID_t Channel() const
Returns the readout channel this object describes.
Definition: SimChannel.h:329
void Convolute(detinfo::DetectorClocksData const &clockData, Channel channel, std::vector< T > &func) const
art::ServiceHandle< util::SignalShapingServiceDUNE > m_psss
std::ostream & GenericSimChannelExtractService::print ( std::ostream &  out = std::cout,
std::string  prefix = "" 
) const
virtual

Implements SimChannelExtractService.

Definition at line 40 of file GenericSimChannelExtractService_service.cc.

40  {
41  out << prefix << "GenericSimChannelExtractService";
42  return out;
43 }

Member Data Documentation

unsigned int GenericSimChannelExtractService::m_ntick
private

Definition at line 43 of file GenericSimChannelExtractService.h.

art::ServiceHandle<util::LArFFT> GenericSimChannelExtractService::m_pfft
private

Definition at line 41 of file GenericSimChannelExtractService.h.

art::ServiceHandle<util::SignalShapingServiceDUNE> GenericSimChannelExtractService::m_psss
private

Definition at line 42 of file GenericSimChannelExtractService.h.


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