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

PixelMap, basic input to CVN neural net. More...

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

Public Member Functions

 PixelMap (unsigned int nPlane, unsigned int nCell, const Boundary &bound, bool PEOnly=false)
 
 PixelMap ()
 
unsigned int NPlane () const
 Length in planes. More...
 
unsigned int NPlanePerView () const
 Length in planes per view. More...
 
unsigned int NCell () const
 Width in cells. More...
 
unsigned int NPixel () const
 Total number of pixels in map. More...
 
void SetMinTime (float minTime)
 
void SetMaxTime (float maxTime)
 
float MinTime () const
 
float MaxTime () const
 
Boundary Bound () const
 Map boundary. More...
 
unsigned int NInput () const
 Number of inputs for the neural net. More...
 
void FillInputVector (float *input) const
 
void Add (const unsigned int &plane, const unsigned int &cell, const float &pe, unsigned int &view, unsigned int &hitID, const float &time, const HitType label, const double purity, const int object, const int nuIdx)
 
unsigned int GlobalToIndex (const unsigned int &plane, const unsigned int &cell, const unsigned int &view)
 Take global plane, cell (detector) and return index in fPE vector. More...
 
unsigned int LocalToIndex (const unsigned int &plane, const unsigned int &cell) const
 Take local plane, cell (within map) and return index in fPE vector. More...
 
unsigned int GlobalToIndexSingle (const unsigned int &plane, const unsigned int &cell, const unsigned int &view)
 Take global plane, cell (detector) and return index in fPE vector. More...
 
void Print ()
 
void ToFile (std::ofstream &ofs, int batch, bool hits=false) const
 Return the pixel map as a 2D histogram for visualization. More...
 
TH2F * ToTH2 (TString name) const
 
TH2F * ToLabTH2 (TString name) const
 
TH2F * ToObjTH2 (TString name) const
 
TH2F * SingleViewToTH2 (const unsigned int &view, TString name) const
 
TH2F * SingleViewToLabTH2 (const unsigned int &view, TString name, bool time) const
 
TH2F * SingleViewToObjTH2 (const unsigned int &view, TString name, bool nuID) const
 
std::vector< unsigned char > PixelMapToVector (bool useGeV) const
 
std::vector< unsigned char > PixelMapToObjVector (bool useLabels) const
 
unsigned int PixelMapToVectors (std::vector< unsigned int > *planes, std::vector< unsigned int > *cells, std::vector< unsigned int > *chan, std::vector< unsigned char > *values, bool useGeV) const
 
unsigned char ConvertToChar (float n, bool useGeV) const
 
unsigned char ConvertHitsToChar (float n) const
 

Public Attributes

unsigned int fNPlane
 Number of planes, length of pixel map. More...
 
unsigned int fNCell
 Number of cells, width of pixel map. More...
 
float fFracX
 fraction of x view hits contained in map More...
 
float fFracY
 fraction of y view hits contained in map More...
 
float fMinTime
 Minimum time considered in pixel map (in nanoseconds) More...
 
float fMaxTime
 Maximum time considered in pixel map (in nanoseconds) More...
 
unsigned int fOccupiedPixels
 Number of non-zero entries in pixel map. Counted when the Add function is called. More...
 
unsigned int fOccupiedPixelsX
 Number of non-zero entries in pixel map. Counted when the Add function is called. More...
 
unsigned int fOccupiedPixelsY
 Number of non-zero entries in pixel map. Counted when the Add function is called. More...
 
std::vector< float > fPE
 Vector of PE measurements for pixels. More...
 
std::vector< float > fPEX
 Vector of X PE measurements for pixels. More...
 
std::vector< float > fPEY
 Vector of Y PE measurements for pixels. More...
 
std::vector< double > fPur
 Vector of purity for pixels. More...
 
std::vector< double > fPurX
 Vector of X purity for pixels. More...
 
std::vector< double > fPurY
 Vector of Y purity for pixels. More...
 
std::vector< HitTypefLab
 Vector of Truth labels for pixels. More...
 
std::vector< HitTypefLabX
 Vector of X Truth labels for pixels. More...
 
std::vector< HitTypefLabY
 Vector of Y Truth labels for pixels. More...
 
std::vector< float > fT
 Vector of Time of hits. More...
 
std::vector< float > fTX
 Vector of X Time of hits. More...
 
std::vector< float > fTY
 Vector of Y Time of hits. More...
 
std::vector< intfObj
 Vector of Particle Idx of hits. More...
 
std::vector< intfObjX
 Vector of X Particle Idx of hits. More...
 
std::vector< intfObjY
 Vector of Y Particle Idx of hits. More...
 
std::vector< intfNu
 Vector of Nu Index of hits. More...
 
std::vector< intfNuX
 Vector of X Nu Index of hits. More...
 
std::vector< intfNuY
 Vector of Y Nu Index of hits. More...
 
std::vector< unsigned intfVie
 Vector of hit view. More...
 
std::vector< unsigned intfVieX
 Vector of X hit view. More...
 
std::vector< unsigned intfVieY
 Vector of Y hit view. More...
 
std::vector< unsigned intfHit
 Vector of hit IDs. More...
 
std::vector< unsigned intfHitX
 Vector of X hit IDs. More...
 
std::vector< unsigned intfHitY
 Vector of Y hit IDs. More...
 
Boundary fBound
 
bool fPEOnly
 

Detailed Description

PixelMap, basic input to CVN neural net.

Definition at line 23 of file PixelMap.h.

Constructor & Destructor Documentation

cvn::PixelMap::PixelMap ( unsigned int  nPlane,
unsigned int  nCell,
const Boundary bound,
bool  PEOnly = false 
)

Definition at line 15 of file PixelMap.cxx.

17  :
18  fNPlane(nPlane),
19  fNCell(nCell),
20  fOccupiedPixels(0),
23  fPE(nPlane*nCell),
24  fPEX (((nPlane/2)+(nPlane%2))*nCell),
25  fPEY (((nPlane/2)+(nPlane%2))*nCell),
26  fPur (PEOnly ? 0 : nPlane*nCell),
27  fPurX(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
28  fPurY(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
29  fLab (PEOnly ? 0 : nPlane*nCell),
30  fLabX(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
31  fLabY(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
32  fT (PEOnly ? 0 : nPlane*nCell),
33  fTX (PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
34  fTY (PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
35  fObj (PEOnly ? 0 : nPlane*nCell),
36  fObjX(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
37  fObjY(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
38  fNu (PEOnly ? 0 : nPlane*nCell),
39  fNuX (PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
40  fNuY (PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
41  fVie (PEOnly ? 0 : nPlane*nCell),
42  fVieX(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
43  fVieY(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
44  fHit (PEOnly ? 0 : nPlane*nCell),
45  fHitX(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
46  fHitY(PEOnly ? 0 : ((nPlane/2)+(nPlane%2))*nCell),
47  fBound(bound),
48  fPEOnly(PEOnly)
49  {}
unsigned int fOccupiedPixelsX
Number of non-zero entries in pixel map. Counted when the Add function is called. ...
Definition: PixelMap.h:124
std::vector< float > fT
Vector of Time of hits.
Definition: PixelMap.h:136
bool fPEOnly
Definition: PixelMap.h:155
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned int fOccupiedPixels
Number of non-zero entries in pixel map. Counted when the Add function is called. ...
Definition: PixelMap.h:123
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::vector< int > fObjX
Vector of X Particle Idx of hits.
Definition: PixelMap.h:140
std::vector< unsigned int > fVieX
Vector of X hit view.
Definition: PixelMap.h:147
std::vector< int > fObjY
Vector of Y Particle Idx of hits.
Definition: PixelMap.h:141
std::vector< int > fNu
Vector of Nu Index of hits.
Definition: PixelMap.h:142
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
std::vector< HitType > fLabY
Vector of Y Truth labels for pixels.
Definition: PixelMap.h:135
std::vector< unsigned int > fHit
Vector of hit IDs.
Definition: PixelMap.h:149
std::vector< unsigned int > fHitY
Vector of Y hit IDs.
Definition: PixelMap.h:151
std::vector< int > fObj
Vector of Particle Idx of hits.
Definition: PixelMap.h:139
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
std::vector< unsigned int > fVie
Vector of hit view.
Definition: PixelMap.h:146
unsigned int fOccupiedPixelsY
Number of non-zero entries in pixel map. Counted when the Add function is called. ...
Definition: PixelMap.h:125
std::vector< unsigned int > fVieY
Vector of Y hit view.
Definition: PixelMap.h:148
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
std::vector< float > fTX
Vector of X Time of hits.
Definition: PixelMap.h:137
std::vector< float > fTY
Vector of Y Time of hits.
Definition: PixelMap.h:138
std::vector< int > fNuX
Vector of X Nu Index of hits.
Definition: PixelMap.h:143
std::vector< double > fPurY
Vector of Y purity for pixels.
Definition: PixelMap.h:132
std::vector< unsigned int > fHitX
Vector of X hit IDs.
Definition: PixelMap.h:150
std::vector< HitType > fLabX
Vector of X Truth labels for pixels.
Definition: PixelMap.h:134
std::vector< HitType > fLab
Vector of Truth labels for pixels.
Definition: PixelMap.h:133
Boundary fBound
Definition: PixelMap.h:153
std::vector< int > fNuY
Vector of Y Nu Index of hits.
Definition: PixelMap.h:144
std::vector< double > fPur
Vector of purity for pixels.
Definition: PixelMap.h:130
std::vector< double > fPurX
Vector of X purity for pixels.
Definition: PixelMap.h:131
cvn::PixelMap::PixelMap ( )
inline

Definition at line 28 of file PixelMap.h.

28 {};

Member Function Documentation

void cvn::PixelMap::Add ( const unsigned int plane,
const unsigned int cell,
const float &  pe,
unsigned int view,
unsigned int hitID,
const float &  time,
const HitType  label = kEmptyHit,
const double  purity = 0.0,
const int  object = 0,
const int  nuIdx = 0 
)

Add a hit to the map if it is contained within the plane, cell rcvne Could be expanded later to add to overflow accordingly.

Definition at line 65 of file PixelMap.cxx.

References fBound, fHit, fHitX, fHitY, fLab, fLabX, fLabY, fNu, fNuX, fNuY, fObj, fObjX, fObjY, fOccupiedPixels, fOccupiedPixelsX, fOccupiedPixelsY, fPE, fPEOnly, fPEX, fPEY, fPur, fPurX, fPurY, fT, fTX, fTY, fVie, fVieX, fVieY, GlobalToIndex(), GlobalToIndexSingle(), cvn::Boundary::IsWithin(), label, plotConfusion::purity(), scale, and POTSpillRate::view.

Referenced by cvn::PixelMapProducer::CreateMapGivenBoundary(), NInput(), and cvn::CVNCosmicMapper::produce().

70  {
71  const float scale = 2100.0; // From Dom's Devs Repo Rev 527
72 
73  if( fBound.IsWithin(plane, cell,view) ){
75  unsigned int pmIndex = GlobalToIndex(plane,cell,view);
76  fPE[pmIndex] += pe/scale;
77 
78  if(!fPEOnly){
79  fT[pmIndex] = time;
80  fNu[pmIndex] = nuIdx;
81  fVie[pmIndex] = view;
82  fHit[pmIndex] = hitID;
83  fLab[pmIndex] = label;
84  fPur[pmIndex] = purity;
85  fObj[pmIndex] = object;
86  }
87 
88  unsigned int pmIdxS = GlobalToIndexSingle(plane,cell,view);
89 
90  if( view == 0 ){ // XZ-view
92  fPEX[pmIdxS] += pe/scale;
93  if(!fPEOnly){
94  fTX[pmIdxS] = time;
95  fNuX[pmIdxS] = nuIdx;
96  fVieX[pmIdxS] = view;
97  fHitX[pmIdxS] = hitID;
98  fLabX[pmIdxS] = label;
99  fPurX[pmIdxS] = purity;
100  fObjX[pmIdxS] = object;
101  }
102  }
103 
104  else{ // YZ-view
106  fPEY[pmIdxS] += pe/scale;
107  if(!fPEOnly){
108  fTY[pmIdxS] = time;
109  fNuY[pmIdxS] = nuIdx;
110  fVieY[pmIdxS] = view;
111  fHitY[pmIdxS] = hitID;
112  fLabY[pmIdxS] = label;
113  fPurY[pmIdxS] = purity;
114  fObjY[pmIdxS] = object;
115  }
116  }
117  }
118  }
unsigned int fOccupiedPixelsX
Number of non-zero entries in pixel map. Counted when the Add function is called. ...
Definition: PixelMap.h:124
std::vector< float > fT
Vector of Time of hits.
Definition: PixelMap.h:136
bool fPEOnly
Definition: PixelMap.h:155
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned int fOccupiedPixels
Number of non-zero entries in pixel map. Counted when the Add function is called. ...
Definition: PixelMap.h:123
std::vector< int > fObjX
Vector of X Particle Idx of hits.
Definition: PixelMap.h:140
std::vector< unsigned int > fVieX
Vector of X hit view.
Definition: PixelMap.h:147
std::vector< int > fObjY
Vector of Y Particle Idx of hits.
Definition: PixelMap.h:141
::xsd::cxx::tree::time< char, simple_type > time
Definition: Database.h:194
std::vector< int > fNu
Vector of Nu Index of hits.
Definition: PixelMap.h:142
const char * label
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
Definition: novas.h:112
Double_t scale
Definition: plot.C:25
std::vector< HitType > fLabY
Vector of Y Truth labels for pixels.
Definition: PixelMap.h:135
std::vector< unsigned int > fHit
Vector of hit IDs.
Definition: PixelMap.h:149
std::vector< unsigned int > fHitY
Vector of Y hit IDs.
Definition: PixelMap.h:151
std::vector< int > fObj
Vector of Particle Idx of hits.
Definition: PixelMap.h:139
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
std::vector< unsigned int > fVie
Vector of hit view.
Definition: PixelMap.h:146
unsigned int fOccupiedPixelsY
Number of non-zero entries in pixel map. Counted when the Add function is called. ...
Definition: PixelMap.h:125
std::vector< unsigned int > fVieY
Vector of Y hit view.
Definition: PixelMap.h:148
std::vector< float > fTX
Vector of X Time of hits.
Definition: PixelMap.h:137
std::vector< float > fTY
Vector of Y Time of hits.
Definition: PixelMap.h:138
std::vector< int > fNuX
Vector of X Nu Index of hits.
Definition: PixelMap.h:143
std::vector< double > fPurY
Vector of Y purity for pixels.
Definition: PixelMap.h:132
std::vector< unsigned int > fHitX
Vector of X hit IDs.
Definition: PixelMap.h:150
std::vector< HitType > fLabX
Vector of X Truth labels for pixels.
Definition: PixelMap.h:134
unsigned int GlobalToIndexSingle(const unsigned int &plane, const unsigned int &cell, const unsigned int &view)
Take global plane, cell (detector) and return index in fPE vector.
Definition: PixelMap.cxx:147
unsigned int GlobalToIndex(const unsigned int &plane, const unsigned int &cell, const unsigned int &view)
Take global plane, cell (detector) and return index in fPE vector.
Definition: PixelMap.cxx:121
std::vector< HitType > fLab
Vector of Truth labels for pixels.
Definition: PixelMap.h:133
Boundary fBound
Definition: PixelMap.h:153
std::vector< int > fNuY
Vector of Y Nu Index of hits.
Definition: PixelMap.h:144
bool IsWithin(const unsigned int &plane, const unsigned int &cell, const unsigned int &view=0)
Definition: Boundary.cxx:40
std::vector< double > fPur
Vector of purity for pixels.
Definition: PixelMap.h:130
std::vector< double > fPurX
Vector of X purity for pixels.
Definition: PixelMap.h:131
Boundary cvn::PixelMap::Bound ( ) const
inline

Map boundary.

Definition at line 51 of file PixelMap.h.

References fBound.

Referenced by nerd::NERDProng::MakeCluster(), and cvn::CVNMapper::produce().

51 {return fBound;};
Boundary fBound
Definition: PixelMap.h:153
unsigned char cvn::PixelMap::ConvertHitsToChar ( float  n) const

Definition at line 410 of file PixelMap.cxx.

Referenced by NInput(), and ToFile().

411  {
412  if (n > 0) return (unsigned char)1;
413  else return (unsigned char)0;
414  }
unsigned char cvn::PixelMap::ConvertToChar ( float  n,
bool  useGeV 
) const

Definition at line 396 of file PixelMap.cxx.

References stan::math::ceil().

Referenced by NInput(), PixelMapToVector(), PixelMapToVectors(), and ToFile().

397  {
398 
399  float peCorrChunk;
400  // This value is 2.0 / (PE/GeV)
401  if (useGeV) peCorrChunk = 1.322e-4 / 255.0;
402  else peCorrChunk = 2.0/255.0;
403 
404  float truncateCorr = ceil(n/peCorrChunk);
405  if (truncateCorr > 255) return (unsigned char)255;
406  else return (unsigned char)truncateCorr;
407  }
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
void cvn::PixelMap::FillInputVector ( float *  input) const

Definition at line 52 of file PixelMap.cxx.

References fPE, and MECModelEnuComparisons::i.

Referenced by NInput().

53  {
54  unsigned int i = 0;
55 
56  for(const auto& pe:fPE){
57  input[i] = pe;
58  ++i;
59  }
60 
61  }
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
unsigned int cvn::PixelMap::GlobalToIndex ( const unsigned int plane,
const unsigned int cell,
const unsigned int view 
)

Take global plane, cell (detector) and return index in fPE vector.

Definition at line 121 of file PixelMap.cxx.

References ana::assert(), fBound, cvn::Boundary::FirstCell(), cvn::Boundary::FirstPlane(), fNCell, fPE, and allTimeWatchdog::index.

Referenced by Add(), and NInput().

124  {
125 
126  unsigned int internalPlane = plane - fBound.FirstPlane();
127  unsigned int internalCell = cell - fBound.FirstCell(view);
128 
129  unsigned int index = internalPlane * fNCell + internalCell % fNCell;
130 
131  assert(index < fPE.size());
132 
133  return index;
134  }
int FirstCell(const unsigned int &view) const
Definition: Boundary.h:44
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
assert(nhit_max >=nhit_nbins)
Boundary fBound
Definition: PixelMap.h:153
int FirstPlane() const
Definition: Boundary.h:42
unsigned int cvn::PixelMap::GlobalToIndexSingle ( const unsigned int plane,
const unsigned int cell,
const unsigned int view 
)

Take global plane, cell (detector) and return index in fPE vector.

Definition at line 147 of file PixelMap.cxx.

References ana::assert(), fBound, cvn::Boundary::FirstCell(), cvn::Boundary::FirstPlane(), fNCell, fPEX, and allTimeWatchdog::index.

Referenced by Add(), nerd::NERDProng::MakeCluster(), and NInput().

150  {
151 
152  unsigned int internalPlane = ((plane - fBound.FirstPlane())/2);
153 
154  unsigned int internalCell = cell - fBound.FirstCell(view);
155 
156  unsigned int index = internalPlane * fNCell + internalCell % fNCell;
157 
158  assert(index < fPEX.size());
159 
160  return index;
161  }
int FirstCell(const unsigned int &view) const
Definition: Boundary.h:44
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
assert(nhit_max >=nhit_nbins)
Boundary fBound
Definition: PixelMap.h:153
int FirstPlane() const
Definition: Boundary.h:42
unsigned int cvn::PixelMap::LocalToIndex ( const unsigned int plane,
const unsigned int cell 
) const

Take local plane, cell (within map) and return index in fPE vector.

Definition at line 137 of file PixelMap.cxx.

References ana::assert(), fNCell, fPE, and allTimeWatchdog::index.

Referenced by NInput(), Print(), SingleViewToLabTH2(), SingleViewToObjTH2(), SingleViewToTH2(), ToLabTH2(), ToObjTH2(), and ToTH2().

139  {
140  unsigned int index = plane * fNCell + cell % fNCell;
141 
142  assert(index < fPE.size());
143  return index;
144  }
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
assert(nhit_max >=nhit_nbins)
float cvn::PixelMap::MaxTime ( ) const
inline

Definition at line 48 of file PixelMap.h.

References fMaxTime.

48 {return fMaxTime;};
float fMaxTime
Maximum time considered in pixel map (in nanoseconds)
Definition: PixelMap.h:122
float cvn::PixelMap::MinTime ( ) const
inline

Definition at line 46 of file PixelMap.h.

References fMinTime.

Referenced by cvntf::CVNCosmicTF::sortPixelTime().

46 {return fMinTime;};
float fMinTime
Minimum time considered in pixel map (in nanoseconds)
Definition: PixelMap.h:121
unsigned int cvn::PixelMap::NCell ( ) const
inline

Width in cells.

Definition at line 37 of file PixelMap.h.

References fNCell.

Referenced by cvn::operator<<(), and cvntf::CVNCosmicTF::pixelmap_to_tensor().

37 {return fNCell;};
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned int cvn::PixelMap::NInput ( ) const
inline
unsigned int cvn::PixelMap::NPixel ( ) const
inline

Total number of pixels in map.

Definition at line 40 of file PixelMap.h.

References fPE.

Referenced by NInput(), and cvn::operator<<().

40 {return fPE.size();};
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
unsigned int cvn::PixelMap::NPlane ( ) const
inline

Length in planes.

Definition at line 31 of file PixelMap.h.

References fNPlane.

Referenced by cvn::operator<<().

31 {return fNPlane;};
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
unsigned int cvn::PixelMap::NPlanePerView ( ) const
inline

Length in planes per view.

Definition at line 34 of file PixelMap.h.

References fNPlane.

Referenced by cvntf::CVNCosmicTF::pixelmap_to_tensor(), and ToFile().

34 { return ((fNPlane/2)+(fNPlane%2)); };
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::vector< unsigned char > cvn::PixelMap::PixelMapToObjVector ( bool  useLabels) const

Definition at line 417 of file PixelMap.cxx.

References channels, fLabX, fLabY, fNCell, fNPlane, fObjX, fObjY, fPEOnly, and MECModelEnuComparisons::i.

Referenced by caf::FillCVNPixelMaps(), nerd::NERDEval::load_truth(), and NInput().

418  {
419  int channels(2), planes(0), cells(0);
420  planes = fNPlane/2;
421  cells = fNCell;
422  std::vector<unsigned char> pixels(channels*planes*cells);
423 
424  if(fPEOnly) return pixels;
425 
426  for (int iChan = 0; iChan < channels; ++iChan)
427  {
428  for (int iPlane = 0; iPlane < planes; ++iPlane)
429  {
430  for (int iCell = 0; iCell < cells; ++iCell)
431  {
432  int i = iCell + cells*(iPlane + planes*iChan);
433  unsigned char lab = (iChan == 0) ?
434  fLabX.at(iCell + cells*iPlane) :
435  fLabY.at(iCell + cells*iPlane);
436  unsigned char obj = (iChan == 0) ?
437  fObjX.at(iCell + cells*iPlane) :
438  fObjY.at(iCell + cells*iPlane);
439 
440  unsigned char pix = (useLabels) ? lab : obj;
441  pixels[i] = pix;
442  }
443  }
444  }
445  return pixels;
446 
447  }
bool fPEOnly
Definition: PixelMap.h:155
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::vector< int > fObjX
Vector of X Particle Idx of hits.
Definition: PixelMap.h:140
std::vector< int > fObjY
Vector of Y Particle Idx of hits.
Definition: PixelMap.h:141
std::map< ToFCounter, std::vector< unsigned int > > channels
std::vector< HitType > fLabY
Vector of Y Truth labels for pixels.
Definition: PixelMap.h:135
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
std::vector< HitType > fLabX
Vector of X Truth labels for pixels.
Definition: PixelMap.h:134
std::vector< unsigned char > cvn::PixelMap::PixelMapToVector ( bool  useGeV) const

Definition at line 449 of file PixelMap.cxx.

References channels, ConvertToChar(), fNCell, fNPlane, fPEX, fPEY, MECModelEnuComparisons::i, and febshutoff_auto::val.

Referenced by caf::FillCVNPixelMaps(), nerd::NERDEval::mold_input(), NInput(), and nerd::NERDEval::predict_fifo().

450  {
451  int channels(2), planes(0), cells(0);
452  planes = fNPlane/2;
453  cells = fNCell;
454  std::vector<unsigned char> pixels(channels*planes*cells);
455  for (int iChan = 0; iChan < channels; ++iChan)
456  {
457  for (int iPlane = 0; iPlane < planes; ++iPlane)
458  {
459  for (int iCell = 0; iCell < cells; ++iCell)
460  {
461  int i = iCell + cells*(iPlane + planes*iChan);
462  float val = (iChan == 0) ?
463  fPEX.at(iCell + cells*iPlane) :
464  fPEY.at(iCell + cells*iPlane);
465 
466  unsigned char pix = ConvertToChar(val, useGeV);
467  pixels[i] = pix;
468  }
469  }
470  }
471  return pixels;
472 
473  }
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::map< ToFCounter, std::vector< unsigned int > > channels
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned char ConvertToChar(float n, bool useGeV) const
Definition: PixelMap.cxx:396
unsigned int cvn::PixelMap::PixelMapToVectors ( std::vector< unsigned int > *  planes,
std::vector< unsigned int > *  cells,
std::vector< unsigned int > *  chan,
std::vector< unsigned char > *  values,
bool  useGeV 
) const

Definition at line 476 of file PixelMap.cxx.

References channels, ConvertToChar(), fNCell, fNPlane, fPEX, fPEY, ncells, nplanes, and febshutoff_auto::val.

Referenced by NInput().

482  {
483  int channels(2), nplanes(0), ncells(0);
484  nplanes = fNPlane/2;
485  ncells = fNCell;
486  unsigned int entries = 0;
487  for (int iChan = 0; iChan < channels; ++iChan)
488  {
489  for (int iPlane = 0; iPlane < nplanes; ++iPlane)
490  {
491  for (int iCell = 0; iCell < ncells; ++iCell)
492  {
493  float val = (iChan == 0) ?
494  fPEX.at(iCell + ncells*iPlane) :
495  fPEY.at(iCell + ncells*iPlane);
496  if (val == 0) continue;
497  unsigned char pix = ConvertToChar(val, useGeV);
498  values->push_back(pix);
499  planes->push_back(iPlane);
500  cells->push_back(iCell);
501  chan->push_back(iChan);
502  entries++;
503  }
504  }
505  }
506  return entries;
507 
508  }
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::map< ToFCounter, std::vector< unsigned int > > channels
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
int nplanes
Definition: geom.C:145
unsigned char ConvertToChar(float n, bool useGeV) const
Definition: PixelMap.cxx:396
int ncells
Definition: geom.C:124
void cvn::PixelMap::Print ( )

Draw pixel map to the screen. This is pretty hokey and the aspect ratio is totally unrealistic.

Definition at line 164 of file PixelMap.cxx.

References om::cout, allTimeWatchdog::endl, fNCell, fNPlane, fPE, allTimeWatchdog::index, and LocalToIndex().

Referenced by NInput().

165  {
166 
167  // Start by doing even planes
168  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
169  for(unsigned int iPlane = 0; iPlane < fNPlane; iPlane += 2){
170  unsigned int index = LocalToIndex(iPlane, iCell);
171 
172  if( fPE[index] > 0) std::cout << "*";
173  else std::cout << " ";
174  }
175  std::cout << std::endl;
176  }
177  // Then do odd planes
178  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
179  for(unsigned int iPlane = 1; iPlane < fNPlane; iPlane += 2){
180  unsigned int index = LocalToIndex(iPlane, iCell);
181 
182  if( fPE[index] > 0) std::cout << "*";
183  else std::cout << " ";
184  }
185  std::cout << std::endl;
186  }
187 
188  }
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
OStream cout
Definition: OStream.cxx:6
unsigned int LocalToIndex(const unsigned int &plane, const unsigned int &cell) const
Take local plane, cell (within map) and return index in fPE vector.
Definition: PixelMap.cxx:137
void cvn::PixelMap::SetMaxTime ( float  maxTime)
inline

Definition at line 44 of file PixelMap.h.

References fMaxTime.

Referenced by cvn::CVNCosmicMapper::produce().

44 {fMaxTime = maxTime;};
float fMaxTime
Maximum time considered in pixel map (in nanoseconds)
Definition: PixelMap.h:122
void cvn::PixelMap::SetMinTime ( float  minTime)
inline

Definition at line 42 of file PixelMap.h.

References fMinTime.

Referenced by cvn::CVNCosmicMapper::produce().

42 {fMinTime = minTime;};
float fMinTime
Minimum time considered in pixel map (in nanoseconds)
Definition: PixelMap.h:121
TH2F * cvn::PixelMap::SingleViewToLabTH2 ( const unsigned int view,
TString  name,
bool  time = false 
) const

Definition at line 331 of file PixelMap.cxx.

References fLabX, fLabY, fNCell, fNPlane, fPEX, fPEY, fTX, fTY, analysePickle::hist, LocalToIndex(), and confusionMatrixTree::t.

Referenced by NInput(), cvn::CVNEventDump::WriteMapTH2(), and cvn::CVNCosmicEventDump::WriteMapTH2().

334  {
335 
336  TH2F* hist = new TH2F(name, ";Plane;Cell", (fNPlane/2)+(fNPlane%2),
337  0, (fNPlane/2)+(fNPlane%2), fNCell, 0, fNCell);
338 
339  for(unsigned int iPlane = 0; iPlane < ((fNPlane/2)+(fNPlane%2)); ++iPlane){
340  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
341  double t = (view == 0) ? fTX[LocalToIndex(iPlane, iCell)] : fTY[LocalToIndex(iPlane, iCell)];
342  double pe = (view == 0) ? fPEX[LocalToIndex(iPlane, iCell)] : fPEY[LocalToIndex(iPlane, iCell)];
343  double lab = (view == 0) ? fLabX[LocalToIndex(iPlane, iCell)] : fLabY[LocalToIndex(iPlane, iCell)];
344 
345  // Draw label 0 as non-empty bin
346  if(pe > 0 && lab < 1) lab = 0.1;
347 
348  double value = ( time ) ? t : lab;
349 
350  // Add 1 to in each bin to skip underflow
351  hist->SetBinContent(iPlane+1, iCell+1, value);
352 
353  }
354  }
355  return hist;
356  }
const XML_Char * name
Definition: expat.h:151
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
::xsd::cxx::tree::time< char, simple_type > time
Definition: Database.h:194
std::vector< HitType > fLabY
Vector of Y Truth labels for pixels.
Definition: PixelMap.h:135
const XML_Char int const XML_Char * value
Definition: expat.h:331
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
std::vector< float > fTX
Vector of X Time of hits.
Definition: PixelMap.h:137
unsigned int LocalToIndex(const unsigned int &plane, const unsigned int &cell) const
Take local plane, cell (within map) and return index in fPE vector.
Definition: PixelMap.cxx:137
std::vector< float > fTY
Vector of Y Time of hits.
Definition: PixelMap.h:138
std::vector< HitType > fLabX
Vector of X Truth labels for pixels.
Definition: PixelMap.h:134
TH2F * cvn::PixelMap::SingleViewToObjTH2 ( const unsigned int view,
TString  name,
bool  nuID = false 
) const

Definition at line 359 of file PixelMap.cxx.

References fNCell, fNPlane, fNuX, fNuY, fObjX, fObjY, fPEX, fPEY, analysePickle::hist, and LocalToIndex().

Referenced by NInput(), cvn::CVNEventDump::WriteMapTH2(), and cvn::CVNCosmicEventDump::WriteMapTH2().

362  {
363 
364  TH2F* hist = new TH2F(name, ";Plane;Cell", (fNPlane/2)+(fNPlane%2),
365  0, (fNPlane/2)+(fNPlane%2), fNCell, 0, fNCell);
366 
367  for(unsigned int iPlane = 0; iPlane < ((fNPlane/2)+(fNPlane%2)); ++iPlane){
368  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
369  double pe = (view == 0) ? fPEX[LocalToIndex(iPlane, iCell)] : fPEY[LocalToIndex(iPlane, iCell)];
370  double nu = (view == 0) ? fNuX[LocalToIndex(iPlane, iCell)] : fNuY[LocalToIndex(iPlane, iCell)];
371  double obj = (view == 0) ? fObjX[LocalToIndex(iPlane, iCell)] : fObjY[LocalToIndex(iPlane, iCell)];
372 
373  // Draw label 0 as non-empty bin
374  if ( pe > 0 && nu == 0 ) nu = 0.1;
375 
376  double value = ( nuID ) ? nu : obj;
377 
378  // Add 1 to in each bin to skip underflow
379  hist->SetBinContent(iPlane+1, iCell+1, value);
380 
381  }
382  }
383  return hist;
384  }
const XML_Char * name
Definition: expat.h:151
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::vector< int > fObjX
Vector of X Particle Idx of hits.
Definition: PixelMap.h:140
std::vector< int > fObjY
Vector of Y Particle Idx of hits.
Definition: PixelMap.h:141
const XML_Char int const XML_Char * value
Definition: expat.h:331
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned int LocalToIndex(const unsigned int &plane, const unsigned int &cell) const
Take local plane, cell (within map) and return index in fPE vector.
Definition: PixelMap.cxx:137
std::vector< int > fNuX
Vector of X Nu Index of hits.
Definition: PixelMap.h:143
std::vector< int > fNuY
Vector of Y Nu Index of hits.
Definition: PixelMap.h:144
TH2F * cvn::PixelMap::SingleViewToTH2 ( const unsigned int view,
TString  name 
) const

Definition at line 312 of file PixelMap.cxx.

References fNCell, fNPlane, fPEX, fPEY, analysePickle::hist, and LocalToIndex().

Referenced by NInput(), cvn::CVNEventDump::WriteMapTH2(), cvn::CVNCosmicEventDump::WriteMapTH2(), and cvn::CVNEventProngDump::WriteMapTH2().

313  {
314 
315  TH2F* hist = new TH2F(name, ";Plane;Cell", (fNPlane/2)+(fNPlane%2),
316  0, (fNPlane/2)+(fNPlane%2), fNCell, 0, fNCell);
317 
318  for(unsigned int iPlane = 0; iPlane < ((fNPlane/2)+(fNPlane%2)); ++iPlane){
319  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
320 
321  double pe = (view == 0) ? fPEX[LocalToIndex(iPlane, iCell)] : fPEY[LocalToIndex(iPlane, iCell)];
322 
323  // Add 1 to in each bin to skip underflow
324  hist->SetBinContent(iPlane+1, iCell+1, pe);
325  }
326  }
327  return hist;
328  }
const XML_Char * name
Definition: expat.h:151
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned int LocalToIndex(const unsigned int &plane, const unsigned int &cell) const
Take local plane, cell (within map) and return index in fPE vector.
Definition: PixelMap.cxx:137
void cvn::PixelMap::ToFile ( std::ofstream &  ofs,
int  batch,
bool  hits = false 
) const

Return the pixel map as a 2D histogram for visualization.

Definition at line 192 of file PixelMap.cxx.

References ConvertHitsToChar(), ConvertToChar(), allTimeWatchdog::endl, fNCell, fPEX, fPEY, allTimeWatchdog::index, NPlanePerView(), and POTSpillRate::view.

Referenced by NInput().

193  {
194  const std::vector<float> *pPEXY;
195 
196  if (hits) {
197  for (unsigned int view = 0; view < 2; view++) {
198  if (view == 0) pPEXY = (&fPEX);
199  else pPEXY = (&fPEY);
200  unsigned int index = 0;
201  char cells[fNCell];
202 
203  for(unsigned int iPlane = 0; iPlane < NPlanePerView(); ++iPlane){
204  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
205  cells[iCell] = ConvertHitsToChar( (*pPEXY)[index] );
206  ++index; //unsigned int index = plane * fNCell + cell % fNCell;
207  }
208  ofs << batch << " " << view << " " << iPlane << ":";
209  ofs.write(cells, fNCell);
210  ofs << std::endl;
211  }
212  }
213  }
214  else {
215  bool useGeV = true;
216  for (unsigned int view = 0; view < 2; view++) {
217  if (view == 0) pPEXY = (&fPEX);
218  else pPEXY = (&fPEY);
219  unsigned int index = 0;
220  char cells[fNCell];
221 
222  for(unsigned int iPlane = 0; iPlane < NPlanePerView(); ++iPlane){
223  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
224  cells[iCell] = ConvertToChar( (*pPEXY)[index], useGeV);
225  ++index;
226  }
227  ofs << batch << " " << view << " " << iPlane << ":";
228  ofs.write(cells, fNCell);
229  ofs << std::endl;
230  }
231  }
232  }
233  }
std::vector< float > fPEY
Vector of Y PE measurements for pixels.
Definition: PixelMap.h:129
unsigned char ConvertHitsToChar(float n) const
Definition: PixelMap.cxx:410
void hits()
Definition: readHits.C:15
std::vector< float > fPEX
Vector of X PE measurements for pixels.
Definition: PixelMap.h:128
unsigned int NPlanePerView() const
Length in planes per view.
Definition: PixelMap.h:34
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned char ConvertToChar(float n, bool useGeV) const
Definition: PixelMap.cxx:396
TH2F * cvn::PixelMap::ToLabTH2 ( TString  name) const

Definition at line 258 of file PixelMap.cxx.

References fBound, cvn::Boundary::FirstView(), fLab, check_time_usage::float, fNCell, fNPlane, fPE, analysePickle::hist, and LocalToIndex().

Referenced by NInput(), cvn::CVNEventDump::WriteMapTH2(), and cvn::CVNCosmicEventDump::WriteMapTH2().

259  {
260 
261  // Create a histogram, use twice as many cells to distinguish views
262  TH2F* hist = new TH2F(name, ";Plane;Cell", fNPlane, 0, fNPlane,
263  fNCell*2, 0, fNCell*2);
264 
265  for(unsigned int iPlane = 0; iPlane < fNPlane; ++iPlane){
266  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
267 
268  float pe = fPE[LocalToIndex(iPlane, iCell)];
269  float lab = (float)fLab[LocalToIndex(iPlane, iCell)];
270  // Draw label 0 as non-empty bin
271  if(pe > 0 && lab < 1) lab = 0.1;
272 
273  // Add 1 to in each bin to skip underflow
274  // view 0 is XZ, view 1 is YZ. Preserve EventDisplay convention of having XZ image on top, YZ below
275  hist->SetBinContent(iPlane+1,
276  iCell + fNCell*((iPlane+fBound.FirstView()+1)%2) + 1,
277  lab);
278 
279  }
280  }
281  return hist;
282  }
const XML_Char * name
Definition: expat.h:151
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
unsigned int FirstView() const
Definition: Boundary.h:46
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned int LocalToIndex(const unsigned int &plane, const unsigned int &cell) const
Take local plane, cell (within map) and return index in fPE vector.
Definition: PixelMap.cxx:137
std::vector< HitType > fLab
Vector of Truth labels for pixels.
Definition: PixelMap.h:133
Boundary fBound
Definition: PixelMap.h:153
TH2F * cvn::PixelMap::ToObjTH2 ( TString  name) const

Definition at line 285 of file PixelMap.cxx.

References fBound, cvn::Boundary::FirstView(), fNCell, fNPlane, fObj, analysePickle::hist, and LocalToIndex().

Referenced by NInput(), cvn::CVNEventDump::WriteMapTH2(), and cvn::CVNCosmicEventDump::WriteMapTH2().

286  {
287 
288  // Create a histogram, use twice as many cells to distinguish views
289  TH2F* hist = new TH2F(name, ";Plane;Cell", fNPlane, 0, fNPlane,
290  fNCell*2, 0, fNCell*2);
291 
292  for(unsigned int iPlane = 0; iPlane < fNPlane; ++iPlane){
293  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
294 
295  //float pe = fPE[LocalToIndex(iPlane, iCell)];
296  int obj = fObj[LocalToIndex(iPlane, iCell)];
297  // Draw label 0 as non-empty bin
298  //if(pe > 0 && obj < 1) obj = 0.1;
299 
300  // Add 1 to in each bin to skip underflow
301  // view 0 is XZ, view 1 is YZ. Preserve EventDisplay convention of having XZ image on top, YZ below
302  hist->SetBinContent(iPlane+1,
303  iCell + fNCell*((iPlane+fBound.FirstView()+1)%2) + 1,
304  obj);
305 
306  }
307  }
308  return hist;
309  }
const XML_Char * name
Definition: expat.h:151
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
unsigned int FirstView() const
Definition: Boundary.h:46
std::vector< int > fObj
Vector of Particle Idx of hits.
Definition: PixelMap.h:139
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned int LocalToIndex(const unsigned int &plane, const unsigned int &cell) const
Take local plane, cell (within map) and return index in fPE vector.
Definition: PixelMap.cxx:137
Boundary fBound
Definition: PixelMap.h:153
TH2F * cvn::PixelMap::ToTH2 ( TString  name) const

Definition at line 236 of file PixelMap.cxx.

References fBound, cvn::Boundary::FirstView(), fNCell, fNPlane, fPE, analysePickle::hist, and LocalToIndex().

Referenced by NInput(), cvn::CVNEventDump::WriteMapTH2(), cvn::CVNCosmicEventDump::WriteMapTH2(), and cvn::CVNEventProngDump::WriteMapTH2().

237  {
238 
239  // Create a histogram, use twice as many cells to distinguish views
240  TH2F* hist = new TH2F(name, ";Plane;Cell", fNPlane, 0, fNPlane,
241  fNCell*2, 0, fNCell*2);
242 
243  for(unsigned int iPlane = 0; iPlane < fNPlane; ++iPlane){
244  for(unsigned int iCell = 0; iCell < fNCell; ++iCell){
245  // Add 1 to in each bin to skip underflow
246  // view 0 is XZ, view 1 is YZ. Preserve EventDisplay convention of having XZ image on top, YZ below
247  hist->SetBinContent(iPlane+1,
248  iCell + fNCell*((iPlane+fBound.FirstView()+1)%2) + 1,
249  fPE[LocalToIndex(iPlane, iCell)]);
250  }
251  }
252  return hist;
253  }
const XML_Char * name
Definition: expat.h:151
unsigned int fNPlane
Number of planes, length of pixel map.
Definition: PixelMap.h:117
unsigned int FirstView() const
Definition: Boundary.h:46
std::vector< float > fPE
Vector of PE measurements for pixels.
Definition: PixelMap.h:127
unsigned int fNCell
Number of cells, width of pixel map.
Definition: PixelMap.h:118
unsigned int LocalToIndex(const unsigned int &plane, const unsigned int &cell) const
Take local plane, cell (within map) and return index in fPE vector.
Definition: PixelMap.cxx:137
Boundary fBound
Definition: PixelMap.h:153

Member Data Documentation

Boundary cvn::PixelMap::fBound
float cvn::PixelMap::fFracX

fraction of x view hits contained in map

Definition at line 119 of file PixelMap.h.

Referenced by cvn::PixelMapProducer::CreateMapGivenBoundary(), and caf::FillCVNPixelMaps().

float cvn::PixelMap::fFracY

fraction of y view hits contained in map

Definition at line 120 of file PixelMap.h.

Referenced by cvn::PixelMapProducer::CreateMapGivenBoundary(), and caf::FillCVNPixelMaps().

std::vector<unsigned int> cvn::PixelMap::fHit

Vector of hit IDs.

Definition at line 149 of file PixelMap.h.

Referenced by Add().

std::vector<unsigned int> cvn::PixelMap::fHitX

Vector of X hit IDs.

Definition at line 150 of file PixelMap.h.

Referenced by Add().

std::vector<unsigned int> cvn::PixelMap::fHitY

Vector of Y hit IDs.

Definition at line 151 of file PixelMap.h.

Referenced by Add().

std::vector<HitType> cvn::PixelMap::fLab

Vector of Truth labels for pixels.

Definition at line 133 of file PixelMap.h.

Referenced by Add(), and ToLabTH2().

std::vector<HitType> cvn::PixelMap::fLabX

Vector of X Truth labels for pixels.

Definition at line 134 of file PixelMap.h.

Referenced by Add(), PixelMapToObjVector(), and SingleViewToLabTH2().

std::vector<HitType> cvn::PixelMap::fLabY

Vector of Y Truth labels for pixels.

Definition at line 135 of file PixelMap.h.

Referenced by Add(), PixelMapToObjVector(), and SingleViewToLabTH2().

float cvn::PixelMap::fMaxTime

Maximum time considered in pixel map (in nanoseconds)

Definition at line 122 of file PixelMap.h.

Referenced by MaxTime(), and SetMaxTime().

float cvn::PixelMap::fMinTime

Minimum time considered in pixel map (in nanoseconds)

Definition at line 121 of file PixelMap.h.

Referenced by MinTime(), and SetMinTime().

unsigned int cvn::PixelMap::fNCell
unsigned int cvn::PixelMap::fNPlane
std::vector<int> cvn::PixelMap::fNu

Vector of Nu Index of hits.

Definition at line 142 of file PixelMap.h.

Referenced by Add().

std::vector<int> cvn::PixelMap::fNuX

Vector of X Nu Index of hits.

Definition at line 143 of file PixelMap.h.

Referenced by Add(), and SingleViewToObjTH2().

std::vector<int> cvn::PixelMap::fNuY

Vector of Y Nu Index of hits.

Definition at line 144 of file PixelMap.h.

Referenced by Add(), and SingleViewToObjTH2().

std::vector<int> cvn::PixelMap::fObj

Vector of Particle Idx of hits.

Definition at line 139 of file PixelMap.h.

Referenced by Add(), and ToObjTH2().

std::vector<int> cvn::PixelMap::fObjX

Vector of X Particle Idx of hits.

Definition at line 140 of file PixelMap.h.

Referenced by Add(), PixelMapToObjVector(), and SingleViewToObjTH2().

std::vector<int> cvn::PixelMap::fObjY

Vector of Y Particle Idx of hits.

Definition at line 141 of file PixelMap.h.

Referenced by Add(), PixelMapToObjVector(), and SingleViewToObjTH2().

unsigned int cvn::PixelMap::fOccupiedPixels

Number of non-zero entries in pixel map. Counted when the Add function is called.

Definition at line 123 of file PixelMap.h.

Referenced by Add().

unsigned int cvn::PixelMap::fOccupiedPixelsX

Number of non-zero entries in pixel map. Counted when the Add function is called.

Definition at line 124 of file PixelMap.h.

Referenced by Add(), and cvn::PixelMapProducer::CreateMapGivenBoundary().

unsigned int cvn::PixelMap::fOccupiedPixelsY

Number of non-zero entries in pixel map. Counted when the Add function is called.

Definition at line 125 of file PixelMap.h.

Referenced by Add(), and cvn::PixelMapProducer::CreateMapGivenBoundary().

std::vector<float> cvn::PixelMap::fPE

Vector of PE measurements for pixels.

Definition at line 127 of file PixelMap.h.

Referenced by Add(), FillInputVector(), GlobalToIndex(), LocalToIndex(), NPixel(), Print(), ToLabTH2(), and ToTH2().

bool cvn::PixelMap::fPEOnly

Definition at line 155 of file PixelMap.h.

Referenced by Add(), and PixelMapToObjVector().

std::vector<float> cvn::PixelMap::fPEX
std::vector<float> cvn::PixelMap::fPEY
std::vector<double> cvn::PixelMap::fPur

Vector of purity for pixels.

Definition at line 130 of file PixelMap.h.

Referenced by Add().

std::vector<double> cvn::PixelMap::fPurX

Vector of X purity for pixels.

Definition at line 131 of file PixelMap.h.

Referenced by Add().

std::vector<double> cvn::PixelMap::fPurY

Vector of Y purity for pixels.

Definition at line 132 of file PixelMap.h.

Referenced by Add().

std::vector<float> cvn::PixelMap::fT

Vector of Time of hits.

Definition at line 136 of file PixelMap.h.

Referenced by Add().

std::vector<float> cvn::PixelMap::fTX

Vector of X Time of hits.

Definition at line 137 of file PixelMap.h.

Referenced by Add(), and SingleViewToLabTH2().

std::vector<float> cvn::PixelMap::fTY

Vector of Y Time of hits.

Definition at line 138 of file PixelMap.h.

Referenced by Add(), and SingleViewToLabTH2().

std::vector<unsigned int> cvn::PixelMap::fVie

Vector of hit view.

Definition at line 146 of file PixelMap.h.

Referenced by Add().

std::vector<unsigned int> cvn::PixelMap::fVieX

Vector of X hit view.

Definition at line 147 of file PixelMap.h.

Referenced by Add().

std::vector<unsigned int> cvn::PixelMap::fVieY

Vector of Y hit view.

Definition at line 148 of file PixelMap.h.

Referenced by Add().


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