Public Member Functions | List of all members
util::SignalShapingDUNE35tTest Class Reference
Inheritance diagram for util::SignalShapingDUNE35tTest:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 SignalShapingDUNE35tTest (fhicl::ParameterSet const &pset)
 
virtual ~SignalShapingDUNE35tTest ()
 
void beginJob ()
 
void analyze (const art::Event &evt)
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
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)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
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)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
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 ()
 

Detailed Description

Definition at line 62 of file SignalShapingDUNE35tTest_module.cc.

Constructor & Destructor Documentation

util::SignalShapingDUNE35tTest::SignalShapingDUNE35tTest ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 80 of file SignalShapingDUNE35tTest_module.cc.

81  : EDAnalyzer(pset)
82  {}
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
util::SignalShapingDUNE35tTest::~SignalShapingDUNE35tTest ( )
virtual

Definition at line 199 of file SignalShapingDUNE35tTest_module.cc.

200  {}

Member Function Documentation

void util::SignalShapingDUNE35tTest::analyze ( const art::Event evt)

Definition at line 202 of file SignalShapingDUNE35tTest_module.cc.

203  {}
void util::SignalShapingDUNE35tTest::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 84 of file SignalShapingDUNE35tTest_module.cc.

85  {
86  // Get services.
87 
91 
92  int nticks = fft->FFTSize();
93  std::cout << "Number of ticks = " << nticks << std::endl;
94 
95  // Make collection plane histograms.
96 
97  art::TFileDirectory dirc = tfs->mkdir("Collection", "Collection");
98  int nhist = std::min(200, nticks);
99  int nfilt = std::min(5000, nticks/2);
100  int nkern = nticks/2;
101 
102  // Make input pulse.
103 
104  std::vector<double> tinc(nticks, 0.);
105  fill_delta(tinc, nhist/2);
106  TH1D* hinc = dirc.make<TH1D>("input", "Collection Input", nhist+1, -0.5, nhist+0.5);
107  vector_to_hist(tinc, hinc);
108 
109  // Convoluted pulse.
110 
111  std::vector<double> tconvc(tinc);
112  sss->Convolute(6000, tconvc);
113  TH1D* hconvc = dirc.make<TH1D>("conv", "Collection Convoluted", nhist+1, -0.5, nhist+0.5);
114  vector_to_hist(tconvc, hconvc);
115 
116  // Deconvoluted pulse.
117 
118  std::vector<double> tdeconvc(tconvc);
119  sss->Deconvolute(6000, tdeconvc);
120  TH1D* hdeconvc = dirc.make<TH1D>("deconv", "Collection Deconvoluted", nhist+1, -0.5, nhist+0.5);
121  vector_to_hist(tdeconvc, hdeconvc);
122 
123  // Get collection response function and fill histogram.
124 
125  const std::vector<double>& respc = sss->SignalShaping(6000).Response();
126  TH1D* hrfc = dirc.make<TH1D>("resp", "Collection Response", nhist+1, -nhist/2-0.5, nhist/2+0.5);
127  vector_to_hist(respc, hrfc);
128 
129  // Get collection convolution kernel and fill histogram.
130 
131  const std::vector<TComplex>& kernc = sss->SignalShaping(6000).ConvKernel();
132  std::vector<double> kernrc(kernc.size());
133  for(unsigned int i=0; i<kernrc.size(); ++i)
134  kernrc[i] = kernc[i].Rho();
135  TH1D* hkernc = dirc.make<TH1D>("kern", "Collection Convolution Kernel", nkern+1, -0.5, nkern+0.5);
136  hkernc->SetMinimum(0.);
137  vector_to_hist(kernrc, hkernc);
138 
139  // Get collection filter function and fill histogram.
140 
141  const std::vector<TComplex>& filtc = sss->SignalShaping(6000).Filter();
142  std::vector<double> filtrc(filtc.size());
143  for(unsigned int i=0; i<filtrc.size(); ++i)
144  filtrc[i] = filtc[i].Re();
145  TH1D* hffc = dirc.make<TH1D>("filt", "Collection Filter", nfilt+1, -0.5, nfilt+0.5);
146  vector_to_hist(filtrc, hffc);
147 
148  // Make induction plane histograms.
149 
150  art::TFileDirectory diri = tfs->mkdir("Induction", "Induction");
151 
152  // Make input pulse.
153 
154  std::vector<double> tini(nticks, 0.);
155  fill_delta(tini, nhist/2);
156  TH1D* hini = diri.make<TH1D>("input", "Induction Input", nhist+1, -0.5, nhist+0.5);
157  vector_to_hist(tini, hini);
158 
159  // Convoluted pulse.
160 
161  std::vector<double> tconvi(tini);
162  sss->Convolute(0, tconvi);
163  TH1D* hconvi = diri.make<TH1D>("conv", "Induction Convoluted", nhist+1, -0.5, nhist+0.5);
164  vector_to_hist(tconvi, hconvi);
165 
166  // Deconvoluted pulse.
167 
168  std::vector<double> tdeconvi(tconvi);
169  sss->Deconvolute(0, tdeconvi);
170  TH1D* hdeconvi = diri.make<TH1D>("deconv", "Induction Deconvoluted", nhist+1, -0.5, nhist+0.5);
171  vector_to_hist(tdeconvi, hdeconvi);
172 
173  // Get induction response function and fill histogram.
174 
175  const std::vector<double>& respi = sss->SignalShaping(0).Response();
176  TH1D* hrfi = diri.make<TH1D>("resp", "Induction Response", nhist+1, -nhist/2-0.5, nhist/2+0.5);
177  vector_to_hist(respi, hrfi);
178 
179  // Get induction convolution kernel and fill histogram.
180 
181  const std::vector<TComplex>& kerni = sss->SignalShaping(0).ConvKernel();
182  std::vector<double> kernri(kerni.size());
183  for(unsigned int i=0; i<kernri.size(); ++i)
184  kernri[i] = kerni[i].Rho();
185  TH1D* hkerni = diri.make<TH1D>("kern", "Induction Convolution Kernel", nkern+1, -0.5, nkern+0.5);
186  hkerni->SetMinimum(0.);
187  vector_to_hist(kernri, hkerni);
188 
189  // Get induction filter function and fill histogram.
190 
191  const std::vector<TComplex>& filti = sss->SignalShaping(0).Filter();
192  std::vector<double> filtri(filti.size());
193  for(unsigned int i=0; i<filtri.size(); ++i)
194  filtri[i] = filti[i].Re();
195  TH1D* hffi = diri.make<TH1D>("filt", "Induction Filter", nfilt+1, -0.5, nfilt+0.5);
196  vector_to_hist(filtri, hffi);
197  }
const std::vector< double > & Response() const
Definition: SignalShaping.h:77
void Deconvolute(detinfo::DetectorClocksData const &clockData, unsigned int channel, std::vector< T > &func) const
int FFTSize() const
Definition: LArFFT.h:69
double Rho
Definition: doAna.cpp:13
void Convolute(detinfo::DetectorClocksData const &clockData, unsigned int channel, std::vector< T > &func) const
const std::vector< TComplex > & Filter() const
Definition: SignalShaping.h:80
const util::SignalShaping & SignalShaping(unsigned int channel) const
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
const std::vector< TComplex > & ConvKernel() const
Definition: SignalShaping.h:79
QTextStream & endl(QTextStream &s)

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