ImpactTransform.h
Go to the documentation of this file.
1 #ifndef WIRECELL_IMPACTTRANSFORM
2 #define WIRECELL_IMPACTTRANSFORM
3 
6 #include "WireCellUtil/Array.h"
7 #include "WireCellUtil/Logging.h"
8 
9 #include <Eigen/Sparse>
10 
11 namespace WireCell {
12  namespace Gen {
13 
14 
15  /** An ImpactTransform transforms charge on impact positions
16  * into waveforms via 2D FFT.
17  */
19  {
22 
23  int m_num_group; // how many 2D convolution is needed
24  int m_num_pad_wire; // how many wires are needed to pad on each side
25  std::vector<std::map<int, IImpactResponse::pointer> > m_vec_map_resp;
26  std::vector<std::vector<std::tuple<int,int,double> > > m_vec_vec_charge; // ch, time, charge
27  //std::vector<Eigen::SparseMatrix<float>* > m_vec_spmatrix;
28 
29 
30  std::vector<int> m_vec_impact;
33  int m_end_ch;
36 
38 
39  public:
40 
42  virtual ~ImpactTransform();
43 
44  /// Return the wire's waveform. If the response functions
45  /// are just field response (ie, instantaneous current)
46  /// then the waveforms are expressed as current integrated
47  /// over each sample bin and thus in units of charge. If
48  /// the response functions include electronics response
49  /// then the waveforms are in units of voltage
50  /// representing the sampling of the output of the FEE
51  /// amplifiers.
52 
53  // fixme: this should be a forward iterator so that it may cal bd.erase() safely to conserve memory
54  Waveform::realseq_t waveform(int wire) const;
55 
56 
57 
58  };
59 
60  } // Gen
61 } // WireCell
62 #endif /* WIRECELL_IMPACTTRANSFORM */
IPlaneImpactResponse::pointer m_pir
Sequence< real_t > realseq_t
Definition: Waveform.h:31
std::vector< int > m_vec_impact
std::shared_ptr< Interface > pointer
Definition: Interface.h:16
BinnedDiffusion_transform & m_bd
std::shared_ptr< spdlog::logger > logptr_t
Definition: Logging.h:24
Definition: Main.h:22
ImpactTransform(IPlaneImpactResponse::pointer pir, BinnedDiffusion_transform &bd)
std::vector< std::vector< std::tuple< int, int, double > > > m_vec_vec_charge
std::vector< std::map< int, IImpactResponse::pointer > > m_vec_map_resp
Waveform::realseq_t waveform(int wire) const
Eigen::ArrayXXf array_xxf
A real, 2D array.
Definition: Array.h:54