19 fProngOnly(prongOnly),
21 fPE(fBound.NBins(0)*fBound.NBins(1)*fBound.NBins(2)),
23 fProngTag(fBound.NBins(0)*fBound.NBins(1)*fBound.NBins(2))
34 int xbin =
x_axis.FindBin(rel_x);
35 int ybin =
y_axis.FindBin(rel_y);
36 int zbin =
z_axis.FindBin(rel_z);
56 std::cout<<
"Do Prong Only selection ......"<<
std::endl;
57 for (
unsigned int i_p= 0; i_p<
fPE.size(); ++i_p) {
64 std::cout<<
"Crop pixel size to 32x32x32 ......"<<
std::endl;
65 int cropped_xbin_low = 50 - 16;
66 int cropped_ybin_low = 50 - 16;
67 int cropped_zbin_low = 0;
68 for (
int i_x= 0; i_x< 32; ++i_x) {
69 for (
int i_y= 0; i_y< 32; ++i_y) {
70 for (
int i_z= 0; i_z< 32; ++i_z) {
71 int cropped_index = i_x*32*32 + i_y*32 + i_z%32;
72 int ii_x = i_x + cropped_xbin_low;
73 int ii_y = i_y + cropped_ybin_low;
74 int ii_z = i_z + cropped_zbin_low;
84 const unsigned int& bin_y,
const unsigned int& bin_z)
const 87 assert(index <
fPE.size());
108 TH3F*
hist =
new TH3F(
"RegCroppedPixelMap3D",
"X:Y:Z", 32, 0, 32*
x_axis.GetBinWidth(0),
109 32, 0, 32*
y_axis.GetBinWidth(0),
110 32, 0, 32*
z_axis.GetBinWidth(0));
111 for (
int ix= 0; ix< 32; ++ix) {
112 for (
int iy= 0; iy< 32; ++iy) {
113 for (
int iz= 0; iz< 32; ++iz) {
114 int cropped_index = ix*32*32 + iy*32 + iz%32;
115 hist->SetBinContent(ix+1, iy+1, iz+1,
fPECropped[cropped_index]);
124 os <<
"RegPixelMap3D...... ";
TH3F * ToCroppedTH3() const
std::vector< int > fProngTag
float StopPos(const unsigned int &axis) const
bool IsWithin(const float &rel_x, const float &rel_y, const float &rel_z)
float StartPos(const unsigned int &axis) const
unsigned int LocalToIndex(const unsigned int &bin_x, const unsigned int &bin_y, const unsigned int &bin_z) const
int NBins(const unsigned int &axis) const
RegPixelMap3D for RegCNN modified from PixelMap.h.
Defines an enumeration for cellhit classification.
void AddHit(float rel_x, float rel_y, float rel_z, float charge, int hit_prong_tag)
std::ostream & operator<<(std::ostream &os, const RegPixelMap3DProducer &p)
RegPixelMap3D, input to 3D CNN neural net.
std::vector< float > fPECropped
QTextStream & endl(QTextStream &s)