14 fMaxBaselineSlope = GetDouble(
"MaxBaselineSlope", 0);
15 units = GetString(
"Units",
"Absolute",
false);
16 if(units.compare(
"Absolute")!=0 and units.compare(
"Relative")!=0)Panic(
"Units not supported, can choose between 'Absolute' (mV/sample) or 'Relative' (BaselineRMS/WindowLength)");
19 fMinBaselineSlope = GetDouble(
"MinBaselineSlope", -fMaxBaselineSlope);
20 fBaselineOwner = GetString(
"BaselineOwner",
"BaselineModule",
false);
21 if(fMaxBaselineSlope) {
25 fFullWindowBaselineSlope = GetDouble(
"MaxFullWindowBaselineSlope", 0,
false);
26 fFullWindowBaselineOwner = GetString(
"FullWindowBaselineOwner",
"BaselineModule_FullWindow",
false);
27 if(fFullWindowBaselineSlope) {
28 ev.Require<
QBaselineData>(fFullWindowBaselineOwner,
"BaselineData");
31 fnPeaks = GetInt(
"NumberOfPeaks", -1);
32 fCountPulsesOwner = GetString(
"CountPulsesOwner",
"BCountPulses",
false);
37 fPulseBasicParametersOwner = GetString(
"PulseBasicParametersOwner",
"PulseBasicParameters",
false);
39 fCheckSaturation = GetBool(
"CheckSaturation",
true,
false);
46 if(fCheckSaturation) {
58 if(fMaxBaselineSlope){
60 if(units.compare(
"Absolute")==0){
61 bs1= ev.
Get<
QBaselineData>(fBaselineOwner.c_str(),
"BaselineData").GetBaselineSlope();
62 }
else if(units.compare(
"Relative")==0){
63 bs1= ev.
Get<
QBaselineData>(fBaselineOwner.c_str(),
"BaselineData").GetBaselineSlopeRMSWindow();
65 if(bs1 > fMaxBaselineSlope || bs1 < fMinBaselineSlope)
68 if(fFullWindowBaselineSlope)
71 if(units.compare(
"Absolute")==0){
72 bs2 = ev.
Get<
QBaselineData>(fFullWindowBaselineOwner.c_str(),
"BaselineData").GetBaselineSlope();
73 }
else if(units.compare(
"Relative")==0){
74 bs2= ev.
Get<
QBaselineData>(fFullWindowBaselineOwner.c_str(),
"BaselineData").GetBaselineSlopeRMSWindow();
76 if(bs2 > fFullWindowBaselineSlope || bs2 < (-1*fFullWindowBaselineSlope))
#define REGISTER_MODULE(clazz)
Filter to remove bad pulses.
bool Filter(const Diana::QEvent &ev)
return true if ev passes the cuts
number of pulses and time interval beetwen peaks in the same acquired window
const int & GetNumberOfPulses() const
void Get(const char *owner, ReadHandle< Q > &handle) const
Get a QObject Handle in read mode.
bool fIsSaturatedLow
IsSaturatedLow.
bool fIsSaturatedHigh
IsSaturatedHigh.
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...