WireBoundedDepos.h
Go to the documentation of this file.
1 #ifndef WIRECELL_GEN_WIREBOUNDEDDEPOS
2 #define WIRECELL_GEN_WIREBOUNDEDDEPOS
3 
7 #include "WireCellUtil/Units.h"
8 
9 #include <tuple>
10 #include <vector>
11 
12 namespace WireCell {
13 
14  namespace Gen {
15 
16  /**
17  WireBoundedDepos outputs depos based on which wires they
18  "land". To "land" means to drift antiparallel to the
19  X-axis. The set of wire regions on which depos may or may
20  not "land" is configured as an array of objects with three
21  integer attributes:
22 
23  [{
24  plane: <plane-number>,
25  min: <min-wire-number>,
26  max: <max-wire-number,
27  },...]
28 
29  Note the range is inclusive of the max.
30 
31  Wire numbers must be counted along the positive pitch
32  direction and starting at 0.
33 
34  The filter can operate in "accept" or "reject" mode. In
35  "accept" mode, a depo which "lands" on any configured wire
36  region will be output. In "reject" mode a depo will not be
37  output if it explicitly lands on any configured wire
38  region. The first wire region landed will determine the
39  fate of the depo.
40 
41  If users desire to bound depos by the intersection of wires
42  from multiple planes they may pipeline multiple
43  WireBoundDepos serially, each configured to accept or
44  reject wire regions defined for a given plane.
45 
46 
47  */
48  class WireBoundedDepos : public IDrifter, public IConfigurable {
49  public:
51  virtual ~WireBoundedDepos();
52  virtual bool operator()(const input_pointer& depo, output_queue& outq);
53  virtual void configure(const WireCell::Configuration& config);
55  private:
56 
58  bool m_accept;
59  std::vector<const Pimpos*> m_pimpos;
60 
61  typedef std::tuple<int,int,int> wire_bounds_t;
62  typedef std::vector<wire_bounds_t> wire_region_t;
63  std::vector<wire_region_t> m_regions;
64  };
65  }
66 }
67 
68 #endif
std::vector< wire_bounds_t > wire_region_t
virtual bool operator()(const input_pointer &depo, output_queue &outq)
The calling signature:
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
std::deque< output_pointer > output_queue
static Config * config
Definition: config.cpp:1054
std::shared_ptr< Interface > pointer
Definition: Interface.h:16
std::vector< const Pimpos * > m_pimpos
std::vector< wire_region_t > m_regions
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50
std::shared_ptr< const IDepo > input_pointer
std::tuple< int, int, int > wire_bounds_t