RegPixelMap3D.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file RegPixelMap3D.h
3 /// \brief RegPixelMap3D for RegCNN modified from PixelMap.h
4 /// \author Wenjie Wu - wenjieww@uci.edu
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef REGCNN_REGPIXELMAP3D_H
8 #define REGCNN_REGPIXELMAP3D_H
9 
10 #include <ostream>
11 #include <vector>
12 
15 #include "TH3F.h"
16 #include "TAxis.h"
17 
18 namespace cnn
19 {
20 
21  /// RegPixelMap3D, input to 3D CNN neural net
23  {
24  public:
25  RegPixelMap3D(const RegCNNBoundary3D& bound, const bool& Cropped, const bool& prongOnly);
27 
28  void AddHit(float rel_x, float rel_y, float rel_z, float charge, int hit_prong_tag);
29  bool IsCroppedPM() const {return fCropped;};
30  std::vector<float> GetPM() const {return fPE;};
31  std::vector<float> GetCroppedPM() const {return fPECropped;};
32 
33  // Add Finish method in order to determine whether to produce prong only/cropped
34  // pixel maps or the full event/uncropped pixel maps
35  void Finish();
36 
37  unsigned int LocalToIndex(const unsigned int& bin_x,
38  const unsigned int& bin_y,
39  const unsigned int& bin_z)
40  const;
41  TH3F* ToTH3() const;
42  TH3F* ToCroppedTH3() const;
43 
45  bool fCropped;
46  bool fProngOnly; //< whether to use prong only pixel map
47  unsigned int fInPM;
48  std::vector<float> fPE; //< charges of all pixels
49  std::vector<float> fPECropped;
50  std::vector<int> fProngTag;
51 
52  private:
53  TAxis x_axis;
54  TAxis y_axis;
55  TAxis z_axis;
56 
57  }; // class RegPixelMap3D
58 
59  std::ostream& operator<<(std::ostream& os, const RegPixelMap3D& m);
60 
61 } // namespace cnn
62 
63 #endif // REGCNN_PIXELMAP3D_H
TH3F * ToCroppedTH3() const
std::vector< int > fProngTag
Definition: RegPixelMap3D.h:50
TH3F * ToTH3() const
std::vector< float > GetCroppedPM() const
Definition: RegPixelMap3D.h:31
unsigned int LocalToIndex(const unsigned int &bin_x, const unsigned int &bin_y, const unsigned int &bin_z) const
std::vector< float > fPE
Definition: RegPixelMap3D.h:48
RegCNNBoundary3D for 3D RegCNN PixelMap modified from CVNBoundary.h.
Defines an enumeration for cellhit classification.
RegCNNBoundary3D fBound
Definition: RegPixelMap3D.h:44
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)
unsigned int fInPM
Definition: RegPixelMap3D.h:47
RegPixelMap3D, input to 3D CNN neural net.
Definition: RegPixelMap3D.h:22
std::vector< float > GetPM() const
Definition: RegPixelMap3D.h:30
std::vector< float > fPECropped
Definition: RegPixelMap3D.h:49
bool IsCroppedPM() const
Definition: RegPixelMap3D.h:29