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

#include <DPhaseSimChannelExtractService.h>

Inheritance diagram for DPhaseSimChannelExtractService:
SimChannelExtractService

Public Member Functions

 DPhaseSimChannelExtractService (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::SignalShapingServiceDUNEDPhasem_psss
 
art::ServiceHandle< util::CrpGainServicem_crpgain
 
unsigned int m_ntick
 

Detailed Description

Definition at line 30 of file DPhaseSimChannelExtractService.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file DPhaseSimChannelExtractService_service.cc.

20 {
21  const string myname = "DPhaseSimChannelExtractService::ctor: ";
22  if( !(m_ntick > 0 && !(m_ntick & (m_ntick-1))) )
23  {
24  throw cet::exception("DPhaseSimChannelExtractService")
25  << "FFT size is not a power of 2. ";
26  }
27 
28  /*
29  m_CrpGainToolName = pset.get<string>("CrpGainToolName");
30  DuneToolManager* ptm = DuneToolManager::instance("");
31  if ( ptm == nullptr )
32  {
33  throw cet::exception("DPhaseSimChannelExtractService")
34  << "Unable to retrieve tool manaager.";
35  }
36 
37  m_CrpGainTool = ptm->getPrivate<CrpGainSimTool>(m_CrpGainToolName);
38 
39  if( !m_CrpGainTool )
40  {
41  throw cet::exception("DPhaseSimChannelExtractService")
42  << "Unable to retrieve "<<m_CrpGainToolName<<".";
43  }
44  */
45  //fDPGainPerView = pset.get<float> ("DPGainPerView");
46  //mf::LogInfo("DPhaseSimChannelExtractService")<<" Gain per view "<<fDPGainPerView;
47 }
int FFTSize() const
Definition: LArFFT.h:69
art::ServiceHandle< util::LArFFT > m_pfft
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Function Documentation

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

Implements SimChannelExtractService.

Definition at line 52 of file DPhaseSimChannelExtractService_service.cc.

53  {
54 
55  if ( psc == nullptr ) return 0;
56 
57  // get the channel number
58  unsigned int chan = psc->Channel();
59 
60  // clear and resize temporary ADC buffer
61  sigs.clear();
62  sigs.resize(m_ntick, 0.0);
63 
64  for ( size_t itck=0; itck<sigs.size(); ++itck ){
65  sigs[itck] = m_crpgain->viewCharge( psc, itck );
66  }
67 
68  // perform convolution
69  m_psss->Convolute(clockData, chan, sigs);
70 
71  return 0;
72 }
art::ServiceHandle< util::CrpGainService > m_crpgain
void Convolute(unsigned int channel, std::vector< T > &func) const
art::ServiceHandle< util::SignalShapingServiceDUNEDPhase > m_psss
double viewCharge(const sim::SimChannel *psc, unsigned itck) const
raw::ChannelID_t Channel() const
Returns the readout channel this object describes.
Definition: SimChannel.h:329
std::ostream & DPhaseSimChannelExtractService::print ( std::ostream &  out = std::cout,
std::string  prefix = "" 
) const
virtual

Implements SimChannelExtractService.

Definition at line 76 of file DPhaseSimChannelExtractService_service.cc.

76  {
77  out << prefix << "DPhaseSimChannelExtractService";
78  return out;
79 }

Member Data Documentation

art::ServiceHandle<util::CrpGainService> DPhaseSimChannelExtractService::m_crpgain
private

Definition at line 52 of file DPhaseSimChannelExtractService.h.

unsigned int DPhaseSimChannelExtractService::m_ntick
private

Definition at line 57 of file DPhaseSimChannelExtractService.h.

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

Definition at line 46 of file DPhaseSimChannelExtractService.h.

art::ServiceHandle<util::SignalShapingServiceDUNEDPhase> DPhaseSimChannelExtractService::m_psss
private

Definition at line 49 of file DPhaseSimChannelExtractService.h.


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