Public Member Functions | Private Attributes | List of all members
nerd::PixelPIDMaps Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-05-06/TensorFlowEvaluator/NERDProng/PixelPIDMaps.h"

Public Member Functions

 PixelPIDMaps (std::vector< std::vector< bool >> maskx, std::vector< std::vector< bool >> masky, std::vector< std::vector< float >> labelx, std::vector< std::vector< float >> labely)
 
 ~PixelPIDMaps ()
 
bool operator== (const PixelPIDMaps &rhs)
 
std::vector< std::vector< bool > > GetViewMask (geo::View_t view)
 
std::vector< std::vector< float > > GetViewLabel (geo::View_t view)
 
unsigned int NClusters (geo::View_t view)
 

Private Attributes

std::vector< std::vector< bool > > fMaskX
 
std::vector< std::vector< bool > > fMaskY
 
std::vector< std::vector< float > > fLabelX
 
std::vector< std::vector< float > > fLabelY
 

Detailed Description

Definition at line 15 of file PixelPIDMaps.h.

Constructor & Destructor Documentation

nerd::PixelPIDMaps::PixelPIDMaps ( std::vector< std::vector< bool >>  maskx,
std::vector< std::vector< bool >>  masky,
std::vector< std::vector< float >>  labelx,
std::vector< std::vector< float >>  labely 
)

Definition at line 11 of file PixelPIDMaps.cxx.

14  :
15  fMaskX(maskx),
16  fMaskY(masky),
17  fLabelX(labelx),
18  fLabelY(labely)
19  {}
std::vector< std::vector< bool > > fMaskX
Definition: PixelPIDMaps.h:31
std::vector< std::vector< bool > > fMaskY
Definition: PixelPIDMaps.h:32
std::vector< std::vector< float > > fLabelX
Definition: PixelPIDMaps.h:34
std::vector< std::vector< float > > fLabelY
Definition: PixelPIDMaps.h:35
nerd::PixelPIDMaps::~PixelPIDMaps ( )

Definition at line 21 of file PixelPIDMaps.cxx.

References fLabelX, fLabelY, fMaskX, and fMaskY.

22  {
23  fMaskX.clear();
24  fMaskY.clear();
25  fLabelX.clear();
26  fLabelY.clear();
27  }
std::vector< std::vector< bool > > fMaskX
Definition: PixelPIDMaps.h:31
std::vector< std::vector< bool > > fMaskY
Definition: PixelPIDMaps.h:32
std::vector< std::vector< float > > fLabelX
Definition: PixelPIDMaps.h:34
std::vector< std::vector< float > > fLabelY
Definition: PixelPIDMaps.h:35

Member Function Documentation

std::vector< std::vector< float > > nerd::PixelPIDMaps::GetViewLabel ( geo::View_t  view)

Definition at line 43 of file PixelPIDMaps.cxx.

References fLabelX, fLabelY, and geo::kY.

Referenced by nerd::NERDProng::MakeCluster(), and nerd::NERDProng::MakeProngs().

44  {
45  if(view == geo::kY)
46  return fLabelY;
47  return fLabelX;
48  }
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
std::vector< std::vector< float > > fLabelX
Definition: PixelPIDMaps.h:34
std::vector< std::vector< float > > fLabelY
Definition: PixelPIDMaps.h:35
std::vector< std::vector< bool > > nerd::PixelPIDMaps::GetViewMask ( geo::View_t  view)

Definition at line 36 of file PixelPIDMaps.cxx.

References fMaskX, fMaskY, and geo::kY.

Referenced by nerd::NERDProng::MakeCluster().

37  {
38  if(view == geo::kY)
39  return fMaskY;
40  return fMaskX;
41  }
std::vector< std::vector< bool > > fMaskX
Definition: PixelPIDMaps.h:31
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
std::vector< std::vector< bool > > fMaskY
Definition: PixelPIDMaps.h:32
unsigned int nerd::PixelPIDMaps::NClusters ( geo::View_t  view)

Definition at line 29 of file PixelPIDMaps.cxx.

References fLabelX, fLabelY, and geo::kY.

Referenced by nerd::NERDProng::MakeCluster().

30  {
31  if(view == geo::kY)
32  return fLabelY.size();
33  return fLabelX.size();
34  }
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
std::vector< std::vector< float > > fLabelX
Definition: PixelPIDMaps.h:34
std::vector< std::vector< float > > fLabelY
Definition: PixelPIDMaps.h:35
bool nerd::PixelPIDMaps::operator== ( const PixelPIDMaps rhs)

Definition at line 50 of file PixelPIDMaps.cxx.

References om::cout, allTimeWatchdog::endl, fLabelX, fLabelY, fMaskX, fMaskY, MECModelEnuComparisons::i, and calib::j.

51  {
52  bool same = true;
53 
54  for(unsigned int i = 0; i < fMaskX.size(); ++i){
55  for(unsigned int j = 0; j < fMaskX[0].size(); ++j){
56  if(fMaskX[i][j] != rhs.fMaskX[i][j]){
57  same = false;
58  std::cout<<"Difference in fMaskX at "<<i<<std::endl;
59  }
60  }
61  }
62 
63  for(unsigned int i = 0; i < fMaskY.size(); ++i){
64  for(unsigned int j = 0; j < fMaskY[0].size(); ++j){
65  if(fMaskY[i][j] != rhs.fMaskY[i][j]){
66  same = false;
67  std::cout<<"Difference in fMaskY at "<<i<<std::endl;
68  }
69  }
70  }
71 
72  for(unsigned int i = 0; i < fLabelX.size(); ++i){
73  for(unsigned int j = 0; j < fLabelX[0].size(); ++j){
74  if(fLabelX[i][j] != rhs.fLabelX[i][j]){
75  same = false;
76  std::cout<<"Difference in fLabelX at "<<i<<std::endl;
77  std::cout<<fLabelX[i][j]<<" vs "<<rhs.fLabelX[i][j]<<std::endl;
78  }
79  }
80  }
81 
82  for(unsigned int i = 0; i < fLabelY.size(); ++i){
83  for(unsigned int j = 0; j < fLabelY[0].size(); ++j){
84  if(fLabelY[i][j] != rhs.fLabelY[i][j]){
85  same = false;
86  std::cout<<"Difference in fLabelY at "<<i<<std::endl;
87  std::cout<<fLabelY[i][j]<<" vs "<<rhs.fLabelY[i][j]<<std::endl;
88  }
89  }
90  }
91 
92  return same;
93  }
std::vector< std::vector< bool > > fMaskX
Definition: PixelPIDMaps.h:31
std::vector< std::vector< bool > > fMaskY
Definition: PixelPIDMaps.h:32
std::vector< std::vector< float > > fLabelX
Definition: PixelPIDMaps.h:34
const double j
Definition: BetheBloch.cxx:29
OStream cout
Definition: OStream.cxx:6
std::vector< std::vector< float > > fLabelY
Definition: PixelPIDMaps.h:35

Member Data Documentation

std::vector<std::vector<float> > nerd::PixelPIDMaps::fLabelX
private

Definition at line 34 of file PixelPIDMaps.h.

Referenced by GetViewLabel(), NClusters(), operator==(), and ~PixelPIDMaps().

std::vector<std::vector<float> > nerd::PixelPIDMaps::fLabelY
private

Definition at line 35 of file PixelPIDMaps.h.

Referenced by GetViewLabel(), NClusters(), operator==(), and ~PixelPIDMaps().

std::vector<std::vector<bool> > nerd::PixelPIDMaps::fMaskX
private

Definition at line 31 of file PixelPIDMaps.h.

Referenced by GetViewMask(), operator==(), and ~PixelPIDMaps().

std::vector<std::vector<bool> > nerd::PixelPIDMaps::fMaskY
private

Definition at line 32 of file PixelPIDMaps.h.

Referenced by GetViewMask(), operator==(), and ~PixelPIDMaps().


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