Boundary.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file Boundary.h
3 /// \brief Boundary for CVN PixelMap
4 /// \author Alexander Radovic - a.radovic@gmail.com
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef CVN_BOUNDARY_H
8 #define CVN_BOUNDARY_H
9 
10 #include <ostream>
11 #include <vector>
12 
13 
14 
15 
16 
17 
18 namespace cvn
19 {
20 
21 
22  /// Boundary object intended for use with cvn::PixelMap. Stores first and
23  /// last wires, as well as first and last cell for even and odd view.
24  /// CVN doesn't carefully define X/Y view, but instead simply uses
25  /// odd/even wire (wire%2) as a proxy.
26  class Boundary
27  {
28 
29  public:
30  /// Create new Boundary object based on number of wires, number of cells,
31  /// minumum wire and mean cell in odd and even view.
32  Boundary(const int& nWire, const double& tRes,
33  const int& minWireX,
34  const int& minWireY,
35  const int& minWireZ,
36  const double& centerTDCX,
37  const double& centerTDCY,
38  const double& centerTDCZ);
39 
40  Boundary(){};
41 
42  bool IsWithin(const unsigned int& wire, const double& cell, const unsigned int& view);
43 
44  int FirstWire(const unsigned int& view) const {return fFirstWire[view];};
45  int LastWire(const unsigned int& view) const {return fLastWire[view];};
46  double FirstTDC(const unsigned int& view) const {return fFirstTDC[view];};
47  double LastTDC (const unsigned int& view) const {return fLastTDC[view];};
48 
49 
50 
51  private:
52  int fFirstWire[3]; ///< Minimum wire, inclusive
53  int fLastWire[3]; ///< Maximum wire, inclusive
54  double fFirstTDC[3]; ///< Minimum cell in each view, inclusive
55  double fLastTDC[3]; ///< Maximum cell in each view, inclusive
56 
57 
58  };
59 
60  std::ostream& operator<<(std::ostream& os, const Boundary& b);
61 }
62 
63 #endif // CVN_BOUNDARY_H
double fFirstTDC[3]
Minimum cell in each view, inclusive.
Definition: Boundary.h:54
std::ostream & operator<<(std::ostream &os, const PixelMapProducer &p)
Utility class for truth labels.
double fLastTDC[3]
Maximum cell in each view, inclusive.
Definition: Boundary.h:55
int fFirstWire[3]
Minimum wire, inclusive.
Definition: Boundary.h:47
double FirstTDC(const unsigned int &view) const
Definition: Boundary.h:46
int FirstWire(const unsigned int &view) const
Definition: Boundary.h:44
int LastWire(const unsigned int &view) const
Definition: Boundary.h:45
static bool * b
Definition: config.cpp:1043
int fLastWire[3]
Maximum wire, inclusive.
Definition: Boundary.h:53
double LastTDC(const unsigned int &view) const
Definition: Boundary.h:47
bool IsWithin(const unsigned int &wire, const double &cell, const unsigned int &view)
Definition: Boundary.cxx:45