Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
TraceFilterer.hpp
Go to the documentation of this file.
1 
10 #ifndef __TRACEFILTERER_HPP_
11 #define __TRACEFILTERER_HPP_
12 
13 #include <string>
14 
15 #include "Trace.hpp"
16 #include "TraceAnalyzer.hpp"
17 
19 class TraceFilterer : public TraceAnalyzer {
20 public:
21  TraceFilterer(){};
22 
34  short fast_rise, short fast_gap, short fast_threshold,
35  short energy_rise, short energy_gap,
36  short slow_rise, short slow_gap, short slow_threshold);
37 
39  virtual ~TraceFilterer(){};
40 
44  virtual bool Init(const std::string &filterFileName = "Config.xml");
45 
47  virtual void DeclarePlots(void);
48 
53  virtual void Analyze(Trace &trace,
54  const std::string &type, const std::string &subtype);
55 protected:
56  static const int energyBins;
58 
60  Trace::value_type fastThreshold;
63  Trace::value_type slowThreshold;
64 
68 
70 
72  struct PulseInfo {
73  Trace::size_type time;
74  double energy;
75  bool isFound;
76 
78  PulseInfo(void){isFound = false;};
82  PulseInfo(Trace::size_type theTime, double theEnergy){isFound = true;};
83  };
84 
86 
91  virtual const PulseInfo& FindPulse(Trace::iterator begin,
92  Trace::iterator end);
93 };
94 #endif // __TRACEFILTERER_HPP_
virtual void DeclarePlots(void)
Parameters for your typical trapezoidal filter.
Definition: Trace.hpp:225
Trace::size_type time
the time of the pulse
Definition: TraceFilterer.hpp:73
Trace thirdFilter
second slow filter of trace
Definition: TraceFilterer.hpp:67
TrapezoidalFilterParameters fastParms
Fast (Trigger) filter parameters.
Definition: TraceFilterer.hpp:59
virtual void Analyze(Trace &trace, const std::string &type, const std::string &subtype)
Header file for the TraceAnalyzer class.
bool useThirdFilter
True if we want to use the third filter.
Definition: TraceFilterer.hpp:69
PulseInfo(Trace::size_type theTime, double theEnergy)
Definition: TraceFilterer.hpp:82
Structure to hold information about the pulse.
Definition: TraceFilterer.hpp:72
Trace fastFilter
fast filter of trace
Definition: TraceFilterer.hpp:65
virtual const PulseInfo & FindPulse(Trace::iterator begin, Trace::iterator end)
Trace::value_type fastThreshold
Threshold for fast filter.
Definition: TraceFilterer.hpp:60
virtual ~TraceFilterer()
Definition: TraceFilterer.hpp:39
Online trace analysis.
Definition: TraceAnalyzer.hpp:19
Trace energyFilter
slow filter of trace
Definition: TraceFilterer.hpp:66
Store the information for a trace.
Definition: Trace.hpp:34
A simple class to store the traces.
TrapezoidalFilterParameters thirdParms
Parameters for second fast filter.
Definition: TraceFilterer.hpp:62
double energyScaleFactor_
energy scaling factor
Definition: TraceFilterer.hpp:57
PulseInfo(void)
Definition: TraceFilterer.hpp:78
A class to perform trapezoidal filters on the traces.
Definition: TraceFilterer.hpp:19
virtual bool Init(void)
Definition: TraceAnalyzer.hpp:39
static const int energyBins
Number of energy bins.
Definition: TraceFilterer.hpp:56
Trace::value_type slowThreshold
Threshold for fast filter.
Definition: TraceFilterer.hpp:63
TrapezoidalFilterParameters energyParms
Slow (Energy) filter parameters.
Definition: TraceFilterer.hpp:61
bool isFound
true if a pulse is found
Definition: TraceFilterer.hpp:75
PulseInfo pulse
Instance of the PulseInfo class.
Definition: TraceFilterer.hpp:85
double energy
energy of the pulse
Definition: TraceFilterer.hpp:74