Dune35tNoiseRemovalService.h
Go to the documentation of this file.
1 // Dune35tNoiseRemovalService.h
2 //
3 // David Adams
4 // June 2016
5 //
6 // Implementation of service that remove coherent noise from data
7 // produced with the DUNE 35-ton detector.
8 //
9 // This implementation is specific to the 35-ton detector because it uses
10 // the LBNE channel map service. This could be "fixed" by generalizing
11 // the channel map interface.
12 //
13 // The code is copied from dunetpc/dune/daqinput35t/FilterWF_module.cc but the
14 // following chnages are made.
15 // 1. Corrections are applied to floating signals after pedestal subtraction.
16 // There might be change doe to int-to-float conversion.
17 // 2. The old code did not correct samples with stuck codes. Here it is an option.
18 // 3. The old code excluded samples with count < 10 or pedestal < 10 from the
19 // correction. Such samples are retained here.
20 //
21 // Configuration:
22 // LogLevel - message logging level: 0=none, 1=initialization, 2+=every event
23 // GroupingFlag - 0=By regulator (128 chan), 1=By ASIC (32 channels)
24 // SkipStuckCodes - Samples with stuck bits are not used to evaluate the correction.
25 // SkipSignals - Samples with signals are not used to evaluate the correction.
26 // CorrectStuckCodes - Samples with stuck bits are corrected iff this is true.
27 // ShowGroups - Display channel groups: 0=no display, 1=orient then group, 2=group then orient
28 // ShowGroupsChannel - Channel type for ShowGroups: 0=none, 1=online, 2=offline,
29 // 3=offline name (u, v, z1, z2)
30 // 4=alternative offline name (u, v, z, Z)
31 //
32 
33 #ifndef Dune35tNoiseRemovalService_H
34 #define Dune35tNoiseRemovalService_H
35 
38 
39 namespace geo {
40  class Geometry;
41 }
42 
43 namespace lbne {
44  class ChannelMapService;
45 }
46 
48 
49 public:
50 
52 
53  int update(AdcChannelDataMap& datamap) const;
54 
55  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
56 
57 private:
58 
59  // Configuration parameters.
67 
68  // Services.
70  const lbne::ChannelMapService* m_pChannelMap;
71 
72  // List of channels for each orientation and group.
73  std::vector<std::vector<AdcChannelVector>> m_GroupChannels;
74 
75  // Map of online channels to ROP channel names.
76  std::map<unsigned int, std::string> m_sRopChannelMap;
77 
78  // Number of warnings issued.
79  mutable unsigned int m_nwarn;
80 
81 };
82 
84 
85 #endif
std::string string
Definition: nybbler.cc:12
const lbne::ChannelMapService * m_pChannelMap
The geometry of one entire detector, as served by art.
Definition: Geometry.h:111
std::vector< std::vector< AdcChannelVector > > m_GroupChannels
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
Namespace collecting geometry-related classes utilities.
#define DECLARE_ART_SERVICE_INTERFACE_IMPL(svc, iface, scope)
std::map< unsigned int, std::string > m_sRopChannelMap