Public Member Functions | Public Attributes | List of all members
cnn::RegCNNBoundary Class Reference

#include <RegCNNBoundary.h>

Public Member Functions

 RegCNNBoundary (const int &nWire, const int &nTDC, const int &wRes, const int &tRes, const int &WireMeanX, const int &WireMeanY, const int &WireMeanZ, const int &TDCMeanX, const int &TDCMeanY, const int &TDCMeanZ)
 
 RegCNNBoundary ()
 
bool IsWithin (const int &wire, const int &tdc, const unsigned int &view)
 
int FirstWire (const unsigned int &view) const
 
int LastWire (const unsigned int &view) const
 
int FirstTDC (const unsigned int &view) const
 
int LastTDC (const unsigned int &view) const
 

Public Attributes

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

Detailed Description

RegCNNBoundary object intended for use with cnn::RegPixelMap. Stores mean of wire and TPCs

Definition at line 20 of file RegCNNBoundary.h.

Constructor & Destructor Documentation

cnn::RegCNNBoundary::RegCNNBoundary ( const int &  nWire,
const int &  nTDC,
const int &  wRes,
const int &  tRes,
const int &  WireMeanX,
const int &  WireMeanY,
const int &  WireMeanZ,
const int &  TDCMeanX,
const int &  TDCMeanY,
const int &  TDCMeanZ 
)

Create new RegCNNBoundary object based on number of wires, number of tdcs, minumum wire and mean tdc in odd and even view.

Definition at line 19 of file RegCNNBoundary.cxx.

28  :
29  fFirstWire{WireMeanX-(nWire*wRes)/2,
30  WireMeanY-(nWire*wRes)/2,
31  WireMeanZ-(nWire*wRes)/2},
32  fLastWire{WireMeanX+(nWire*wRes)/2-wRes/2,
33  WireMeanY+(nWire*wRes)/2-wRes/2,
34  WireMeanZ+(nWire*wRes)/2-wRes/2},
35  fFirstTDC{TDCMeanX - (nTDC*tRes)/2,
36  TDCMeanY - (nTDC*tRes)/2,
37  TDCMeanZ - (nTDC*tRes)/2},
38  fLastTDC{TDCMeanX + (nTDC*tRes)/2-tRes/2,
39  TDCMeanY + (nTDC*tRes)/2-tRes/2,
40  TDCMeanZ + (nTDC*tRes)/2-tRes/2}
41 
42  {
43  if (fLastWire[0] - fFirstWire[0] != nWire*wRes - wRes/2)
44  mf::LogError("RegCNNBoundary::RegCNNBoundary") << "RegCNN 1st Map Boundary Wrong"<<std::endl;
45  if (fLastWire[1] - fFirstWire[1] != nWire*wRes - wRes/2)
46  mf::LogError("RegCNNBoundary::RegCNNBoundary") << "RegCNN 2nd Map Boundary Wrong"<<std::endl;
47  if (fLastWire[2] - fFirstWire[2] != nWire*wRes - wRes/2)
48  mf::LogError("RegCNNBoundary::RegCNNBoundary") << "RegCNN 3rd Map Boundary Wrong"<<std::endl;
49  }
int fLastWire[3]
Maximum wire, inclusive.
int fFirstTDC[3]
Minimum TDC in each view, inclusive.
int fFirstWire[3]
Minimum wire, inclusive.
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
int fLastTDC[3]
Maximum TDC in each view, inclusive.
QTextStream & endl(QTextStream &s)
cnn::RegCNNBoundary::RegCNNBoundary ( )
inline

Definition at line 35 of file RegCNNBoundary.h.

35 {};

Member Function Documentation

int cnn::RegCNNBoundary::FirstTDC ( const unsigned int &  view) const
inline

Definition at line 41 of file RegCNNBoundary.h.

41 {return fFirstTDC[view];};
int fFirstTDC[3]
Minimum TDC in each view, inclusive.
int cnn::RegCNNBoundary::FirstWire ( const unsigned int &  view) const
inline

Definition at line 39 of file RegCNNBoundary.h.

39 {return fFirstWire[view];};
int fFirstWire[3]
Minimum wire, inclusive.
bool cnn::RegCNNBoundary::IsWithin ( const int &  wire,
const int &  tdc,
const unsigned int &  view 
)

Definition at line 51 of file RegCNNBoundary.cxx.

52  {
53  bool inWireRcnne = (int) wire >= fFirstWire[view] && (int) wire < fLastWire[view];
54  bool inTDCRcnne = (int) tdc >= fFirstTDC[view] &&
55  (int) tdc < fLastTDC[view];
56  return inWireRcnne && inTDCRcnne;
57  }
int fLastWire[3]
Maximum wire, inclusive.
int fFirstTDC[3]
Minimum TDC in each view, inclusive.
int fFirstWire[3]
Minimum wire, inclusive.
int fLastTDC[3]
Maximum TDC in each view, inclusive.
int cnn::RegCNNBoundary::LastTDC ( const unsigned int &  view) const
inline

Definition at line 42 of file RegCNNBoundary.h.

42 {return fLastTDC[view];};
int fLastTDC[3]
Maximum TDC in each view, inclusive.
int cnn::RegCNNBoundary::LastWire ( const unsigned int &  view) const
inline

Definition at line 40 of file RegCNNBoundary.h.

40 {return fLastWire[view];};
int fLastWire[3]
Maximum wire, inclusive.

Member Data Documentation

int cnn::RegCNNBoundary::fFirstTDC[3]

Minimum TDC in each view, inclusive.

Definition at line 48 of file RegCNNBoundary.h.

int cnn::RegCNNBoundary::fFirstWire[3]

Minimum wire, inclusive.

Definition at line 42 of file RegCNNBoundary.h.

int cnn::RegCNNBoundary::fLastTDC[3]

Maximum TDC in each view, inclusive.

Definition at line 49 of file RegCNNBoundary.h.

int cnn::RegCNNBoundary::fLastWire[3]

Maximum wire, inclusive.

Definition at line 47 of file RegCNNBoundary.h.


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