PixelMapSimProducer.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file PixelMapSimProducer.h
3 /// \brief PixelMapSimProducer for CVN
4 /// \author Alexander Radovic - a.radovic@gmail.com
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef CVN_PIXELMAPSIMPRODUCER_H
8 #define CVN_PIXELMAPSIMPRODUCER_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  PixelMapSimProducer(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 sim::SimChannel* >& 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 
68  const std::vector< const sim::SimChannel* >& slice);
69 
71  const std::vector< const sim::SimChannel* >& 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_PixelMapSimProducer_H
unsigned int fTotHits
How many ROIs above threshold?
unsigned int NTdc() const
std::vector< double > fVDPlane0
double fThreshold
charge threshold for each time tick, below which isn&#39;t added to pixel map
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
struct vector vector
PixelMap CreateMapGivenBoundary(detinfo::DetectorPropertiesData const &detProp, const std::vector< const sim::SimChannel * > &cluster, const Boundary &bound)
Cluster finding and building.
PixelMap for CVN.
Utility class for truth labels.
void SetUnwrapped(unsigned short unwrap)
void GetDUNEVertDrift3ViewGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int &globalWire, unsigned int &globalPlane) const
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
double fTRes
Timing resolution for pixel map.
Description of geometry of one entire detector.
PixelMap CreateMap(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< sim::SimChannel > > &slice)
double _getIntercept(geo::WireID wireid) const
unsigned int fNWire
Number of wires, length for pixel maps.
Boundary DefineBoundary(detinfo::DetectorPropertiesData const &detProp, const std::vector< const sim::SimChannel * > &cluster)
Get boundaries for pixel map representation of cluster.
PixelMap, basic input to CVN neural net.
Definition: PixelMap.h:22
Producer algorithm for PixelMap, input to CVN neural net.
bool fProtoDUNE
Do we want to use this for particle extraction from protoDUNE?
unsigned int fNTdc
Number of tdcs, width of pixel map.
unsigned short fUnwrapped
Use unwrapped pixel maps?
Sparse pixel map for CVN.
Access the description of detector geometry.
void GetProtoDUNEGlobalWire(unsigned int localWire, unsigned int plane, unsigned int tpc, unsigned int &globalWire, unsigned int &globalPlane) const
void GetProtoDUNEGlobalWireTDC(unsigned int localWire, double localTDC, unsigned int plane, unsigned int tpc, unsigned int &globalWire, double &globalTDC, unsigned int &globalPlane) 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.
geo::GeometryCore const * fGeometry
Boundary for CVN PixelMap.
std::vector< double > fVDPlane1