WireParams.h
Go to the documentation of this file.
1 #ifndef WIRECELL_WIREPARAMS
2 #define WIRECELL_WIREPARAMS
3 
6 #include "WireCellUtil/Units.h"
7 
8 namespace WireCell {
9 
10  /** Embody parameters describing a triple of wire planes and
11  * provide a configurable interface. */
12  class WireParams :
13  public IWireParameters,
14  public IConfigurable
15  {
16  public:
17 
18  /// Directly set the fundamental parameters.
19  /// See WireCell::IWireParameters.
20  void set(const Ray& bounds,
21  const Ray& U, const Ray& V, const Ray& W);
22 
23 
24  /** Set the wire parameters simply.
25  *
26  * This method gives a simpler, more restricted interface to
27  * setting the wire parameter. It follows the same
28  * conventions as the one above but assumes:
29  *
30  * - The bounding box is centered on the origin.
31  *
32  * - One wire of each plane intersects the X-axis.
33  *
34  * - The magnitudes of the U and V angles are equal.
35  *
36  * - The pitches of all three planes are the same.
37  *
38  * - The X values W, V and U planes evening distributed on the
39  * positive half of the X covered by the bounding box.
40  *
41  * \param dx, dy, dz are the full widths of the bounding box
42  * in the associated direction.
43  *
44  * \param pitch is the perpendicular distance between two
45  * adjacent wires in a plane.
46  *
47  * \param angle is the absolute angular distance from the U
48  * and V wires and the Y-axis.
49  */
50  void set(double dx=10*units::mm,
51  double dy=1*units::meter,
52  double dz=1*units::meter,
53  double pitch = 10*units::mm,
54  double angle = 60.0*units::degree);
55 
56  /** Provide access to the rays which were used to define the wires. */
57  const Ray& bounds() const;
58  const Ray& pitchU() const;
59  const Ray& pitchV() const;
60  const Ray& pitchW() const;
61 
62  /** Configurable interface.
63  */
64  virtual void configure(const WireCell::Configuration& config);
66 
67  WireParams();
68  virtual ~WireParams();
69 
70  private:
72  };
73 }
74 
75 #endif
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
Definition: Point.h:21
const Ray & bounds() const
Definition: WireParams.cxx:149
static const double meter
Definition: Units.h:30
virtual void configure(const WireCell::Configuration &config)
Definition: WireParams.cxx:44
virtual const Ray & pitch(WireCell::WirePlaneLayer_t layer) const
const Ray & pitchW() const
Definition: WireParams.cxx:152
static Config * config
Definition: config.cpp:1054
const Ray & pitchV() const
Definition: WireParams.cxx:151
static const double mm
Definition: Units.h:55
const Ray & pitchU() const
Definition: WireParams.cxx:150
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
Definition: WireParams.cxx:29
static const double degree
Definition: Units.h:78