Public Member Functions | Private Attributes | List of all members
cvn::Boundary Class Reference

#include <Boundary.h>

Public Member Functions

 Boundary (const int &nWire, const double &tRes, const int &minWireX, const int &minWireY, const int &minWireZ, const double &centerTDCX, const double &centerTDCY, const double &centerTDCZ)
 
 Boundary ()
 
bool IsWithin (const unsigned int &wire, const double &cell, const unsigned int &view)
 
int FirstWire (const unsigned int &view) const
 
int LastWire (const unsigned int &view) const
 
double FirstTDC (const unsigned int &view) const
 
double LastTDC (const unsigned int &view) const
 

Private Attributes

int fFirstWire [3]
 Minimum wire, inclusive. More...
 
int fLastWire [3]
 Maximum wire, inclusive. More...
 
double fFirstTDC [3]
 Minimum cell in each view, inclusive. More...
 
double fLastTDC [3]
 Maximum cell in each view, inclusive. More...
 

Detailed Description

Boundary object intended for use with cvn::PixelMap. Stores first and last wires, as well as first and last cell for even and odd view. CVN doesn't carefully define X/Y view, but instead simply uses odd/even wire (wire%2) as a proxy.

Definition at line 26 of file Boundary.h.

Constructor & Destructor Documentation

cvn::Boundary::Boundary ( const int &  nWire,
const double &  tRes,
const int &  minWireX,
const int &  minWireY,
const int &  minWireZ,
const double &  centerTDCX,
const double &  centerTDCY,
const double &  centerTDCZ 
)

Create new Boundary object based on number of wires, number of cells, minumum wire and mean cell in odd and even view.

Definition at line 18 of file Boundary.cxx.

25  :
26  fFirstWire{minWireX,
27  minWireY,
28  minWireZ},
29  fLastWire{minWireX + nWire - 1,
30  minWireY + nWire - 1,
31  minWireZ + nWire - 1},
32  fFirstTDC{centerTDCX - tRes, // For odd nTDC, we will truncate 0.5,
33  centerTDCY - tRes,
34  centerTDCZ - tRes}, // but get it back in LastTDC
35  fLastTDC{centerTDCX + tRes,// Recover the trucated 0.5
36  centerTDCY + tRes,
37  centerTDCZ + tRes}// with nTDC % 2
38 
39  {
40  assert(fLastWire[0] - fFirstWire[0] == nWire - 1);
41  assert(fLastWire[1] - fFirstWire[1] == nWire - 1);
42  assert(fLastWire[2] - fFirstWire[2] == nWire - 1);
43  }
double fFirstTDC[3]
Minimum cell in each view, inclusive.
Definition: Boundary.h:54
double fLastTDC[3]
Maximum cell in each view, inclusive.
Definition: Boundary.h:55
int fFirstWire[3]
Minimum wire, inclusive.
Definition: Boundary.h:47
int fLastWire[3]
Maximum wire, inclusive.
Definition: Boundary.h:53
cvn::Boundary::Boundary ( )
inline

Definition at line 40 of file Boundary.h.

40 {};

Member Function Documentation

double cvn::Boundary::FirstTDC ( const unsigned int &  view) const
inline

Definition at line 46 of file Boundary.h.

46 {return fFirstTDC[view];};
double fFirstTDC[3]
Minimum cell in each view, inclusive.
Definition: Boundary.h:54
int cvn::Boundary::FirstWire ( const unsigned int &  view) const
inline

Definition at line 44 of file Boundary.h.

44 {return fFirstWire[view];};
int fFirstWire[3]
Minimum wire, inclusive.
Definition: Boundary.h:47
bool cvn::Boundary::IsWithin ( const unsigned int &  wire,
const double &  cell,
const unsigned int &  view 
)

Definition at line 45 of file Boundary.cxx.

46  {
47  bool inWireRcvne = (int) wire >= fFirstWire[view] && (int) wire <= fLastWire[view];
48  bool inTDCRcvne = (double) cell >= fFirstTDC[view] &&
49  (double) cell <= fLastTDC[view];
50  return inWireRcvne && inTDCRcvne;
51  }
double fFirstTDC[3]
Minimum cell in each view, inclusive.
Definition: Boundary.h:54
double fLastTDC[3]
Maximum cell in each view, inclusive.
Definition: Boundary.h:55
int fFirstWire[3]
Minimum wire, inclusive.
Definition: Boundary.h:47
int fLastWire[3]
Maximum wire, inclusive.
Definition: Boundary.h:53
double cvn::Boundary::LastTDC ( const unsigned int &  view) const
inline

Definition at line 47 of file Boundary.h.

47 {return fLastTDC[view];};
double fLastTDC[3]
Maximum cell in each view, inclusive.
Definition: Boundary.h:55
int cvn::Boundary::LastWire ( const unsigned int &  view) const
inline

Definition at line 45 of file Boundary.h.

45 {return fLastWire[view];};
int fLastWire[3]
Maximum wire, inclusive.
Definition: Boundary.h:53

Member Data Documentation

double cvn::Boundary::fFirstTDC[3]
private

Minimum cell in each view, inclusive.

Definition at line 54 of file Boundary.h.

int cvn::Boundary::fFirstWire[3]
private

Minimum wire, inclusive.

Definition at line 47 of file Boundary.h.

double cvn::Boundary::fLastTDC[3]
private

Maximum cell in each view, inclusive.

Definition at line 55 of file Boundary.h.

int cvn::Boundary::fLastWire[3]
private

Maximum wire, inclusive.

Definition at line 53 of file Boundary.h.


The documentation for this class was generated from the following files: