LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
PixelMap, basic input to CVN neural net. More...
#include "PixelMap.h"
Public Member Functions | |
PixelMap (unsigned int nWire, unsigned int nTdc, const Boundary &bound) | |
PixelMap () | |
unsigned int | NWire () const |
Length in wires. More... | |
unsigned int | NTdc () const |
Width in tdcs. More... | |
unsigned int | NPixel () const |
Total number of pixels in map. More... | |
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 &wire, const double &tdc, const unsigned int &view, const double &pe) |
unsigned int | GlobalToIndex (const unsigned int &wire, const double &tdc, const unsigned int &view) |
Take global wire, tdc (detector) and return index in fPE vector. More... | |
unsigned int | LocalToIndex (const unsigned int &wire, const unsigned int &tdc) const |
Take local wire, tdc (within map) and return index in fPE vector. More... | |
unsigned int | GlobalToIndexSingle (const unsigned int &wire, const double &tdc, const unsigned int &view) |
Take global wire, tdc (detector) and return index in fPE vector. More... | |
void | SetTotHits (unsigned int tothits) |
unsigned int | GetTotHits () |
void | Print () const |
TH2F * | ToTH2 () const |
Return the pixel map as a 2D histogram for visualization. More... | |
TH2F * | ToLabTH2 () const |
TH2F * | SingleViewToTH2 (const unsigned int &view) const |
Public Attributes | |
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< float > | fPEZ |
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< double > | fPurZ |
Vector of Y purity for pixels. More... | |
std::vector< HitType > | fLab |
Vector of Truth labels for pixels. More... | |
std::vector< HitType > | fLabX |
Vector of X Truth labels for pixels. More... | |
std::vector< HitType > | fLabY |
Vector of Y Truth labels for pixels. More... | |
std::vector< HitType > | fLabZ |
Vector of Y Truth labels for pixels. More... | |
Private Attributes | |
unsigned int | fNWire |
Number of wires, length of pixel map. More... | |
unsigned int | fNTdc |
Number of tdcs, width of pixel map. More... | |
unsigned int | fTotHits |
Number of hits that make up the pixel map. More... | |
Boundary | fBound |
PixelMap, basic input to CVN neural net.
Definition at line 20 of file PixelMap.h.
lcvn::PixelMap::PixelMap | ( | unsigned int | nWire, |
unsigned int | nTdc, | ||
const Boundary & | bound | ||
) |
Definition at line 14 of file PixelMap.cxx.
References fTotHits.
|
inline |
Definition at line 23 of file PixelMap.h.
References fTotHits.
void lcvn::PixelMap::Add | ( | const unsigned int & | wire, |
const double & | tdc, | ||
const unsigned int & | view, | ||
const double & | pe | ||
) |
Add a hit to the map if it is contained within the wire, tdc rcvne Could be expanded later to add to overflow accordingly.
Definition at line 44 of file PixelMap.cxx.
References fBound, fLab, fLabX, fLabY, fLabZ, fPE, fPEX, fPEY, fPEZ, fPur, fPurX, fPurY, fPurZ, GlobalToIndex(), GlobalToIndexSingle(), lcvn::Boundary::IsWithin(), and lcvn::kEmptyHit.
Referenced by lcvn::PixelMapProducer< T, U >::CreateMapGivenBoundary(), and NInput().
|
inline |
void lcvn::PixelMap::FillInputVector | ( | float * | input | ) | const |
Definition at line 34 of file PixelMap.cxx.
References fPE.
Referenced by NInput().
|
inline |
Definition at line 63 of file PixelMap.h.
References fTotHits, Print(), SingleViewToTH2(), ToLabTH2(), and ToTH2().
Referenced by lcvn::LArNuCVNZlibMaker::write_files().
unsigned int lcvn::PixelMap::GlobalToIndex | ( | const unsigned int & | wire, |
const double & | tdc, | ||
const unsigned int & | view | ||
) |
Take global wire, tdc (detector) and return index in fPE vector.
Definition at line 73 of file PixelMap.cxx.
References fBound, lcvn::Boundary::FirstTDC(), lcvn::Boundary::FirstWire(), fNTdc, fPE, and lcvn::Boundary::LastTDC().
Referenced by Add(), and NInput().
unsigned int lcvn::PixelMap::GlobalToIndexSingle | ( | const unsigned int & | wire, |
const double & | tdc, | ||
const unsigned int & | view | ||
) |
Take global wire, tdc (detector) and return index in fPE vector.
Definition at line 102 of file PixelMap.cxx.
References fBound, lcvn::Boundary::FirstTDC(), lcvn::Boundary::FirstWire(), fNTdc, fPEX, and lcvn::Boundary::LastTDC().
Referenced by Add(), and NInput().
unsigned int lcvn::PixelMap::LocalToIndex | ( | const unsigned int & | wire, |
const unsigned int & | tdc | ||
) | const |
Take local wire, tdc (within map) and return index in fPE vector.
Definition at line 94 of file PixelMap.cxx.
Referenced by NInput(), Print(), SingleViewToTH2(), ToLabTH2(), and ToTH2().
|
inline |
Number of inputs for the neural net.
Definition at line 38 of file PixelMap.h.
References Add(), FillInputVector(), GlobalToIndex(), GlobalToIndexSingle(), LocalToIndex(), and NPixel().
|
inline |
Total number of pixels in map.
Definition at line 32 of file PixelMap.h.
References fPE.
Referenced by NInput(), and lcvn::operator<<().
|
inline |
Width in tdcs.
Definition at line 29 of file PixelMap.h.
References fNTdc.
Referenced by lcvn::CVNImageUtils::ConvertPixelMapToImageVector(), lcvn::CVNImageUtils::ConvertPixelMapToImageVectorF(), lcvn::CVNImageUtils::ConvertPixelMapToPixelArray(), lcvn::operator<<(), and lcvn::LArNuCVNZlibMaker::write_files().
|
inline |
Length in wires.
Definition at line 26 of file PixelMap.h.
References fNWire.
Referenced by lcvn::CVNImageUtils::ConvertPixelMapToImageVector(), lcvn::CVNImageUtils::ConvertPixelMapToImageVectorF(), lcvn::CVNImageUtils::ConvertPixelMapToPixelArray(), lcvn::operator<<(), and lcvn::LArNuCVNZlibMaker::write_files().
void lcvn::PixelMap::Print | ( | ) | const |
Draw pixel map to the screen. This is pretty hokey and the aspect ratio is totally unrealistic.
Definition at line 124 of file PixelMap.cxx.
References fNTdc, fNWire, fPE, and LocalToIndex().
Referenced by GetTotHits().
|
inline |
Definition at line 62 of file PixelMap.h.
References fTotHits.
Referenced by lcvn::PixelMapProducer< T, U >::CreateMapGivenBoundary(), and lcvn::ICVNMapper< T, U >::produce().
TH2F * lcvn::PixelMap::SingleViewToTH2 | ( | const unsigned int & | view | ) | const |
Definition at line 183 of file PixelMap.cxx.
References fNTdc, fNWire, fPEX, fPEY, fPEZ, hist, and LocalToIndex().
Referenced by GetTotHits().
TH2F * lcvn::PixelMap::ToLabTH2 | ( | ) | const |
Definition at line 167 of file PixelMap.cxx.
References fLab, fNTdc, fNWire, hist, and LocalToIndex().
Referenced by GetTotHits().
TH2F * lcvn::PixelMap::ToTH2 | ( | ) | const |
Return the pixel map as a 2D histogram for visualization.
Definition at line 151 of file PixelMap.cxx.
References fNTdc, fNWire, fPE, hist, and LocalToIndex().
Referenced by GetTotHits().
|
private |
Definition at line 91 of file PixelMap.h.
Referenced by Add(), Bound(), GlobalToIndex(), and GlobalToIndexSingle().
std::vector<HitType> lcvn::PixelMap::fLab |
Vector of Truth labels for pixels.
Definition at line 81 of file PixelMap.h.
Referenced by Add(), and ToLabTH2().
std::vector<HitType> lcvn::PixelMap::fLabX |
std::vector<HitType> lcvn::PixelMap::fLabY |
std::vector<HitType> lcvn::PixelMap::fLabZ |
|
private |
Number of tdcs, width of pixel map.
Definition at line 88 of file PixelMap.h.
Referenced by GlobalToIndex(), GlobalToIndexSingle(), LocalToIndex(), NTdc(), Print(), SingleViewToTH2(), ToLabTH2(), and ToTH2().
|
private |
Number of wires, length of pixel map.
Definition at line 87 of file PixelMap.h.
Referenced by NWire(), Print(), SingleViewToTH2(), ToLabTH2(), and ToTH2().
std::vector<float> lcvn::PixelMap::fPE |
Vector of PE measurements for pixels.
Definition at line 73 of file PixelMap.h.
Referenced by Add(), FillInputVector(), GlobalToIndex(), LocalToIndex(), NPixel(), Print(), and ToTH2().
std::vector<float> lcvn::PixelMap::fPEX |
Vector of X PE measurements for pixels.
Definition at line 74 of file PixelMap.h.
Referenced by Add(), lcvn::CVNImageUtils::ConvertPixelMapToImageVector(), lcvn::CVNImageUtils::ConvertPixelMapToImageVectorF(), lcvn::CVNImageUtils::ConvertPixelMapToPixelArray(), GlobalToIndexSingle(), and SingleViewToTH2().
std::vector<float> lcvn::PixelMap::fPEY |
Vector of Y PE measurements for pixels.
Definition at line 75 of file PixelMap.h.
Referenced by Add(), lcvn::CVNImageUtils::ConvertPixelMapToImageVector(), lcvn::CVNImageUtils::ConvertPixelMapToImageVectorF(), lcvn::CVNImageUtils::ConvertPixelMapToPixelArray(), and SingleViewToTH2().
std::vector<float> lcvn::PixelMap::fPEZ |
Vector of Y PE measurements for pixels.
Definition at line 76 of file PixelMap.h.
Referenced by Add(), lcvn::CVNImageUtils::ConvertPixelMapToImageVector(), lcvn::CVNImageUtils::ConvertPixelMapToImageVectorF(), lcvn::CVNImageUtils::ConvertPixelMapToPixelArray(), and SingleViewToTH2().
std::vector<double> lcvn::PixelMap::fPur |
std::vector<double> lcvn::PixelMap::fPurX |
std::vector<double> lcvn::PixelMap::fPurY |
std::vector<double> lcvn::PixelMap::fPurZ |
|
private |
Number of hits that make up the pixel map.
Definition at line 89 of file PixelMap.h.
Referenced by GetTotHits(), PixelMap(), and SetTotHits().