LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lcvn::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 lcvn::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 19 of file Boundary.h.

Constructor & Destructor Documentation

lcvn::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 16 of file Boundary.cxx.

References fFirstTDC, fFirstWire, fLastTDC, and fLastWire.

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

Definition at line 33 of file Boundary.h.

References IsWithin().

33 {};

Member Function Documentation

double lcvn::Boundary::FirstTDC ( const unsigned int  view) const
inline

Definition at line 39 of file Boundary.h.

References fFirstTDC.

Referenced by lcvn::PixelMap::GlobalToIndex(), lcvn::PixelMap::GlobalToIndexSingle(), and lcvn::operator<<().

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

Definition at line 37 of file Boundary.h.

References fFirstWire.

Referenced by lcvn::PixelMap::GlobalToIndex(), lcvn::PixelMap::GlobalToIndexSingle(), and lcvn::operator<<().

37 { return fFirstWire[view]; };
int fFirstWire[3]
Minimum wire, inclusive.
Definition: Boundary.h:40
bool lcvn::Boundary::IsWithin ( const unsigned int  wire,
const double  cell,
const unsigned int  view 
)

Definition at line 40 of file Boundary.cxx.

References fFirstTDC, fFirstWire, fLastTDC, and fLastWire.

Referenced by lcvn::PixelMap::Add(), and Boundary().

41  {
42  bool inWireRcvne = (int)wire >= fFirstWire[view] && (int)wire <= fLastWire[view];
43  bool inTDCRcvne = (double)cell >= fFirstTDC[view] && (double)cell <= fLastTDC[view];
44  return inWireRcvne && inTDCRcvne;
45  }
int fFirstWire[3]
Minimum wire, inclusive.
Definition: Boundary.h:40
double fLastTDC[3]
Maximum cell in each view, inclusive.
Definition: Boundary.h:46
double fFirstTDC[3]
Minimum cell in each view, inclusive.
Definition: Boundary.h:45
int fLastWire[3]
Maximum wire, inclusive.
Definition: Boundary.h:44
double lcvn::Boundary::LastTDC ( const unsigned int  view) const
inline

Definition at line 40 of file Boundary.h.

References fFirstWire, and fLastTDC.

Referenced by lcvn::PixelMap::GlobalToIndex(), lcvn::PixelMap::GlobalToIndexSingle(), and lcvn::operator<<().

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

Definition at line 38 of file Boundary.h.

References fLastWire.

Referenced by lcvn::operator<<().

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

Member Data Documentation

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

Minimum cell in each view, inclusive.

Definition at line 45 of file Boundary.h.

Referenced by Boundary(), FirstTDC(), and IsWithin().

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

Minimum wire, inclusive.

Definition at line 40 of file Boundary.h.

Referenced by Boundary(), FirstWire(), IsWithin(), and LastTDC().

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

Maximum cell in each view, inclusive.

Definition at line 46 of file Boundary.h.

Referenced by Boundary(), IsWithin(), and LastTDC().

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

Maximum wire, inclusive.

Definition at line 44 of file Boundary.h.

Referenced by Boundary(), IsWithin(), and LastWire().


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