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

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/CVN/func/Boundary.h"

Public Member Functions

 Boundary (const int &nPlane, const int &nCell, const int &minPlane, const int &centerCellEven, const int &centerCellOdd, const unsigned int &firstView=0)
 
 Boundary ()
 
bool IsWithin (const unsigned int &plane, const unsigned int &cell, const unsigned int &view=0)
 
int FirstPlane () const
 
int LastPlane () const
 
int FirstCell (const unsigned int &view) const
 
int LastCell (const unsigned int &view) const
 
unsigned int FirstView () const
 

Private Attributes

int fFirstPlane
 Minimum plane, inclusive. More...
 
int fLastPlane
 Maximum plane, inclusive. More...
 
int fFirstCell [2]
 Minimum cell in each view, inclusive. More...
 
int fLastCell [2]
 Maximum cell in each view, inclusive. More...
 
unsigned int fFirstView
 View of first plane (0=XZ, 1=YZ) More...
 

Detailed Description

Boundary object intended for use with cvn::PixelMap. Stores first and last planes, 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 plane (plane%2) as a proxy.

Definition at line 26 of file Boundary.h.

Constructor & Destructor Documentation

cvn::Boundary::Boundary ( const int nPlane,
const int nCell,
const int minPlane,
const int centerCellEven,
const int centerCellOdd,
const unsigned int firstView = 0 
)

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

Definition at line 17 of file Boundary.cxx.

References ana::assert(), fFirstCell, fFirstPlane, fFirstView, fLastCell, and fLastPlane.

22  :
23  fFirstPlane(minPlane),
24  fLastPlane (minPlane + nPlane - 1),
25  fFirstCell{centerCellEven - nCell / 2, // For odd nCell, we will truncate 0.5,
26  centerCellOdd - nCell / 2}, // but get it back in LastCell
27  fLastCell{centerCellEven + nCell / 2 + nCell % 2 - 1,// Recover the trucated 0.5
28  centerCellOdd + nCell / 2 + nCell % 2 - 1 },// with nCell % 2
29  fFirstView(firstView)
30 
31  {
32  assert(fLastPlane - fFirstPlane == nPlane - 1);
33  assert(fLastCell[0] - fFirstCell[0] == nCell - 1);
34  assert(fLastCell[1] - fFirstCell[1] == nCell - 1);
35 
36  }
int fLastCell[2]
Maximum cell in each view, inclusive.
Definition: Boundary.h:53
int fFirstPlane
Minimum plane, inclusive.
Definition: Boundary.h:46
int fFirstCell[2]
Minimum cell in each view, inclusive.
Definition: Boundary.h:52
unsigned int fFirstView
View of first plane (0=XZ, 1=YZ)
Definition: Boundary.h:54
assert(nhit_max >=nhit_nbins)
int fLastPlane
Maximum plane, inclusive.
Definition: Boundary.h:51
cvn::Boundary::Boundary ( )
inline

Definition at line 38 of file Boundary.h.

References getBrightness::cell, IsWithin(), NDAPDHVSetting::plane, and POTSpillRate::view.

38 {};

Member Function Documentation

int cvn::Boundary::FirstCell ( const unsigned int view) const
inline
int cvn::Boundary::FirstPlane ( ) const
inline
unsigned int cvn::Boundary::FirstView ( ) const
inline

Definition at line 46 of file Boundary.h.

References fFirstPlane, and fFirstView.

Referenced by cvn::PixelMap::ToLabTH2(), cvn::PixelMap::ToObjTH2(), and cvn::PixelMap::ToTH2().

46 {return fFirstView;};
unsigned int fFirstView
View of first plane (0=XZ, 1=YZ)
Definition: Boundary.h:54
bool cvn::Boundary::IsWithin ( const unsigned int plane,
const unsigned int cell,
const unsigned int view = 0 
)

Definition at line 40 of file Boundary.cxx.

References fFirstCell, fFirstPlane, fLastCell, fLastPlane, makeTrainCVSamples::int, and POTSpillRate::view.

Referenced by cvn::RegPixelMap::Add(), cvn::PixelMap::Add(), Boundary(), and nerd::NERDProng::MakeCluster().

41  {
42  bool inPlaneRcvne = (int) plane >= fFirstPlane && (int) plane <= fLastPlane;
43  bool inCellRcvne = (int) cell >= fFirstCell[view] &&
44  (int) cell <= fLastCell[view];
45  return inPlaneRcvne && inCellRcvne;
46  }
int fLastCell[2]
Maximum cell in each view, inclusive.
Definition: Boundary.h:53
int fFirstPlane
Minimum plane, inclusive.
Definition: Boundary.h:46
int fFirstCell[2]
Minimum cell in each view, inclusive.
Definition: Boundary.h:52
int fLastPlane
Maximum plane, inclusive.
Definition: Boundary.h:51
int cvn::Boundary::LastCell ( const unsigned int view) const
inline

Definition at line 45 of file Boundary.h.

References fLastCell, and POTSpillRate::view.

Referenced by caf::FillCVNPixelMaps(), and cvn::operator<<().

45 {return fLastCell[view];};
int fLastCell[2]
Maximum cell in each view, inclusive.
Definition: Boundary.h:53
int cvn::Boundary::LastPlane ( ) const
inline

Definition at line 43 of file Boundary.h.

References fLastPlane.

Referenced by caf::FillCVNPixelMaps(), and cvn::operator<<().

43 {return fLastPlane;};
int fLastPlane
Maximum plane, inclusive.
Definition: Boundary.h:51

Member Data Documentation

int cvn::Boundary::fFirstCell[2]
private

Minimum cell in each view, inclusive.

Definition at line 52 of file Boundary.h.

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

int cvn::Boundary::fFirstPlane
private

Minimum plane, inclusive.

Definition at line 46 of file Boundary.h.

Referenced by Boundary(), FirstPlane(), FirstView(), and IsWithin().

unsigned int cvn::Boundary::fFirstView
private

View of first plane (0=XZ, 1=YZ)

Definition at line 54 of file Boundary.h.

Referenced by Boundary(), and FirstView().

int cvn::Boundary::fLastCell[2]
private

Maximum cell in each view, inclusive.

Definition at line 53 of file Boundary.h.

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

int cvn::Boundary::fLastPlane
private

Maximum plane, inclusive.

Definition at line 51 of file Boundary.h.

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


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