Boundary.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file Boundary.h
3 /// \brief Boundary for CVN PixelMap
4 /// \author Dominick Rocco - rocco@physics.umn.edu
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 planes, 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 plane (plane%2) as a proxy.
26  class Boundary
27  {
28 
29  public:
30  /// Create new Boundary object based on number of planes, number of cells,
31  /// minumum plane and mean cell in odd and even view.
32  Boundary(const int& nPlane, const int& nCell,
33  const int& minPlane,
34  const int& centerCellEven,
35  const int& centerCellOdd,
36  const unsigned int& firstView = 0);
37 
38  Boundary(){};
39 
40  bool IsWithin(const unsigned int& plane, const unsigned int& cell, const unsigned int& view = 0);
41 
42  int FirstPlane() const {return fFirstPlane;};
43  int LastPlane() const {return fLastPlane;};
44  int FirstCell(const unsigned int& view) const {return fFirstCell[view];};
45  int LastCell (const unsigned int& view) const {return fLastCell[view];};
46  unsigned int FirstView() const {return fFirstView;};
47 
48 
49  private:
50  int fFirstPlane; ///< Minimum plane, inclusive
51  int fLastPlane; ///< Maximum plane, inclusive
52  int fFirstCell[2]; ///< Minimum cell in each view, inclusive
53  int fLastCell[2]; ///< Maximum cell in each view, inclusive
54  unsigned int fFirstView; ///<View of first plane (0=XZ, 1=YZ)
55 
56  };
57 
58  std::ostream& operator<<(std::ostream& os, const Boundary& b);
59 }
60 
61 #endif // CVN_BOUNDARY_H
int FirstCell(const unsigned int &view) const
Definition: Boundary.h:44
int fLastCell[2]
Maximum cell in each view, inclusive.
Definition: Boundary.h:53
std::ostream & operator<<(std::ostream &os, const PixelMapProducer &p)
int fFirstPlane
Minimum plane, inclusive.
Definition: Boundary.h:46
unsigned int FirstView() const
Definition: Boundary.h:46
int LastPlane() const
Definition: Boundary.h:43
Defines an enumeration for prong classification.
int fFirstCell[2]
Minimum cell in each view, inclusive.
Definition: Boundary.h:52
int LastCell(const unsigned int &view) const
Definition: Boundary.h:45
unsigned int fFirstView
View of first plane (0=XZ, 1=YZ)
Definition: Boundary.h:54
const hit & b
Definition: hits.cxx:21
bool IsWithin(const unsigned int &plane, const unsigned int &cell, const unsigned int &view=0)
Definition: Boundary.cxx:40
int FirstPlane() const
Definition: Boundary.h:42
int fLastPlane
Maximum plane, inclusive.
Definition: Boundary.h:51