SimChannelSink.h
Go to the documentation of this file.
1 /** A WCT component that is a sink of sim::SimChannel
2  * (converted from WireCell::IDepo) into an art::Event.
3  *
4  * Contact brussell@yale.edu for comments/questions.
5  *
6  * Modified by Wenqiang Gu (wgu@bnl.gov), 9/16/2019
7  * A generic SimChannel saver for multiple volumes
8  */
9 
10 #ifndef LARWIRECELL_COMPONENTS_SIMCHANNELSINK
11 #define LARWIRECELL_COMPONENTS_SIMCHANNELSINK
12 
13 #include "WireCellIface/IDepoFilter.h"
14 #include "WireCellIface/IConfigurable.h"
15 #include "WireCellIface/IAnodePlane.h"
16 #include "WireCellIface/IRandom.h"
17 #include "WireCellUtil/Pimpos.h"
20 
21 namespace wcls {
22 
24  public WireCell::IDepoFilter,
25  public WireCell::IConfigurable {
26 
27  public:
29  // virtual ~SimChannelSink();
30 
31  /// IArtEventVisitor
32  virtual void produces(art::ProducesCollector& collector);
33  virtual void visit(art::Event & event);
34 
35  /// IDepoFilter
36  virtual bool operator()(const WireCell::IDepo::pointer& indepo,
37  WireCell::IDepo::pointer& outdepo);
38 
39  /// IConfigurable
41  virtual void configure(const WireCell::Configuration& config);
42 
43  private:
44  WireCell::IDepo::pointer m_depo;
45  // WireCell::IAnodePlane::pointer m_anode;
46  std::vector<WireCell::IAnodePlane::pointer> m_anodes; // multiple volumes
47  WireCell::IRandom::pointer m_rng;
48 
49  std::map<unsigned int,sim::SimChannel> m_mapSC;
50 
51  void save_as_simchannel(const WireCell::IDepo::pointer& depo);
52 
55  double m_tick;
56  double m_start_time;
57  double m_nsigma;
58  double m_drift_speed;
59  double m_u_to_rp;
60  double m_v_to_rp;
61  double m_y_to_rp;
65  double m_g4_ref_time;
67  bool m_use_extra_sigma; // extra smearing from signal processing
68 
69  // double Pi = 3.141592653589;
70  // WireCell::Pimpos *uboone_u;
71  // WireCell::Pimpos *uboone_v;
72  // WireCell::Pimpos *uboone_y;
73  // //WireCell::Pimpos *pimpos; // unused
74  };
75 }
76 
77 #endif
void save_as_simchannel(const WireCell::IDepo::pointer &depo)
virtual void produces(art::ProducesCollector &collector)
IArtEventVisitor.
std::string m_artlabel
WireCell::IRandom::pointer m_rng
std::string string
Definition: nybbler.cc:12
virtual void visit(art::Event &event)
Implement to visit an Art event.
virtual void configure(const WireCell::Configuration &config)
static Config * config
Definition: config.cpp:1054
std::vector< WireCell::IAnodePlane::pointer > m_anodes
WireCell::IDepo::pointer m_depo
std::map< unsigned int, sim::SimChannel > m_mapSC
virtual bool operator()(const WireCell::IDepo::pointer &indepo, WireCell::IDepo::pointer &outdepo)
IDepoFilter.
Event finding and building.
virtual WireCell::Configuration default_configuration() const
IConfigurable.