PixelMapWireProducer.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file PixelMapWireProducer.h
3 /// \brief PixelMapWireProducer for CVN
4 /// \author Alexander Radovic - a.radovic@gmail.com
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef CVN_PIXELMAPWIREPRODUCER_H
8 #define CVN_PIXELMAPWIREPRODUCER_H
9 
10 
11 #include <array>
12 #include <vector>
13 
14 // Framework includes
16 
21 
25 
26 namespace cvn
27 {
28  /// Producer algorithm for PixelMap, input to CVN neural net
30  {
31  public:
32  PixelMapWireProducer(unsigned int nWire, unsigned int nTdc, double tRes, double threshold = 0.);
34 
35  void SetUnwrapped(unsigned short unwrap){fUnwrapped = unwrap;};
36  void SetProtoDUNE(){fProtoDUNE = true;};
37 
38  /// Get boundaries for pixel map representation of cluster
40  const std::vector< const recob::Wire* >& cluster);
41 
42  unsigned int NROI(){return fTotHits;};
43 
44  /// Function to convert to a global unwrapped wire number
45  void GetDUNEGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int& globalWire, unsigned int& globalPlane) const;
47  unsigned int localWire, double localTDC, unsigned int plane, unsigned int tpc,
48  unsigned int& globalWire, unsigned int& globalPlane, double& globalTDC) const;
49 
51  unsigned int localWire, double localTDC, unsigned int plane, unsigned int tpc,
52  unsigned int& globalWire, unsigned int& globalPlane, double& globalTDC) const;
53  void GetProtoDUNEGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int& globalWire, unsigned int& globalPlane) const;
54  void GetProtoDUNEGlobalWireTDC(unsigned int localWire, double localTDC, unsigned int plane, unsigned int tpc,
55  unsigned int& globalWire, double& globalTDC, unsigned int& globalPlane) const;
56 
57  // preliminary vert drift 3 view studies
58  void GetDUNEVertDrift3ViewGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int& globalWire, unsigned int& globalPlane) const;
59 
60 
61  unsigned int NWire() const {return fNWire;};
62  unsigned int NTdc() const {return fNTdc;};
63  double TRes() const {return fTRes;};
64 
66  const std::vector< art::Ptr< recob::Wire > >& slice);
68  const std::vector< const recob::Wire* >& slice);
69 
71  const std::vector< const recob::Wire* >& cluster,
72  const Boundary& bound);
73 
74  private:
75  unsigned int fNWire; ///< Number of wires, length for pixel maps
76  unsigned int fNTdc; ///< Number of tdcs, width of pixel map
77  double fTRes; ///< Timing resolution for pixel map
78  double fThreshold; ///< charge threshold for each time tick, below which isn't added to pixel map
79  unsigned short fUnwrapped; ///< Use unwrapped pixel maps?
80  bool fProtoDUNE; ///< Do we want to use this for particle extraction from protoDUNE?
81 
82  unsigned int fTotHits; ///<How many ROIs above threshold?
83 
85  std::vector<double> fVDPlane0;
86  std::vector<double> fVDPlane1;
87  // std::vector<int> fPlane0GapWires;
88  // std::vector<int> fPlane1GapWires;
89 
90  double _getIntercept(geo::WireID wireid) const;
91  void _cacheIntercepts();
92  };
93 
94 }
95 
96 #endif // CVN_PixelMapWireProducer_H
Boundary DefineBoundary(detinfo::DetectorPropertiesData const &detProp, const std::vector< const recob::Wire * > &cluster)
Get boundaries for pixel map representation of cluster.
std::vector< double > fVDPlane0
PixelMap CreateMap(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Wire > > &slice)
void GetDUNE10ktGlobalWireTDC(detinfo::DetectorPropertiesData const &detProp, unsigned int localWire, double localTDC, unsigned int plane, unsigned int tpc, unsigned int &globalWire, unsigned int &globalPlane, double &globalTDC) const
unsigned short fUnwrapped
Use unwrapped pixel maps?
struct vector vector
void GetProtoDUNEGlobalWireTDC(unsigned int localWire, double localTDC, unsigned int plane, unsigned int tpc, unsigned int &globalWire, double &globalTDC, unsigned int &globalPlane) const
double fTRes
Timing resolution for pixel map.
Producer algorithm for PixelMap, input to CVN neural net.
double fThreshold
charge threshold for each time tick, below which isn&#39;t added to pixel map
Cluster finding and building.
void GetDUNEVertDrift3ViewGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int &globalWire, unsigned int &globalPlane) const
PixelMap for CVN.
Utility class for truth labels.
std::vector< double > fVDPlane1
void GetProtoDUNEGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int &globalWire, unsigned int &globalPlane) const
unsigned int fNTdc
Number of tdcs, width of pixel map.
double _getIntercept(geo::WireID wireid) const
void GetDUNEGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int &globalWire, unsigned int &globalPlane) const
Function to convert to a global unwrapped wire number.
unsigned int fTotHits
How many ROIs above threshold?
unsigned int fNWire
Number of wires, length for pixel maps.
bool fProtoDUNE
Do we want to use this for particle extraction from protoDUNE?
Description of geometry of one entire detector.
geo::GeometryCore const * fGeometry
unsigned int NTdc() const
void SetUnwrapped(unsigned short unwrap)
PixelMap, basic input to CVN neural net.
Definition: PixelMap.h:22
void GetDUNEGlobalWireTDC(detinfo::DetectorPropertiesData const &detProp, unsigned int localWire, double localTDC, unsigned int plane, unsigned int tpc, unsigned int &globalWire, unsigned int &globalPlane, double &globalTDC) const
unsigned int NWire() const
Sparse pixel map for CVN.
Access the description of detector geometry.
Declaration of basic channel signal object.
PixelMap CreateMapGivenBoundary(detinfo::DetectorPropertiesData const &detProp, const std::vector< const recob::Wire * > &cluster, const Boundary &bound)
Boundary for CVN PixelMap.